Content changes for mapgrid kill (#12567)

This commit is contained in:
metalgearsloth
2022-11-22 13:12:04 +11:00
committed by GitHub
parent 9170e7ac9d
commit 6c76061887
75 changed files with 192 additions and 123 deletions

View File

@@ -6,6 +6,7 @@ using Content.Shared.Decals;
using Robust.Client.GameObjects;
using Robust.Shared.GameObjects;
using Robust.Shared.Map;
using Robust.Shared.Map.Components;
using Robust.Shared.Maths;
using Robust.Shared.Timing;
using Robust.Shared.Utility;
@@ -43,7 +44,7 @@ namespace Content.MapRenderer.Painters
_decals = GetDecals();
}
public void Run(Image gridCanvas, IMapGrid grid)
public void Run(Image gridCanvas, MapGridComponent grid)
{
var stopwatch = new Stopwatch();
stopwatch.Start();
@@ -136,7 +137,7 @@ namespace Content.MapRenderer.Painters
return decals;
}
private (float x, float y) TransformLocalPosition(Vector2 position, IMapGrid grid)
private (float x, float y) TransformLocalPosition(Vector2 position, MapGridComponent grid)
{
var xOffset = (int) -grid.LocalAABB.Left;
var yOffset = (int) -grid.LocalAABB.Bottom;

View File

@@ -9,6 +9,7 @@ using Robust.Server.GameObjects;
using Robust.Server.Player;
using Robust.Shared.GameObjects;
using Robust.Shared.Map;
using Robust.Shared.Map.Components;
using Robust.Shared.Maths;
using Robust.Shared.Timing;
using SixLabors.ImageSharp;
@@ -59,7 +60,7 @@ namespace Content.MapRenderer.Painters
var tilePainter = new TilePainter(client, server);
var entityPainter = new GridPainter(client, server);
IMapGrid[] grids = null!;
MapGridComponent[] grids = null!;
var xformQuery = sEntityManager.GetEntityQuery<TransformComponent>();
await server.WaitPost(() =>

View File

@@ -4,6 +4,7 @@ using System.Linq;
using Robust.Client.Graphics;
using Robust.Client.ResourceManagement;
using Robust.Shared.Map;
using Robust.Shared.Map.Components;
using Robust.Shared.Timing;
using SixLabors.ImageSharp;
using SixLabors.ImageSharp.PixelFormats;
@@ -26,7 +27,7 @@ namespace Content.MapRenderer.Painters
_cResourceCache = client.ResolveDependency<IResourceCache>();
}
public void Run(Image gridCanvas, IMapGrid grid)
public void Run(Image gridCanvas, MapGridComponent grid)
{
var stopwatch = new Stopwatch();
stopwatch.Start();