- type: entity
  id: airlock
  name: Airlock
  description: It opens, it closes, and maybe crushes you.
  components:
  - type: Clickable
  - type: InteractionOutline
  - type: Sprite
    netsync: false

    drawdepth: Mobs # They're on the same layer as mobs, perspective.
    sprite: Buildings/airlock_basic.rsi
    layers:
    - state: closed
      map: ["enum.DoorVisualLayers.Base"]
    - state: closed_unlit
      shader: unshaded
      map: ["enum.DoorVisualLayers.BaseUnlit"]
    - state: panel_open
      map: ["enum.WiresVisualLayers.MaintenancePanel"]

  - type: Icon
    sprite: Buildings/airlock_basic.rsi
    state: closed

  - type: Collidable
    shapes:
    - !type:PhysShapeAabb
      bounds: "-0.49,-0.49,0.49,0.49" # don't want this colliding with walls or they won't close
      mask: 4
      layer: 31
  - type: Airlock
  - type: Appearance
    visuals:
    - type: AirlockVisualizer2D
      open_sound: /Audio/machines/airlock_open.ogg
      close_sound: /Audio/machines/airlock_close.ogg
      deny_sound: /Audio/machines/airlock_deny.ogg
    - type: WiresVisualizer2D
  - type: PowerDevice
  - type: Wires
  - type: UserInterface
    interfaces:
    - key: enum.WiresUiKey.Key
      type: WiresBoundUserInterface
  placement:
    mode: SnapgridCenter
