Skip to content
This repository has been archived by the owner on Nov 1, 2024. It is now read-only.

Commit

Permalink
Merge pull request #314 from new-frontiers-14/master
Browse files Browse the repository at this point in the history
Рыжий ап
  • Loading branch information
Vonsant authored Jun 16, 2024
2 parents f58b320 + ae1edc3 commit 6bc49c7
Show file tree
Hide file tree
Showing 353 changed files with 6,012 additions and 48 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);
}
}
15 changes: 15 additions & 0 deletions Resources/Changelog/Changelog.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5106,3 +5106,18 @@ Entries:
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'
Loading

0 comments on commit 6bc49c7

Please sign in to comment.