コード例 #1
0
 private void OnBeforeDoorAutoclose(EntityUid uid, FirelockComponent component, BeforeDoorAutoCloseEvent args)
 {
     // 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 (!EntityManager.TryGetComponent(uid, out AtmosAlarmableComponent? alarmable))
     {
         args.Cancel();
         return;
     }
     if (alarmable.HighestNetworkState != AtmosMonitorAlarmType.Danger)
     {
         args.Cancel();
     }
 }
コード例 #2
0
 private void OnDoorAutoCloseCheck(EntityUid uid, AirlockComponent component, BeforeDoorAutoCloseEvent args)
 {
     if (!component.AutoClose)
     {
         args.Cancel();
     }
 }
コード例 #3
0
 private void OnAutoClose(EntityUid uid, DockingComponent component, BeforeDoorAutoCloseEvent args)
 {
     // We'll just pin the door open when docked.
     if (component.Docked)
     {
         args.Cancel();
     }
 }
コード例 #4
0
 private void OnBeforeDoorAutoclose(EntityUid uid, FirelockComponent component, BeforeDoorAutoCloseEvent args)
 {
     // Firelocks can't autoclose, they must be manually closed
     args.Cancel();
 }