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(); }
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); }
private void OnDoorStateChanged(DoorStateEventArgs e) { DoorStateChangedEvent?.Invoke(this, e); }
public void OnDoorOpen(DoorEventArgs e) { DoorStateChangedEvent?.Invoke(this, e); }
protected virtual void OnDoorStateChanged(DoorStateChangedEventArgs e) { DoorStateChangedEvent?.Invoke(this, e); }