Remove plural BaseTurfs as a thing in favour of BaseTurf (#16560)
This commit is contained in:
@@ -467,10 +467,10 @@ public sealed partial class ExplosionSystem : EntitySystem
|
||||
effectiveIntensity -= type.TileBreakRerollReduction;
|
||||
|
||||
// does this have a base-turf that we can break it down to?
|
||||
if (tileDef.BaseTurfs.Count == 0)
|
||||
if (string.IsNullOrEmpty(tileDef.BaseTurf))
|
||||
break;
|
||||
|
||||
if (_tileDefinitionManager[tileDef.BaseTurfs[^1]] is not ContentTileDefinition newDef)
|
||||
if (_tileDefinitionManager[tileDef.BaseTurf] is not ContentTileDefinition newDef)
|
||||
break;
|
||||
|
||||
if (newDef.IsSpace && !canCreateVacuum)
|
||||
|
||||
@@ -79,13 +79,19 @@ public sealed class TileSystem : EntitySystem
|
||||
|
||||
private bool DeconstructTile(TileRef tileRef)
|
||||
{
|
||||
var indices = tileRef.GridIndices;
|
||||
if (tileRef.Tile.IsEmpty)
|
||||
return false;
|
||||
|
||||
var tileDef = (ContentTileDefinition) _tileDefinitionManager[tileRef.Tile.TypeId];
|
||||
|
||||
if (string.IsNullOrEmpty(tileDef.BaseTurf))
|
||||
return false;
|
||||
|
||||
var mapGrid = _mapManager.GetGrid(tileRef.GridUid);
|
||||
|
||||
const float margin = 0.1f;
|
||||
var bounds = mapGrid.TileSize - margin * 2;
|
||||
var indices = tileRef.GridIndices;
|
||||
var coordinates = mapGrid.GridTileToLocal(indices)
|
||||
.Offset(new Vector2(
|
||||
(_robustRandom.NextFloat() - 0.5f) * bounds,
|
||||
@@ -102,7 +108,7 @@ public sealed class TileSystem : EntitySystem
|
||||
_decal.RemoveDecal(tileRef.GridUid, id);
|
||||
}
|
||||
|
||||
var plating = _tileDefinitionManager[tileDef.BaseTurfs[^1]];
|
||||
var plating = _tileDefinitionManager[tileDef.BaseTurf];
|
||||
|
||||
mapGrid.SetTile(tileRef.GridIndices, new Tile(plating.TileId));
|
||||
|
||||
|
||||
@@ -34,7 +34,7 @@ public sealed partial class ToolSystem
|
||||
|
||||
if (_tileDefinitionManager[tile.Tile.TypeId] is not ContentTileDefinition tileDef
|
||||
|| !tileDef.CanWirecutter
|
||||
|| tileDef.BaseTurfs.Count == 0
|
||||
|| string.IsNullOrEmpty(tileDef.BaseTurf)
|
||||
|| tile.IsBlockedTurf(true))
|
||||
return;
|
||||
|
||||
@@ -66,8 +66,8 @@ public sealed partial class ToolSystem
|
||||
|
||||
if (_tileDefinitionManager[tile.Tile.TypeId] is not ContentTileDefinition tileDef
|
||||
|| !tileDef.CanWirecutter
|
||||
|| tileDef.BaseTurfs.Count == 0
|
||||
|| _tileDefinitionManager[tileDef.BaseTurfs[^1]] is not ContentTileDefinition newDef
|
||||
|| string.IsNullOrEmpty(tileDef.BaseTurf)
|
||||
|| _tileDefinitionManager[tileDef.BaseTurf] is not ContentTileDefinition newDef
|
||||
|| tile.IsBlockedTurf(true))
|
||||
return false;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user