]> git.smokeofanarchy.ru Git - space-station-14.git/commitdiff
Fix item toggles where no sound exists (#24807)
authormetalgearsloth <31366439+metalgearsloth@users.noreply.github.com>
Thu, 1 Feb 2024 11:43:06 +0000 (22:43 +1100)
committerGitHub <noreply@github.com>
Thu, 1 Feb 2024 11:43:06 +0000 (22:43 +1100)
Oop

Content.Shared/Item/ItemToggle/SharedItemToggleSystem.cs

index c502f845dddacdd6818a5fd582a7c44652dd4c5c..e2e5fc2e3c34f267cf412060d8d9a047c9093d90 100644 (file)
@@ -134,10 +134,7 @@ public abstract class SharedItemToggleSystem : EntitySystem
             _light.SetEnabled(uid, true, light);
         }
 
-        SoundSpecifier? soundToPlay = itemToggle.SoundActivate;
-
-        if (soundToPlay == null)
-            return;
+        var soundToPlay = itemToggle.SoundActivate;
 
         if (predicted)
             _audio.PlayPredicted(soundToPlay, uid, user);