From bc412610091183d88a8fae949e972f44acf03ac6 Mon Sep 17 00:00:00 2001 From: RndName Date: Sat, 26 Feb 2022 21:43:08 +0100 Subject: [PATCH] Fix missing parameter for initialize_turn The recent changes missed to add the required parameter also for the ui callers. --- qt_ui/windows/basemenu/ground_forces/QGroundForcesStrategy.py | 3 ++- qt_ui/windows/groundobject/QGroundObjectBuyMenu.py | 3 ++- qt_ui/windows/groundobject/QGroundObjectMenu.py | 3 ++- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/qt_ui/windows/basemenu/ground_forces/QGroundForcesStrategy.py b/qt_ui/windows/basemenu/ground_forces/QGroundForcesStrategy.py index 39592e65..a9d63eb6 100644 --- a/qt_ui/windows/basemenu/ground_forces/QGroundForcesStrategy.py +++ b/qt_ui/windows/basemenu/ground_forces/QGroundForcesStrategy.py @@ -3,6 +3,7 @@ from collections.abc import Callable from PySide2.QtWidgets import QGroupBox, QLabel, QPushButton, QVBoxLayout from game import Game +from game.sim.gameupdateevents import GameUpdateEvents from game.theater import ControlPoint from qt_ui.windows.GameUpdateSignal import GameUpdateSignal from qt_ui.windows.basemenu.ground_forces.QGroundForcesStrategySelector import ( @@ -56,5 +57,5 @@ class QGroundForcesStrategy(QGroupBox): self.cp.base.affect_strength(amount) enemy_point.base.affect_strength(-amount) # Clear the ATO to replan missions affected by the front line. - self.game.initialize_turn() + self.game.initialize_turn(GameUpdateEvents()) GameUpdateSignal.get_instance().updateGame(self.game) diff --git a/qt_ui/windows/groundobject/QGroundObjectBuyMenu.py b/qt_ui/windows/groundobject/QGroundObjectBuyMenu.py index 71b3fb2f..8e1dbc16 100644 --- a/qt_ui/windows/groundobject/QGroundObjectBuyMenu.py +++ b/qt_ui/windows/groundobject/QGroundObjectBuyMenu.py @@ -23,6 +23,7 @@ from game import Game from game.armedforces.forcegroup import ForceGroup from game.data.groups import GroupRole, GroupTask from game.point_with_heading import PointWithHeading +from game.sim.gameupdateevents import GameUpdateEvents from game.theater import TheaterGroundObject from game.theater.theatergroundobject import ( VehicleGroupGroundObject, @@ -218,7 +219,7 @@ class QGroundObjectTemplateLayout(QGroupBox): ) # Replan redfor missions - self.game.initialize_turn(for_red=True, for_blue=False) + self.game.initialize_turn(GameUpdateEvents(), for_red=True, for_blue=False) GameUpdateSignal.get_instance().updateGame(self.game) diff --git a/qt_ui/windows/groundobject/QGroundObjectMenu.py b/qt_ui/windows/groundobject/QGroundObjectMenu.py index 59b80cc2..c82ddde0 100644 --- a/qt_ui/windows/groundobject/QGroundObjectMenu.py +++ b/qt_ui/windows/groundobject/QGroundObjectMenu.py @@ -14,6 +14,7 @@ from dcs import Point from game import Game from game.config import REWARDS from game.data.building_data import FORTIFICATION_BUILDINGS +from game.sim.gameupdateevents import GameUpdateEvents from game.theater import ControlPoint, TheaterGroundObject from game.theater.theatergroundobject import ( BuildingGroundObject, @@ -209,7 +210,7 @@ class QGroundObjectMenu(QDialog): package.target == self.ground_object for package in self.game.ato_for(player=False).packages ): - self.game.initialize_turn(for_red=True, for_blue=False) + self.game.initialize_turn(GameUpdateEvents(), for_red=True, for_blue=False) self.do_refresh_layout() GameUpdateSignal.get_instance().updateGame(self.game)