mirror of
https://github.com/dcs-retribution/dcs-retribution.git
synced 2025-11-10 15:41:24 +00:00
Add orientation info and allow user to rotate TGO
- Give user information about the heading of a TGO - Add a button to change the heading to head to conflic - Change the orientation of a TGO during Buy - Run the heading to conflict calculation to change the orientation of the newly bought group. It will then head to the center of the conflict
This commit is contained in:
@@ -27,8 +27,6 @@ from game.layout.layout import (
|
||||
TgoLayout,
|
||||
TgoLayoutGroup,
|
||||
)
|
||||
from game.server import EventStream
|
||||
from game.sim.gameupdateevents import GameUpdateEvents
|
||||
from game.theater import TheaterGroundObject
|
||||
from game.theater.theatergroundobject import (
|
||||
EwrGroundObject,
|
||||
@@ -36,7 +34,6 @@ from game.theater.theatergroundobject import (
|
||||
VehicleGroupGroundObject,
|
||||
)
|
||||
from qt_ui.uiconstants import EVENT_ICONS
|
||||
from qt_ui.windows.GameUpdateSignal import GameUpdateSignal
|
||||
|
||||
|
||||
@dataclass
|
||||
@@ -208,6 +205,12 @@ class QGroundObjectTemplateLayout(QGroupBox):
|
||||
# Something went wrong. Buy button should be disabled!
|
||||
logging.error("Not enough money to buy the group")
|
||||
return
|
||||
|
||||
# Change the heading of the new group to head to the conflict
|
||||
self.ground_object.heading = (
|
||||
self.game.theater.heading_to_conflict_from(self.ground_object.position)
|
||||
or self.ground_object.heading
|
||||
)
|
||||
self.game.blue.budget -= price - self.current_group_value
|
||||
self.ground_object.groups = []
|
||||
for group_name, groups in self.layout_model.groups.items():
|
||||
|
||||
Reference in New Issue
Block a user