using System.Numerics;
namespace Content.Server._Mono.Radar;
///
/// Stores the trajectory information for hitscan projectiles to be visualized on radar.
/// Tracks the start and end points of the hitscan beam to draw a line on the scanner.
///
[RegisterComponent]
public sealed partial class HitscanRadarComponent : Component
{
///
/// Color that gets shown on the radar screen for the hitscan line.
///
[ViewVariables(VVAccess.ReadWrite), DataField("radarColor")]
public Color RadarColor = Color.Magenta;
///
/// Start position of the hitscan beam in world coordinates.
///
[DataField]
public Vector2 StartPosition;
///
/// End position of the hitscan beam in world coordinates.
///
[DataField]
public Vector2 EndPosition;
///
/// Thickness of the line drawn on the radar.
///
[ViewVariables(VVAccess.ReadWrite), DataField("lineThickness")]
public float LineThickness = 1.0f;
///
/// The grid that the hitscan is associated with, if any.
/// This is used for coordinate transformations when drawing on the radar.
///
[DataField]
public EntityUid? OriginGrid;
///
/// Controls whether this hitscan line is visible on radar.
///
[ViewVariables(VVAccess.ReadWrite), DataField("enabled")]
public bool Enabled = true;
///
/// Time this hitscan radar blip should remain visible before being automatically removed.
///
[DataField]
public float LifeTime = 0.5f;
}