From 07abdc1a34042a07e9fac7f11299e91335538523 Mon Sep 17 00:00:00 2001 From: MetalStormGhost Date: Sat, 29 Oct 2022 15:06:03 +0300 Subject: [PATCH] Remove the stock Viper when the F-16I mod is enabled because that DCS ID is then used by the Sufa. --- game/factions/faction.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/game/factions/faction.py b/game/factions/faction.py index b8d139b4..e6bd84e3 100644 --- a/game/factions/faction.py +++ b/game/factions/faction.py @@ -334,6 +334,8 @@ class Faction: self.remove_aircraft("F_16D_52_NS") else: inject_F16I() + # Remove the stock Viper because that DCS ID is now used by the Sufa + self.remove_aircraft_by_name("F-16CM Fighting Falcon (Block 50)") if not mod_settings.f22_raptor: self.remove_aircraft("F-22A") if not mod_settings.f84g_thunderjet: @@ -418,6 +420,11 @@ class Faction: if i.dcs_unit_type.id == name: self.aircrafts.remove(i) + def remove_aircraft_by_name(self, name: str) -> None: + for i in self.aircrafts: + if i.name == name: + self.aircrafts.remove(i) + def remove_preset(self, name: str) -> None: for pg in self.preset_groups: if pg.name == name: