From cbbebe22d89e148b4dd6ab35024b013a2603f96e Mon Sep 17 00:00:00 2001 From: deltanedas <39013340+deltanedas@users.noreply.github.com> Date: Tue, 13 Jun 2023 20:16:29 +0000 Subject: [PATCH] prevent emitters being turned on or off when unanchored (#17303) Co-authored-by: deltanedas <@deltanedas:kde.org> --- Content.Server/Singularity/EntitySystems/EmitterSystem.cs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Content.Server/Singularity/EntitySystems/EmitterSystem.cs b/Content.Server/Singularity/EntitySystems/EmitterSystem.cs index 7a86154dd0..bfe5ca27b9 100644 --- a/Content.Server/Singularity/EntitySystems/EmitterSystem.cs +++ b/Content.Server/Singularity/EntitySystems/EmitterSystem.cs @@ -317,6 +317,10 @@ namespace Content.Server.Singularity.EntitySystems private void OnSignalReceived(EntityUid uid, EmitterComponent component, ref SignalReceivedEvent args) { + // must anchor the emitter for signals to work + if (TryComp(uid, out var phys) && phys.BodyType != BodyType.Static) + return; + if (args.Port == component.OffPort) { SwitchOff(uid, component);