From: metalgearsloth <31366439+metalgearsloth@users.noreply.github.com> Date: Sun, 10 Dec 2023 11:19:26 +0000 (+1100) Subject: Fix MapPainter (#22290) X-Git-Url: https://git.smokeofanarchy.ru/gitweb.cgi?a=commitdiff_plain;h=88de2e840703a97d2b990b1c7dcd53ca452eafb4;p=space-station-14.git Fix MapPainter (#22290) --- diff --git a/Content.IntegrationTests/PoolManager.Cvars.cs b/Content.IntegrationTests/PoolManager.Cvars.cs index dfdbddd923..327ec627f5 100644 --- a/Content.IntegrationTests/PoolManager.Cvars.cs +++ b/Content.IntegrationTests/PoolManager.Cvars.cs @@ -35,7 +35,7 @@ public static partial class PoolManager (CVars.NetBufferSize.Name, "0") }; - public static async Task SetupCVars(RobustIntegrationTest.IntegrationInstance instance, PoolSettings settings) + public static async Task SetupCVars(RobustIntegrationTest.IntegrationInstance instance, PoolSettings settings) { var cfg = instance.ResolveDependency(); await instance.WaitPost(() => @@ -67,4 +67,4 @@ public static partial class PoolManager options.CVarOverrides[cvar] = value; } } -} \ No newline at end of file +} diff --git a/Content.MapRenderer/Painters/MapPainter.cs b/Content.MapRenderer/Painters/MapPainter.cs index 8a87a93744..94d58b35a0 100644 --- a/Content.MapRenderer/Painters/MapPainter.cs +++ b/Content.MapRenderer/Painters/MapPainter.cs @@ -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().DefaultMap; grids = sMapManager.GetAllGrids(mapId).ToArray(); foreach (var (uid, _) in grids)