* 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:
bgreman
2021-06-23 17:09:17 -04:00
committed by GitHub
parent d365094616
commit c3b8c48ca2
3 changed files with 27 additions and 21 deletions

View File

@@ -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()