fix save compat

This commit is contained in:
Eclipse/Druss99
2025-10-05 18:08:31 -04:00
committed by Raffson
parent 855d269420
commit 96d0b2b7d9
2 changed files with 5 additions and 5 deletions

View File

@@ -99,6 +99,10 @@ class Coalition:
# Avoid persisting any volatile types that can be deterministically
# recomputed on load for the sake of save compatibility.
del state["faker"]
# TODO: Figure out why this is needed after adding neutral point support
if state["player"] != Player.NEUTRAL:
del state["_threat_zone"]
del state["_navmesh"]
return state
def __setstate__(self, state: dict[str, Any]) -> None: