mirror of
https://github.com/dcs-retribution/dcs-retribution.git
synced 2025-11-10 15:41:24 +00:00
Release parking slots when capture occurs
This commit is contained in:
parent
66d741d0b3
commit
e4cb0f7c28
@ -25,6 +25,7 @@
|
||||
* **[Data]** Corrected the class of the USS Samuel Chase from Logistics to LandingShip, in order to prevent it being spawned as part of AAA sites.
|
||||
* **[Mission Generation]** Helicopters oscillating due to over-speeding
|
||||
* **[Mission Generation]** Fix infinite loop when using "Fast-Forward to first contact"
|
||||
* **[Capture Logic]** Release all parking slots when an airbase is captured
|
||||
|
||||
# Retribution v1.2.1 (hotfix)
|
||||
|
||||
|
||||
@ -906,12 +906,16 @@ class ControlPoint(MissionTarget, SidcDescribable, ABC):
|
||||
if not tgo.capturable:
|
||||
tgo.clear()
|
||||
|
||||
def release_parking_slots(self) -> None:
|
||||
pass
|
||||
|
||||
# TODO: Should be Airbase specific.
|
||||
def capture(self, game: Game, events: GameUpdateEvents, for_player: bool) -> None:
|
||||
new_coalition = game.coalition_for(for_player)
|
||||
self.ground_unit_orders.refund_all(self.coalition)
|
||||
self.retreat_ground_units(game)
|
||||
self.retreat_air_units(game)
|
||||
self.release_parking_slots()
|
||||
self.depopulate_uncapturable_tgos()
|
||||
self._coalition = new_coalition
|
||||
self.base.set_strength_to_minimum()
|
||||
@ -1232,6 +1236,10 @@ class Airfield(ControlPoint, CTLD):
|
||||
parking_slots += len(self.airport.parking_slots)
|
||||
return parking_slots
|
||||
|
||||
def release_parking_slots(self) -> None:
|
||||
for slot in self.parking_slots:
|
||||
slot.unit_id = None
|
||||
|
||||
@property
|
||||
def heading(self) -> Heading:
|
||||
return Heading.from_degrees(self.airport.runways[0].heading)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user