Skip to content

Commit

Permalink
Фиксы тестов
Browse files Browse the repository at this point in the history
  • Loading branch information
Farrellka-dev committed Oct 31, 2024
1 parent 43fe744 commit 947675b
Showing 1 changed file with 16 additions and 6 deletions.
22 changes: 16 additions & 6 deletions Content.Server/Chat/Systems/ChatSystem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -613,8 +613,7 @@ private void SendHiddenEntityEmote(
LanguagePrototype language,
bool hideLog = false,
bool checkEmote = true,
bool ignoreActionBlocker = false,
NetUserId? author = null
bool ignoreActionBlocker = false
)
{
if (!_actionBlocker.CanEmote(source) && !ignoreActionBlocker)
Expand All @@ -626,10 +625,21 @@ private void SendHiddenEntityEmote(
var coloredName = $"[color=#FFD29E]{name}[/color]";
var coloredAction = $"[color=#FFD29E]{FormattedMessage.RemoveMarkup(action)}[/color]";

var wrappedMessage = Loc.GetString("chat-manager-entity-me-wrap-message",
("entityName", coloredName),
("entity", ent),
("message", coloredAction));

string wrappedMessage;
try
{
wrappedMessage = Loc.GetString("chat-manager-entity-me-wrap-message",
("entityName", coloredName),
("entity", ent),
("message", coloredAction));
}
catch (NullReferenceException ex)
{
Logger.ErrorS("loc", $"Localization error: {ex}");
wrappedMessage = "Emote error";
}


if (checkEmote)
TryEmoteChatInput(source, action);
Expand Down

0 comments on commit 947675b

Please sign in to comment.