EyeCursorOffsetComponent.cs 1.0 KB

1234567891011121314151617181920212223242526272829303132
  1. using System.Numerics;
  2. using Content.Shared.Movement.Systems;
  3. using Robust.Shared.GameStates;
  4. namespace Content.Shared.Movement.Components;
  5. /// <summary>
  6. /// Displaces SS14 eye data when given to an entity.
  7. /// </summary>
  8. [ComponentProtoName("EyeCursorOffset"), NetworkedComponent]
  9. public abstract partial class SharedEyeCursorOffsetComponent : Component
  10. {
  11. /// <summary>
  12. /// The amount the view will be displaced when the cursor is positioned at/beyond the max offset distance.
  13. /// Measured in tiles.
  14. /// </summary>
  15. [DataField]
  16. public float MaxOffset = 3f;
  17. /// <summary>
  18. /// The speed which the camera adjusts to new positions. 0.5f seems like a good value, but can be changed if you want very slow/instant adjustments.
  19. /// </summary>
  20. [DataField]
  21. public float OffsetSpeed = 0.5f;
  22. /// <summary>
  23. /// The amount the PVS should increase to account for the max offset.
  24. /// Should be 1/10 of MaxOffset most of the time.
  25. /// </summary>
  26. [DataField]
  27. public float PvsIncrease = 0.3f;
  28. }