Replace obsolete Tile Access methods (#32508)
* Replace obsolete SetTile * Remove obsolete GetTileRef & GetAllTiles * Forgor * Apply suggested `GetMapOrInvalid`
This commit is contained in:
@@ -36,6 +36,7 @@ public sealed class FloorTileSystem : EntitySystem
|
||||
[Dependency] private readonly SharedTransformSystem _transform = default!;
|
||||
[Dependency] private readonly TileSystem _tile = default!;
|
||||
[Dependency] private readonly SharedPhysicsSystem _physics = default!;
|
||||
[Dependency] private readonly SharedMapSystem _map = default!;
|
||||
|
||||
private static readonly Vector2 CheckRange = new(1f, 1f);
|
||||
|
||||
@@ -132,7 +133,7 @@ public sealed class FloorTileSystem : EntitySystem
|
||||
return;
|
||||
}
|
||||
|
||||
var tile = mapGrid.GetTileRef(location);
|
||||
var tile = _map.GetTileRef(gridUid, mapGrid, location);
|
||||
var baseTurf = (ContentTileDefinition) _tileDefinitionManager[tile.Tile.TypeId];
|
||||
|
||||
if (HasBaseTurf(currentTileDefinition, baseTurf.ID))
|
||||
@@ -176,7 +177,7 @@ public sealed class FloorTileSystem : EntitySystem
|
||||
|
||||
var random = new System.Random((int) _timing.CurTick.Value);
|
||||
var variant = _tile.PickVariant((ContentTileDefinition) _tileDefinitionManager[tileId], random);
|
||||
mapGrid.SetTile(location.Offset(new Vector2(offset, offset)), new Tile(tileId, 0, variant));
|
||||
_map.SetTile(gridUid, mapGrid,location.Offset(new Vector2(offset, offset)), new Tile(tileId, 0, variant));
|
||||
|
||||
_audio.PlayPredicted(placeSound, location, user);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user