mirror of
https://github.com/space-syndicate/space-station-14.git
synced 2026-10-09 10:21:18 +03:00
Fix radio/chat error (#9264)
This commit is contained in:
parent
8df89bd055
commit
bb04646bbe
1 changed files with 12 additions and 3 deletions
|
|
@ -231,6 +231,8 @@ public sealed partial class ChatSystem : SharedChatSystem
|
|||
var (message, channel) = GetRadioPrefix(source, originalMessage);
|
||||
|
||||
message = TransformSpeech(source, message);
|
||||
if (message.Length == 0)
|
||||
return;
|
||||
|
||||
if (channel != null)
|
||||
_listener.PingListeners(source, message, channel);
|
||||
|
|
@ -249,11 +251,14 @@ public sealed partial class ChatSystem : SharedChatSystem
|
|||
_adminLogger.Add(LogType.Chat, LogImpact.Low, $"Say from {ToPrettyString(source):user}, original: {originalMessage}, transformed: {message}.");
|
||||
}
|
||||
|
||||
private void SendEntityWhisper(EntityUid source, string message, bool hideChat = false)
|
||||
private void SendEntityWhisper(EntityUid source, string originalMessage, bool hideChat = false)
|
||||
{
|
||||
if (!_actionBlocker.CanSpeak(source)) return;
|
||||
|
||||
message = TransformSpeech(source, message);
|
||||
var message = TransformSpeech(source, originalMessage);
|
||||
if (message.Length == 0)
|
||||
return;
|
||||
|
||||
var obfuscatedMessage = ObfuscateMessageReadability(message, 0.2f);
|
||||
|
||||
var transformSource = Transform(source);
|
||||
|
|
@ -289,7 +294,11 @@ public sealed partial class ChatSystem : SharedChatSystem
|
|||
|
||||
var ev = new EntitySpokeEvent(message);
|
||||
RaiseLocalEvent(source, ev, false);
|
||||
_adminLogger.Add(LogType.Chat, LogImpact.Low, $"Whisper from {ToPrettyString(source):user}: {message}");
|
||||
|
||||
if (originalMessage == message)
|
||||
_adminLogger.Add(LogType.Chat, LogImpact.Low, $"Whisper from {ToPrettyString(source):user}: {originalMessage}.");
|
||||
else
|
||||
_adminLogger.Add(LogType.Chat, LogImpact.Low, $"Whisper from {ToPrettyString(source):user}, original: {originalMessage}, transformed: {message}.");
|
||||
}
|
||||
|
||||
private void SendEntityEmote(EntityUid source, string action, bool hideChat)
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue