Fix firelock prediction issues with periodic pulses of closing lights (#28227)
* Fix firelock prediction issues with periodic pulses of closing lights For some reason this function was setting a time for the next state which was triggering the door system to try to close the firelock. This does not happen serverside because the function only fires from an event called clientside apparently. It appears to be an attempt to stop firelocks from closing instantly that did not function properly, and I cannot discern any other purpose. As such I have removed it. * Remove redundant serverside check This became redundant with commit 439a87f2
This commit is contained in:
@@ -28,8 +28,6 @@ namespace Content.Server.Doors.Systems
|
||||
{
|
||||
base.Initialize();
|
||||
|
||||
|
||||
SubscribeLocalEvent<FirelockComponent, BeforeDoorAutoCloseEvent>(OnBeforeDoorAutoclose);
|
||||
SubscribeLocalEvent<FirelockComponent, AtmosAlarmEvent>(OnAtmosAlarm);
|
||||
|
||||
SubscribeLocalEvent<FirelockComponent, PowerChangedEvent>(PowerChanged);
|
||||
@@ -80,19 +78,6 @@ namespace Content.Server.Doors.Systems
|
||||
}
|
||||
}
|
||||
|
||||
private void OnBeforeDoorAutoclose(EntityUid uid, FirelockComponent component, BeforeDoorAutoCloseEvent args)
|
||||
{
|
||||
if (!this.IsPowered(uid, EntityManager))
|
||||
args.Cancel();
|
||||
|
||||
// Make firelocks autoclose, but only if the last alarm type it
|
||||
// remembers was a danger. This is to prevent people from
|
||||
// flooding hallways with endless bad air/fire.
|
||||
if (component.AlarmAutoClose &&
|
||||
(_atmosAlarmable.TryGetHighestAlert(uid, out var alarm) && alarm != AtmosAlarmType.Danger || alarm == null))
|
||||
args.Cancel();
|
||||
}
|
||||
|
||||
private void OnAtmosAlarm(EntityUid uid, FirelockComponent component, AtmosAlarmEvent args)
|
||||
{
|
||||
if (!this.IsPowered(uid, EntityManager))
|
||||
|
||||
Reference in New Issue
Block a user