Kills TurfHelpers (#37939)

* Create TurfSystem equivalent for and obsolete TurfHelpers.GetTileRef

* Fix EntitySystem uses of TurfHelpers.GetTileRef

* Fix EntitySystem uses of TurfHelpers.TryGetTileRef

* Fix construction condition uses of TurfHelpers.GetTileRef

* Fix last use of TurfHelpers.IsBlockedTurf

* Create TurfSystem equivalent to and obsolete TurfHelpers.GetContentTileDefinition

* Fix uses of TurfHelpers.GetContentTileDefinition(TileRef)

* Fix uses of TurfHelpers.GetContentTileDefinition(Tile)

* Create TurfSystem equivalent to and obsolete TurfHelpers.IsSpace

* Fix EntitySystem uses of TurfHelpers.IsSpace(Tile)

* Fix EntitySystem uses of TurfHelpers.IsSpace(TileRef)

* Fix remaining uses of TurfHelpers.IsSpace

* Fix uses of TurfHelpers.GetEntitiesInTile

* Delete TurfHelpers.cs

* Add GetEntitiesInTile lookup methods

* Convert some GetEntitiesInTile methods to LookupSystem extension methods

* Use new GetEntitiesInTile methods

* Recycle spiderweb hashset

* Recycle floor tile hashset
This commit is contained in:
TemporalOroboros
2025-06-21 08:23:19 -07:00
committed by GitHub
parent 334dc61d4d
commit d4876be6f0
37 changed files with 251 additions and 229 deletions

View File

@@ -54,8 +54,9 @@ namespace Content.Server.Decals.Commands
}
var mapSystem = _entManager.System<MapSystem>();
var turfSystem = _entManager.System<TurfSystem>();
var coordinates = new EntityCoordinates(gridIdRaw.Value, new Vector2(x, y));
if (mapSystem.GetTileRef(gridIdRaw.Value, grid, coordinates).IsSpace())
if (turfSystem.IsSpace(mapSystem.GetTileRef(gridIdRaw.Value, grid, coordinates)))
{
shell.WriteError($"Cannot create decal on space tile at {coordinates}.");
return;