Fix the fix for accents on radio (#10242)
This commit is contained in:
@@ -1,3 +1,4 @@
|
||||
using Content.Server.Chat.Systems;
|
||||
using Content.Server.Radio.Components;
|
||||
using Content.Server.Radio.EntitySystems;
|
||||
using Content.Shared.Chat;
|
||||
@@ -21,6 +22,7 @@ namespace Content.Server.Headset
|
||||
[Dependency] private readonly IEntityManager _entMan = default!;
|
||||
[Dependency] private readonly IServerNetManager _netManager = default!;
|
||||
|
||||
private ChatSystem _chatSystem = default!;
|
||||
private RadioSystem _radioSystem = default!;
|
||||
|
||||
[DataField("channels", customTypeSerializer:typeof(PrototypeIdHashSetSerializer<RadioChannelPrototype>))]
|
||||
@@ -39,6 +41,7 @@ namespace Content.Server.Headset
|
||||
{
|
||||
base.Initialize();
|
||||
|
||||
_chatSystem = EntitySystem.Get<ChatSystem>();
|
||||
_radioSystem = EntitySystem.Get<RadioSystem>();
|
||||
}
|
||||
|
||||
@@ -55,6 +58,10 @@ namespace Content.Server.Headset
|
||||
|
||||
var playerChannel = actor.PlayerSession.ConnectedClient;
|
||||
|
||||
message = _chatSystem.TransformSpeech(source, message);
|
||||
if (message.Length == 0)
|
||||
return;
|
||||
|
||||
var msg = new MsgChatMessage
|
||||
{
|
||||
Channel = ChatChannel.Radio,
|
||||
|
||||
Reference in New Issue
Block a user