From 4ce1aa6bfeada86290ef809d031f01879553e619 Mon Sep 17 00:00:00 2001 From: Quantum-cross <7065792+Quantum-cross@users.noreply.github.com> Date: Mon, 2 Feb 2026 07:20:12 -0500 Subject: [PATCH] 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 f6866b6af43ef3a0939147673f2303c7e90d9bca. * Ensure that anomalies do not spawn multiple entities in the same tile when `CanSpawnOnEntities` is false. --- Content.Shared/Anomaly/SharedAnomalySystem.cs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Content.Shared/Anomaly/SharedAnomalySystem.cs b/Content.Shared/Anomaly/SharedAnomalySystem.cs index 452dc73e263..b63b25fa5da 100644 --- a/Content.Shared/Anomaly/SharedAnomalySystem.cs +++ b/Content.Shared/Anomaly/SharedAnomalySystem.cs @@ -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; } }