Skip to content

Commit

Permalink
Merge branch 'new-frontiers-14:master' into 2024-06-Wizard-NPCs-Rework
Browse files Browse the repository at this point in the history
  • Loading branch information
ErhardSteinhauer authored Jun 17, 2024
2 parents 6b05efe + 8c6dc9a commit 5da790a
Show file tree
Hide file tree
Showing 369 changed files with 15,296 additions and 8,760 deletions.
7 changes: 0 additions & 7 deletions Content.Server/Speech/Components/GoblinAccentComponent.cs

This file was deleted.

8 changes: 8 additions & 0 deletions Content.Server/_NF/Speech/Components/GoblinAccentComponent.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
using Content.Server._NF.Speech.EntitySystems;

namespace Content.Server._NF.Speech.Components;

[RegisterComponent]
[Access(typeof(GoblinAccentSystem))]
public sealed partial class GoblinAccentComponent : Component
{ }
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
namespace Content.Server._NF.Speech.Components
{
[RegisterComponent]
public sealed partial class StreetpunkAccentComponent : Component
{
}
}
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
using Content.Server.Speech.Components;
using Robust.Shared.Random;
using System.Text.RegularExpressions;
using Content.Server._NF.Speech.Components;
using Content.Server.Speech;
using Content.Server.Speech.EntitySystems;

namespace Content.Server.Speech.EntitySystems;
namespace Content.Server._NF.Speech.EntitySystems;

public sealed class GoblinAccentSystem : EntitySystem
{
Expand Down
42 changes: 42 additions & 0 deletions Content.Server/_NF/Speech/EntitySystems/StreetpunkAccentSystem.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
using Content.Server._NF.Speech.Components;
using Content.Server.Speech;
using Content.Server.Speech.EntitySystems;
using System.Text.RegularExpressions;

namespace Content.Server._NF.Speech.EntitySystems;

public sealed class StreetpunkAccentSystem : EntitySystem
{
[Dependency] private readonly ReplacementAccentSystem _replacement = default!;
private static readonly Regex RegexIng = new(@"ing\b");
private static readonly Regex RegexAnd = new(@"\band\b");
private static readonly Regex RegexDve = new("d've");

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

SubscribeLocalEvent<StreetpunkAccentComponent, AccentGetEvent>(OnAccentGet);
}

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

//They shoulda started runnin' an' hidin' from me! <- bit from SouthernDrawl Accent
msg = RegexIng.Replace(msg, "in'");
msg = RegexAnd.Replace(msg, "an'");
msg = RegexDve.Replace(msg, "da");

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


return msg;
}

private void OnAccentGet(EntityUid uid, StreetpunkAccentComponent component, AccentGetEvent args)
{
args.Message = Accentuate(args.Message, component);
}
}
36 changes: 36 additions & 0 deletions Resources/Changelog/Changelog.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5091,3 +5091,39 @@ Entries:
message: Stacks of spesos now display the largest valued bill on top.
id: 5041
time: '2024-06-14T23:17:33.0000000+00:00'
- author: UncaughtEx
changes:
- type: Add
message: >-
With permission from the NT Pharmaceuticals branch, fresh from the Fabs,
SBI would like to introduce the Beaker Shipyard License approved for
distribution! Yeah, Science!
id: 5042
time: '2024-06-15T02:40:48.0000000+00:00'
- author: erhardsteinhauer
changes:
- type: Fix
message: Fixed backrooms on salvage outpost dungeon theme.
id: 5043
time: '2024-06-15T18:29:25.0000000+00:00'
- author: erhardsteinhauer
changes:
- type: Add
message: >-
Added more questionable clothing choices for fashion enjoyers:
jumpsuits, jackets, armor vests, glasses, gasmasks and belts. Check your
loadouts.
- type: Add
message: Added holograffiti projector.
- type: Add
message: It is now possible to encounter bands of gangers planetside.
- type: Add
message: Added new accent - Street Punk.
id: 5044
time: '2024-06-16T22:16:33.0000000+00:00'
- author: dvir01
changes:
- type: Tweak
message: Updated Frontier Outpost.
id: 5045
time: '2024-06-16T23:24:16.0000000+00:00'
Loading

0 comments on commit 5da790a

Please sign in to comment.