Southern accent (#26543)
* created the AccentComponent and the AccentSystem * word replacement schtuhff * made it a trait fr ongg!!1 * Update Content.Server/Speech/EntitySystems/SouthernAccentSystem.cs --------- Co-authored-by: metalgearsloth <31366439+metalgearsloth@users.noreply.github.com>
This commit is contained in:
@@ -0,0 +1,8 @@
|
||||
using Content.Server.Speech.EntitySystems;
|
||||
|
||||
namespace Content.Server.Speech.Components;
|
||||
|
||||
[RegisterComponent]
|
||||
[Access(typeof(SouthernAccentSystem))]
|
||||
public sealed partial class SouthernAccentComponent : Component
|
||||
{ }
|
||||
28
Content.Server/Speech/EntitySystems/SouthernAccentSystem.cs
Normal file
28
Content.Server/Speech/EntitySystems/SouthernAccentSystem.cs
Normal file
@@ -0,0 +1,28 @@
|
||||
using System.Text.RegularExpressions;
|
||||
using Content.Server.Speech.Components;
|
||||
|
||||
namespace Content.Server.Speech.EntitySystems;
|
||||
|
||||
public sealed class SouthernAccentSystem : EntitySystem
|
||||
{
|
||||
[Dependency] private readonly ReplacementAccentSystem _replacement = default!;
|
||||
|
||||
public override void Initialize()
|
||||
{
|
||||
base.Initialize();
|
||||
SubscribeLocalEvent<SouthernAccentComponent, AccentGetEvent>(OnAccent);
|
||||
}
|
||||
|
||||
private void OnAccent(EntityUid uid, SouthernAccentComponent component, AccentGetEvent args)
|
||||
{
|
||||
var message = args.Message;
|
||||
|
||||
message = _replacement.ApplyReplacements(message, "southern");
|
||||
|
||||
//They shoulda started runnin' an' hidin' from me!
|
||||
message = Regex.Replace(message, @"ing\b", "in'");
|
||||
message = Regex.Replace(message, @"\band\b", "an'");
|
||||
message = Regex.Replace(message, "d've", "da");
|
||||
args.Message = message;
|
||||
}
|
||||
};
|
||||
17
Resources/Locale/en-US/accent/southern.ftl
Normal file
17
Resources/Locale/en-US/accent/southern.ftl
Normal file
@@ -0,0 +1,17 @@
|
||||
accent-southern-words-1 = you all
|
||||
accent-southern-words-replace-1 = y'all
|
||||
|
||||
accent-southern-words-2 = you guys
|
||||
accent-southern-words-replace-2 = y'all
|
||||
|
||||
accent-southern-words-3 = isn't
|
||||
accent-southern-words-replace-3 = ain't
|
||||
|
||||
accent-southern-words-4 = is not
|
||||
accent-southern-words-replace-4 = ain't
|
||||
|
||||
accent-southern-words-5 = aren't
|
||||
accent-southern-words-replace-5 = ain't
|
||||
|
||||
accent-southern-words-6 = are not
|
||||
accent-southern-words-replace-6 = ain't
|
||||
@@ -33,5 +33,8 @@ trait-frontal-lisp-desc = You thpeak with a lithp
|
||||
trait-socialanxiety-name = Social Anxiety
|
||||
trait-socialanxiety-desc = You are anxious when you speak and stutter.
|
||||
|
||||
trait-southern-name = Southern Drawl
|
||||
trait-southern-desc = Are you wonderin' what this does?
|
||||
|
||||
trait-snoring-name = Snoring
|
||||
trait-snoring-desc = You will snore while sleeping.
|
||||
|
||||
@@ -367,6 +367,15 @@
|
||||
accent-cowboy-words-98: accent-cowboy-replacement-98
|
||||
accent-cowboy-words-99: accent-cowboy-replacement-99
|
||||
|
||||
- type: accent
|
||||
id: southern
|
||||
wordReplacements:
|
||||
accent-southern-words-1: accent-southern-words-replace-1
|
||||
accent-southern-words-2: accent-southern-words-replace-2
|
||||
accent-southern-words-3: accent-southern-words-replace-3
|
||||
accent-southern-words-4: accent-southern-words-replace-4
|
||||
accent-southern-words-5: accent-southern-words-replace-5
|
||||
accent-southern-words-6: accent-southern-words-replace-6
|
||||
|
||||
# For the chat sanitization system
|
||||
- type: accent
|
||||
|
||||
@@ -16,3 +16,10 @@
|
||||
- type: MothAccent
|
||||
- type: ReplacementAccent
|
||||
accent: dwarf
|
||||
|
||||
- type: trait
|
||||
id: Southern
|
||||
name: trait-southern-name
|
||||
description: trait-southern-desc
|
||||
components:
|
||||
- type: SouthernAccent
|
||||
|
||||
Reference in New Issue
Block a user