mirror of
https://github.com/dcs-retribution/dcs-retribution.git
synced 2025-11-10 15:41:24 +00:00
Move calculation of aircraft amounts into game.
The planner needs to know how much space is still expected to be available next turn.
This commit is contained in:
@@ -376,6 +376,15 @@ class ControlPoint(MissionTarget):
|
||||
return False
|
||||
return True
|
||||
|
||||
@property
|
||||
def expected_aircraft_next_turn(self) -> int:
|
||||
total = self.base.total_aircraft
|
||||
assert self.pending_unit_deliveries
|
||||
for unit_bought in self.pending_unit_deliveries.units:
|
||||
if issubclass(unit_bought, FlyingType):
|
||||
total += self.pending_unit_deliveries.units[unit_bought]
|
||||
return total
|
||||
|
||||
|
||||
class OffMapSpawn(ControlPoint):
|
||||
def __init__(self, id: int, name: str, position: Point):
|
||||
|
||||
Reference in New Issue
Block a user