diff --git a/Content.Server/Medical/Components/HealthAnalyzerComponent.cs b/Content.Server/Medical/Components/HealthAnalyzerComponent.cs index 34b7af0212..9c7ccd5330 100644 --- a/Content.Server/Medical/Components/HealthAnalyzerComponent.cs +++ b/Content.Server/Medical/Components/HealthAnalyzerComponent.cs @@ -39,10 +39,10 @@ public sealed partial class HealthAnalyzerComponent : Component public EntityUid? ScannedEntity; /// - /// 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 /// [DataField] - public float MaxScanRange = 2.5f; + public float? MaxScanRange = 2.5f; /// /// Sound played on scanning begin diff --git a/Content.Server/Medical/HealthAnalyzerSystem.cs b/Content.Server/Medical/HealthAnalyzerSystem.cs index 9f8ee92e3d..f2235363ad 100644 --- a/Content.Server/Medical/HealthAnalyzerSystem.cs +++ b/Content.Server/Medical/HealthAnalyzerSystem.cs @@ -63,8 +63,9 @@ public sealed class HealthAnalyzerSystem : EntitySystem 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); diff --git a/Resources/Prototypes/Entities/Objects/Devices/pda.yml b/Resources/Prototypes/Entities/Objects/Devices/pda.yml index b5ec63577e..d1ac45387f 100644 --- a/Resources/Prototypes/Entities/Objects/Devices/pda.yml +++ b/Resources/Prototypes/Entities/Objects/Devices/pda.yml @@ -949,6 +949,7 @@ - type: Pda id: UniversalIDCard - type: HealthAnalyzer + maxScanRange: null scanDelay: 0 silent: true - type: CartridgeLoader