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