BlurryVisionComponent.cs 959 B

12345678910111213141516171819202122232425262728
  1. using Content.Shared.Eye.Blinding.Systems;
  2. using Robust.Shared.GameStates;
  3. namespace Content.Shared.Eye.Blinding.Components;
  4. /// <summary>
  5. /// This component adds a white overlay to the viewport. It does not actually cause blurring.
  6. /// </summary>
  7. [RegisterComponent]
  8. [NetworkedComponent, AutoGenerateComponentState]
  9. [Access(typeof(BlurryVisionSystem))]
  10. public sealed partial class BlurryVisionComponent : Component
  11. {
  12. /// <summary>
  13. /// Amount of "blurring". Also modifies examine ranges.
  14. /// </summary>
  15. [ViewVariables(VVAccess.ReadWrite), DataField("magnitude"), AutoNetworkedField]
  16. public float Magnitude;
  17. /// <summary>
  18. /// Exponent that controls the magnitude of the effect.
  19. /// </summary>
  20. [ViewVariables(VVAccess.ReadWrite), DataField("correctionPower"), AutoNetworkedField]
  21. public float CorrectionPower;
  22. public const float MaxMagnitude = 6;
  23. public const float DefaultCorrectionPower = 2f;
  24. }