mirror of
https://github.com/space-wizards/space-station-14.git
synced 2026-02-14 19:29:53 +01:00
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:
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user