mirror of
https://github.com/dcs-retribution/dcs-retribution.git
synced 2025-11-10 15:41:24 +00:00
fix a bug with pretense generation wrt neutral bases
This commit is contained in:
@@ -1622,7 +1622,7 @@ class PretenseLuaGenerator(LuaGenerator):
|
||||
break
|
||||
elif (
|
||||
closest_cps[extra_connection].is_fleet
|
||||
and closest_cps[extra_connection].captured
|
||||
and closest_cps[extra_connection].captured.is_blue
|
||||
and self.game.settings.pretense_controllable_carrier
|
||||
):
|
||||
break
|
||||
@@ -1647,7 +1647,7 @@ class PretenseLuaGenerator(LuaGenerator):
|
||||
if isinstance(cp, OffMapSpawn):
|
||||
continue
|
||||
cp_side_captured = cp_side == 2
|
||||
if cp_side_captured != cp.captured:
|
||||
if cp_side_captured != cp.captured.is_blue:
|
||||
continue
|
||||
cp_name_trimmed = PretenseNameGenerator.pretense_trimmed_cp_name(
|
||||
cp.name
|
||||
|
||||
@@ -111,7 +111,7 @@ class PretenseTriggerGenerator:
|
||||
f"Could not find {airfield.airport.name} in the mission"
|
||||
)
|
||||
cp_airport.set_coalition(
|
||||
airfield.captured and player_coalition or enemy_coalition
|
||||
airfield.captured.is_blue and player_coalition or enemy_coalition
|
||||
)
|
||||
|
||||
def _set_skill(self, player_coalition: str, enemy_coalition: str) -> None:
|
||||
|
||||
Reference in New Issue
Block a user