Fix ForceGroup merging and PresetGroup handling

This commit is contained in:
RndName
2022-03-22 19:08:24 +01:00
parent d0fe058a24
commit 892bd9f069
3 changed files with 29 additions and 28 deletions

View File

@@ -214,10 +214,8 @@ class Faction:
ShipUnitType.named(n) for n in json.get("naval_units", [])
]
# This has to be loaded AFTER GroundUnitType and ShipUnitType to work properly
faction.preset_groups = [
ForceGroup.for_faction_by_name(n, faction)
for n in json.get("preset_groups", [])
ForceGroup.named(n) for n in json.get("preset_groups", [])
]
faction.requirements = json.get("requirements", {})