ChatManager murder (#7337)

This commit is contained in:
mirrorcult
2022-03-30 22:21:58 -07:00
committed by GitHub
parent a11e8b676c
commit 70f0fffed2
16 changed files with 587 additions and 512 deletions

View File

@@ -1,4 +1,5 @@
using System.Collections.Generic;
using Content.Server.Chat;
using Content.Server.Chat.Managers;
using Content.Server.Radio.EntitySystems;
using Content.Shared.Examine;
@@ -23,7 +24,7 @@ namespace Content.Server.Radio.Components
public sealed class HandheldRadioComponent : Component, IListen, IRadio, IActivate, IExamine
#pragma warning restore 618
{
[Dependency] private readonly IChatManager _chatManager = default!;
private ChatSystem _chatSystem = default!;
private RadioSystem _radioSystem = default!;
private bool _radioOn;
@@ -54,13 +55,14 @@ namespace Content.Server.Radio.Components
base.Initialize();
_radioSystem = EntitySystem.Get<RadioSystem>();
_chatSystem = EntitySystem.Get<ChatSystem>();
RadioOn = false;
}
public void Speak(string message)
{
_chatManager.EntitySay(Owner, message);
_chatSystem.TrySendInGameICMessage(Owner, message, InGameICChatType.Speak, false);
}
public bool Use(EntityUid user)