Clean up available parking code a bit.

Moved more into the `ControlPoint`.
This commit is contained in:
Dan Albert
2020-11-20 18:31:19 -08:00
parent c4b8a41742
commit 75edbb62f1
2 changed files with 20 additions and 17 deletions

View File

@@ -235,7 +235,7 @@ class ControlPoint(MissionTarget):
return result
@property
def available_aircraft_slots(self):
def total_aircraft_parking(self):
"""
:return: The maximum number of aircraft that can be stored in this control point
"""
@@ -385,6 +385,10 @@ class ControlPoint(MissionTarget):
total += self.pending_unit_deliveries.units[unit_bought]
return total
@property
def unclaimed_parking(self) -> int:
return self.total_aircraft_parking - self.expected_aircraft_next_turn
class OffMapSpawn(ControlPoint):
def __init__(self, id: int, name: str, position: Point):
@@ -400,5 +404,5 @@ class OffMapSpawn(ControlPoint):
yield from []
@property
def available_aircraft_slots(self) -> int:
def total_aircraft_parking(self) -> int:
return 1000