mirror of
https://github.com/dcs-retribution/dcs-retribution.git
synced 2025-11-10 15:41:24 +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
This commit is contained in:
parent
db36cf248e
commit
d3d655da07
@ -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