Fix incorrect forcegroup loading

Forcegroups were not loaded correctly from preset groups during faction initialization. When a user created a new game and directly after that created another game with different factions the Forcegroups for the preset groups were still reused and therefore units which were not accessible by the faction were accidently available to the new faction.
closes #2186
This commit is contained in:
RndName
2022-05-06 19:31:40 +02:00
parent a10e55cfd7
commit 244425381d
3 changed files with 13 additions and 7 deletions

View File

@@ -216,7 +216,7 @@ class Faction:
]
faction.preset_groups = [
ForceGroup.named(n) for n in json.get("preset_groups", [])
ForceGroup.from_preset_group(g) for g in json.get("preset_groups", [])
]
faction.requirements = json.get("requirements", {})