Fix missing parameter for initialize_turn

The recent changes missed to add the required parameter also for the ui callers.
This commit is contained in:
RndName 2022-02-26 21:43:08 +01:00
parent a53812c0fb
commit bc41261009
No known key found for this signature in database
GPG Key ID: 5EF516FD9537F7C0
3 changed files with 6 additions and 3 deletions

View File

@ -3,6 +3,7 @@ from collections.abc import Callable
from PySide2.QtWidgets import QGroupBox, QLabel, QPushButton, QVBoxLayout from PySide2.QtWidgets import QGroupBox, QLabel, QPushButton, QVBoxLayout
from game import Game from game import Game
from game.sim.gameupdateevents import GameUpdateEvents
from game.theater import ControlPoint from game.theater import ControlPoint
from qt_ui.windows.GameUpdateSignal import GameUpdateSignal from qt_ui.windows.GameUpdateSignal import GameUpdateSignal
from qt_ui.windows.basemenu.ground_forces.QGroundForcesStrategySelector import ( from qt_ui.windows.basemenu.ground_forces.QGroundForcesStrategySelector import (
@ -56,5 +57,5 @@ class QGroundForcesStrategy(QGroupBox):
self.cp.base.affect_strength(amount) self.cp.base.affect_strength(amount)
enemy_point.base.affect_strength(-amount) enemy_point.base.affect_strength(-amount)
# Clear the ATO to replan missions affected by the front line. # 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) GameUpdateSignal.get_instance().updateGame(self.game)

View File

@ -23,6 +23,7 @@ from game import Game
from game.armedforces.forcegroup import ForceGroup from game.armedforces.forcegroup import ForceGroup
from game.data.groups import GroupRole, GroupTask from game.data.groups import GroupRole, GroupTask
from game.point_with_heading import PointWithHeading from game.point_with_heading import PointWithHeading
from game.sim.gameupdateevents import GameUpdateEvents
from game.theater import TheaterGroundObject from game.theater import TheaterGroundObject
from game.theater.theatergroundobject import ( from game.theater.theatergroundobject import (
VehicleGroupGroundObject, VehicleGroupGroundObject,
@ -218,7 +219,7 @@ class QGroundObjectTemplateLayout(QGroupBox):
) )
# Replan redfor missions # 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) GameUpdateSignal.get_instance().updateGame(self.game)

View File

@ -14,6 +14,7 @@ from dcs import Point
from game import Game from game import Game
from game.config import REWARDS from game.config import REWARDS
from game.data.building_data import FORTIFICATION_BUILDINGS from game.data.building_data import FORTIFICATION_BUILDINGS
from game.sim.gameupdateevents import GameUpdateEvents
from game.theater import ControlPoint, TheaterGroundObject from game.theater import ControlPoint, TheaterGroundObject
from game.theater.theatergroundobject import ( from game.theater.theatergroundobject import (
BuildingGroundObject, BuildingGroundObject,
@ -209,7 +210,7 @@ class QGroundObjectMenu(QDialog):
package.target == self.ground_object package.target == self.ground_object
for package in self.game.ato_for(player=False).packages 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() self.do_refresh_layout()
GameUpdateSignal.get_instance().updateGame(self.game) GameUpdateSignal.get_instance().updateGame(self.game)