From 53c7912592d411f35bbb14a47e69c8aa3423de35 Mon Sep 17 00:00:00 2001 From: Dan Albert Date: Wed, 23 Jun 2021 12:50:07 -0700 Subject: [PATCH] Copy initialization fix to AircraftType. (cherry picked from commit 610a27c0e4914437c14b3d091d4e619d1b6eda48) --- game/dcs/aircrafttype.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/game/dcs/aircrafttype.py b/game/dcs/aircrafttype.py index 077b3f9b..126f2064 100644 --- a/game/dcs/aircrafttype.py +++ b/game/dcs/aircrafttype.py @@ -184,6 +184,8 @@ class AircraftType(UnitType[FlyingType]): @classmethod def for_dcs_type(cls, dcs_unit_type: Type[FlyingType]) -> Iterator[AircraftType]: + if not cls._loaded: + cls._load_all() yield from cls._by_unit_type[dcs_unit_type] @staticmethod