From 68e0d43a1d61b025a7f6e00a411e0d9bdce87b91 Mon Sep 17 00:00:00 2001 From: Druss99 <42724070+Druss99@users.noreply.github.com> Date: Wed, 5 Nov 2025 17:52:38 -0500 Subject: [PATCH] fix frontline generation (#609) --- changelog.md | 1 + game/missiongenerator/flotgenerator.py | 4 +++- game/procurement.py | 6 +++--- 3 files changed, 7 insertions(+), 4 deletions(-) diff --git a/changelog.md b/changelog.md index 63a2652e..6afbd7c0 100644 --- a/changelog.md +++ b/changelog.md @@ -34,6 +34,7 @@ * **[Engine]** Fixed a bug with state.json loading wrt transfers * **[Engine]** Fixed a bug wrt pretense generation and moose script conflicts * **[Engine]** Fixed a bug where frontline debriefing was not properly calculated +* **[Mission Generation]** Fixed an issue where blue and red units spawned next to each other on frontlines # Retribution v1.4.1 (hotfix) diff --git a/game/missiongenerator/flotgenerator.py b/game/missiongenerator/flotgenerator.py index f95bde7b..0e781057 100644 --- a/game/missiongenerator/flotgenerator.py +++ b/game/missiongenerator/flotgenerator.py @@ -768,7 +768,9 @@ class FlotGenerator: positioned_groups = [] assert self.conflict.heading is not None spawn_heading = ( - self.conflict.heading.left if is_player else self.conflict.heading.right + self.conflict.heading.left + if is_player.is_blue + else self.conflict.heading.right ) country = self.game.coalition_for(is_player).faction.country country = self.mission.country(country.name) diff --git a/game/procurement.py b/game/procurement.py index 47ffcbf1..27c4400c 100644 --- a/game/procurement.py +++ b/game/procurement.py @@ -78,7 +78,7 @@ class ProcurementAi: balance = ( self.game.settings.auto_procurement_balance - if self.is_player + if self.is_player.is_blue else self.game.settings.auto_procurement_balance_red ) air = balance / 100.0 @@ -269,7 +269,7 @@ class ProcurementAi: reserves_factor = ( self.game.settings.frontline_reserves_factor - if self.is_player + if self.is_player.is_blue else self.game.settings.frontline_reserves_factor_red ) fr_factor = reserves_factor / 100.0 @@ -308,7 +308,7 @@ class ProcurementAi: ) target = ( self.game.settings.reserves_procurement_target - if self.is_player + if self.is_player.is_blue else self.game.settings.reserves_procurement_target_red ) if allocated.total >= target: