[feat] ComicSans back to clown!
This commit is contained in:
24
Content.Server/Chat/FunnyFontsChatSystem.cs
Normal file
24
Content.Server/Chat/FunnyFontsChatSystem.cs
Normal file
@@ -0,0 +1,24 @@
|
||||
using Content.Server.Chat.Systems;
|
||||
using Content.Server.VoiceMask;
|
||||
using Content.Shared.Interaction.Components;
|
||||
|
||||
namespace Content.Server.Chat;
|
||||
|
||||
public sealed class FunnyFontsChatSystem : EntitySystem
|
||||
{
|
||||
public override void Initialize()
|
||||
{
|
||||
base.Initialize();
|
||||
SubscribeLocalEvent<SpeechTransformedEvent>(OnEntitySpeak);
|
||||
}
|
||||
|
||||
private void OnEntitySpeak(SpeechTransformedEvent ev)
|
||||
{
|
||||
if(TryComp(ev.Sender, out VoiceMaskComponent? mask) && mask.Enabled) return;
|
||||
|
||||
if (TryComp<ClumsyComponent>(ev.Sender, out _))
|
||||
{
|
||||
ev.Message = $"[font=\"ComicSansMS\"]{ev.Message}[/font]";
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user