mirror of
https://github.com/dcs-liberation/dcs_liberation.git
synced 2025-11-10 14:22:26 +00:00
Revert "Use the actual Country type instead of the name."
This reverts commit bd2ec12e0f.
Country is both the data (name, ID, etc) and the container for groups
added to the miz, so it can't be used across multiple mission
generations. See https://github.com/pydcs/dcs/issues/314 for potential
follow up work that would let us do this.
Fixes https://github.com/dcs-liberation/dcs_liberation/issues/2864.
This commit is contained in:
@@ -1,9 +0,0 @@
|
||||
from dcs.countries import country_dict
|
||||
from dcs.country import Country
|
||||
|
||||
|
||||
def country_with_name(name: str) -> Country:
|
||||
for country in country_dict.values():
|
||||
if country.name == name:
|
||||
return country()
|
||||
raise KeyError(f"No country found named {name}")
|
||||
Reference in New Issue
Block a user