Files
tbd-station-14/Content.Shared/Eye/Blinding/Components/EyeClosingComponent.cs
deathride58 aa6645c8e9 Blindness rework - damaged eyes are now a stylized simulation of legal blindness (#23212)
* blindness rework - damaged eyes now simulate legal blindness

* hEY THATS FOR DEMONSTRATION PURPOSES ONLY AAA

* attributions

* makes eyeclosecomponent adminbus compatible

* useshader(null)
2024-01-03 01:07:02 -08:00

51 lines
1.8 KiB
C#

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;
/// <summary>
/// Allows mobs to toggle their eyes between being closed and being not closed.
/// </summary>
[RegisterComponent, NetworkedComponent, AutoGenerateComponentState(true)]
public sealed partial class EyeClosingComponent : Component
{
/// <summary>
/// The prototype to grant to enable eye-toggling action.
/// </summary>
[DataField("eyeToggleAction", customTypeSerializer: typeof(PrototypeIdSerializer<EntityPrototype>))]
public string EyeToggleAction = "ActionToggleEyes";
/// <summary>
/// The actual eye toggling action entity itself.
/// </summary>
[DataField]
public EntityUid? EyeToggleActionEntity;
/// <summary>
/// Path to sound to play when opening eyes
/// </summary>
[ViewVariables(VVAccess.ReadWrite), DataField, AutoNetworkedField]
public string EyeOpenSound = "/Audio/Effects/eye_open.ogg";
/// <summary>
/// Path to sound to play when closing eyes
/// </summary>
[ViewVariables(VVAccess.ReadWrite), DataField, AutoNetworkedField]
public string EyeCloseSound = "/Audio/Effects/eye_close.ogg";
/// <summary>
/// Toggles whether the eyes are open or closed. This is really just exactly what it says on the tin. Honest.
/// </summary>
[ViewVariables(VVAccess.ReadWrite), DataField, AutoNetworkedField]
public bool EyesClosed;
[ViewVariables(VVAccess.ReadOnly), DataField]
public bool PreviousEyelidPosition;
[ViewVariables(VVAccess.ReadOnly), DataField]
public bool NaturallyCreated;
}