Files
tbd-station-14/Content.Shared/Eye/Blinding/Components/BlindableComponent.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

42 lines
1.4 KiB
C#

using Content.Shared.Eye.Blinding.Systems;
using Robust.Shared.GameStates;
namespace Content.Shared.Eye.Blinding.Components;
[RegisterComponent]
[NetworkedComponent, AutoGenerateComponentState]
[Access(typeof(BlindableSystem))]
public sealed partial class BlindableComponent : Component
{
/// <summary>
/// How many seconds will be subtracted from each attempt to add blindness to us?
/// </summary>
[ViewVariables(VVAccess.ReadWrite), DataField("isBlind"), AutoNetworkedField]
public bool IsBlind;
/// <summary>
/// Eye damage due to things like staring directly at welders. Causes blurry vision or outright
/// blindness if greater than or equal to <see cref="MaxDamage"/>.
/// </summary>
/// <remarks>
/// Should eventually be replaced with a proper eye health system when we have bobby.
/// </remarks>
[ViewVariables(VVAccess.ReadWrite), DataField("EyeDamage"), AutoNetworkedField]
public int EyeDamage = 0;
public const int MaxDamage = 9;
/// <description>
/// Used to ensure that this doesn't break with sandbox or admin tools.
/// This is not "enabled/disabled".
/// </description>
[Access(Other = AccessPermissions.ReadWriteExecute)]
public bool LightSetup = false;
/// <description>
/// Gives an extra frame of blindness to reenable light manager during
/// </description>
[Access(Other = AccessPermissions.ReadWriteExecute)]
public bool GraceFrame = false;
}