Fix MapPainter (#22290)
This commit is contained in:
@@ -3,6 +3,8 @@ using System.Collections.Generic;
|
|||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
using Content.IntegrationTests;
|
using Content.IntegrationTests;
|
||||||
|
using Content.Server.GameTicking;
|
||||||
|
using Content.Server.Maps;
|
||||||
using Robust.Client.GameObjects;
|
using Robust.Client.GameObjects;
|
||||||
using Robust.Server.GameObjects;
|
using Robust.Server.GameObjects;
|
||||||
using Robust.Server.Player;
|
using Robust.Server.Player;
|
||||||
@@ -10,6 +12,7 @@ using Robust.Shared.GameObjects;
|
|||||||
using Robust.Shared.Map;
|
using Robust.Shared.Map;
|
||||||
using Robust.Shared.Map.Components;
|
using Robust.Shared.Map.Components;
|
||||||
using Robust.Shared.Maths;
|
using Robust.Shared.Maths;
|
||||||
|
using Robust.Shared.Prototypes;
|
||||||
using Robust.Shared.Timing;
|
using Robust.Shared.Timing;
|
||||||
using SixLabors.ImageSharp;
|
using SixLabors.ImageSharp;
|
||||||
using SixLabors.ImageSharp.PixelFormats;
|
using SixLabors.ImageSharp.PixelFormats;
|
||||||
@@ -29,7 +32,8 @@ namespace Content.MapRenderer.Painters
|
|||||||
DummyTicker = false,
|
DummyTicker = false,
|
||||||
Connected = true,
|
Connected = true,
|
||||||
Fresh = 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;
|
var server = pair.Server;
|
||||||
@@ -73,7 +77,7 @@ namespace Content.MapRenderer.Painters
|
|||||||
sEntityManager.DeleteEntity(playerEntity.Value);
|
sEntityManager.DeleteEntity(playerEntity.Value);
|
||||||
}
|
}
|
||||||
|
|
||||||
var mapId = sMapManager.GetAllMapIds().Last();
|
var mapId = sEntityManager.System<GameTicker>().DefaultMap;
|
||||||
grids = sMapManager.GetAllGrids(mapId).ToArray();
|
grids = sMapManager.GetAllGrids(mapId).ToArray();
|
||||||
|
|
||||||
foreach (var (uid, _) in grids)
|
foreach (var (uid, _) in grids)
|
||||||
|
|||||||
Reference in New Issue
Block a user