using System.Numerics; using Content.Shared.Movement.Systems; using Robust.Shared.GameStates; namespace Content.Shared.Movement.Components; /// /// Displaces SS14 eye data when given to an entity. /// [RegisterComponent, NetworkedComponent, AutoGenerateComponentState] // DeltaV - remove ComponentProtoName, add AutoGenerateComponentState public sealed partial class EyeCursorOffsetComponent : Component // DeltaV - make component entirely Shared, was SharedEyeCursorOffsetComponent and abstract { /// /// The amount the view will be displaced when the cursor is positioned at/beyond the max offset distance. /// Measured in tiles. /// [DataField, AutoNetworkedField] // DeltaV - make AutoNetworkedField public float MaxOffset = 3f; /// /// 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. /// [DataField] public float OffsetSpeed = 0.5f; /// /// The amount the PVS should increase to account for the max offset. /// Should be 1/10 of MaxOffset most of the time. /// [DataField, AutoNetworkedField] // DeltaV - make AutoNetworkedField public float PvsIncrease = 0.3f; // Begin DeltaV additions - make component entirely Shared /// /// The location the offset will attempt to pan towards; based on the cursor's position in the game window. /// public Vector2 TargetPosition = Vector2.Zero; /// /// The current positional offset being applied. Used to enable gradual panning. /// public Vector2 CurrentPosition = Vector2.Zero; // End DeltaV additions - make component entirely Shared [DataField] public bool Enabled = true; // DeltaV - enable/disable }