diff --git a/Content.Server/_CorvaxNext/Light/ToggleableOccluderSystem.cs b/Content.Server/_CorvaxNext/Light/ToggleableOccluderSystem.cs index d7be5cfff0f..90f911aa26d 100644 --- a/Content.Server/_CorvaxNext/Light/ToggleableOccluderSystem.cs +++ b/Content.Server/_CorvaxNext/Light/ToggleableOccluderSystem.cs @@ -28,21 +28,13 @@ private void OnSignalReceived(EntityUid uid, ToggleableOccluderComponent comp, r { if (!TryComp(uid, out var occluder)) return; - - switch (args.Port) - { - case comp.OffPort: - SetState(uid, false, occluder); - break; - - case comp.OnPort: - SetState(uid, true, occluder); - break; - - case comp.TogglePort: - ToggleState(uid, occluder); - break; - } + + if (args.Port == comp.OffPort) + SetState(uid, false, occluder); + else if (args.Port == comp.OnPort) + SetState(uid, true, occluder); + else if (args.Port == comp.TogglePort) + ToggleState(uid, occluder); } public void ToggleState(EntityUid uid, OccluderComponent? occluder = null)