forked from impstation/imp-station-14
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request impstation#772 from widgetbeck/goblins
Port Goblins from Frontier for ghostroles.
- Loading branch information
Showing
172 changed files
with
4,604 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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
8
Content.Server/_NF/Speech/Components/GoblinAccentComponent.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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
59
Content.Server/_NF/Speech/EntitySystems/GoblinAccentSystem.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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; | ||
} | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.