Prevent anomalies from spawning multiple entities on the same tile when instructed not to. (#37833)

* Fix the ability to hit overlapping walls.

* Revert "Fix the ability to hit overlapping walls."

This reverts commit f6866b6af4.

* Ensure that anomalies do not spawn multiple entities in the same tile when `CanSpawnOnEntities` is false.
This commit is contained in:
Quantum-cross
2026-02-02 07:20:12 -05:00
committed by GitHub
parent fae9b35aaa
commit 4ce1aa6bfe

View File

@@ -431,6 +431,9 @@ public abstract class SharedAnomalySystem : EntitySystem
if (!settings.CanSpawnOnEntities)
{
// If it can't spawn on entities, ensure that maximum one entity will be spawned here this pulse.
tilerefs.Remove(tileref);
var valid = true;
foreach (var ent in _map.GetAnchoredEntities(xform.GridUid.Value, grid, tileref.GridIndices))
{
@@ -447,7 +450,6 @@ public abstract class SharedAnomalySystem : EntitySystem
}
if (!valid)
{
tilerefs.Remove(tileref);
continue;
}
}