Skip to content

Commit

Permalink
Merge pull request #5459 from IllianiCBT/resupply_dispatch
Browse files Browse the repository at this point in the history
Added Notification for Dispatched Convoys During Resupplies
  • Loading branch information
IllianiCBT authored Dec 20, 2024
2 parents 6758e40 + 3d54a52 commit 9c87518
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
1 change: 1 addition & 0 deletions MekHQ/resources/mekhq/resources/Resupply.properties
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ convoyRescuedStratCon.text=Thanks to your timely intervention the supplies were\
convoyDefeatedStratCon.text=Even with your intervention the supplies were %s<b>lost</b>%s.
convoyEscaped.text=Miraculously, the convoy was able to %s<b>escape</b>%s.

convoyDispatched.text=Convoy `%s` has finished loading their cargo and is en route.
convoyInsufficientSize.text=Despite the crews' best efforts, the following items could not be fit in\
\ the transports and have to be left behind:

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -255,6 +255,7 @@ public static void loadPlayerConvoys(Resupply resupply) {
// Ammo and Armor are delivered in batches of 5, so we need to make sure to multiply their
// weight by five when picking these items.
final int WEIGHT_MULTIPLIER = 5;
final Campaign campaign = resupply.getCampaign();
final Map<Force, Double> playerConvoys = resupply.getPlayerConvoys();

// Sort the player's available convoys according to cargo space, largest -> smallest
Expand Down Expand Up @@ -293,6 +294,9 @@ public static void loadPlayerConvoys(Resupply resupply) {
}

convoyContents.removeAll(convoyItems);

campaign.addReport(String.format(resources.getString("convoyDispatched.text"),
convoy.getName()));
processConvoy(resupply, convoyItems, convoy);
}
}
Expand Down

0 comments on commit 9c87518

Please sign in to comment.