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:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user