Skip to content

Commit

Permalink
Merge branch 'master' into floof-merge
Browse files Browse the repository at this point in the history
  • Loading branch information
sleepyyapril authored Dec 3, 2024
2 parents 9e04147 + 6fad416 commit 0c0e6ea
Show file tree
Hide file tree
Showing 8 changed files with 1,015 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
using Content.Server.DeltaV.Speech.EntitySystems;

namespace Content.Server.DeltaV.Speech.Components;

// Takes the ES and assigns the system and component to each other
[RegisterComponent]
[Access(typeof(IrishAccentSystem))]
public sealed partial class IrishAccentComponent : Component
{ }
33 changes: 33 additions & 0 deletions Content.Server/DeltaV/Speech/EntitySystems/IrishAccentSystem.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
using Content.Server.DeltaV.Speech.Components;
using Content.Server.Speech;
using Content.Server.Speech.EntitySystems;
using System.Text.RegularExpressions;

namespace Content.Server.DeltaV.Speech.EntitySystems;

public sealed class IrishAccentSystem : EntitySystem
{
[Dependency] private readonly ReplacementAccentSystem _replacement = default!;

public override void Initialize()
{
base.Initialize();

SubscribeLocalEvent<IrishAccentComponent, AccentGetEvent>(OnAccentGet);
}

// converts left word when typed into the right word. For example typing you becomes ye.
public string Accentuate(string message, IrishAccentComponent component)
{
var msg = message;

msg = _replacement.ApplyReplacements(msg, "irish");

return msg;
}

private void OnAccentGet(EntityUid uid, IrishAccentComponent component, AccentGetEvent args)
{
args.Message = Accentuate(args.Message, component);
}
}
9 changes: 9 additions & 0 deletions Resources/Changelog/Den.yml
Original file line number Diff line number Diff line change
Expand Up @@ -485,3 +485,12 @@ Entries:
id: 44
time: '2024-12-02T00:53:39.0000000+00:00'
url: https://github.com/TheDenSS14/TheDen/pull/83
- author: sleepyyapril
changes:
- type: Add
message: Ported the Irish accent.
- type: Add
message: Added Irish, Spanish, French, Russian, and Mobster accents to loadouts.
id: 45
time: '2024-12-03T18:02:16.0000000+00:00'
url: https://github.com/TheDenSS14/TheDen/pull/85
Loading

0 comments on commit 0c0e6ea

Please sign in to comment.