mirror of
https://github.com/DeltaV-Station/Delta-v.git
synced 2026-09-29 23:57:29 +00:00
Revert "Allow station tiles to be placed on solid ground and other platings. (#38898)"
This reverts commit 418b2b70b0.
Maintainer vote decided to vote this out due to code quality issues. The original contributor is aware and will get help from a maintainer to reintroduce it
This commit is contained in:
committed by
Coryler
parent
a69640f61b
commit
9661e4138e
@@ -517,39 +517,17 @@ public sealed partial class ExplosionSystem
|
||||
else if (tileDef.MapAtmosphere)
|
||||
canCreateVacuum = true; // is already a vacuum.
|
||||
|
||||
var history = CompOrNull<TileHistoryComponent>(tileRef.GridUid);
|
||||
|
||||
// break the tile into its underlying parts
|
||||
int tileBreakages = 0;
|
||||
while (maxTileBreak > tileBreakages && _robustRandom.Prob(type.TileBreakChance(effectiveIntensity)))
|
||||
{
|
||||
tileBreakages++;
|
||||
effectiveIntensity -= type.TileBreakRerollReduction;
|
||||
|
||||
ContentTileDefinition? newDef = null;
|
||||
// does this have a base-turf that we can break it down to?
|
||||
if (string.IsNullOrEmpty(tileDef.BaseTurf))
|
||||
break;
|
||||
|
||||
// if we have tile history, we revert the tile to its previous state
|
||||
var chunkIndices = SharedMapSystem.GetChunkIndices(tileRef.GridIndices, TileSystem.ChunkSize);
|
||||
if (history != null && history.ChunkHistory.TryGetValue(chunkIndices, out var chunk) &&
|
||||
chunk.History.TryGetValue(tileRef.GridIndices, out var stack) && stack.Count > 0)
|
||||
{
|
||||
// last entry in the stack
|
||||
var newId = stack[^1];
|
||||
stack.RemoveAt(stack.Count - 1);
|
||||
if (stack.Count == 0)
|
||||
chunk.History.Remove(tileRef.GridIndices);
|
||||
|
||||
Dirty(tileRef.GridUid, history);
|
||||
|
||||
newDef = (ContentTileDefinition) _tileDefinitionManager[newId.Id];
|
||||
}
|
||||
else if (tileDef.BaseTurf.HasValue)
|
||||
{
|
||||
// otherwise, we just use the base turf
|
||||
newDef = (ContentTileDefinition) _tileDefinitionManager[tileDef.BaseTurf.Value];
|
||||
}
|
||||
|
||||
if (newDef == null)
|
||||
if (_tileDefinitionManager[tileDef.BaseTurf] is not ContentTileDefinition newDef)
|
||||
break;
|
||||
|
||||
if (newDef.MapAtmosphere && !canCreateVacuum)
|
||||
|
||||
Reference in New Issue
Block a user