6
StarHorizon_Public/Content.Server/_NF/Speech/Components/AddAccentPickupComponent.cs
2026-01-24 12:49:55 +03:00

36 lines
1.1 KiB
C#

using Content.Server.Speech.Components;
using Content.Server.Speech.Prototypes;
using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom.Prototype;
namespace Content.Server._NF.Speech.Components;
/// <summary>
/// Applies accent to user while they hold the entity.
/// </summary>
[RegisterComponent]
public sealed partial class AddAccentPickupComponent : Component
{
/// <summary>
/// Component name for accent that will be applied.
/// </summary>
[DataField(required: true)]
public string Accent = default!;
/// <summary>
/// What <see cref="ReplacementAccentPrototype"/> to use.
/// Will be applied only with <see cref="ReplacementAccentComponent"/>.
/// </summary>
[DataField("replacement", customTypeSerializer: typeof(PrototypeIdSerializer<ReplacementAccentPrototype>))]
public string? ReplacementPrototype;
/// <summary>
/// Is the entity held and affecting someones accent?
/// </summary>
public bool IsActive = false;
/// <summary>
/// Who is currently holding the item?
/// </summary>
public EntityUid Holder; // Frontier
}