Handle runway damage in the debrief.

Apparently we were already getting this info because it's a unit like
any other according to the event system, so if runways were actually
sufficiently damaged we'd emit a ton of exceptions.

This doesn't do anything yet, but tracks the damage state. Will add the
ability to repair them next, and then finally make the damage render the
runway inoperable.
This commit is contained in:
Dan Albert
2020-11-25 13:10:48 -08:00
parent ef0e565337
commit 0c4e920af3
5 changed files with 58 additions and 21 deletions

View File

@@ -32,6 +32,7 @@ from gen.triggergen import TRIGGER_RADIUS_MEDIUM, TriggersGenerator
from .. import db
from ..debriefing import Debriefing
from ..theater import Airfield
from ..unitmap import UnitMap
if TYPE_CHECKING:
@@ -173,6 +174,9 @@ class Operation:
@classmethod
def create_unit_map(cls) -> None:
cls.unit_map = UnitMap()
for control_point in cls.game.theater.controlpoints:
if isinstance(control_point, Airfield):
cls.unit_map.add_airfield(control_point)
@classmethod
def create_radio_registries(cls) -> None: