diff --git a/Content.Server/Pinpointer/NavMapSystem.cs b/Content.Server/Pinpointer/NavMapSystem.cs index 81de3a4368..dae3c1ca66 100644 --- a/Content.Server/Pinpointer/NavMapSystem.cs +++ b/Content.Server/Pinpointer/NavMapSystem.cs @@ -1,3 +1,5 @@ +using Content.Server.Station.Components; +using Content.Server.Station.Systems; using Content.Shared.Pinpointer; using Content.Shared.Tag; using Robust.Shared.GameStates; @@ -21,6 +23,15 @@ public sealed class NavMapSystem : SharedNavMapSystem SubscribeLocalEvent(OnReAnchor); SubscribeLocalEvent(OnGetState); SubscribeLocalEvent(OnNavMapSplit); + SubscribeLocalEvent(OnStationInit); + } + + private void OnStationInit(StationGridAddedEvent ev) + { + var comp = EnsureComp(ev.GridId); + var physicsQuery = GetEntityQuery(); + var tagQuery = GetEntityQuery(); + RefreshGrid(comp, Comp(ev.GridId), physicsQuery, tagQuery); } private void OnNavMapSplit(EntityUid uid, NavMapComponent component, ref GridSplitEvent args) @@ -51,6 +62,7 @@ public sealed class NavMapSystem : SharedNavMapSystem if (!component.Chunks.TryGetValue(chunkOrigin, out var chunk)) { chunk = new NavMapChunk(chunkOrigin); + component.Chunks[chunkOrigin] = chunk; } RefreshTile(grid, component, chunk, tile.Value.GridIndices, physicsQuery, tagQuery);