mirror of
https://github.com/dcs-liberation/dcs_liberation.git
synced 2025-11-10 14:22:26 +00:00
Improved FOB support : new custom banner for FOB menu and do not display aircrafts menu on first page.
This commit is contained in:
parent
ce13295cf0
commit
e63743f537
@ -172,6 +172,8 @@ class QBaseMenu2(QDialog):
|
||||
return "./resources/ui/carrier.png"
|
||||
elif self.cp.cptype == ControlPointType.LHA_GROUP:
|
||||
return "./resources/ui/lha.png"
|
||||
elif self.cp.cptype == ControlPointType.FOB:
|
||||
return "./resources/ui/fob.png"
|
||||
else:
|
||||
return "./resources/ui/airbase.png"
|
||||
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
from PySide2.QtWidgets import QTabWidget
|
||||
|
||||
from game.theater import ControlPoint, OffMapSpawn
|
||||
from game.theater import ControlPoint, OffMapSpawn, Fob
|
||||
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
|
||||
@ -19,6 +19,18 @@ class QBaseMenuTabs(QTabWidget):
|
||||
self.intel = QIntelInfo(cp, game_model.game)
|
||||
self.addTab(self.intel, "Intel")
|
||||
else:
|
||||
|
||||
if cp:
|
||||
if isinstance(cp, Fob):
|
||||
self.ground_forces_hq = QGroundForcesHQ(cp, game_model)
|
||||
self.addTab(self.ground_forces_hq, "Ground Forces HQ")
|
||||
if cp.helipads:
|
||||
self.airfield_command = QAirfieldCommand(cp, game_model)
|
||||
self.addTab(self.airfield_command, "Heliport")
|
||||
self.base_defenses_hq = QBaseDefensesHQ(cp, game_model.game)
|
||||
self.addTab(self.base_defenses_hq, "Base Defenses")
|
||||
else:
|
||||
|
||||
self.airfield_command = QAirfieldCommand(cp, game_model)
|
||||
self.addTab(self.airfield_command, "Airfield Command")
|
||||
|
||||
|
||||
@ -12,11 +12,12 @@ from PySide2.QtWidgets import (
|
||||
QVBoxLayout,
|
||||
QWidget,
|
||||
)
|
||||
from dcs.helicopters import helicopter_map
|
||||
from dcs.task import CAP, CAS, AWACS
|
||||
from dcs.unittype import FlyingType, UnitType
|
||||
|
||||
from game import db
|
||||
from game.theater import ControlPoint
|
||||
from game.theater import ControlPoint, ControlPointType
|
||||
from qt_ui.models import GameModel
|
||||
from qt_ui.uiconstants import ICONS
|
||||
from qt_ui.windows.basemenu.QRecruitBehaviour import QRecruitBehaviour
|
||||
@ -63,6 +64,8 @@ class QAircraftRecruitmentMenu(QFrame, QRecruitBehaviour):
|
||||
continue
|
||||
if self.cp.is_lha and unit not in db.LHA_CAPABLE:
|
||||
continue
|
||||
if self.cp.cptype in [ControlPointType.FOB, ControlPointType.FARP] and unit not in helicopter_map.values():
|
||||
continue
|
||||
unit_types.add(unit)
|
||||
|
||||
sorted_units = sorted(
|
||||
|
||||
BIN
resources/ui/fob.png
Normal file
BIN
resources/ui/fob.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 258 KiB |
Loading…
x
Reference in New Issue
Block a user