Update for grid API changes (#8152)
This commit is contained in:
@@ -138,8 +138,8 @@ namespace Content.MapRenderer.Painters
|
|||||||
|
|
||||||
private (float x, float y) TransformLocalPosition(Vector2 position, IMapGrid grid)
|
private (float x, float y) TransformLocalPosition(Vector2 position, IMapGrid grid)
|
||||||
{
|
{
|
||||||
var xOffset = (int) Math.Abs(grid.LocalBounds.Left);
|
var xOffset = (int) Math.Abs(grid.LocalAABB.Left);
|
||||||
var yOffset = (int) Math.Abs(grid.LocalBounds.Bottom);
|
var yOffset = (int) Math.Abs(grid.LocalAABB.Bottom);
|
||||||
var tileSize = grid.TileSize;
|
var tileSize = grid.TileSize;
|
||||||
|
|
||||||
var x = ((float) Math.Floor(position.X) + xOffset) * tileSize * TilePainter.TileImageSize;
|
var x = ((float) Math.Floor(position.X) + xOffset) * tileSize * TilePainter.TileImageSize;
|
||||||
|
|||||||
@@ -114,7 +114,7 @@ namespace Content.MapRenderer.Painters
|
|||||||
var tileXSize = grid.TileSize * TilePainter.TileImageSize;
|
var tileXSize = grid.TileSize * TilePainter.TileImageSize;
|
||||||
var tileYSize = grid.TileSize * TilePainter.TileImageSize;
|
var tileYSize = grid.TileSize * TilePainter.TileImageSize;
|
||||||
|
|
||||||
var bounds = grid.LocalBounds;
|
var bounds = grid.LocalAABB;
|
||||||
|
|
||||||
var left = bounds.Left;
|
var left = bounds.Left;
|
||||||
var right = bounds.Right;
|
var right = bounds.Right;
|
||||||
|
|||||||
@@ -31,7 +31,7 @@ namespace Content.MapRenderer.Painters
|
|||||||
var stopwatch = new Stopwatch();
|
var stopwatch = new Stopwatch();
|
||||||
stopwatch.Start();
|
stopwatch.Start();
|
||||||
|
|
||||||
var bounds = grid.LocalBounds;
|
var bounds = grid.LocalAABB;
|
||||||
var xOffset = Math.Abs(bounds.Left);
|
var xOffset = Math.Abs(bounds.Left);
|
||||||
var yOffset = Math.Abs(bounds.Bottom);
|
var yOffset = Math.Abs(bounds.Bottom);
|
||||||
var tileSize = grid.TileSize * TileImageSize;
|
var tileSize = grid.TileSize * TileImageSize;
|
||||||
|
|||||||
@@ -118,7 +118,7 @@ namespace Content.Server.StationEvents.Events
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
var bounds = mapGrid.LocalBounds;
|
var bounds = mapGrid.LocalAABB;
|
||||||
var randomX = _robustRandom.Next((int) bounds.Left, (int) bounds.Right);
|
var randomX = _robustRandom.Next((int) bounds.Left, (int) bounds.Right);
|
||||||
var randomY = _robustRandom.Next((int) bounds.Bottom, (int) bounds.Top);
|
var randomY = _robustRandom.Next((int) bounds.Bottom, (int) bounds.Top);
|
||||||
|
|
||||||
|
|||||||
@@ -208,7 +208,7 @@ namespace Content.Server.StationEvents.Events
|
|||||||
|
|
||||||
var atmosphereSystem = EntitySystem.Get<AtmosphereSystem>();
|
var atmosphereSystem = EntitySystem.Get<AtmosphereSystem>();
|
||||||
var found = false;
|
var found = false;
|
||||||
var gridBounds = grid.WorldBounds;
|
var gridBounds = grid.WorldAABB;
|
||||||
var gridPos = grid.WorldPosition;
|
var gridPos = grid.WorldPosition;
|
||||||
|
|
||||||
for (var i = 0; i < 10; i++)
|
for (var i = 0; i < 10; i++)
|
||||||
|
|||||||
Reference in New Issue
Block a user