mirror of
https://github.com/dcs-liberation/dcs_liberation.git
synced 2025-11-10 14:22:26 +00:00
Fixed missed initialization of unit data on load.
We'd only load unit data if a name lookup was done and missed it on a type lookup. Ideally we wouldn't need to do a type lookup here until the ground unit templates are reworked we still do. Fixes https://github.com/dcs-liberation/dcs_liberation/issues/1299 (cherry picked from commit d3d655da0716f37dcfd8bbcc9f901417dcb540e6)
This commit is contained in:
parent
b057f027d5
commit
2bb1c0b3f2
@ -45,6 +45,8 @@ class GroundUnitType(UnitType[VehicleType]):
|
||||
|
||||
@classmethod
|
||||
def for_dcs_type(cls, dcs_unit_type: Type[VehicleType]) -> Iterator[GroundUnitType]:
|
||||
if not cls._loaded:
|
||||
cls._load_all()
|
||||
yield from cls._by_unit_type[dcs_unit_type]
|
||||
|
||||
@staticmethod
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user