Make radio jammer block suit sensors (#26046)

* Make radio jammer block suit sensors

* Fix stupid

Use CancellableEventArgs instead of doing what the hell I was doing before.

* Address Reviews.

Change the event from a CancellableEntityEventArgs to a ByRefEvent.
This commit is contained in:
nikthechampiongr
2024-03-14 17:55:14 +02:00
committed by GitHub
parent d674be697e
commit dce24dfd03
5 changed files with 36 additions and 5 deletions

View File

@@ -73,6 +73,11 @@ public sealed class SuitSensorSystem : EntitySystem
// TODO: This would cause imprecision at different tick rates.
sensor.NextUpdate = curTime + sensor.UpdateRate;
var canEv = new SuitSensorsSendAttemptEvent();
RaiseLocalEvent(uid, ref canEv);
if (canEv.Cancelled)
continue;
// get sensor status
var status = GetSensorState(uid, sensor);
if (status == null)