mirror of
https://github.com/WWhiteDreamProject/wwdpublic.git
synced 2026-04-17 13:37:47 +03:00
24 lines
592 B
C#
24 lines
592 B
C#
using Content.Server.Chat.Systems;
|
|
using Content.Shared.Chat;
|
|
using Content.Shared.Magic;
|
|
using Content.Shared.Magic.Events;
|
|
|
|
namespace Content.Server.Magic;
|
|
|
|
public sealed class MagicSystem : SharedMagicSystem
|
|
{
|
|
[Dependency] private readonly ChatSystem _chat = default!;
|
|
|
|
public override void Initialize()
|
|
{
|
|
base.Initialize();
|
|
|
|
SubscribeLocalEvent<SpeakSpellEvent>(OnSpellSpoken);
|
|
}
|
|
|
|
private void OnSpellSpoken(ref SpeakSpellEvent args)
|
|
{
|
|
_chat.TrySendInGameICMessage(args.Performer, Loc.GetString(args.Speech), args.ChatType, false);
|
|
}
|
|
}
|