Voice Mask refactor (#30798)

* First commit

* Added base.Initialize()

* Voice wire fix (Electricty name)

* Various minor cleanups

* Localized default voice mask name

* Added VoiceOverride stuff

* Removed unused stuff

* Typo

* Better localized stuff

* Typo / spelling stuff / comments

* Blessed
This commit is contained in:
beck-thompson
2024-09-26 09:55:59 -07:00
committed by GitHub
parent c2bc821e55
commit fe2145d3b9
20 changed files with 214 additions and 236 deletions

View File

@@ -0,0 +1,24 @@
using Content.Shared.Speech;
using Robust.Shared.Prototypes;
using Content.Shared.Inventory;
namespace Content.Shared.Chat;
/// <summary>
/// This event should be sent everytime an entity talks (Radio, local chat, etc...).
/// The event is sent to both the entity itself, and all clothing (For stuff like voice masks).
/// </summary>
public sealed class TransformSpeakerNameEvent : EntityEventArgs, IInventoryRelayEvent
{
public SlotFlags TargetSlots { get; } = SlotFlags.WITHOUT_POCKET;
public EntityUid Sender;
public string VoiceName;
public ProtoId<SpeechVerbPrototype>? SpeechVerb;
public TransformSpeakerNameEvent(EntityUid sender, string name)
{
Sender = sender;
VoiceName = name;
SpeechVerb = null;
}
}