mirror of
https://github.com/dcs-retribution/dcs-retribution.git
synced 2025-11-10 15:41:24 +00:00
The AI isn't making use of these yet, but it's not smart enough to do so anyway. Would benefit from an icon to differentiate it on the map. I'm stretching the definition of "control point" quite a bit. We might want to put a class above `ControlPoint` for `AirSpawnLocation` to represent types of spawn locations that can't be captured and don't have ground objectives. Fixes https://github.com/Khopa/dcs_liberation/issues/274
34 lines
1.6 KiB
Python
34 lines
1.6 KiB
Python
from PySide2.QtWidgets import QFrame, QGridLayout, QLabel, QTabWidget
|
|
|
|
from qt_ui.models import GameModel
|
|
from qt_ui.windows.basemenu.airfield.QAirfieldCommand import QAirfieldCommand
|
|
from qt_ui.windows.basemenu.base_defenses.QBaseDefensesHQ import QBaseDefensesHQ
|
|
from qt_ui.windows.basemenu.ground_forces.QGroundForcesHQ import QGroundForcesHQ
|
|
from qt_ui.windows.basemenu.intel.QIntelInfo import QIntelInfo
|
|
from theater import ControlPoint, OffMapSpawn
|
|
|
|
|
|
class QBaseMenuTabs(QTabWidget):
|
|
|
|
def __init__(self, cp: ControlPoint, game_model: GameModel):
|
|
super(QBaseMenuTabs, self).__init__()
|
|
|
|
if not cp.captured:
|
|
if not cp.is_carrier and not isinstance(cp, OffMapSpawn):
|
|
self.base_defenses_hq = QBaseDefensesHQ(cp, game_model.game)
|
|
self.addTab(self.base_defenses_hq, "Base Defenses")
|
|
self.intel = QIntelInfo(cp, game_model.game)
|
|
self.addTab(self.intel, "Intel")
|
|
else:
|
|
if cp.has_runway():
|
|
self.airfield_command = QAirfieldCommand(cp, game_model)
|
|
self.addTab(self.airfield_command, "Airfield Command")
|
|
|
|
if cp.is_carrier:
|
|
self.base_defenses_hq = QBaseDefensesHQ(cp, game_model.game)
|
|
self.addTab(self.base_defenses_hq, "Fleet")
|
|
elif not isinstance(cp, OffMapSpawn):
|
|
self.ground_forces_hq = QGroundForcesHQ(cp, game_model)
|
|
self.addTab(self.ground_forces_hq, "Ground Forces HQ")
|
|
self.base_defenses_hq = QBaseDefensesHQ(cp, game_model.game)
|
|
self.addTab(self.base_defenses_hq, "Base Defenses") |