mirror of
https://github.com/dcs-retribution/dcs-retribution.git
synced 2025-11-10 15:41:24 +00:00
Display damaged runways.
This commit is contained in:
parent
7dfb0c67e5
commit
ee768b9147
@ -404,7 +404,7 @@ class Airfield(ControlPoint):
|
||||
return self.airport.runways[0].heading
|
||||
|
||||
def has_runway(self) -> bool:
|
||||
return True
|
||||
return not self.damaged
|
||||
|
||||
def active_runway(self, conditions: Conditions,
|
||||
dynamic_runways: Dict[str, RunwayData]) -> RunwayData:
|
||||
|
||||
@ -33,13 +33,12 @@ class QMapControlPoint(QMapObject):
|
||||
painter.setBrush(self.brush_color)
|
||||
painter.setPen(self.pen_color)
|
||||
|
||||
if self.control_point.has_runway():
|
||||
if self.isUnderMouse():
|
||||
painter.setBrush(const.COLORS["white"])
|
||||
painter.setPen(self.pen_color)
|
||||
if not self.control_point.has_runway():
|
||||
painter.setBrush(const.COLORS["black"])
|
||||
painter.setPen(self.brush_color)
|
||||
|
||||
r = option.rect
|
||||
painter.drawEllipse(r.x(), r.y(), r.width(), r.height())
|
||||
r = option.rect
|
||||
painter.drawEllipse(r.x(), r.y(), r.width(), r.height())
|
||||
# TODO: Draw sunk carriers differently.
|
||||
# Either don't draw them at all, or perhaps use a sunk ship icon.
|
||||
painter.restore()
|
||||
|
||||
@ -61,7 +61,7 @@ class QBaseMenu2(QDialog):
|
||||
title.setProperty("style", "base-title")
|
||||
aircraft = self.cp.base.total_aircraft
|
||||
armor = self.cp.base.total_armor
|
||||
runway_status = "operational" if self.cp.has_runway() else "inoperative"
|
||||
runway_status = "operational" if self.cp.has_runway() else "damaged"
|
||||
intel_summary = QLabel("\n".join([
|
||||
f"{aircraft} aircraft",
|
||||
f"{armor} ground units",
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user