Fix MapPainter (#22290)

This commit is contained in:
metalgearsloth
2023-12-16 19:37:31 +01:00
committed by Debug
parent 15eb80d661
commit 867f873c9c
2 changed files with 8 additions and 4 deletions
+6 -2
View File
@@ -3,6 +3,8 @@ using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using Content.IntegrationTests;
using Content.Server.GameTicking;
using Content.Server.Maps;
using Robust.Client.GameObjects;
using Robust.Server.GameObjects;
using Robust.Server.Player;
@@ -10,6 +12,7 @@ using Robust.Shared.GameObjects;
using Robust.Shared.Map;
using Robust.Shared.Map.Components;
using Robust.Shared.Maths;
using Robust.Shared.Prototypes;
using Robust.Shared.Timing;
using SixLabors.ImageSharp;
using SixLabors.ImageSharp.PixelFormats;
@@ -29,7 +32,8 @@ namespace Content.MapRenderer.Painters
DummyTicker = false,
Connected = true,
Fresh = true,
Map = map
// Seriously whoever made MapPainter use GameMapPrototype I wish you step on a lego one time.
Map = map,
});
var server = pair.Server;
@@ -73,7 +77,7 @@ namespace Content.MapRenderer.Painters
sEntityManager.DeleteEntity(playerEntity.Value);
}
var mapId = sMapManager.GetAllMapIds().Last();
var mapId = sEntityManager.System<GameTicker>().DefaultMap;
grids = sMapManager.GetAllGrids(mapId).ToArray();
foreach (var (uid, _) in grids)