コード例 #1
0
 private void OnBeforeDoorOpened(EntityUid uid, AirlockComponent component, BeforeDoorOpenedEvent args)
 {
     if (!component.CanChangeState())
     {
         args.Cancel();
     }
 }
コード例 #2
0
 private void OnBeforeDoorOpened(EntityUid uid, FirelockComponent component, BeforeDoorOpenedEvent args)
 {
     if (component.IsHoldingFire() || component.IsHoldingPressure())
     {
         args.Cancel();
     }
 }