mirror of
https://github.com/dcs-liberation/dcs_liberation.git
synced 2025-11-10 14:22:26 +00:00
Compare commits
2 Commits
develop-3.
...
develop_2_
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
34aca41461 | ||
|
|
7d83131173 |
@@ -1521,7 +1521,7 @@ def unit_get_expanded_info(country_name: str, unit_type, request_type: str) -> s
|
|||||||
default_value = None
|
default_value = None
|
||||||
faction_value = None
|
faction_value = None
|
||||||
with UNITINFOTEXT_PATH.open("r", encoding="utf-8") as fdata:
|
with UNITINFOTEXT_PATH.open("r", encoding="utf-8") as fdata:
|
||||||
data = json.load(fdata, encoding="utf-8")
|
data = json.load(fdata)
|
||||||
type_exists = data.get(original_name)
|
type_exists = data.get(original_name)
|
||||||
if type_exists is not None:
|
if type_exists is not None:
|
||||||
for faction in type_exists:
|
for faction in type_exists:
|
||||||
|
|||||||
@@ -31,7 +31,7 @@ class FactionLoader:
|
|||||||
for f in files:
|
for f in files:
|
||||||
try:
|
try:
|
||||||
with f.open("r", encoding="utf-8") as fdata:
|
with f.open("r", encoding="utf-8") as fdata:
|
||||||
data = json.load(fdata, encoding="utf-8")
|
data = json.load(fdata)
|
||||||
factions[data["name"]] = Faction.from_json(data)
|
factions[data["name"]] = Faction.from_json(data)
|
||||||
logging.info("Loaded faction : " + str(f))
|
logging.info("Loaded faction : " + str(f))
|
||||||
except Exception:
|
except Exception:
|
||||||
|
|||||||
Reference in New Issue
Block a user