mirror of
https://github.com/space-wizards/RobustToolbox.git
synced 2026-02-15 03:30:53 +01:00
Replace obsolete functions in GridFixtureSystem (#5484)
This commit is contained in:
@@ -285,7 +285,7 @@ namespace Robust.Server.Physics
|
||||
foreach (var index in node.Indices)
|
||||
{
|
||||
var tilePos = offset + index;
|
||||
tileData.Add((tilePos, oldGrid.GetTileRef(tilePos).Tile));
|
||||
tileData.Add((tilePos, _maps.GetTileRef(oldGridUid, oldGrid, tilePos).Tile));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -355,7 +355,7 @@ namespace Robust.Server.Physics
|
||||
}
|
||||
|
||||
// Set tiles on old grid
|
||||
oldGrid.SetTiles(tileData);
|
||||
_maps.SetTiles(oldGridUid, oldGrid, tileData);
|
||||
GenerateSplitNodes(newGridUid, newGrid);
|
||||
SendNodeDebug(newGridUid);
|
||||
}
|
||||
@@ -388,7 +388,7 @@ namespace Robust.Server.Physics
|
||||
|
||||
private void GenerateSplitNodes(EntityUid gridUid, MapGridComponent grid)
|
||||
{
|
||||
foreach (var chunk in grid.GetMapChunks().Values)
|
||||
foreach (var chunk in _maps.GetMapChunks(gridUid, grid).Values)
|
||||
{
|
||||
var group = CreateNodes(gridUid, grid, chunk);
|
||||
_nodes[gridUid].Add(chunk.Indices, group);
|
||||
@@ -479,7 +479,7 @@ namespace Robust.Server.Physics
|
||||
if (index.X == 0)
|
||||
{
|
||||
// Check West
|
||||
if (grid.TryGetChunk(new Vector2i(chunk.Indices.X - 1, chunk.Indices.Y), out neighborChunk) &&
|
||||
if (_maps.TryGetChunk(gridEuid, grid, new Vector2i(chunk.Indices.X - 1, chunk.Indices.Y), out neighborChunk) &&
|
||||
TryGetNode(gridEuid, neighborChunk, new Vector2i(chunk.ChunkSize - 1, index.Y), out neighborNode))
|
||||
{
|
||||
chunkNode.Neighbors.Add(neighborNode);
|
||||
@@ -490,7 +490,7 @@ namespace Robust.Server.Physics
|
||||
if (index.Y == 0)
|
||||
{
|
||||
// Check South
|
||||
if (grid.TryGetChunk(new Vector2i(chunk.Indices.X, chunk.Indices.Y - 1), out neighborChunk) &&
|
||||
if (_maps.TryGetChunk(gridEuid, grid, new Vector2i(chunk.Indices.X, chunk.Indices.Y - 1), out neighborChunk) &&
|
||||
TryGetNode(gridEuid, neighborChunk, new Vector2i(index.X, chunk.ChunkSize - 1), out neighborNode))
|
||||
{
|
||||
chunkNode.Neighbors.Add(neighborNode);
|
||||
@@ -501,7 +501,7 @@ namespace Robust.Server.Physics
|
||||
if (index.X == chunk.ChunkSize - 1)
|
||||
{
|
||||
// Check East
|
||||
if (grid.TryGetChunk(new Vector2i(chunk.Indices.X + 1, chunk.Indices.Y), out neighborChunk) &&
|
||||
if (_maps.TryGetChunk(gridEuid, grid, new Vector2i(chunk.Indices.X + 1, chunk.Indices.Y), out neighborChunk) &&
|
||||
TryGetNode(gridEuid, neighborChunk, new Vector2i(0, index.Y), out neighborNode))
|
||||
{
|
||||
chunkNode.Neighbors.Add(neighborNode);
|
||||
@@ -512,7 +512,7 @@ namespace Robust.Server.Physics
|
||||
if (index.Y == chunk.ChunkSize - 1)
|
||||
{
|
||||
// Check North
|
||||
if (grid.TryGetChunk(new Vector2i(chunk.Indices.X, chunk.Indices.Y + 1), out neighborChunk) &&
|
||||
if (_maps.TryGetChunk(gridEuid, grid, new Vector2i(chunk.Indices.X, chunk.Indices.Y + 1), out neighborChunk) &&
|
||||
TryGetNode(gridEuid, neighborChunk, new Vector2i(index.X, 0), out neighborNode))
|
||||
{
|
||||
chunkNode.Neighbors.Add(neighborNode);
|
||||
|
||||
Reference in New Issue
Block a user