Fix keyboard sounds not playing when opening a computer UI (#24348)
Fix keyboard sounds not playing on UI open
This commit is contained in:
@@ -29,7 +29,7 @@ public sealed class EmitSoundSystem : SharedEmitSoundSystem
|
|||||||
{
|
{
|
||||||
if (soundSpammer.PopUp != null)
|
if (soundSpammer.PopUp != null)
|
||||||
Popup.PopupEntity(Loc.GetString(soundSpammer.PopUp), uid);
|
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)
|
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)
|
private void HandleEmitSoundOnTrigger(EntityUid uid, EmitSoundOnTriggerComponent component, TriggerEvent args)
|
||||||
{
|
{
|
||||||
TryEmitSound(uid, component);
|
TryEmitSound(uid, component, args.User, false);
|
||||||
args.Handled = true;
|
args.Handled = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -52,6 +52,8 @@
|
|||||||
- type: EmitSoundOnUIOpen
|
- type: EmitSoundOnUIOpen
|
||||||
sound:
|
sound:
|
||||||
collection: Keyboard
|
collection: Keyboard
|
||||||
|
params:
|
||||||
|
volume: -1
|
||||||
- type: ContainerContainer
|
- type: ContainerContainer
|
||||||
containers:
|
containers:
|
||||||
board: !type:Container
|
board: !type:Container
|
||||||
|
|||||||
Reference in New Issue
Block a user