Refactor front line code to make sides explicit.

A was intended to be the blue point and B was intended to be the red
point. Make this a part of the name so that's clear, and clean up
related code to keep that reliable.
This commit is contained in:
Dan Albert
2021-05-07 20:56:39 -07:00
parent 12f474ecbe
commit b0c24f6e51
13 changed files with 125 additions and 154 deletions

View File

@@ -101,16 +101,16 @@ class QFrontLine(QGraphicsLineItem):
Dialog.open_new_package_dialog(self.mission_target)
def cheat_forward(self) -> None:
self.mission_target.control_point_a.base.affect_strength(0.1)
self.mission_target.control_point_b.base.affect_strength(-0.1)
self.mission_target.blue_cp.base.affect_strength(0.1)
self.mission_target.red_cp.base.affect_strength(-0.1)
# Clear the ATO to replan missions affected by the front line.
self.game_model.game.reset_ato()
self.game_model.game.initialize_turn()
GameUpdateSignal.get_instance().updateGame(self.game_model.game)
def cheat_backward(self) -> None:
self.mission_target.control_point_a.base.affect_strength(-0.1)
self.mission_target.control_point_b.base.affect_strength(0.1)
self.mission_target.blue_cp.base.affect_strength(-0.1)
self.mission_target.red_cp.base.affect_strength(0.1)
# Clear the ATO to replan missions affected by the front line.
self.game_model.game.reset_ato()
self.game_model.game.initialize_turn()