From bb44986121737bf18068aeaec7930c6a282e2b7f Mon Sep 17 00:00:00 2001 From: SokyranTheDragon Date: Sun, 1 Sep 2024 23:36:56 +0200 Subject: [PATCH] Update WorldObject sync worker delegate to handle pocket maps When a pocket map is generated, it is added to `Find.World.pocketMaps` rather than `Find.World.worldObjects.AllWorldObjects`. This change will make sync worker fallback to pocket maps list if it did not find the map in world objects list. --- Source/Client/Syncing/Dict/SyncDictRimWorld.cs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Source/Client/Syncing/Dict/SyncDictRimWorld.cs b/Source/Client/Syncing/Dict/SyncDictRimWorld.cs index 0ceefbe2..7f46b107 100644 --- a/Source/Client/Syncing/Dict/SyncDictRimWorld.cs +++ b/Source/Client/Syncing/Dict/SyncDictRimWorld.cs @@ -878,7 +878,8 @@ public static class SyncDictRimWorld if (objId == -1) return null; - return Find.World.worldObjects.AllWorldObjects.Find(w => w.ID == objId); + return Find.World.worldObjects.AllWorldObjects.Find(w => w.ID == objId) ?? + Find.World.pocketMaps.Find(p => p.ID == objId); }, true // Implicit }, {