mirror of
https://github.com/dcs-liberation/dcs_liberation.git
synced 2025-11-10 14:22:26 +00:00
Add predefined squadron support.
https://github.com/dcs-liberation/dcs_liberation/issues/276
This commit is contained in:
@@ -74,9 +74,9 @@ class FlightType(Enum):
|
||||
|
||||
@classmethod
|
||||
def from_name(cls, name: str) -> FlightType:
|
||||
for value in cls:
|
||||
if name == value:
|
||||
return value
|
||||
for entry in cls:
|
||||
if name == entry.value:
|
||||
return entry
|
||||
raise KeyError(f"No FlightType with name {name}")
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user