CatStation/Content.Shared/VoiceMask/SharedVoiceMaskSystem.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

82 lines
2.2 KiB
C#

using Content.Shared.Inventory;
using Robust.Shared.Serialization;
namespace Content.Shared.VoiceMask;
[Serializable, NetSerializable]
public enum VoiceMaskUIKey : byte
{
Key
}
[Serializable, NetSerializable]
public sealed class VoiceMaskBuiState : BoundUserInterfaceState
{
public readonly string Name;
public readonly string? Verb;
public readonly bool Active;
public readonly bool AccentHide;
public readonly LocId TitleText;
public VoiceMaskBuiState(string name, string? verb, bool active, bool accentHide, LocId titleText)
{
Name = name;
Verb = verb;
Active = active;
AccentHide = accentHide;
TitleText = titleText;
}
}
[Serializable, NetSerializable]
public sealed class VoiceMaskChangeNameMessage : BoundUserInterfaceMessage
{
public readonly string Name;
public VoiceMaskChangeNameMessage(string name)
{
Name = name;
}
}
/// <summary>
/// Change the speech verb prototype to override, or null to use the user's verb.
/// </summary>
[Serializable, NetSerializable]
public sealed class VoiceMaskChangeVerbMessage : BoundUserInterfaceMessage
{
public readonly string? Verb;
public VoiceMaskChangeVerbMessage(string? verb)
{
Verb = verb;
}
}
/// <summary>
/// Toggle the effects of the voice mask.
/// </summary>
[Serializable, NetSerializable]
public sealed class VoiceMaskToggleMessage : BoundUserInterfaceMessage;
/// <summary>
/// Toggle the effects of accent negation.
/// </summary>
[Serializable, NetSerializable]
public sealed class VoiceMaskAccentToggleMessage : BoundUserInterfaceMessage;
/// <summary>
/// Fired when a voice mask is turned on.
/// </summary>
/// <param name=="Mask">The voice mask that was turned on</param>
/// <param name=="Source">The entity that owns the voice mask</param>
/// <param name=="Active">The new value of the voice mask</param>
public sealed class VoiceMaskToggledEvent(EntityUid mask, EntityUid source, bool active) : IInventoryRelayEvent
{
public EntityUid Mask = mask;
public EntityUid Source = source;
public bool Active = active;
SlotFlags IInventoryRelayEvent.TargetSlots => SlotFlags.WITHOUT_POCKET;
}