mirror of
https://github.com/dcs-retribution/dcs-retribution.git
synced 2025-11-10 15:41:24 +00:00
Don't show FOB structure as a target.
This isn't perfect because the auto planner might still target it. We need a larger refactoring for target iteration so we don't need to remember all the special rules at each call site. For now, this restores the 2.3.2 behavior. Fixes https://github.com/Khopa/dcs_liberation/issues/681
This commit is contained in:
parent
89f313295e
commit
69833f66e3
@ -7,7 +7,8 @@ from PySide2.QtWidgets import (
|
|||||||
QWidget,
|
QWidget,
|
||||||
)
|
)
|
||||||
|
|
||||||
from game.theater import Airport, ControlPoint
|
from game.theater import Airport, ControlPoint, Fob
|
||||||
|
from game.theater.theatergroundobject import BuildingGroundObject
|
||||||
from qt_ui.windows.basemenu.base_defenses.QBaseDefenseGroupInfo import \
|
from qt_ui.windows.basemenu.base_defenses.QBaseDefenseGroupInfo import \
|
||||||
QBaseDefenseGroupInfo
|
QBaseDefenseGroupInfo
|
||||||
|
|
||||||
@ -30,9 +31,18 @@ class QBaseInformation(QFrame):
|
|||||||
scroll_content.setLayout(task_box_layout)
|
scroll_content.setLayout(task_box_layout)
|
||||||
|
|
||||||
for g in self.cp.ground_objects:
|
for g in self.cp.ground_objects:
|
||||||
if g.airbase_group:
|
# Airbase groups are the objects that are hidden on the map because
|
||||||
group_info = QBaseDefenseGroupInfo(self.cp, g, self.game)
|
# they're shown in the base menu.
|
||||||
task_box_layout.addWidget(group_info)
|
if not g.airbase_group:
|
||||||
|
continue
|
||||||
|
|
||||||
|
# Of these, we need to ignore the FOB structure itself since that's
|
||||||
|
# not supposed to be targetable.
|
||||||
|
if isinstance(self.cp, Fob) and isinstance(g, BuildingGroundObject):
|
||||||
|
continue
|
||||||
|
|
||||||
|
group_info = QBaseDefenseGroupInfo(self.cp, g, self.game)
|
||||||
|
task_box_layout.addWidget(group_info)
|
||||||
|
|
||||||
scroll_content.setLayout(task_box_layout)
|
scroll_content.setLayout(task_box_layout)
|
||||||
scroll = QScrollArea()
|
scroll = QScrollArea()
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user