BlindableComponent.cs 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. using Content.Shared.Eye.Blinding.Systems;
  2. using Robust.Shared.GameStates;
  3. namespace Content.Shared.Eye.Blinding.Components;
  4. [RegisterComponent]
  5. [NetworkedComponent, AutoGenerateComponentState]
  6. [Access(typeof(BlindableSystem))]
  7. public sealed partial class BlindableComponent : Component
  8. {
  9. /// <summary>
  10. /// How many seconds will be subtracted from each attempt to add blindness to us?
  11. /// </summary>
  12. [ViewVariables(VVAccess.ReadWrite), DataField("isBlind"), AutoNetworkedField]
  13. public bool IsBlind;
  14. /// <summary>
  15. /// Eye damage due to things like staring directly at welders. Causes blurry vision or outright
  16. /// blindness if greater than or equal to <see cref="MaxDamage"/>.
  17. /// </summary>
  18. /// <remarks>
  19. /// Should eventually be replaced with a proper eye health system when we have bobby.
  20. /// </remarks>
  21. [ViewVariables(VVAccess.ReadWrite), DataField("EyeDamage"), AutoNetworkedField]
  22. public int EyeDamage = 0;
  23. [ViewVariables(VVAccess.ReadOnly), DataField]
  24. public int MaxDamage = 9;
  25. [ViewVariables(VVAccess.ReadOnly), DataField]
  26. public int MinDamage = 0;
  27. /// <description>
  28. /// Used to ensure that this doesn't break with sandbox or admin tools.
  29. /// This is not "enabled/disabled".
  30. /// </description>
  31. [Access(Other = AccessPermissions.ReadWriteExecute)]
  32. public bool LightSetup = false;
  33. /// <description>
  34. /// Gives an extra frame of blindness to reenable light manager during
  35. /// </description>
  36. [Access(Other = AccessPermissions.ReadWriteExecute)]
  37. public bool GraceFrame = false;
  38. }