Refactor: ProximityDetectionSystem (#35133)

* Refactor: ProximityDetectionSystem

* Update

* Update

* Update

* Yikes

* Update

* Dirty

* Update

* Update

* Lil cleanup

* Update

* Update
This commit is contained in:
Winkarst
2025-05-11 17:33:35 +03:00
committed by GitHub
parent cd1ebecab0
commit 078814ce41
6 changed files with 144 additions and 214 deletions

View File

@@ -25,14 +25,8 @@ public sealed class ProximityBeeperSystem : EntitySystem
{
if (!TryComp<BeeperComponent>(owner, out var beeper))
return;
if (args.Target == null)
{
_beeper.SetMute(owner, true, beeper);
return;
}
_beeper.SetIntervalScaling(owner, args.Distance / args.Detector.Range, beeper);
_beeper.SetMute(owner, false, beeper);
_beeper.SetIntervalScaling(owner, args.Distance / args.Detector.Comp.Range, beeper);
}
private void OnNewProximityTarget(EntityUid owner, ProximityBeeperComponent proxBeeper, ref NewProximityTargetEvent args)