[feat] Sockets, i guess mm hmm

# Conflicts:
#	Content.Server/Administration/Systems/BwoinkSystem.cs
#	Content.Server/Chat/Managers/ChatManager.cs
#	Content.Server/Entry/EntryPoint.cs
#	Content.Server/GameTicking/GameTicker.RoundFlow.cs
#	Content.Server/IoC/ServerContentIoC.cs
#	Content.Server/RoundEnd/RoundEndSystem.cs
#	Content.Server/Shuttles/Systems/EmergencyShuttleSystem.Console.cs
#	Content.Server/Shuttles/Systems/EmergencyShuttleSystem.cs
#	Content.Shared/CCVar/CCVars.cs
This commit is contained in:
rhailrake
2023-04-27 06:01:05 +06:00
committed by Remuchi
parent eeec02119d
commit aca6843c0a
26 changed files with 1175 additions and 81 deletions

View File

@@ -8,6 +8,7 @@ using Content.Server.Speech.Components;
using Content.Server.Speech.EntitySystems;
using Content.Server.Station.Components;
using Content.Server.Station.Systems;
using Content.Server.UtkaIntegration;
using Content.Shared.ActionBlocker;
using Content.Shared.CCVar;
using Content.Shared.Chat;
@@ -56,6 +57,10 @@ public sealed partial class ChatSystem : SharedChatSystem
[Dependency] private readonly SharedInteractionSystem _interactionSystem = default!;
[Dependency] private readonly ReplacementAccentSystem _wordreplacement = default!;
//WD-EDIT
[Dependency] private readonly UtkaTCPWrapper _utkaSockets = default!;
//WD-EDIT
public const int VoiceRange = 10; // how far voice goes in world units
public const int WhisperClearRange = 2; // how far whisper goes while still being understandable, in world units
public const int WhisperMuffledRange = 5; // how far whisper goes at all, in world units
@@ -571,6 +576,28 @@ public sealed partial class ChatSystem : SharedChatSystem
_adminLogger.Add(LogType.Chat, LogImpact.Low, $"Emote from {ToPrettyString(source):user} as {name}: {action}");
else
_adminLogger.Add(LogType.Chat, LogImpact.Low, $"Emote from {ToPrettyString(source):user}: {action}");
//WD-EDIT
string ckey = string.Empty;
if (TryComp<ActorComponent>(source, out var actorComponent))
{
ckey = actorComponent.PlayerSession.Name;
}
if(string.IsNullOrEmpty(ckey)) return;
var utkaEmoteEvent = new UtkaChatMeEvent()
{
Ckey = ckey,
Message = action,
CharacterName = MetaData(source).EntityName
};
_utkaSockets.SendMessageToAll(utkaEmoteEvent);
//WD-EDIT
}
// ReSharper disable once InconsistentNaming