forked from DeltaV-Station/Delta-v
-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'EE-Andromeda' of https://github.com/LaryNevesPR/Estacao…
…-Andromeda into EE-Andromeda
- Loading branch information
Showing
13 changed files
with
640 additions
and
5 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
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
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
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
15 changes: 15 additions & 0 deletions
15
Content.Server/_Andromeda/Speech/Components/NerdAccentComponent.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,15 @@ | ||
namespace Content.Server.Speech.Components; | ||
|
||
/// <summary> | ||
/// Nyehh, my gabagool, see? | ||
/// Etc etc. | ||
/// </summary> | ||
[RegisterComponent] | ||
public sealed partial class NerdAccentComponent : Component | ||
{ | ||
/// <summary> | ||
/// Do you make all the rules? | ||
/// </summary> | ||
[DataField("nerd")] | ||
public bool nerd = true; | ||
} |
37 changes: 37 additions & 0 deletions
37
Content.Server/_Andromeda/Speech/EntitySystems/NerdAccentSystem.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,37 @@ | ||
using System.Linq; | ||
using System.Text.RegularExpressions; | ||
using Content.Server.Speech.Components; | ||
|
||
namespace Content.Server.Speech.EntitySystems; | ||
|
||
public sealed class NerdAccentSystem : EntitySystem | ||
{ | ||
private static Regex RegexIng = new(@"(?<=\w\w)(in)g(?!\w)", RegexOptions.IgnoreCase); | ||
private static Regex RegexLowerOr = new(@"(?<=\w)o[Rr](?=\w)"); | ||
private static Regex RegexUpperOr = new(@"(?<=\w)O[Rr](?=\w)"); | ||
private static Regex RegexLowerAr = new(@"(?<=\w)a[Rr](?=\w)"); | ||
private static Regex RegexUpperAr = new(@"(?<=\w)A[Rr](?=\w)"); | ||
|
||
[Dependency] private ReplacementAccentSystem _replacement = default!; | ||
|
||
public override void Initialize() | ||
{ | ||
base.Initialize(); | ||
|
||
SubscribeLocalEvent<NerdAccentComponent, AccentGetEvent>(OnAccentGet); | ||
} | ||
|
||
public string Accentuate(string message, NerdAccentComponent component) | ||
{ | ||
// Aplicar substituições diretas | ||
var msg = _replacement.ApplyReplacements(message, "nerd"); | ||
|
||
|
||
return msg; | ||
} | ||
|
||
private void OnAccentGet(EntityUid uid, NerdAccentComponent component, AccentGetEvent args) | ||
{ | ||
args.Message = Accentuate(args.Message, component); | ||
} | ||
} |
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,16 @@ | ||
using Robust.Shared.Configuration; | ||
namespace Content.Shared.CCVar; | ||
public sealed partial class CCVars | ||
{ | ||
/* | ||
* Radio sounds | ||
*/ | ||
public static readonly CVarDef<bool> RadioSoundsEnabled = | ||
CVarDef.Create("audio.radio_sounds_enabled", true, CVar.ARCHIVE | CVar.CLIENT | CVar.REPLICATED); | ||
public static readonly CVarDef<string> RadioSoundPath = | ||
CVarDef.Create("audio.radio_sound_path", "/Audio/_Andromeda/Effects/Radio/sound_items_radio_radio_receive.ogg", CVar.ARCHIVE | CVar.CLIENT | CVar.REPLICATED); | ||
public static readonly CVarDef<float> RadioVolume = | ||
CVarDef.Create("audio.radio_volume", -5f, CVar.ARCHIVE | CVar.CLIENT | CVar.REPLICATED); | ||
public static readonly CVarDef<float> RadioCooldown = | ||
CVarDef.Create("audio.radio_cooldown", 2f, CVar.ARCHIVE | CVar.CLIENT | CVar.REPLICATED); | ||
} |
Binary file added
BIN
+9.29 KB
Resources/Audio/_Andromeda/Effects/Radio/sound_items_radio_radio_receive.ogg
Binary file not shown.
Oops, something went wrong.