]> git.smokeofanarchy.ru Git - space-station-14.git/commitdiff
Fix keyboard sounds not playing when opening a computer UI (#24348)
authorNemanja <98561806+EmoGarbage404@users.noreply.github.com>
Sun, 21 Jan 2024 07:36:03 +0000 (02:36 -0500)
committerGitHub <noreply@github.com>
Sun, 21 Jan 2024 07:36:03 +0000 (18:36 +1100)
Fix keyboard sounds not playing on UI open

Content.Server/Sound/EmitSoundSystem.cs
Resources/Prototypes/Entities/Structures/Machines/Computers/base_structurecomputers.yml

index e4f9ebcb43669748e316d5084d87b4007e06cad2..3c7713b305cac5eca67b69f8c161f327217f94e1 100644 (file)
@@ -29,7 +29,7 @@ public sealed class EmitSoundSystem : SharedEmitSoundSystem
             {
                 if (soundSpammer.PopUp != null)
                     Popup.PopupEntity(Loc.GetString(soundSpammer.PopUp), uid);
-                TryEmitSound(uid, soundSpammer);
+                TryEmitSound(uid, soundSpammer, predict: false);
             }
         }
     }
@@ -44,12 +44,12 @@ public sealed class EmitSoundSystem : SharedEmitSoundSystem
 
     private void HandleEmitSoundOnUIOpen(EntityUid uid, EmitSoundOnUIOpenComponent component, AfterActivatableUIOpenEvent args)
     {
-        TryEmitSound(uid, component, args.User);
+        TryEmitSound(uid, component, args.User, false);
     }
 
     private void HandleEmitSoundOnTrigger(EntityUid uid, EmitSoundOnTriggerComponent component, TriggerEvent args)
     {
-        TryEmitSound(uid, component);
+        TryEmitSound(uid, component, args.User, false);
         args.Handled = true;
     }
 }
index 5aa602aedd9355e02dd3280b288bfa498ed1015a..a5e26463b9919e0d7a434a6ab4fb844b15968b06 100644 (file)
@@ -52,6 +52,8 @@
   - type: EmitSoundOnUIOpen
     sound:
       collection: Keyboard
+      params:
+        volume: -1
   - type: ContainerContainer
     containers:
       board: !type:Container