From a3c93b0bd7478c0f75daaa2f7d0bd8b88565b27e Mon Sep 17 00:00:00 2001 From: dffdff2423 <57052305+dffdff2423@users.noreply.github.com> Date: Wed, 21 Feb 2024 00:52:03 -0600 Subject: [PATCH] Add option for admins to disable bwoink (#25008) * Add option for admins to disable bwoink In a vain attempt to get people to ahelp more, provide the possibility for admins to not play the bwoink sound if they don't want to scare the player. * Add silent indicator to discord relay * Use string interpolation --- .../Administration/Systems/BwoinkSystem.cs | 4 +-- .../UI/Bwoink/BwoinkControl.xaml | 2 ++ .../Systems/Bwoink/AHelpUIController.cs | 14 ++++----- .../Administration/Systems/BwoinkSystem.cs | 29 ++++++++++++------- .../Administration/SharedBwoinkSystem.cs | 5 +++- .../Locale/en-US/administration/bwoink.ftl | 2 ++ 6 files changed, 35 insertions(+), 21 deletions(-) diff --git a/Content.Client/Administration/Systems/BwoinkSystem.cs b/Content.Client/Administration/Systems/BwoinkSystem.cs index eafd40cc9c..5166dc8416 100644 --- a/Content.Client/Administration/Systems/BwoinkSystem.cs +++ b/Content.Client/Administration/Systems/BwoinkSystem.cs @@ -19,11 +19,11 @@ namespace Content.Client.Administration.Systems OnBwoinkTextMessageRecieved?.Invoke(this, message); } - public void Send(NetUserId channelId, string text) + public void Send(NetUserId channelId, string text, bool playSound) { // Reuse the channel ID as the 'true sender'. // Server will ignore this and if someone makes it not ignore this (which is bad, allows impersonation!!!), that will help. - RaiseNetworkEvent(new BwoinkTextMessage(channelId, channelId, text)); + RaiseNetworkEvent(new BwoinkTextMessage(channelId, channelId, text, playSound: playSound)); SendInputTextUpdated(channelId, false); } diff --git a/Content.Client/Administration/UI/Bwoink/BwoinkControl.xaml b/Content.Client/Administration/UI/Bwoink/BwoinkControl.xaml index e5269c027a..39ea50edbe 100644 --- a/Content.Client/Administration/UI/Bwoink/BwoinkControl.xaml +++ b/Content.Client/Administration/UI/Bwoink/BwoinkControl.xaml @@ -7,6 +7,8 @@ + +