Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
namespace Content.Server._MACRO.Speech.Components;

/// <summary>
/// Scraw!!
/// </summary>
[RegisterComponent]
public sealed partial class AllulaloAccentComponent : Component;
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
using System.Text.RegularExpressions;
using Content.Server._MACRO.Speech.Components;
using Content.Shared.Speech;

namespace Content.Server._MACRO.Speech.EntitySystems;

public sealed class AllulaloAccentSystem : EntitySystem
{
private static readonly Regex RegexLowerslurR = new Regex("r{1,3}");
private static readonly Regex RegexUpperslurR = new Regex("R{1,3}");
private static readonly Regex RegexLowerdoubleCK = new Regex("ck{1,3}");
private static readonly Regex RegexUpperdoubleCK = new Regex("CK{1,3}");
private static readonly Regex RegexCasedoubleCK = new Regex("Ck{1,3}");
private static readonly Regex RegexCameldoubleCK = new Regex("cK{1,3}");
private static readonly Regex RegexLowerdoubleCKT = new Regex("ct{1,3}");
private static readonly Regex RegexUpperdoubleCKT = new Regex("CT{1,3}");
private static readonly Regex RegexCasedoubleCKT = new Regex("Ct{1,3}");
private static readonly Regex RegexCameldoubleCKT = new Regex("cT{1,3}");

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

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

// Im not writing music in this one
message = RegexLowerslurR.Replace(message, "rr");
// Sorry to the snalienaccentsystem fans
message = RegexUpperslurR.Replace(message, "RR");
//
message = RegexLowerdoubleCK.Replace(message, "ck-ck");
//
message = RegexUpperdoubleCK.Replace(message, "CK-CK");
//
message = RegexCasedoubleCK.Replace(message, "Ck-ck");
//
message = RegexCameldoubleCK.Replace(message, "cK-CK");
//
message = RegexLowerdoubleCKT.Replace(message, "ck-ct");
//
message = RegexUpperdoubleCKT.Replace(message, "CK-CT");
//
message = RegexCasedoubleCKT.Replace(message, "Ck-ct");
//
message = RegexCameldoubleCKT.Replace(message, "cK-CT");
args.Message = message;
}
}
10 changes: 10 additions & 0 deletions Content.Shared/_MACRO/Species/UnableToWieldComponent.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
using Robust.Shared.GameStates;

namespace Content.Shared._MACRO.UnableToWield;

[RegisterComponent, NetworkedComponent]
public sealed partial class UnableToWieldComponent : Component
{
[DataField]
public LocId? PopupText = "unable-to-wield-cant-do";
}
24 changes: 24 additions & 0 deletions Content.Shared/_MACRO/Species/UnableToWieldSystem.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
using Content.Shared.Popups;
using Content.Shared.Wieldable;

namespace Content.Shared._MACRO.UnableToWield;

public sealed partial class UnableToWieldSystem : EntitySystem
{
[Dependency] private SharedPopupSystem _popup = default!;

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

SubscribeLocalEvent<UnableToWieldComponent, WieldAttemptEvent>(OnWieldAttempt);
}

private void OnWieldAttempt(Entity<UnableToWieldComponent> ent, ref WieldAttemptEvent args)
{
args.Cancel();

if (ent.Comp.PopupText != null)
_popup.PopupClient(Loc.GetString(ent.Comp.PopupText), ent, ent);
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
using Content.Shared.Whitelist;
using Robust.Shared.GameStates;

namespace Content.Shared._MACRO.TooShortForUI.Components;

/// <summary>
/// Blocks the use of machine UI on blacklisted or non-whitelisted machines if the entity is not:
/// 1) buckled into something, like a chair or a bed
/// 2) weightless
/// or 3) vaulted on a table.
/// </summary>
[RegisterComponent, NetworkedComponent]
public sealed partial class TooShortForUIComponent : Component
{
/// <summary>
/// These entities will be allowed.
/// If the blacklist is null, blocks all entities.
/// </summary>
[DataField]
public EntityWhitelist? Whitelist;

/// <summary>
/// These entities will *not* be allowed.
/// If the blacklist is null, blocks all entities.
/// </summary>
[DataField]
public EntityWhitelist? Blacklist;

[DataField]
public LocId? PopupText = "too-short-for-ui-cant-use";
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
namespace Content.Shared._MACRO.TooShortForUI.Components;

/// <summary>
/// This component solely determines if an entity is NOT within height for an entity with <see cref="TooShortForUIComponent"/>"
/// </summary>
[RegisterComponent]
public sealed partial class TooShortForUiBlacklistComponent : Component;
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
namespace Content.Shared._MACRO.TooShortForUI.Components;

/// <summary>
/// This component solely determines if an entity is within height for an entity with <see cref="TooShortForUIComponent"/>"
/// </summary>
[RegisterComponent]
public sealed partial class TooShortForUiWhitelistComponent : Component;
59 changes: 59 additions & 0 deletions Content.Shared/_MACRO/TooShortForUI/TooShortForUISystem.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
using Content.Shared._MACRO.TooShortForUI.Components;
using Content.Shared.Buckle.Components;
using Content.Shared.Climbing.Components;
using Content.Shared.Gravity;
using Content.Shared.Popups;
using Content.Shared.UserInterface;
using Content.Shared.Whitelist;
using Robust.Shared.Network;
using Robust.Shared.Physics.Components;
using Robust.Shared.Timing;

namespace Content.Shared._MACRO.TooShortForUI;

public sealed partial class TooShortForUI : EntitySystem
{
[Dependency] private EntityWhitelistSystem _whitelist = default!;
[Dependency] private IGameTiming _timing = default!;
[Dependency] private INetManager _net = default!;
[Dependency] private SharedGravitySystem _gravity = default!;
[Dependency] private SharedPopupSystem _popup = default!;

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

SubscribeLocalEvent<TooShortForUIComponent, UserOpenActivatableUIAttemptEvent>(OnUIOpenAttempt);
}

public void OnUIOpenAttempt(Entity<TooShortForUIComponent> ent, ref UserOpenActivatableUIAttemptEvent args)
{
// first, check if we're buckled to something, and if we are, return
if (TryComp<BuckleComponent>(ent, out var buckle) && buckle.Buckled)
return;

// next, check if we're in the air. if we are, return
if (TryComp<PhysicsComponent>(ent, out var physics) && physics.BodyStatus != BodyStatus.OnGround)
return;

// next, check if we're weightless. you get the idea
if (TryComp<GravityAffectedComponent>(ent, out var gravityAffected) && _gravity.IsWeightless((ent.Owner, gravityAffected)))
return;

// finally, check if we're on a table.
if (TryComp<ClimbingComponent>(ent, out var climbing) && climbing.IsClimbing)
return;

// finally, if the target entity is on the whitelist, return if true
if (_whitelist.IsWhitelistPass(ent.Comp.Whitelist, args.Target))
return;

// if the target entity is on the blacklist or no blacklist is defined, cancel the event
if (_whitelist.IsWhitelistPassOrNull(ent.Comp.Blacklist, args.Target))
args.Cancel();

// if the event has been cancelled and there is popup text, popup
if (args.Cancelled && ent.Comp.PopupText != null && _net.IsClient && _timing.IsFirstTimePredicted)
_popup.PopupEntity(Loc.GetString(ent.Comp.PopupText), ent, ent);
}
}
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.
9 changes: 9 additions & 0 deletions Resources/Audio/_MACRO/Voice/Allulalo/attributions.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
211123 Red-tailed Hawk call, pretty close, noisy roof, Toronto 10am.wav by TRP -- https://freesound.org/s/616995/ -- License: Creative Commons 0

Utahraptor Hiss by NaturesTemper -- https://freesound.org/s/622809/ -- License: Creative Commons 0

RaptorintheKitchen.wav by Nerdwizard78 -- https://freesound.org/s/643927/ -- License: Creative Commons 0

raptorshreak by Nerdwizard78 -- https://freesound.org/s/643850/ -- License: Creative Commons 0

Sumatran laughingthrush (Garrulax bicolor) by Breviceps -- https://freesound.org/s/535813/ -- License: Creative Commons 0
34 changes: 34 additions & 0 deletions Resources/Audio/_MACRO/Voice/Vox/attributions.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
- files: ["voxchitter1.ogg"]
license: "Custom"
copyright: "Recorded by June Hunter Images; modified by AvianMaiden."
source: "https://www.youtube.com/watch?v=8xybFI2Q-No"

- files: ["voxchitter2.ogg"]
license: "CC-BY-3.0"
copyright: "AlexTriceratops123, mixed to mono by DinnerCalzone (github)"
source: "https://web.archive.org/web/20200223000457/https://www.youtube.com/watch?v=uA5yGyB_z5U"

- files: ["voxcoo1.ogg"]
license: "Custom"
copyright: "Recorded by lulzBrownie; modified by AvianMaiden."
source: "https://www.youtube.com/watch?v=-qS77R0Y1K8"

- files: ["voxcoo2.ogg"]
license: "Custom"
copyright: "Recorded by Critter Cam; modified by AvianMaiden."
source: "https://www.youtube.com/watch?v=AOZmkZ72ISI"

- files: ["voxcry.ogg"]
license: "Custom"
copyright: "Recorded by Wil Hershberger; modified by AvianMaiden."
source: "https://macaulaylibrary.org/asset/100707"

- files: ["voxhiss.ogg"]
license: "Custom"
copyright: "Recorded by John Naran; modified by AvianMaiden."
source: "https://www.youtube.com/watch?v=ETS5NGOankI"

- files: ["voxgasp1.ogg", "voxgasp2.ogg", "voxgasp3.ogg"]
license: "Custom"
copyright: "Recorded by Lance Benner; modified by AvianMaiden."
source: "https://macaulaylibrary.org/asset/25670251"
Binary file not shown.
Binary file not shown.
Binary file added Resources/Audio/_MACRO/Voice/Vox/voxcoo1.ogg
Binary file not shown.
Binary file added Resources/Audio/_MACRO/Voice/Vox/voxcoo2.ogg
Binary file not shown.
Binary file added Resources/Audio/_MACRO/Voice/Vox/voxcoo3.ogg
Binary file not shown.
Binary file added Resources/Audio/_MACRO/Voice/Vox/voxcry.ogg
Binary file not shown.
Binary file added Resources/Audio/_MACRO/Voice/Vox/voxgasp1.ogg
Binary file not shown.
Binary file added Resources/Audio/_MACRO/Voice/Vox/voxgasp2.ogg
Binary file not shown.
Binary file added Resources/Audio/_MACRO/Voice/Vox/voxgasp3.ogg
Binary file not shown.
Binary file added Resources/Audio/_MACRO/Voice/Vox/voxhiss.ogg
Binary file not shown.
5 changes: 5 additions & 0 deletions Resources/Locale/en-US/_MACRO/chat/chat-managers.ftl
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
chat-speech-verb-name-allulalo = Allulalo
chat-speech-verb-allulalo-1 = whistles
chat-speech-verb-allulalo-2 = clicks
chat-speech-verb-allulalo-3 = chitters
chat-speech-verb-allulalo-4 = knocks
42 changes: 42 additions & 0 deletions Resources/Locale/en-US/_MACRO/datasets/names/allulalo.ftl
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
names-allulalo-first-1 = Lepti
names-allulalo-first-2 = Bronto
names-allulalo-first-3 = Apato
names-allulalo-first-4 = Cera
names-allulalo-first-5 = Canorus
names-allulalo-first-6 = Luro
names-allulalo-first-7 = Mimus
names-allulalo-first-8 = Nycho
names-allulalo-first-9 = Velox
names-allulalo-first-10 = Affinis
names-allulalo-first-11 = Alatus
names-allulalo-first-12 = Amabilis
names-allulalo-first-13 = Brachy
names-allulalo-first-14 = Communis
names-allulalo-first-15 = Deino
names-allulalo-first-16 = Dulcis
names-allulalo-first-17 = Erio
names-allulalo-first-18 = Garrulus
names-allulalo-first-19 = Halio
names-allulalo-first-20 = Haplo
names-allulalo-first-21 = Cursor

names-allulalo-last-1 = Inin-Sada
names-allulalo-last-2 = Aono-ni
names-allulalo-last-3 = Nana-Sana
names-allulalo-last-4 = Ourn-far
names-allulalo-last-5 = Ran-ran
names-allulalo-last-6 = Nera-Ina
names-allulalo-last-7 = Dyan-kata
names-allulalo-last-8 = Beca-howl
names-allulalo-last-9 = Xena-tasa
names-allulalo-last-10 = Lopi-den
names-allulalo-last-11 = Colo-pota
names-allulalo-last-12 = Valo-dexa
names-allulalo-last-13 = Jama-valt
names-allulalo-last-14 = Mera-ban
names-allulalo-last-15 = Loga-nab
names-allulalo-last-16 = Quana-bua
names-allulalo-last-17 = Pota-pota
names-allulalo-last-18 = Hera-Nofa
names-allulalo-last-19 = Noro-Mon
names-allulalo-last-20 = Sepa-dex
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
flavor-complex-allulalo = like hand sanitizer
Loading
Loading