Use ID for unit info lookups instead of name.

This commit is contained in:
Schneefl0cke
2021-06-12 11:24:21 +02:00
committed by GitHub
parent c3c6915fa0
commit 21fe746f2f
2 changed files with 327 additions and 95 deletions

View File

@@ -942,7 +942,7 @@ def unit_get_expanded_info(country_name: str, unit_type, request_type: str) -> s
faction_value = None
with UNITINFOTEXT_PATH.open("r", encoding="utf-8") as fdata:
data = json.load(fdata)
type_exists = data.get(original_name)
type_exists = data.get(unit_type.id)
if type_exists is not None:
for faction in type_exists:
if default_value is None: