using Content.Shared.Actions;
using Content.Shared.Clothing.EntitySystems;
using Robust.Shared.GameStates;
using Robust.Shared.Prototypes;
using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom.Prototype;
namespace Content.Shared.Clothing.Components;
///
/// Adds StealthComponent to the user when enabled, either by an action or the system's SetEnabled method.
///
[RegisterComponent, NetworkedComponent, AutoGenerateComponentState(true), Access(typeof(StealthClothingSystem))]
public sealed partial class StealthClothingComponent : Component
{
///
/// Whether stealth effect is enabled.
///
[DataField("enabled"), ViewVariables(VVAccess.ReadWrite), AutoNetworkedField]
public bool Enabled;
///
/// Number added to MinVisibility when stealthed, to make the user not fully invisible.
///
[DataField("visibility"), ViewVariables(VVAccess.ReadWrite), AutoNetworkedField]
public float Visibility;
[DataField("toggleAction", customTypeSerializer: typeof(PrototypeIdSerializer))]
public string ToggleAction = "ActionTogglePhaseCloak";
///
/// The action for enabling and disabling stealth.
///
[DataField, AutoNetworkedField] public EntityUid? ToggleActionEntity;
}
///
/// When stealth is enabled, disables it.
/// When it is disabled, raises before enabling.
/// Put any checks in a handler for that event to cancel it.
///
public sealed partial class ToggleStealthEvent : InstantActionEvent
{
}