mirror of
https://github.com/dcs-retribution/dcs-retribution.git
synced 2025-11-10 15:41:24 +00:00
Fix corruptions due to overpopulation
This commit is contained in:
parent
b958e9b095
commit
b8cb1a6273
@ -107,6 +107,12 @@ class Migrator:
|
||||
c = country_dict.get(s.country, s.country)
|
||||
s.country = countries_by_name[c]()
|
||||
|
||||
# code below is used to fix corruptions wrt overpopulation
|
||||
if s.owned_aircraft < 0 or s.location.unclaimed_parking() < 0:
|
||||
s.owned_aircraft = max(
|
||||
0, s.location.unclaimed_parking() + s.owned_aircraft
|
||||
)
|
||||
|
||||
def _update_factions(self) -> None:
|
||||
for c in self.game.coalitions:
|
||||
if isinstance(c.faction.country, str):
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user