Update for grid API changes (#8152)

This commit is contained in:
metalgearsloth
2022-05-14 14:56:15 +10:00
committed by GitHub
parent 093105c034
commit 58aae01ee3
5 changed files with 6 additions and 6 deletions

View File

@@ -138,8 +138,8 @@ namespace Content.MapRenderer.Painters
private (float x, float y) TransformLocalPosition(Vector2 position, IMapGrid grid)
{
var xOffset = (int) Math.Abs(grid.LocalBounds.Left);
var yOffset = (int) Math.Abs(grid.LocalBounds.Bottom);
var xOffset = (int) Math.Abs(grid.LocalAABB.Left);
var yOffset = (int) Math.Abs(grid.LocalAABB.Bottom);
var tileSize = grid.TileSize;
var x = ((float) Math.Floor(position.X) + xOffset) * tileSize * TilePainter.TileImageSize;

View File

@@ -114,7 +114,7 @@ namespace Content.MapRenderer.Painters
var tileXSize = grid.TileSize * TilePainter.TileImageSize;
var tileYSize = grid.TileSize * TilePainter.TileImageSize;
var bounds = grid.LocalBounds;
var bounds = grid.LocalAABB;
var left = bounds.Left;
var right = bounds.Right;

View File

@@ -31,7 +31,7 @@ namespace Content.MapRenderer.Painters
var stopwatch = new Stopwatch();
stopwatch.Start();
var bounds = grid.LocalBounds;
var bounds = grid.LocalAABB;
var xOffset = Math.Abs(bounds.Left);
var yOffset = Math.Abs(bounds.Bottom);
var tileSize = grid.TileSize * TileImageSize;

View File

@@ -118,7 +118,7 @@ namespace Content.Server.StationEvents.Events
return false;
}
var bounds = mapGrid.LocalBounds;
var bounds = mapGrid.LocalAABB;
var randomX = _robustRandom.Next((int) bounds.Left, (int) bounds.Right);
var randomY = _robustRandom.Next((int) bounds.Bottom, (int) bounds.Top);

View File

@@ -208,7 +208,7 @@ namespace Content.Server.StationEvents.Events
var atmosphereSystem = EntitySystem.Get<AtmosphereSystem>();
var found = false;
var gridBounds = grid.WorldBounds;
var gridBounds = grid.WorldAABB;
var gridPos = grid.WorldPosition;
for (var i = 0; i < 10; i++)