Added Whisper system for talking with players 2 tiles away. (#5994)

Co-authored-by: metalgearsloth <comedian_vs_clown@hotmail.com>
This commit is contained in:
Michael Phillips
2022-01-11 06:48:18 -08:00
committed by GitHub
parent b3706b9467
commit 86812c1ad7
24 changed files with 406 additions and 225 deletions

View File

@@ -198,6 +198,7 @@ namespace Content.Client.Chat.Managers
{
// can always hear local / radio / emote when in the game
FilterableChannels |= ChatChannel.Local;
FilterableChannels |= ChatChannel.Whisper;
FilterableChannels |= ChatChannel.Radio;
FilterableChannels |= ChatChannel.Emotes;
@@ -206,6 +207,7 @@ namespace Content.Client.Chat.Managers
if (!IsGhost)
{
SelectableChannels |= ChatSelectChannel.Local;
SelectableChannels |= ChatSelectChannel.Whisper;
SelectableChannels |= ChatSelectChannel.Radio;
SelectableChannels |= ChatSelectChannel.Emotes;
}
@@ -353,6 +355,10 @@ namespace Content.Client.Chat.Managers
_consoleHost.ExecuteCommand($"say \"{CommandParsing.Escape(str)}\"");
break;
case ChatSelectChannel.Whisper:
_consoleHost.ExecuteCommand($"whisper \"{CommandParsing.Escape(str)}\"");
break;
default:
throw new ArgumentOutOfRangeException(nameof(channel), channel, null);
}
@@ -405,6 +411,10 @@ namespace Content.Client.Chat.Managers
AddSpeechBubble(msg, SpeechBubble.SpeechType.Say);
break;
case ChatChannel.Whisper:
AddSpeechBubble(msg, SpeechBubble.SpeechType.Whisper);
break;
case ChatChannel.Dead:
if (!IsGhost)
break;