Skip to content

Commit

Permalink
Add unit type to C/SL/O info log entries
Browse files Browse the repository at this point in the history
  • Loading branch information
SuperStucco authored and SuperStucco committed Dec 5, 2024
1 parent d29e18e commit 4533fd0
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions megamek/src/megamek/client/ratgenerator/RATGenerator.java
Original file line number Diff line number Diff line change
Expand Up @@ -1292,18 +1292,20 @@ private void adjustForRating(FactionRecord fRec,
DecimalFormat pctFormatter = new DecimalFormat("#.##");
if (pctOmni != null &&
Math.abs(pctOmni - (100.0 * totalOmniWeight / totalWeight)) > MIN_OMNI_DIFFERENCE) {
logger.info("Faction {} Omni percentage ({}) differs significantly from" +
logger.info("Faction {} {} Omni percentage ({}) differs significantly from" +
" faction C/SL/O data ({}) in year {}.",
fRec.getKey(),
UnitType.getTypeName(unitType),
pctFormatter.format(100.0 * totalOmniWeight / totalWeight),
pctOmni,
year);
}
if (pctSL != null &&
Math.abs(pctSL - (100.0 * totalSLWeight / totalWeight)) > MIN_SL_DIFFERENCE) {
logger.info("Faction {} Star League/advanced IS percentage ({}) differs" +
logger.info("Faction {} {} Star League/advanced IS percentage ({}) differs" +
" significantly from faction C/SL/O data ({}) in year {}.",
fRec.getKey(),
UnitType.getTypeName(unitType),
pctFormatter.format(100.0 * totalSLWeight / totalWeight),
pctSL,
year);
Expand All @@ -1312,9 +1314,10 @@ private void adjustForRating(FactionRecord fRec,
Math.abs(pctClan -
(100.0 * Math.min(totalWeight, totalClanWeight + clanSalvageWeight) / totalWeight)
) > MIN_CLAN_DIFFERENCE) {
logger.info("Faction {} Clan percentage ({}) differs significantly from" +
logger.info("Faction {} {} Clan percentage ({}) differs significantly from" +
" faction C/SL/O data ({}) in year {}.",
fRec.getKey(),
UnitType.getTypeName(unitType),
pctFormatter.format(100.0 * Math.min(totalWeight, totalClanWeight + clanSalvageWeight) / totalWeight),
pctClan,
year);
Expand Down

0 comments on commit 4533fd0

Please sign in to comment.