Skip to content

Commit

Permalink
Merge pull request impstation#772 from widgetbeck/goblins
Browse files Browse the repository at this point in the history
Port Goblins from Frontier for ghostroles.
  • Loading branch information
hivehum authored Nov 24, 2024
2 parents 2159eb8 + cdbf56d commit a26a6d5
Show file tree
Hide file tree
Showing 172 changed files with 4,604 additions and 0 deletions.
7 changes: 7 additions & 0 deletions Content.Server/_NF/Goblin/Components/GoblinComponent.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
namespace Content.Server._NF.Goblin.Components;

[RegisterComponent]
public sealed partial class GoblinComponent : Component
{

}
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
{ }
59 changes: 59 additions & 0 deletions Content.Server/_NF/Speech/EntitySystems/GoblinAccentSystem.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
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;

// The whole code is a copy of SouthernAccentSystem by UBlueberry (https://github.com/UBlueberry)
public sealed class GoblinAccentSystem : EntitySystem
{
private static readonly Regex RegexIng = new(@"(in)g\b", RegexOptions.IgnoreCase);
private static readonly Regex RegexAnd = new(@"\b(an)d\b", RegexOptions.IgnoreCase);
private static readonly Regex RegexEr = new(@"([^\WpPfF])er\b"); // Keep "er", "per", "Per", "fer" and "Fer"
private static readonly Regex RegexErUpper = new(@"([^\WpPfF])ER\b"); // Keep "ER", "PER" and "FER"
private static readonly Regex RegexTwoLetterEr = new(@"(\w\w)er\b"); // Replace "..XXer", e.g. "super"->"supah"
private static readonly Regex RegexTwoLetterErUpper = new(@"(\w\w)ER\b"); // Replace "..XXER", e.g. "SUPER"->"SUPAH"
private static readonly Regex RegexErs = new(@"(\w)ers\b"); // Replace "..XXers", e.g. "fixers"->"fixas"
private static readonly Regex RegexErsUpper = new(@"(\w)ERS\b"); // Replace "..XXers", e.g. "fixers"->"fixas"
private static readonly Regex RegexTt = new(@"([aeiouy])tt", RegexOptions.IgnoreCase);
private static readonly Regex RegexOf = new(@"\b(o)f\b", RegexOptions.IgnoreCase);
private static readonly Regex RegexThe = new(@"\bthe\b");
private static readonly Regex RegexTheUpper = new(@"\bTHE\b");
private static readonly Regex RegexH = new(@"\bh", RegexOptions.IgnoreCase);
private static readonly Regex RegexSelf = new(@"self\b");
private static readonly Regex RegexSelfUpper = new(@"SELF\b");

[Dependency] private readonly ReplacementAccentSystem _replacement = default!;

public override void Initialize()
{
base.Initialize();
SubscribeLocalEvent<GoblinAccentComponent, AccentGetEvent>(OnAccent);
}

private void OnAccent(EntityUid uid, GoblinAccentComponent component, AccentGetEvent args)
{
var message = args.Message;

message = _replacement.ApplyReplacements(message, "goblin_accent");

message = RegexIng.Replace(message, "$1'"); //ing->in', ING->IN'
message = RegexAnd.Replace(message, "$1'"); //and->an', AND->AN'
message = RegexEr.Replace(message, "$1ah");
message = RegexErUpper.Replace(message, "$1AH");
message = RegexTwoLetterEr.Replace(message, "$1ah");
message = RegexTwoLetterErUpper.Replace(message, "$1AH");
message = RegexErs.Replace(message, "$1as");
message = RegexErsUpper.Replace(message, "$1AS");
message = RegexTt.Replace(message, "$1'");
message = RegexH.Replace(message, "'");
message = RegexSelf.Replace(message, "sewf");
message = RegexSelfUpper.Replace(message, "SEWF");
message = RegexOf.Replace(message, "$1'"); //of->o', OF->O'
message = RegexThe.Replace(message, "da");
message = RegexTheUpper.Replace(message, "DA");

args.Message = message;
}
};
48 changes: 48 additions & 0 deletions Resources/Audio/_NF/Voice/Goblin/attributions.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
- files: ["goblin-cackle-01.ogg, goblin-cackle-02.ogg, goblin-cackle-03.ogg"]
license: "CC0-1.0"
copyright: "Original file made by SnowFightStudios (https://freesound.org/people/SnowFightStudios/), edited (converted to mono, cropped, lowered amplitudes, exported as ogg) by erhardsteinhauer (discord/github)"
source: "https://freesound.org/people/SnowFightStudios/sounds/643664/"
- files: ["goblin-cackle-04.ogg, goblin-gasp-01.ogg, goblin-gasp-02.ogg, goblin-gasp-03.ogg"]
license: "CC0-1.0"
copyright: "Original file made by spookymodem (https://freesound.org/people/spookymodem/), edited (converted to mono, cropped, exported as ogg) by erhardsteinhauer (discord/github)"
source: "https://freesound.org/people/spookymodem/sounds/202096/"
- files: ["goblin-cackle-05.ogg"]
license: "CC-BY-4.0"
copyright: "Original file made by Nanakisan (https://freesound.org/people/Nanakisan/)"
source: "https://freesound.org/people/Nanakisan/sounds/253532/"
- files: ["goblin-scream-01.ogg"]
license: "CC0-1.0"
copyright: "Original file made by SnowFightStudios (https://freesound.org/people/SnowFightStudios/), edited (converted to mono, cropped, exported as ogg) by erhardsteinhauer (discord/github)"
source: "https://freesound.org/people/SnowFightStudios/sounds/643655/"
- files: ["goblin-scream-02.ogg, goblin-scream-03.ogg, goblin-scream-04.ogg"]
license: "CC0-1.0"
copyright: "Original file made by Duisterwho (https://freesound.org/people/Duisterwho/), edited (converted to mono, cropped, exported as ogg) by erhardsteinhauer (discord/github)"
source: "https://freesound.org/people/Duisterwho/sounds/643497/"
- files: ["goblin-cry-01.ogg, goblin-cry-02.ogg"]
license: "CC0-1.0"
copyright: "Original file made by SnowFightStudios (https://freesound.org/people/SnowFightStudios/), edited (converted to mono, cropped, exported as ogg) by erhardsteinhauer (discord/github)"
source: https://freesound.org/people/SnowFightStudios/sounds/643657/
- files: ["goblin-mutter-01.ogg, goblin-mutter-02.ogg, goblin-mutter-03.ogg, goblin-mutter-04.ogg"]
license: "CC0-1.0"
copyright: "Original file made by Fenodyrie (https://freesound.org/people/Fenodyrie/), edited (converted to mono, lowered amplitudes, exported as ogg) by erhardsteinhauer (discord/github)"
source: https://freesound.org/people/Fenodyrie/sounds/565923/
- files: ["goblin-hiss-01.ogg"]
license: "CC-BY-4.0"
copyright: "Original file made by LittleRobotSoundFactory (https://freesound.org/people/LittleRobotSoundFactory/), edited (converted to mono, exported as ogg) by erhardsteinhauer (discord/github)"
source: https://freesound.org/people/LittleRobotSoundFactory/sounds/270389/
- files: ["goblin-throat-singing-01.ogg, goblin-throat-singing-02.ogg, goblin-throat-singing-03.ogg, goblin-throat-singing-04.ogg"]
license: "CC-BY-NC-4.0"
copyright: "Original file made by djgriffin (https://freesound.org/people/djgriffin/), edited (pitch adjusted, cropped, converted to mono, exported as ogg) by erhardsteinhauer (discord/github)"
source: https://freesound.org/people/djgriffin/sounds/21215/
- files: ["goblin-throat-singing-05.ogg, goblin-throat-singing-06.ogg, goblin-throat-singing-07.ogg"]
license: "CC-BY-NC-4.0"
copyright: "Original file made by djgriffin (https://freesound.org/people/djgriffin/), edited (pitch adjusted, cropped, converted to mono, exported as ogg) by erhardsteinhauer (discord/github)"
source: https://freesound.org/people/djgriffin/sounds/21205/
- files: ["goblin-throat-singing-08.ogg"]
license: "CC-BY-NC-4.0"
copyright: "Original file made by djgriffin (https://freesound.org/people/djgriffin/), edited (pitch adjusted, cropped, converted to mono, exported as ogg) by erhardsteinhauer (discord/github)"
source: https://freesound.org/people/djgriffin/sounds/21202/
- files: ["goblin-deathgasp-01.ogg, goblin-deathgasp-02.ogg, goblin-deathgasp-03.ogg, goblin-deathgasp-04.ogg"]
license: "CC-BY-NC-4.0"
copyright: "Original file made by Fenodyrie (https://freesound.org/people/Fenodyrie/), edited (pitch adjusted, cropped, converted to mono, exported as ogg) by erhardsteinhauer (discord/github)"
source: https://freesound.org/people/Fenodyrie/sounds/565928/
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
48 changes: 48 additions & 0 deletions Resources/Audio/_NF/Voice/Goblin/license.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
- files: ["goblin-cackle-01.ogg, goblin-cackle-02.ogg, goblin-cackle-03.ogg"]
license: "CC0-1.0"
copyright: "Original file made by SnowFightStudios (https://freesound.org/people/SnowFightStudios/), edited (converted to mono, cropped, lowered amplitudes, exported as ogg) by erhardsteinhauer (discord/github)"
source: "https://freesound.org/people/SnowFightStudios/sounds/643664/"
- files: ["goblin-cackle-04.ogg, goblin-gasp-01.ogg, goblin-gasp-02.ogg, goblin-gasp-03.ogg"]
license: "CC0-1.0"
copyright: "Original file made by spookymodem (https://freesound.org/people/spookymodem/), edited (converted to mono, cropped, exported as ogg) by erhardsteinhauer (discord/github)"
source: "https://freesound.org/people/spookymodem/sounds/202096/"
- files: ["goblin-cackle-05.ogg"]
license: "CC-BY-4.0"
copyright: "Original file made by Nanakisan (https://freesound.org/people/Nanakisan/)"
source: "https://freesound.org/people/Nanakisan/sounds/253532/"
- files: ["goblin-scream-01.ogg"]
license: "CC0-1.0"
copyright: "Original file made by SnowFightStudios (https://freesound.org/people/SnowFightStudios/), edited (converted to mono, cropped, exported as ogg) by erhardsteinhauer (discord/github)"
source: "https://freesound.org/people/SnowFightStudios/sounds/643655/"
- files: ["goblin-scream-02.ogg, goblin-scream-03.ogg, goblin-scream-04.ogg"]
license: "CC0-1.0"
copyright: "Original file made by Duisterwho (https://freesound.org/people/Duisterwho/), edited (converted to mono, cropped, exported as ogg) by erhardsteinhauer (discord/github)"
source: "https://freesound.org/people/Duisterwho/sounds/643497/"
- files: ["goblin-cry-01.ogg, goblin-cry-02.ogg"]
license: "CC0-1.0"
copyright: "Original file made by SnowFightStudios (https://freesound.org/people/SnowFightStudios/), edited (converted to mono, cropped, exported as ogg) by erhardsteinhauer (discord/github)"
source: https://freesound.org/people/SnowFightStudios/sounds/643657/
- files: ["goblin-mutter-01.ogg, goblin-mutter-02.ogg, goblin-mutter-03.ogg, goblin-mutter-04.ogg"]
license: "CC0-1.0"
copyright: "Original file made by Fenodyrie (https://freesound.org/people/Fenodyrie/), edited (converted to mono, lowered amplitudes, exported as ogg) by erhardsteinhauer (discord/github)"
source: https://freesound.org/people/Fenodyrie/sounds/565923/
- files: ["goblin-hiss-01.ogg"]
license: "CC-BY-4.0"
copyright: "Original file made by LittleRobotSoundFactory (https://freesound.org/people/LittleRobotSoundFactory/), edited (converted to mono, exported as ogg) by erhardsteinhauer (discord/github)"
source: https://freesound.org/people/LittleRobotSoundFactory/sounds/270389/
- files: ["goblin-throat-singing-01.ogg, goblin-throat-singing-02.ogg, goblin-throat-singing-03.ogg, goblin-throat-singing-04.ogg"]
license: "CC-BY-NC-4.0"
copyright: "Original file made by djgriffin (https://freesound.org/people/djgriffin/), edited (pitch adjusted, cropped, converted to mono, exported as ogg) by erhardsteinhauer (discord/github)"
source: https://freesound.org/people/djgriffin/sounds/21215/
- files: ["goblin-throat-singing-05.ogg, goblin-throat-singing-06.ogg, goblin-throat-singing-07.ogg"]
license: "CC-BY-NC-4.0"
copyright: "Original file made by djgriffin (https://freesound.org/people/djgriffin/), edited (pitch adjusted, cropped, converted to mono, exported as ogg) by erhardsteinhauer (discord/github)"
source: https://freesound.org/people/djgriffin/sounds/21205/
- files: ["goblin-throat-singing-08.ogg"]
license: "CC-BY-NC-4.0"
copyright: "Original file made by djgriffin (https://freesound.org/people/djgriffin/), edited (pitch adjusted, cropped, converted to mono, exported as ogg) by erhardsteinhauer (discord/github)"
source: https://freesound.org/people/djgriffin/sounds/21202/
- files: ["goblin-deathgasp-01.ogg, goblin-deathgasp-02.ogg, goblin-deathgasp-03.ogg, goblin-deathgasp-04.ogg"]
license: "CC-BY-NC-4.0"
copyright: "Original file made by Fenodyrie (https://freesound.org/people/Fenodyrie/), edited (pitch adjusted, cropped, converted to mono, exported as ogg) by erhardsteinhauer (discord/github)"
source: https://freesound.org/people/Fenodyrie/sounds/565928/
Original file line number Diff line number Diff line change
Expand Up @@ -29,3 +29,15 @@ ghost-role-information-luggage-description = You are The Luggage, a chest made o
ghost-role-information-cargorilla-name = Cargorilla
ghost-role-information-cargorilla-description = A "well" trained gorilla, assist Cargo by dragging around freight and making deliveries.
ghost-role-information-goblin-stowaway-name = Goblin Stowaway
ghost-role-information-goblin-stowaway-description = You are Goblin. Your fellow Goblin is Goblin. Goblin must construct Goblinhome.
ghost-role-information-nonantagonist-freeagent-goblin-stowaway = You are a [color=yellow][bold]Team Free Agent[/bold][/color] with all other Goblins. You are free to act as either antagonists or non-antagonists.
Your primary goal is to construct Goblinhome, a home for yourself and your people. [color=red]Harming the station would likely put that goal at risk.[/color]
You don't remember any of your previous life, and you don't remember anything you learned as a ghost.
ghost-role-information-goblin-knight-name = Sir Gollylad
ghost-role-information-goblin-knight-description = You are Sir Gollylad, the most gallant and pure-of-heart among the Goblin Knights. Your charge is someone aboard the station. You forget who, exactly, so... Anyone will do. Find someone, and protect them with your life.
Loading

0 comments on commit a26a6d5

Please sign in to comment.