Files
wwdpublic/Content.Server/_White/Chat/FunnyFontsChatSystem.cs
Kutosss 1fac796e5c [ADD/PORT] Шрифт клоуна (#454)
* КЛОУНСКИЙ БЛЯТЬ ШРИФТ СУЧКИ

* пенес

* 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>
2025-04-20 06:21:57 +03:00

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]";
}
}
}