Issue 2778 (#3374)

This PR addresses #2778 by:
- Updating the logic for how redeployment of front line units works to
handle "out of order" captures e.g. for control points A->B->C, where A
starts friendly and B, C starts as enemy-controlled, the player captures
C first, typically using air assault.
- Updating the cheat logic so that capturing CPs using cheats behaves
the same way as capturing CPs normally.
This commit is contained in:
zhexu14
2024-04-13 21:55:44 +10:00
committed by GitHub
parent c8c78d0b2a
commit f59051c9f8
3 changed files with 32 additions and 24 deletions

View File

@@ -16,6 +16,7 @@ from game import Game
from game.ato.flighttype import FlightType
from game.config import RUNWAY_REPAIR_COST
from game.server import EventStream
from game.sim.missionresultsprocessor import MissionResultsProcessor
from game.theater import (
AMMO_DEPOT_FRONTLINE_UNIT_CONTRIBUTION,
ControlPoint,
@@ -156,6 +157,9 @@ class QBaseMenu2(QDialog):
self.cp.capture(
self.game_model.game, events, for_player=not self.cp.captured
)
# Redeploy frontline units, as if the CP capture was done in mission.
results_processor = MissionResultsProcessor(self.game_model.game)
results_processor.redeploy_units(self.cp)
self.close()
@property