- type: entity
  id: Airlock
  name: airlock
  description: It opens, it closes, and maybe crushes you.
  components:
  - type: Clickable
  - type: RCDDeconstructWhitelist
  - type: InteractionOutline
  - type: Sprite
    netsync: false
    drawdepth: Mobs # They're on the same layer as mobs, perspective.
    sprite: Constructible/Structures/Doors/airlock_basic.rsi
    layers:
    - state: closed
      map: ["enum.DoorVisualLayers.Base"]
    - state: closed_unlit
      shader: unshaded
      map: ["enum.DoorVisualLayers.BaseUnlit"]
    - state: bolted
      shader: unshaded
      map: ["enum.DoorVisualLayers.BaseBolted"]
    - state: panel_open
      map: ["enum.WiresVisualLayers.MaintenancePanel"]
  - type: Icon
    sprite: Constructible/Structures/Doors/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:
      - MobImpassable
      layer:
      - Opaque
      - Impassable
      - MobImpassable
      - VaultImpassable
      - SmallImpassable
  - type: Airlock
  - type: Appearance
    visuals:
    - type: AirlockVisualizer
      open_sound: /Audio/Machines/airlock_open.ogg
      close_sound: /Audio/Machines/airlock_close.ogg
      deny_sound: /Audio/Machines/airlock_deny.ogg
    - type: WiresVisualizer
  - type: PowerReceiver
  - type: Wires
    BoardName: "Airlock Control"
    LayoutId: Airlock
  - type: UserInterface
    interfaces:
    - key: enum.WiresUiKey.Key
      type: WiresBoundUserInterface
  - type: Airtight
    fixVacuum: true
    adjacentAtmosphere: true
  - type: Occluder
  - type: SnapGrid
    offset: Center
  placement:
    mode: SnapgridCenter

- type: entity
  id: AirlockGlass
  parent: Airlock
  name: glass airlock
  components:
  - type: Airlock
    occludes: false
  - type: Occluder
    enabled: false
  - type: Sprite
    sprite: Constructible/Structures/Doors/airlock_glass.rsi
  - type: Icon
    sprite: Constructible/Structures/Doors/airlock_glass.rsi

- type: entity
  parent: Airlock
  id: AirlockMaint
  name: maintenance hatch
  components:
  - type: Sprite
    sprite: Constructible/Structures/Doors/airlock_maint.rsi
  - type: Icon
    sprite: Constructible/Structures/Doors/airlock_maint.rsi
