CatStation/Content.Shared/Speech/EntitySystems/AccentSystem.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

21 lines
604 B
C#

using System.Text.RegularExpressions;
using Content.Shared.Chat;
namespace Content.Shared.Speech.EntitySystems;
public sealed partial class AccentSystem : EntitySystem
{
public static readonly Regex SentenceRegex = new(@"(?<=[\.!\?‽])(?![\.!\?‽])", RegexOptions.Compiled);
[SubscribeLocalEvent]
private void AccentHandler(TransformSpeechEvent args)
{
if (args.Cancelled)
return;
var accentEvent = new AccentGetEvent(args.Sender, args.Message);
RaiseLocalEvent(args.Sender, ref accentEvent);
args.Message = accentEvent.Message;
}
}