mirror of
https://github.com/dcs-liberation/dcs_liberation.git
synced 2025-11-10 14:22:26 +00:00
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:
parent
a53812c0fb
commit
bc41261009
@ -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)
|
||||||
|
|||||||
@ -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)
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -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)
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user