Skip to content

Commit

Permalink
Merge pull request #5684 from IllianiCBT/stratCon_returnFromDeployment
Browse files Browse the repository at this point in the history
Added Report for Returning StratCon Forces
  • Loading branch information
Sleet01 authored Jan 9, 2025
2 parents 00cc051 + 47202b5 commit 38ab0a8
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
2 changes: 2 additions & 0 deletions MekHQ/resources/mekhq/resources/AtBStratCon.properties
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,8 @@ btnAddSP.text=Add SP (GM)
btnAddCVP.text=Add CVP (GM)
btnRemoveCVP.text=Remove CVP (GM)

force.undeployed=<b>%s</b> has returned from deployment.

requestingResupply.title=Requesting Resupply
supplyPointExpenditure.text=How many Support Points would you like to spend?
btnConfirm.text=Confirm
Expand Down
6 changes: 6 additions & 0 deletions MekHQ/src/mekhq/campaign/stratcon/StratconRulesManager.java
Original file line number Diff line number Diff line change
Expand Up @@ -2686,6 +2686,9 @@ public static void switchFacilityOwner(StratconFacility facility) {
* return date is on or before the given date.
*/
public static void processTrackForceReturnDates(StratconTrackState track, Campaign campaign) {
final ResourceBundle resources = ResourceBundle.getBundle("mekhq.resources.AtBStratCon",
MekHQ.getMHQOptions().getLocale());

List<Integer> forcesToUndeploy = new ArrayList<>();
LocalDate date = campaign.getLocalDate();

Expand All @@ -2700,6 +2703,9 @@ public static void processTrackForceReturnDates(StratconTrackState track, Campai
&& (force != null) && !track.getBackingScenariosMap().containsKey(force.getScenarioId())
&& !track.getStickyForces().contains(forceID)) {
forcesToUndeploy.add(forceID);

campaign.addReport(String.format(resources.getString("force.undeployed"),
force.getName()));
}
}

Expand Down

0 comments on commit 38ab0a8

Please sign in to comment.