mirror of
https://github.com/Pax1601/DCSOlympus.git
synced 2025-10-29 16:56:34 +00:00
Introduces a new Python API module with supporting scripts for data extraction, data types, unit management, and utility functions. Adds JSON databases for aircraft, helicopters, ground units, navy units, and mods, as well as configuration and VSCode launch settings. This provides the foundation for interacting with and managing units, spawning, and logging within the application.
19 lines
416 B
Python
19 lines
416 B
Python
def enum_to_coalition(coalition_id: int) -> str:
|
|
if coalition_id == 0:
|
|
return "neutral"
|
|
elif coalition_id == 1:
|
|
return "red"
|
|
elif coalition_id == 2:
|
|
return "blue"
|
|
return ""
|
|
|
|
|
|
def coalition_to_enum(coalition: str) -> int:
|
|
if coalition == "neutral":
|
|
return 0
|
|
elif coalition == "red":
|
|
return 1
|
|
elif coalition == "blue":
|
|
return 2
|
|
return 0
|
|
1 |