From 8aa57e8fd5f2d0f7fa70e13446e3c02b25fc4150 Mon Sep 17 00:00:00 2001 From: lzk <124214523+lzk228@users.noreply.github.com> Date: Sun, 24 Nov 2024 22:06:23 +0100 Subject: [PATCH] =?UTF-8?q?=D0=B1=D0=BB=D1=8F=D1=82=D1=8C=20=D0=BD=D1=83?= =?UTF-8?q?=20=D1=8D=D1=82=D0=BE=20=D1=85=D1=83=D0=B9=D0=BD=D1=8F,=20?= =?UTF-8?q?=D0=BF=D1=83=D1=81=D1=82=D1=8C=20=D0=B8=D1=84=D0=B5=D0=BB=D1=81?= =?UTF-8?q?=20=D0=B1=D1=83=D0=B4=D0=B5=D1=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Light/ToggleableOccluderSystem.cs | 22 ++++++------------- 1 file changed, 7 insertions(+), 15 deletions(-) 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)