From b912dedbfce4670015cd35a71dea948936a87138 Mon Sep 17 00:00:00 2001 From: Winkarst <74284083+Winkarst-cpu@users.noreply.github.com> Date: Sat, 22 Feb 2025 20:45:50 +0300 Subject: [PATCH] New Feature: Admin Only messages in AHelp (#35283) * Feature * Update * Update * Update * Update Resources/Locale/en-US/administration/bwoink.ftl Co-authored-by: Pieter-Jan Briers * Yes --------- Co-authored-by: Pieter-Jan Briers --- .../Administration/Systems/BwoinkSystem.cs | 4 ++-- .../Administration/UI/Bwoink/BwoinkControl.xaml | 4 +++- .../Administration/UI/Bwoink/BwoinkControl.xaml.cs | 2 ++ .../Systems/Bwoink/AHelpUIController.cs | 12 ++++++------ .../Administration/Systems/BwoinkSystem.cs | 12 ++++++------ Content.Shared/Administration/SharedBwoinkSystem.cs | 5 ++++- Resources/Locale/en-US/administration/bwoink.ftl | 7 +++++++ 7 files changed, 30 insertions(+), 16 deletions(-) diff --git a/Content.Client/Administration/Systems/BwoinkSystem.cs b/Content.Client/Administration/Systems/BwoinkSystem.cs index 5166dc8416..7adf0069b2 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, bool playSound) + public void Send(NetUserId channelId, string text, bool playSound, bool adminOnly) { // 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, playSound: playSound)); + RaiseNetworkEvent(new BwoinkTextMessage(channelId, channelId, text, playSound: playSound, adminOnly: adminOnly)); SendInputTextUpdated(channelId, false); } diff --git a/Content.Client/Administration/UI/Bwoink/BwoinkControl.xaml b/Content.Client/Administration/UI/Bwoink/BwoinkControl.xaml index 39ea50edbe..42d6f4b354 100644 --- a/Content.Client/Administration/UI/Bwoink/BwoinkControl.xaml +++ b/Content.Client/Administration/UI/Bwoink/BwoinkControl.xaml @@ -7,7 +7,9 @@ - + + +