- type: entity
  id: airlock
  name: Airlock
  description: It opens, it closes, and maybe crushes you.
  components:
  - type: Clickable
  - 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"]

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

  - type: BoundingBox
    # This AABB isn't the full tile because..
    # If it is, airlocks collide with walls and other airlocks causing them to never close.
    # yeah...
    # TODO: Fix that.
    aabb: -0.45, -0.45, 0.45, 0.45
  - type: Collidable
  - type: Door
  - type: Appearance
    visuals:
    - type: AirlockVisualizer2D
      open_sound: /Audio/machines/airlock_open.ogg
      close_sound: /Audio/machines/airlock_close.ogg

  placement:
    mode: SnapgridBorder
