Files
tbd-station-14/Content.Shared/Ninja/Components/NinjaGlovesComponent.cs
Leon Friedrich 3101e5a18d Fix action-granting items not being predicted (#20778)
* Ensure actions are predicted

* Fix test fail
2023-10-07 15:08:13 -04:00

46 lines
1.5 KiB
C#

using Content.Shared.DoAfter;
using Content.Shared.Ninja.Systems;
using Content.Shared.Toggleable;
using Content.Shared.Whitelist;
using Robust.Shared.Audio;
using Robust.Shared.GameStates;
using Robust.Shared.Prototypes;
using Robust.Shared.Serialization;
using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom.Prototype;
using Robust.Shared.Utility;
namespace Content.Shared.Ninja.Components;
/// <summary>
/// Component for toggling glove powers.
/// Powers being enabled is controlled by User not being null.
/// </summary>
[RegisterComponent, NetworkedComponent, AutoGenerateComponentState]
[Access(typeof(SharedNinjaGlovesSystem))]
public sealed partial class NinjaGlovesComponent : Component
{
/// <summary>
/// Entity of the ninja using these gloves, usually means enabled
/// </summary>
[DataField("user"), AutoNetworkedField]
public EntityUid? User;
/// <summary>
/// The action id for toggling ninja gloves abilities
/// </summary>
[DataField("toggleAction", customTypeSerializer: typeof(PrototypeIdSerializer<EntityPrototype>))]
public string ToggleAction = "ActionToggleNinjaGloves";
[DataField, AutoNetworkedField]
public EntityUid? ToggleActionEntity;
/// <summary>
/// The whitelist used for the emag provider to emag airlocks only (not regular doors).
/// </summary>
[DataField("doorjackWhitelist")]
public EntityWhitelist DoorjackWhitelist = new()
{
Components = new[] {"Airlock"}
};
}