Skip to content

Commit

Permalink
Update WorldObject sync worker delegate to handle pocket maps
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
SokyranTheDragon committed Sep 1, 2024
1 parent f0221d0 commit bb44986
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion Source/Client/Syncing/Dict/SyncDictRimWorld.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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
},
{
Expand Down

0 comments on commit bb44986

Please sign in to comment.