Pax1601 4bcb5936b4 feat: Add initial API implementation and databases
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.
2025-08-05 17:26:24 +02:00

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