using Content.Shared.Eye.Blinding.Systems; using Robust.Shared.GameStates; using Robust.Shared.Prototypes; using Robust.Shared.Serialization; using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom.Prototype; namespace Content.Shared.Eye.Blinding.Components; /// /// Allows mobs to toggle their eyes between being closed and being not closed. /// [RegisterComponent, NetworkedComponent, AutoGenerateComponentState(true)] public sealed partial class EyeClosingComponent : Component { /// /// The prototype to grant to enable eye-toggling action. /// [DataField("eyeToggleAction", customTypeSerializer: typeof(PrototypeIdSerializer))] public string EyeToggleAction = "ActionToggleEyes"; /// /// The actual eye toggling action entity itself. /// [DataField] public EntityUid? EyeToggleActionEntity; /// /// Path to sound to play when opening eyes /// [ViewVariables(VVAccess.ReadWrite), DataField, AutoNetworkedField] public string EyeOpenSound = "/Audio/Effects/eye_open.ogg"; /// /// Path to sound to play when closing eyes /// [ViewVariables(VVAccess.ReadWrite), DataField, AutoNetworkedField] public string EyeCloseSound = "/Audio/Effects/eye_close.ogg"; /// /// Toggles whether the eyes are open or closed. This is really just exactly what it says on the tin. Honest. /// [ViewVariables(VVAccess.ReadWrite), DataField, AutoNetworkedField] public bool EyesClosed; [ViewVariables(VVAccess.ReadOnly), DataField] public bool PreviousEyelidPosition; [ViewVariables(VVAccess.ReadOnly), DataField] public bool NaturallyCreated; }