mirror of
https://github.com/dcs-retribution/dcs-retribution.git
synced 2025-11-10 15:41:24 +00:00
Initial squadrons implementation.
Doesn't actually do anything yet, but squadrons are created for each aircraft type and pilots will be created as needed to fill flights. https://github.com/dcs-liberation/dcs_liberation/issues/276
This commit is contained in:
@@ -1459,6 +1459,13 @@ def unit_type_from_name(name: str) -> Optional[Type[UnitType]]:
|
||||
return None
|
||||
|
||||
|
||||
def flying_type_from_name(name: str) -> Optional[Type[FlyingType]]:
|
||||
unit_type = plane_map.get(name)
|
||||
if unit_type is not None:
|
||||
return unit_type
|
||||
return helicopter_map.get(name)
|
||||
|
||||
|
||||
def unit_type_of(unit: Unit) -> UnitType:
|
||||
if isinstance(unit, Vehicle):
|
||||
return vehicle_map[unit.type]
|
||||
|
||||
Reference in New Issue
Block a user