diff --git a/Content.Server/Chat/Systems/ChatSystem.cs b/Content.Server/Chat/Systems/ChatSystem.cs index 908c4a7aabb..cf31abca487 100644 --- a/Content.Server/Chat/Systems/ChatSystem.cs +++ b/Content.Server/Chat/Systems/ChatSystem.cs @@ -23,6 +23,7 @@ using Content.Shared.Players.RateLimiting; using Content.Shared.Radio; using Content.Shared.Whitelist; +using Content.Shared.Speech.Hushing; using Robust.Server.Player; using Robust.Shared.Audio; using Robust.Shared.Audio.Systems; @@ -217,6 +218,15 @@ public void TrySendInGameICMessage( checkRadioPrefix = false; message = message[1..]; } + + // Corvax-Next-Hushed-Start + // This needs to happen after prefix removal to avoid bug + if (desiredType == InGameICChatType.Speak && HasComp(source)) + { + // hushed players cannot speak on local chat so will be sent as whisper instead + desiredType = InGameICChatType.Whisper; + } + // Corvax-Next-Hushed-End bool shouldCapitalize = (desiredType != InGameICChatType.Emote); bool shouldPunctuate = _configurationManager.GetCVar(CCVars.ChatPunctuation); diff --git a/Content.Shared/_CorvaxNext/Speech/HushedComponent.cs b/Content.Shared/_CorvaxNext/Speech/HushedComponent.cs new file mode 100644 index 00000000000..db13e31438d --- /dev/null +++ b/Content.Shared/_CorvaxNext/Speech/HushedComponent.cs @@ -0,0 +1,6 @@ +using Robust.Shared.GameStates; + +namespace Content.Shared.Speech.Hushing; + +[RegisterComponent, NetworkedComponent] +public sealed partial class HushedComponent : Component; diff --git a/Resources/Locale/ru-RU/_CorvaxNext/traits/traits.ftl b/Resources/Locale/ru-RU/_CorvaxNext/traits/traits.ftl new file mode 100644 index 00000000000..99234245842 --- /dev/null +++ b/Resources/Locale/ru-RU/_CorvaxNext/traits/traits.ftl @@ -0,0 +1,2 @@ +trait-hushed-name = Тихоня +trait-hushed-desc = Вы слишком скромны и можете говорить только шёпотом. \ No newline at end of file diff --git a/Resources/Prototypes/_CorvaxNext/Traits/speech.yml b/Resources/Prototypes/_CorvaxNext/Traits/speech.yml new file mode 100644 index 00000000000..b2bc2e907f8 --- /dev/null +++ b/Resources/Prototypes/_CorvaxNext/Traits/speech.yml @@ -0,0 +1,11 @@ +- type: trait + id: Hushed + name: trait-hushed-name + description: trait-hushed-desc + category: SpeechTraits + cost: 1 + blacklist: + components: + - BorgChassis + components: + - type: Hushed \ No newline at end of file