mirror of
https://github.com/WWhiteDreamProject/wwdpublic.git
synced 2026-04-17 05:27:38 +03:00
* КЛОУНСКИЙ БЛЯТЬ ШРИФТ СУЧКИ * пенес * Update fonts.yml * Update fonts.yml * Update Content.Server/_White/Chat/FunnyFontsChatSystem.cs Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> * Кролик, иди нахуй --------- Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
28 lines
743 B
C#
28 lines
743 B
C#
using Content.Server.Chat.Systems;
|
|
using Content.Server.VoiceMask;
|
|
using Content.Shared.Clumsy;
|
|
using Content.Shared.Interaction.Components;
|
|
using Robust.Shared.Network;
|
|
|
|
namespace Content.Server.Chat;
|
|
|
|
public sealed class FunnyFontsChatSystem : EntitySystem
|
|
{
|
|
public override void Initialize()
|
|
{
|
|
base.Initialize();
|
|
SubscribeLocalEvent<TransformSpeechEvent>(OnTransformSpeech);
|
|
}
|
|
|
|
private void OnTransformSpeech(TransformSpeechEvent ev)
|
|
{
|
|
if (TryComp(ev.Sender, out VoiceMaskComponent? mask) && mask.VoiceMaskName != null)
|
|
return;
|
|
|
|
if (TryComp<ClumsyComponent>(ev.Sender, out _))
|
|
{
|
|
ev.Message = $"[font=\"ComicSansMS\"]{ev.Message}[/font]";
|
|
}
|
|
}
|
|
}
|