]> git.smokeofanarchy.ru Git - space-station-14.git/commitdiff
Fix MapPainter (#22290)
authormetalgearsloth <31366439+metalgearsloth@users.noreply.github.com>
Sun, 10 Dec 2023 11:19:26 +0000 (22:19 +1100)
committerGitHub <noreply@github.com>
Sun, 10 Dec 2023 11:19:26 +0000 (22:19 +1100)
Content.IntegrationTests/PoolManager.Cvars.cs
Content.MapRenderer/Painters/MapPainter.cs

index dfdbddd92304a2133c84c83aee831fdcf6778799..327ec627f5209598af34318f9621bdf3ad165865 100644 (file)
@@ -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<IConfigurationManager>();
         await instance.WaitPost(() =>
@@ -67,4 +67,4 @@ public static partial class PoolManager
             options.CVarOverrides[cvar] = value;
         }
     }
-}
\ No newline at end of file
+}
index 8a87a93744c6925f9c6fd9d7318721ba9ef8080e..94d58b35a001c63e8bb898bcceefa48f4c966572 100644 (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)