public EntityUid? ScannedEntity;
/// <summary>
- /// The maximum range in tiles at which the analyzer can receive continuous updates
+ /// The maximum range in tiles at which the analyzer can receive continuous updates, a value of null will be infinite range
/// </summary>
[DataField]
- public float MaxScanRange = 2.5f;
+ public float? MaxScanRange = 2.5f;
/// <summary>
/// Sound played on scanning begin
component.NextUpdate = _timing.CurTime + component.UpdateInterval;
//Get distance between health analyzer and the scanned entity
+ //null is infinite range
var patientCoordinates = Transform(patient).Coordinates;
- if (!_transformSystem.InRange(patientCoordinates, transform.Coordinates, component.MaxScanRange))
+ if (component.MaxScanRange != null && !_transformSystem.InRange(patientCoordinates, transform.Coordinates, component.MaxScanRange.Value))
{
//Range too far, disable updates
StopAnalyzingEntity((uid, component), patient);