Media
![image](https://github.com/user-attachments/assets/ac0c1a57-da49-4419-bb75-da0a308eee7d)
![image](https://github.com/user-attachments/assets/0739a740-4adf-4ba1-a852-0a382a534d8d)
---
# Changelog
:cl: FoxxoTrystan
- add: Added the ability to speak with Sign Language.
---
Content.Server/Chat/Systems/ChatSystem.cs | 54 ++++++++++++++++---
Content.Shared/Language/LanguagePrototype.cs | 8 ++-
Resources/Locale/en-US/language/languages.ftl | 3 ++
.../Locale/en-US/language/sign-language.ftl | 4 ++
Resources/Prototypes/Language/languages.yml | 9 ++++
5 files changed, 69 insertions(+), 9 deletions(-)
create mode 100644 Resources/Locale/en-US/language/sign-language.ftl
diff --git a/Content.Server/Chat/Systems/ChatSystem.cs b/Content.Server/Chat/Systems/ChatSystem.cs
index 58bc5dac65f..bfb38457e92 100644
--- a/Content.Server/Chat/Systems/ChatSystem.cs
+++ b/Content.Server/Chat/Systems/ChatSystem.cs
@@ -241,6 +241,17 @@ public void TrySendInGameICMessage(
if (string.IsNullOrEmpty(message))
return;
+ // Check if the message is in sign language
+ if (desiredType == InGameICChatType.Speak || desiredType == InGameICChatType.Whisper)
+ {
+ var language = languageOverride ?? _language.GetLanguage(source);
+ if (language.SignLanguage ?? false)
+ {
+ SendEntityEmote(source, message, range, nameOverride, ignoreActionBlocker, signLanguage: true, languageOverride: languageOverride);
+ return;
+ }
+ }
+
// This message may have a radio prefix, and should then be whispered to the resolved radio channel
if (checkRadioPrefix)
{
@@ -573,7 +584,9 @@ private void SendEntityEmote(
bool hideLog = false,
bool checkEmote = true,
bool ignoreActionBlocker = false,
- NetUserId? author = null
+ NetUserId? author = null,
+ LanguagePrototype? languageOverride = null,
+ bool? signLanguage = false
)
{
if (!_actionBlocker.CanEmote(source) && !ignoreActionBlocker)
@@ -583,15 +596,32 @@ private void SendEntityEmote(
var ent = Identity.Entity(source, EntityManager);
string name = FormattedMessage.EscapeText(nameOverride ?? Name(ent));
+ var language = languageOverride ?? _language.GetLanguage(source);
+
// Emotes use Identity.Name, since it doesn't actually involve your voice at all.
- var wrappedMessage = Loc.GetString("chat-manager-entity-me-wrap-message",
- ("entityName", name),
- ("entity", ent),
- ("message", FormattedMessage.RemoveMarkup(action)));
+ var wrappedMessage = "";
+ var obfuscatedWrappedMessage = "";
+ if (signLanguage == true)
+ {
+ wrappedMessage = Loc.GetString("entity-signlanguage-message",
+ ("entityName", name),
+ ("message", FormattedMessage.EscapeText(action)));
+
+ obfuscatedWrappedMessage = Loc.GetString(_language.ObfuscateSpeech(action, language),
+ ("entityName", name));
+ }
+ else
+ {
+ wrappedMessage = Loc.GetString("chat-manager-entity-me-wrap-message",
+ ("entityName", name),
+ ("entity", ent),
+ ("message", FormattedMessage.RemoveMarkup(action)));
+
+ }
if (checkEmote)
TryEmoteChatInput(source, action);
- SendInVoiceRange(ChatChannel.Emotes, name, action, wrappedMessage, obfuscated: "", obfuscatedWrappedMessage: "", source, range, author);
+ SendInVoiceRange(ChatChannel.Emotes, name, action, wrappedMessage, obfuscated: "", obfuscatedWrappedMessage, source, range, author, signLanguage: true);
if (!hideLog)
if (name != Name(source))
_adminLogger.Add(LogType.Chat, LogImpact.Low, $"Emote from {ToPrettyString(source):user} as {name}: {action}");
@@ -705,7 +735,7 @@ private MessageRangeCheckResult MessageRangeCheck(ICommonSession session, ICChat
///