コード例 #1
0
 private void OnStateChanged(EntityUid uid, AirlockComponent component, DoorStateChangedEvent args)
 {
     // Only show the maintenance panel if the airlock is closed
     if (component.WiresComponent != null)
     {
         component.WiresComponent.IsPanelVisible =
             component.OpenPanelVisible ||
             args.State != SharedDoorComponent.DoorState.Open;
     }
     // If the door is closed, we should look if the bolt was locked while closing
     component.UpdateBoltLightStatus();
 }
コード例 #2
0
        private void OnStateChanged(EntityUid uid, AirlockComponent component, DoorStateChangedEvent args)
        {
            // TODO move to shared? having this be server-side, but having client-side door opening/closing & prediction
            // means that sometimes the panels & bolt lights may be visible despite a door being completely open.

            // Only show the maintenance panel if the airlock is closed
            if (TryComp <WiresComponent>(uid, out var wiresComponent))
            {
                wiresComponent.IsPanelVisible =
                    component.OpenPanelVisible ||
                    args.State != DoorState.Open;
            }
            // If the door is closed, we should look if the bolt was locked while closing
            component.UpdateBoltLightStatus();

            UpdateAutoClose(uid, component);
        }
コード例 #3
0
 private void OnDoorStateChanged(DoorStateEventArgs e)
 {
     DoorStateChangedEvent?.Invoke(this, e);
 }
コード例 #4
0
 public void OnDoorOpen(DoorEventArgs e)
 {
     DoorStateChangedEvent?.Invoke(this, e);
 }
コード例 #5
0
 protected virtual void OnDoorStateChanged(DoorStateChangedEventArgs e)
 {
     DoorStateChangedEvent?.Invoke(this, e);
 }