Skip to content

Commit

Permalink
Apply suggestions from code review
Browse files Browse the repository at this point in the history
Co-authored-by: DEATHB4DEFEAT <[email protected]>
Signed-off-by: FoxxoTrystan <[email protected]>
  • Loading branch information
FoxxoTrystan and DEATHB4DEFEAT authored Jun 13, 2024
1 parent 65eb6cb commit 5a3ccfd
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 6 deletions.
8 changes: 5 additions & 3 deletions Content.Server/Chat/Systems/ChatSystem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -241,13 +241,14 @@ public void TrySendInGameICMessage(
if (string.IsNullOrEmpty(message))
return;

// Check is the message is Sign Language, If yes handle it in a special function for it.
// Check if the message is in sign language
if (desiredType == InGameICChatType.Speak || desiredType == InGameICChatType.Whisper)
{
var language = languageOverride ?? _language.GetLanguage(source);
if (language.SignLanguage)
{
SendEntityEmote(source, message, range, nameOverride, ignoreActionBlocker, signLanguage: true);
SendEntityEmote(source, message, range, nameOverride,
ignoreActionBlocker, signLanguage: true);
return;
}
}
Expand Down Expand Up @@ -614,7 +615,8 @@ private void SendEntityEmote(

if (checkEmote)
TryEmoteChatInput(source, action);
SendInVoiceRange(ChatChannel.Emotes, name, action, wrappedMessage, obfuscated: "", obfuscatedWrappedMessage, source, range, author, null, true);
SendInVoiceRange(ChatChannel.Emotes, name, action, wrappedMessage, obfuscated: "",
obfuscatedWrappedMessage, source, range, author, null, true);
if (!hideLog)
if (name != Name(source))
_adminLogger.Add(LogType.Chat, LogImpact.Low, $"Emote from {ToPrettyString(source):user} as {name}: {action}");
Expand Down
4 changes: 2 additions & 2 deletions Content.Shared/Language/LanguagePrototype.cs
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,9 @@ public sealed class LanguagePrototype : IPrototype
public bool ObfuscateSyllables;

// <summary>
// If true, will mark the language as a SignLanguage and will be handled as such, this variable is nullable. (Please do not put SignLanguage = false or i will choke you, this does nothing!)
// If true, will mark the language as a SignLanguage and will be handled as such.
// </summary>
[DataField(required: false)]
[DataField]
public bool SignLanguage;

/// <summary>
Expand Down
2 changes: 1 addition & 1 deletion Resources/Locale/en-US/language/languages.ftl
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ language-GalacticCommon-name = Galactic common
language-GalacticCommon-description = The standard Galatic language, most commonly used for inter-species communications and legal work.
language-SignLanguage-name = Sign Language
language-SignLanguage-description = The standard Galatic sign language, used by those that are unable to speak or speak Galactic Common.
language-SignLanguage-description = The standard Galactic sign language, used by those that are unable to speak Galactic Common or at all.
language-Bubblish-name = Bubblish
language-Bubblish-description = The language of Slimes. Being a mixture of bubbling noises and pops it's very difficult to speak for humans without the use of mechanical aids.
Expand Down

0 comments on commit 5a3ccfd

Please sign in to comment.