mirror of
https://github.com/space-syndicate/space-station-14.git
synced 2026-10-09 18:31:17 +03:00
* move-accents-to-shared * Update AccentSystem.cs * Update ListeningSystem.cs * aaaaaa * Update AccentSystem.cs * oh god * aaooao * // * review * fix * Update VocalSystem.cs
16 lines
606 B
C#
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");
|
|
}
|
|
}
|