Make Health Analyzer scan range nullable and adjust admin PDA (#36347)

* Modify .cs and admin pda

* enhance comment
This commit is contained in:
Minemoder5000
2025-04-06 02:31:06 -06:00
committed by GitHub
parent fe7814c94b
commit 7c84ff1a93
3 changed files with 5 additions and 3 deletions

View File

@@ -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);