CatStation/Content.Shared/Speech/EntitySystems/BleatingAccentSystem.cs
Pok 7a8fab78e3
Move Accents to Shared v2 (#44772)
* move-accents-to-shared

* Update AccentSystem.cs

* Update ListeningSystem.cs

* aaaaaa

* Update AccentSystem.cs

* oh god

* aaooao

* //

* review

* fix

* Update VocalSystem.cs
2026-07-25 22:29:39 +00:00

16 lines
606 B
C#

using System.Text.RegularExpressions;
using Content.Shared.Speech.Components;
namespace Content.Shared.Speech.EntitySystems;
public sealed partial class BleatingAccentSystem : RelayAccentSystem<BleatingAccentComponent>
{
private static readonly Regex BleatRegex = new("([mbdlpwhrkcnytfo])([aiu])", RegexOptions.IgnoreCase);
public override string Accentuate(string message, Entity<BleatingAccentComponent>? ent = null)
{
// Repeats the vowel in certain consonant-vowel pairs
// So you taaaalk liiiike thiiiis
return BleatRegex.Replace(message, "$1$2$2$2$2");
}
}