CatStation/Content.Shared/VoiceMask/VoiceMaskComponent.cs
KeTuFaisPiKiNut 00d4c4f8fe
Changeling voice mimicry (#43675)
* working yay

* fixed the thing I had removed

* there it works

* i know my coding I hope

* Update Resources/Textures/Interface/Actions/changeling2.rsi/meta.json

Co-authored-by: ScarKy0 <106310278+ScarKy0@users.noreply.github.com>

* Update Content.Server/VoiceMask/VoiceMaskSystem.cs

Co-authored-by: ScarKy0 <106310278+ScarKy0@users.noreply.github.com>

* Update Content.Server/VoiceMask/VoiceMaskSystem.cs

Co-authored-by: ScarKy0 <106310278+ScarKy0@users.noreply.github.com>

* Update Content.Server/VoiceMask/VoiceMaskSystem.cs

Co-authored-by: ScarKy0 <106310278+ScarKy0@users.noreply.github.com>

* Update Content.Server/VoiceMask/VoiceMaskSystem.cs

Co-authored-by: ScarKy0 <106310278+ScarKy0@users.noreply.github.com>

* Apply suggestions from code review

oh god you can just do batches oh my god

Co-authored-by: ScarKy0 <106310278+ScarKy0@users.noreply.github.com>

* Update changeling-catalog.ftl

new line at EOF

* Update changeling.yml

same

* Update changeling.yml

line

* Update StoreSystem.Ui.cs

* Update StoreSystem.Ui.cs

* Update StoreSystem.Ui.cs

just reverted it to master

* Apply suggestions from code review

Co-authored-by: ScarKy0 <106310278+ScarKy0@users.noreply.github.com>

* Update VoiceMaskSystem.cs

there ya go skar

* fixed the bug, yay

* clean

* GITHUB, DO YOUR THING

* [DataField] is in the air? WRONG.

* minor spelling mistake

* all is well all is well sometimes

* minor fix

* apathy

* it works

* VIVE LA RÉVOLUTION

* minor spelling mistake *dies*

* why the fuck are high-rez vest making tests fail

* stuff

* NEWLINENEWLINENEWLINE

* Update Content.Client/VoiceMask/VoiceMaskNameChangeWindow.xaml.cs

Co-authored-by: slarticodefast <161409025+slarticodefast@users.noreply.github.com>

* Update Content.Server/VoiceMask/VoiceMaskSystem.cs

Co-authored-by: slarticodefast <161409025+slarticodefast@users.noreply.github.com>

---------

Co-authored-by: nomdéraisonnablementlong <you@example.com>
Co-authored-by: ScarKy0 <106310278+ScarKy0@users.noreply.github.com>
Co-authored-by: ScarKy0 <scarky0@onet.eu>
Co-authored-by: beck-thompson <beck314159@hotmail.com>
Co-authored-by: slarticodefast <161409025+slarticodefast@users.noreply.github.com>
2026-04-26 16:58:20 +00:00

80 lines
2.7 KiB
C#

using Content.Shared.Speech;
using Robust.Shared.Prototypes;
namespace Content.Shared.VoiceMask;
/// <summary>
/// This component is for voice mask items & voice-masking entities! Adding this component to clothing will give the voice mask UI
/// and allow the wearer to change their voice and verb at will.
/// Having this on an entity while the IsInnate field is true will give it an innate voice masking ability.
/// </summary>
/// <remarks>
/// DO NOT use this if you do not want the interface.
/// The VoiceOverrideSystem is probably what your looking for (Or you might have to make something similar)!
/// </remarks>
[RegisterComponent]
public sealed partial class VoiceMaskComponent : Component
{
/// <summary>
/// The name that will override an entities default name. If null, it will use the default override.
/// </summary>
[DataField]
public string? VoiceMaskName = null;
/// <summary>
/// The speech verb that will override an entities default one. If null, it will use the entities default verb.
/// </summary>
[DataField]
public ProtoId<SpeechVerbPrototype>? VoiceMaskSpeechVerb;
/// <summary>
/// If true will override the users identity with whatever <see cref="VoiceMaskName"/> is.
/// </summary>
[DataField]
public bool OverrideIdentity;
/// <summary>
/// The action that gets displayed when the voice mask is equipped.
/// </summary>
[DataField]
public EntProtoId Action = "ActionChangeVoiceMask";
/// <summary>
/// Reference to the action.
/// </summary>
[DataField]
public EntityUid? ActionEntity;
/// <summary>
/// If user's voice is getting changed when they speak.
/// </summary>
[DataField]
public bool Active = false;
/// <summary>
/// If user's accent is getting hidden when they speak.
/// </summary>
[DataField]
public bool AccentHide = true;
/// <summary>
/// If user's equipped agent id name is getting changed.
/// </summary>
[DataField]
public bool ChangeIDName = false;
/// <summary>
/// Whether the voice mask is innate to the entity.
/// When added to an entity while this field is set to true, the entity itself will gain the action & UI necessary to change its voice.
/// When this field is set to false, then the entity with this component will be a provider (either through implanting or through wearing) of the voice masking abilities for another entity.
/// </summary>
[DataField]
public bool IsInnate = false;
/// <summary>
/// Is used as the title text in the UI.
/// </summary>
[DataField]
public LocId TitleText = "voice-mask-name-change-window";
}