mirror of
https://github.com/dcs-retribution/dcs-retribution.git
synced 2025-11-10 15:41:24 +00:00
* Fixes #1310 by only refunding GUs if no faction CP has an attached factory. Previously it would refund all units at the CP, including aircraft. Also changes the CP CAPTURE cheat to work at any CP regardless of adjacency to frontline or BLUEFOR/OPFOR state. * Fixing typing issues, changint all Dict[] types to dict[] * Updating changelog
This commit is contained in:
@@ -118,18 +118,10 @@ class QBaseMenu2(QDialog):
|
||||
|
||||
@property
|
||||
def cheat_capturable(self) -> bool:
|
||||
if not self.game_model.game.settings.enable_base_capture_cheat:
|
||||
return False
|
||||
if self.cp.captured:
|
||||
return False
|
||||
|
||||
for connected in self.cp.connected_points:
|
||||
if connected.captured:
|
||||
return True
|
||||
return False
|
||||
return self.game_model.game.settings.enable_base_capture_cheat
|
||||
|
||||
def cheat_capture(self) -> None:
|
||||
self.cp.capture(self.game_model.game, for_player=True)
|
||||
self.cp.capture(self.game_model.game, for_player=not self.cp.captured)
|
||||
# Reinitialized ground planners and the like. The ATO needs to be reset because
|
||||
# missions planned against the flipped base are no longer valid.
|
||||
self.game_model.game.reset_ato()
|
||||
|
||||
Reference in New Issue
Block a user