-
Notifications
You must be signed in to change notification settings - Fork 55
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' into upstream0611
- Loading branch information
Showing
81 changed files
with
199,566 additions
and
481 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
using Robust.Shared.Utility; | ||
using Content.Shared.ADT.Language; | ||
|
||
namespace Content.Server.Chat.Systems; | ||
|
||
public sealed partial class ChatSystem | ||
{ | ||
public (string, string) GetLanguageColoredMessages(EntityUid sender, string message, LanguagePrototype language) | ||
{ | ||
string coloredMessage = message; | ||
string coloredLanguageMessage = _language.ObfuscateMessage(sender, message, language); | ||
|
||
if (language.Color != null) | ||
{ | ||
coloredMessage = "[color=" + language.Color.Value.ToHex().ToString() + "]" + coloredMessage + "[/color]"; | ||
coloredLanguageMessage = "[color=" + language.Color.Value.ToHex().ToString() + "]" + coloredLanguageMessage + "[/color]"; | ||
} | ||
|
||
return (coloredMessage, coloredLanguageMessage); | ||
} | ||
|
||
public (string, string) GetLanguageICSanitizedMessages(EntityUid sender, string message, LanguagePrototype language) | ||
{ | ||
message = SanitizeInGameICMessage(sender, FormattedMessage.EscapeText(message), out _); | ||
string languageMessage = SanitizeInGameICMessage(sender, FormattedMessage.EscapeText(_language.ObfuscateMessage(sender, message, language)), out _); | ||
|
||
return (message, languageMessage); | ||
} | ||
|
||
public (string, string) GetObfuscatedLanguageMessages(EntityUid source, string message, LanguagePrototype language) | ||
{ | ||
var obfuscatedMessage = ObfuscateMessageReadability(message, 0.2f); | ||
var obfuscatedLanguageMessage = ObfuscateMessageReadability(_language.ObfuscateMessage(source, message, language), 0.2f); | ||
|
||
return (obfuscatedMessage, obfuscatedLanguageMessage); | ||
} | ||
|
||
public (string, string, string, string) GetColoredObfuscatedLanguageMessages(EntityUid source, string message, LanguagePrototype language) | ||
{ | ||
var languageMessage = _language.ObfuscateMessage(source, message, language); | ||
var obfuscatedMessage = ObfuscateMessageReadability(message, 0.2f); | ||
var obfuscatedLanguageMessage = ObfuscateMessageReadability(languageMessage, 0.2f); | ||
|
||
if (language.Color != null) | ||
{ | ||
message = "[color=" + language.Color.Value.ToHex().ToString() + "]" + message + "[/color]"; | ||
languageMessage = "[color=" + language.Color.Value.ToHex().ToString() + "]" + languageMessage + "[/color]"; | ||
obfuscatedMessage = "[color=" + language.Color.Value.ToHex().ToString() + "]" + obfuscatedMessage + "[/color]"; | ||
obfuscatedLanguageMessage = "[color=" + language.Color.Value.ToHex().ToString() + "]" + obfuscatedLanguageMessage + "[/color]"; | ||
} | ||
|
||
return (message, languageMessage, obfuscatedMessage, obfuscatedLanguageMessage); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 2 additions & 0 deletions
2
Resources/Locale/ru-RU/ADT/Interaction/interaction-system.ftl
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
battery-drinker-verb-drink = Использовать аккумулятор для зарядки. | ||
battery-drinker-empty = Аккумулятор для зарядки пуст. |
Oops, something went wrong.