diff --git a/MekHQ/resources/mekhq/resources/CamOpsReputation.properties b/MekHQ/resources/mekhq/resources/CamOpsReputation.properties
index 68073bf8f4..6684728987 100644
--- a/MekHQ/resources/mekhq/resources/CamOpsReputation.properties
+++ b/MekHQ/resources/mekhq/resources/CamOpsReputation.properties
@@ -1,57 +1,63 @@
-unitReputation.text=Unit Reputation: %d
-
-averageExperienceRating.text=Average Experience Rating: %s
-experienceLevel.text=
Experience Level: %s
-
-commandRating.text=Command Rating: %s
-leadership.text=
Leadership: %s
-tactics.text=
Tactics: %s
-strategy.text=
Strategy: %s
-negotiation.text=
Negotiation: %s
-traits.text=
Traits: %s Not Implemented
-personality.text=
Personality: %s
-
-combatRecordRating.text=Combat Record Rating: %s
+refresh.text=This report refreshes every Monday.
+count.text=Count
+modifier.text=Modifier
+required.text=Required
+available.text=Available
+
+averageExperienceRating.text=Average Experience Rating
+experienceLevel.text=Experience Level
+
+commandRating.text=Command Rating
+leadership.text=Leadership
+tactics.text=Tactics
+strategy.text=Strategy
+negotiation.text=Negotiation
+traits.text=Traits
+traitsNotImplemented.text=Not Implemented
+personality.text=Personality
+
+combatRecordRating.text=Combat Record Rating
successes.text=Successes
partialSuccesses.text=Partial Successes
failures.text=Failures
contractsBreached.text=Contracts Breached
retainerDuration.text=Retainer Duration
-mission.text=
%s: %s (%s)
-
-transportationRating.text=Transportation Rating: %s
-hasJumpShipOrWarShip.text=
Has JumpShip or WarShip: +10
-smallCraft.text=Small Craft
-fighters.text=Fighters
-battleMeks.text=BattleMeks
-vehicleSuperHeavy.text=Vehicles (Super Heavy)
-vehicleHeavy.text=Vehicles (Heavy)
-vehicleLight.text=Vehicles (Light)
-protoMeks.text=ProtoMeks
-battleArmor.text=Battle Armor
-infantry.text=Infantry
-transportString.text=
%s: %d / %d Bays%s %s
-asterisk.text=
* Lighter units will occupy spare bays
-noDropShip.text=No DropShip: -5
-dropShipString.text=
DropShips: %d / %d Docking Collars (%s)
-
-supportRating.text=
Support Rating: %d
-crewRequirements.text=
Partially Crewed Large Craft: -5
-administrationRequirements.text=
Administration Requirements: %d / %d (%d)
-technicianRequirements.text=
Technician Requirements: %s
-battleMeksAndProtoMeks.text=BattleMeks & ProtoMeks
-vehicles.text=Vehicles
-fightersAndSmallCraft.text=Fighters & Small Craft
-technicianString.text= %s: %d / %d
-
-financialRating.text=Financial Rating: %s
-hasLoanOrDebt.text=
Has Loan or Debt: -10
-
-crimeRating.text=
Crime Rating: %s
-piracy.text=
Piracy: %s
-otherCrimes.text=
Other: %s
-dateOfLastCrime.text=
Date of Last Crime: %s
-
-otherModifiers.text=
Other Modifiers: %s
-inactiveYears.text=
Inactivity: %d
-customModifier.text=
Custom Modifier: %s
+
+transportationRating.text=Transportation Rating
+hasJumpShipOrWarShip.text=JumpShip/WarShip Modifier
+hasDropShip.text=DropShip Modifier
+capacityCombatant.text=Combatant Capacity
+capacityNonCombatant.text=Non-Combatant Capacity
+dockingCollars.text=Docking Collars
+smallCraft.text=Small Craft Bays
+fighters.text=Fighter Bays
+battleMeks.text=BattleMek Bays
+vehicleSuperHeavy.text=Vehicle Bays (Super Heavy)
+vehicleHeavy.text=Vehicle Bays (Heavy)
+vehicleLight.text=Vehicle Bays (Light)
+protoMeks.text=ProtoMek Bays
+battleArmor.text=Battle Armor Bays
+infantry.text=Infantry Bays
+passengers.text=Non-Combatant Capacity
+asterisk.text=Lighter units will occupy spare bays
+
+supportRating.text=Support Rating
+crewRequirements.text=Partially Crewed Large Craft Modifier
+administrationModifier.text=Administration Modifier
+TechnicianModifier.text=Technician Modifier
+administrationRequirements.text=Administrators
+battleMeksAndProtoMeks.text=BattleMek & ProtoMek Technicians
+vehicles.text=Vehicle Technicians
+fightersAndSmallCraft.text=Fighters & Small Craft Technicians
+
+financialRating.text=Financial Rating
+hasLoanOrDebt.text=Debt Modifier
+
+crimeRating.text=Crime Rating
+piracy.text=Piracy
+otherCrimes.text=Other
+dateOfLastCrime.text=Date of Last Crime
+
+otherModifiers.text=Other Modifiers
+inactiveYears.text=Inactivity Modifier
+customModifier.text=Custom Modifier
diff --git a/MekHQ/src/mekhq/campaign/rating/CamOpsReputation/ReputationController.java b/MekHQ/src/mekhq/campaign/rating/CamOpsReputation/ReputationController.java
index 40ff6f72b1..0a18cc2ba1 100644
--- a/MekHQ/src/mekhq/campaign/rating/CamOpsReputation/ReputationController.java
+++ b/MekHQ/src/mekhq/campaign/rating/CamOpsReputation/ReputationController.java
@@ -18,6 +18,7 @@
*/
package mekhq.campaign.rating.CamOpsReputation;
+import megamek.client.ui.swing.util.UIUtil;
import megamek.common.annotations.Nullable;
import megamek.common.enums.SkillLevel;
import megamek.logging.MMLogger;
@@ -203,299 +204,298 @@ public int getReputationModifier() {
* @return the report text as a string
*/
public String getReportText(Campaign campaign) {
- StringBuilder description = new StringBuilder();
+ int titleFontSize = UIUtil.scaleForGUI(7);
+ int subtitleFontSize = UIUtil.scaleForGUI(5);
+ String indent = " ";
- description.append("
");
-
- description.append(String.format(resources.getString("unitReputation.text"), reputationRating));
+ StringBuilder description = new StringBuilder("");
+ // HEADER
+ description.append(String.format("
%s: %d
",
+ titleFontSize, campaign.getName(), reputationRating));
+ description.append(String.format("
%s
",
+ resources.getString("refresh.text")));
// AVERAGE EXPERIENCE RATING
- description.append(String.format(resources.getString("averageExperienceRating.text"), averageExperienceRating));
- description.append(String.format(resources.getString("experienceLevel.text"), averageSkillLevel.toString()));
+ description.append(String.format("
%s: %d",
+ subtitleFontSize, resources.getString("averageExperienceRating.text"), averageExperienceRating));
+
+ description.append("
");
+ description.append(String.format("%s%s: | %s |
",
+ indent, resources.getString("experienceLevel.text"), averageSkillLevel.toString()));
+
+ description.append("
");
// COMMAND RATING
- description.append(String.format(resources.getString("commandRating.text"), commanderRating));
- description.append(String.format(resources.getString("leadership.text"), commanderMap.get("leadership")));
- description.append(String.format(resources.getString("tactics.text"), commanderMap.get("tactics")));
- description.append(String.format(resources.getString("strategy.text"), commanderMap.get("strategy")));
- description.append(String.format(resources.getString("negotiation.text"), commanderMap.get("negotiation")));
- description.append(String.format(resources.getString("traits.text"), commanderMap.get("traits")));
+ description.append(String.format("
%s: %d",
+ subtitleFontSize, resources.getString("commandRating.text"), commanderRating));
+
+ description.append("
");
+ description.append(String.format("%s%s: | %d |
",
+ indent, resources.getString("leadership.text"), commanderMap.get("leadership")));
+
+ description.append(String.format("%s%s: | %d |
",
+ indent, resources.getString("tactics.text"), commanderMap.get("tactics")));
+
+ description.append(String.format("%s%s: | %d |
",
+ indent, resources.getString("strategy.text"), commanderMap.get("strategy")));
+
+ description.append(String.format("%s%s: | %d |
",
+ indent, resources.getString("negotiation.text"), commanderMap.get("negotiation")));
+
+ description.append(String.format("%s%s: | %d %s%s |
",
+ indent, resources.getString("traits.text"), commanderMap.get("traits"), indent,
+ resources.getString("traitsNotImplemented.text")));
if (campaign.getCampaignOptions().isUseRandomPersonalities()
- && (campaign.getCampaignOptions().isUseRandomPersonalityReputation())) {
- description.append(String.format(resources.getString("personality.text"), commanderMap.get("personality")))
- .append("
");
- } else {
- description.append("
");
+ && (campaign.getCampaignOptions().isUseRandomPersonalityReputation())) {
+ description.append(String.format("%s%s: | %d |
",
+ indent, resources.getString("personality.text"), commanderMap.get("personality")));
}
+ description.append("
");
+
// COMBAT RECORD RATING
- description.append(String.format(resources.getString("combatRecordRating.text"), combatRecordRating));
+ description.append(String.format("
%s: %d",
+ subtitleFontSize, resources.getString("combatRecordRating.text"), combatRecordRating));
+
+ description.append("
");
+ description.append(String.format(" | %s | %s |
",
+ resources.getString("count.text"), resources.getString("modifier.text")));
+
+ description.append(String.format("%s%s: | " +
+ "%d | +%d |
",
+ indent, resources.getString("successes.text"), combatRecordMap.get("successes"),
+ combatRecordMap.get("successes") * 5));
+
+ description.append(String.format("%s%s: | " +
+ "%d | +%d |
",
+ indent, resources.getString("partialSuccesses.text"), combatRecordMap.get("partialSuccesses"),
+ combatRecordMap.get("partialSuccesses")));
- description.append(getMissionString("successes", resources.getString("successes.text"), 5));
- description.append(getMissionString("partialSuccesses", resources.getString("partialSuccesses.text"), 0));
- description.append(getMissionString("failures", resources.getString("failures.text"), -10));
- description.append(getMissionString("contractsBreached", resources.getString("contractsBreached.text"), -25));
+ description.append(String.format("%s%s: | " +
+ "%d | -%d |
",
+ indent, resources.getString("failures.text"), combatRecordMap.get("failures"),
+ combatRecordMap.get("failures") * 10));
+
+ description.append(String.format("%s%s: | " +
+ "%d | -%d |
",
+ indent, resources.getString("contractsBreached.text"), combatRecordMap.get("contractsBreached"),
+ combatRecordMap.get("contractsBreached") * 25));
if (campaign.getRetainerStartDate() != null) {
- description.append(getMissionString("retainerDuration", resources.getString("retainerDuration.text"), 5))
- .append("
");
- } else {
- description.append("
");
+ description.append(String.format("%s%s: | " +
+ "%d | +%d |
",
+ indent, resources.getString("retainerDuration.text"), combatRecordMap.get("retainerDuration"),
+ combatRecordMap.get("retainerDuration") * 5));
}
- // TRANSPORTATION RATING
- description.append(String.format(resources.getString("transportationRating.text"), transportationRating));
+ description.append("
");
- if (transportationCapacities.get("hasJumpShipOrWarShip") == 1) {
- description.append(resources.getString("hasJumpShipOrWarShip.text"));
- }
+ // TRANSPORTATION RATING
+ description.append(String.format("
%s: %d",
+ subtitleFontSize, resources.getString("transportationRating.text"), transportationRating));
+
+ description.append("
");
+ description.append(String.format("%s%s: | %s |
",
+ indent, resources.getString("hasJumpShipOrWarShip.text"),
+ transportationCapacities.get("hasJumpShipOrWarShip") == 1 ? "+10" : "+0"));
+
+ description.append(String.format("%s%s: | %s |
",
+ indent, resources.getString("hasDropShip.text"),
+ transportationRequirements.get("dropShipCount") > 0 ? "+0" : "-5"));
+
+ description.append(String.format("%s%s: | %s%s |
",
+ indent, resources.getString("capacityCombatant.text"),
+ transportationCapacities.get("capacityRating") >= 0 ? "+" : "",
+ transportationCapacities.get("capacityRating")));
+
+ description.append(String.format("%s%s: | %s%s |
",
+ indent, resources.getString("capacityNonCombatant.text"),
+ transportationValues.get("passenger") >= 0 ? "+" : "",
+ transportationValues.get("passenger")));
+ description.append("
");
+
+ description.append("
");
+ description.append(String.format(" | %s | %s |
",
+ resources.getString("required.text"), resources.getString("available.text")));
+
+ description.append(String.format("%s%s: | " +
+ "%d | %d |
",
+ indent, resources.getString("dockingCollars.text"), transportationRequirements.get("dropShipCount"),
+ transportationCapacities.get("dockingCollars")));
+
+ description.append(String.format("%s%s:* | " +
+ "%d | %d |
",
+ indent, resources.getString("smallCraft.text"), transportationRequirements.get("smallCraftCount"),
+ transportationCapacities.get("smallCraftBays")));
+
+ description.append(String.format("%s%s:* | " +
+ "%d | %d |
",
+ indent, resources.getString("fighters.text"), transportationRequirements.get("asfCount"),
+ transportationCapacities.get("asfBays")));
- description.append(getDropShipString());
- description.append(getTransportString("smallCraftCount", "smallCraftBays", "smallCraft",
- resources.getString("smallCraft.text"), true));
- description
- .append(getTransportString("asfCount", "asfBays", "asf", resources.getString("fighters.text"), false));
// <50.01 compatibility handler
try {
- description.append(getTransportString("mekCount", "mekBays", "mek",
- resources.getString("battleMeks.text"), false));
+ description.append(String.format("%s%s: | " +
+ "%d | %d |
",
+ indent, resources.getString("battleMeks.text"), transportationRequirements.get("mekCount"),
+ transportationCapacities.get("mekBays")));
} catch (Exception e) {
- description.append(getTransportString("mechCount", "mechBays", "mech",
- resources.getString("battleMeks.text"), false));
+ description.append(String.format("%s%s: | " +
+ "%d | %d |
",
+ indent, resources.getString("battleMeks.text"), transportationRequirements.get("mechCount"),
+ transportationCapacities.get("mechBays")));
}
- description.append(getTransportString("superHeavyVehicleCount", "superHeavyVehicleBays", "superHeavyVehicle",
- resources.getString("vehicleSuperHeavy.text"), true));
- description.append(getTransportString("heavyVehicleCount", "heavyVehicleBays", "heavyVehicle",
- resources.getString("vehicleHeavy.text"), true));
- description.append(getTransportString("lightVehicleCount", "lightVehicleBays", "lightVehicle",
- resources.getString("vehicleLight.text"), false));
+ description.append(String.format("%s%s:* | " +
+ "%d | %d |
",
+ indent, resources.getString("vehicleSuperHeavy.text"), transportationRequirements.get("superHeavyVehicleCount"),
+ transportationCapacities.get("superHeavyVehicleBays")));
+
+ description.append(String.format("%s%s:* | " +
+ "%d | %d |
",
+ indent, resources.getString("vehicleHeavy.text"), transportationRequirements.get("heavyVehicleCount"),
+ transportationCapacities.get("heavyVehicleBays")));
+
+ description.append(String.format("%s%s: | " +
+ "%d | %d |
",
+ indent, resources.getString("vehicleLight.text"), transportationRequirements.get("lightVehicleCount"),
+ transportationCapacities.get("lightVehicleBays")));
+
// <50.01 compatibility handler
try {
- description.append(getTransportString("protoMekCount", "protoMekBays",
- "protoMek", resources.getString("protoMeks.text"), false));
+ description.append(String.format("%s%s: | " +
+ "%d | %d |
",
+ indent, resources.getString("protoMeks.text"), transportationRequirements.get("protoMekCount"),
+ transportationCapacities.get("protoMekBays")));
} catch (Exception e) {
- description.append(getTransportString("protoMechCount", "protoMechBays",
- "protoMech", resources.getString("protoMeks.text"), false));
+ description.append(String.format("%s%s: | " +
+ "%d | %d |
",
+ indent, resources.getString("protoMeks.text"), transportationRequirements.get("protoMechCount"),
+ transportationCapacities.get("protoMechBays")));
}
- description.append(getTransportString("battleArmorCount", "battleArmorBays", "battleArmor",
- resources.getString("battleArmor.text"), false));
- description.append(getTransportString("infantryCount", "infantryBays", "infantry",
- resources.getString("infantry.text"), false));
- description.append(resources.getString("asterisk.text"));
+ description.append(String.format("%s%s: | " +
+ "%d | %d |
",
+ indent, resources.getString("battleArmor.text"), transportationRequirements.get("battleArmorCount"),
+ transportationCapacities.get("battleArmorBays")));
- // SUPPORT RATING
- description.append(String.format(resources.getString("supportRating.text"), supportRating));
+ description.append(String.format("%s%s: | " +
+ "%d | %d |
",
+ indent, resources.getString("infantry.text"), transportationRequirements.get("infantryCount"),
+ transportationCapacities.get("infantryBays")));
- if (crewRequirements.get("crewRequirements") < 0) {
- description.append(resources.getString("crewRequirements.text"));
- }
+ description.append(String.format("%s%s: | " +
+ "%d | %d |
",
+ indent, resources.getString("passengers.text"), transportationRequirements.get("passengerCount"),
+ transportationCapacities.get("passengerCapacity")));
- description.append(String.format(resources.getString("administrationRequirements.text"),
- administrationRequirements.get("personnelCount"),
- administrationRequirements.get("administratorCount"),
- administrationRequirements.get("total")));
+ description.append("
");
+ description.append(String.format("
* %s", resources.getString("asterisk.text")));
- description.append(String.format(resources.getString("technicianRequirements.text"),
- technicianRequirements.get("rating").get(0)));
+ // SUPPORT RATING
+ description.append(String.format("
%s: %d",
+ subtitleFontSize, resources.getString("supportRating.text"), supportRating));
+
+ description.append("
");
+ description.append(String.format("%s%s: | %s |
",
+ indent, resources.getString("crewRequirements.text"),
+ crewRequirements.get("crewRequirements") >= 0 ? "+0" : "-5"));
+
+ description.append(String.format("%s%s: | %s%s |
",
+ indent, resources.getString("administrationModifier.text"),
+ administrationRequirements.get("total") >= 0 ? "+" : "",
+ administrationRequirements.get("total")));
+
+ description.append(String.format("%s%s: | %s%s |
",
+ indent, resources.getString("TechnicianModifier.text"),
+ technicianRequirements.get("rating").get(0) >= 0 ? "+" : "",
+ technicianRequirements.get("rating").get(0)));
+ description.append("
");
+
+ description.append("
");
+ description.append(String.format(" | %s | %s |
",
+ resources.getString("required.text"), resources.getString("available.text")));
+
+ description.append(String.format("%s%s: | " +
+ "%d | %d |
",
+ indent, resources.getString("administrationRequirements.text"), administrationRequirements.get("personnelCount"),
+ administrationRequirements.get("administratorCount")));
// <50.01 compatibility handler
try {
- description.append(getTechnicianString("mek"));
+ description.append(String.format("%s%s: | " +
+ "%d | %d |
",
+ indent, resources.getString("battleMeksAndProtoMeks.text"), technicianRequirements.get("mek").get(0),
+ technicianRequirements.get("mek").get(1)));
} catch (Exception e) {
- description.append(getTechnicianString("mech"));
+ description.append(String.format("%s%s: | " +
+ "%d | %d |
",
+ indent, resources.getString("battleMeksAndProtoMeks.text"), technicianRequirements.get("mech").get(0),
+ technicianRequirements.get("mech").get(1)));
}
- description.append(getTechnicianString("vehicle"));
- description.append(getTechnicianString("aero"));
- description.append(getTechnicianString("battleArmor"));
- description.append("
");
+ description.append(String.format("%s%s: | " +
+ "%d | %d |
",
+ indent, resources.getString("vehicles.text"), technicianRequirements.get("vehicle").get(0),
+ technicianRequirements.get("vehicle").get(1)));
+
+ description.append(String.format("%s%s: | " +
+ "%d | %d |
",
+ indent, resources.getString("fightersAndSmallCraft.text"), technicianRequirements.get("aero").get(0),
+ technicianRequirements.get("aero").get(1)));
+
+ description.append(String.format("%s%s: | " +
+ "%d | %d |
",
+ indent, resources.getString("battleArmor.text"), technicianRequirements.get("battleArmor").get(0),
+ technicianRequirements.get("battleArmor").get(1)));
+ description.append("
");
// FINANCIAL RATING
- description.append(String.format(resources.getString("financialRating.text"), financialRating));
+ description.append(String.format("
%s: %d",
+ subtitleFontSize, resources.getString("financialRating.text"), financialRating));
- if ((financialRatingMap.get("hasLoan") + financialRatingMap.get("inDebt")) > 0) {
- description.append(resources.getString("hasLoanOrDebt.text"));
- } else {
- description.append("
");
- }
+ description.append("
");
+ description.append(String.format("%s%s: | %s |
",
+ indent, resources.getString("hasLoanOrDebt.text"),
+ ((financialRatingMap.get("hasLoan") + financialRatingMap.get("inDebt")) > 0) ? "-10" : "0"));
+ description.append("
");
// CRIME RATING
- description.append(String.format(resources.getString("crimeRating.text"), crimeRating));
+ description.append(String.format("
%s: %d",
+ subtitleFontSize, resources.getString("crimeRating.text"), crimeRating));
- if (crimeRating < 0) {
- int piracy = crimeRatingMap.get("piracy");
- if (piracy < 0) {
- description.append(String.format(resources.getString("piracy.text"), piracy));
- }
+ description.append("
");
+ description.append(String.format("%s%s: | %d |
",
+ indent, resources.getString("piracy.text"), crimeRatingMap.get("piracy")));
- int otherCrimes = crimeRatingMap.get("other");
- if (otherCrimes < 0) {
- description.append(String.format(resources.getString("otherCrimes.text"), otherCrimes));
- }
+ description.append(String.format("%s%s: | %d |
",
+ indent, resources.getString("otherCrimes.text"), crimeRatingMap.get("other")));
+ description.append("
");
- description.append(String.format(resources.getString("dateOfLastCrime.text"), dateOfLastCrime));
- } else {
- description.append("
");
+ if (crimeRating < 0) {
+ description.append(String.format("
%s%s: %s
", indent,
+ resources.getString("dateOfLastCrime.text"), dateOfLastCrime == null ? "" : dateOfLastCrime));
}
// OTHER MODIFIERS
- description.append(String.format(resources.getString("otherModifiers.text"), otherModifiers));
+ description.append(String.format("
%s: %d",
+ subtitleFontSize, resources.getString("otherModifiers.text"), otherModifiers));
- int inactiveYears = otherModifiersMap.get("inactiveYears");
+ description.append("
");
+ description.append(String.format("%s%s: | %d | %d |
",
+ indent, resources.getString("inactiveYears.text"), otherModifiersMap.get("inactiveYears"),
+ otherModifiersMap.get("inactiveYears") * -5));
- if (inactiveYears > 0) {
- description.append(String.format(resources.getString("inactiveYears.text"), -inactiveYears * 5));
- }
+ description.append(String.format("%s%s: | %d |
",
+ indent, resources.getString("customModifier.text"), otherModifiersMap.get("customModifier")));
+ description.append("
");
- int customModifier = otherModifiersMap.get("customModifier");
-
- if (customModifier != 0) {
- String modifier = String.format("(%+d)", customModifier);
- description.append(String.format(resources.getString("customModifier.text"), modifier));
- }
-
- description.append("
");
+ description.append("");
return description.toString();
}
- /**
- * Appends the technician requirement information for the given type.
- * If the technician requirement exceeds 0, it generates an HTML formatted
- * string
- * with the technician label and the current count and maximum count of
- * technicians.
- *
- * @param type the type of technician requirement (mek, vehicle, aero,
- * battleArmor)
- * @return the generated technician requirement string in HTML format,
- * or an empty string if either technicianRequirement value is 0.
- */
- private String getTechnicianString(String type) {
- List