From aaa06a5e88a43e390d6a3b58817d5ae5d55adba2 Mon Sep 17 00:00:00 2001 From: Raffson Date: Sun, 12 Mar 2023 14:36:04 +0100 Subject: [PATCH] Fix possible conficts in runway data In case 2 carriers are present and have the same name, the kneeboard information gets screwed up... --- game/missiongenerator/tgogenerator.py | 2 +- game/theater/controlpoint.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/game/missiongenerator/tgogenerator.py b/game/missiongenerator/tgogenerator.py index 9a6b50f0..fb408a16 100644 --- a/game/missiongenerator/tgogenerator.py +++ b/game/missiongenerator/tgogenerator.py @@ -529,7 +529,7 @@ class GenericCarrierGenerator(GroundObjectGenerator): # they aren't exposed as such to the game. Should # clean this up so that's possible. We can't use the # unit name since it's an arbitrary ID. - self.runways[self.control_point.name] = RunwayData( + self.runways[self.control_point.full_name] = RunwayData( self.control_point.name, brc, f"{brc.degrees:03}", diff --git a/game/theater/controlpoint.py b/game/theater/controlpoint.py index 9a408141..572a0d32 100644 --- a/game/theater/controlpoint.py +++ b/game/theater/controlpoint.py @@ -1246,7 +1246,7 @@ class NavalControlPoint( fallback = RunwayData( self.full_name, runway_heading=Heading.from_degrees(0), runway_name="" ) - return dynamic_runways.get(self.name, fallback) + return dynamic_runways.get(self.full_name, fallback) @property def runway_status(self) -> RunwayStatus: