- type: entity
  id: Firelock
  parent: BaseStructure
  name: firelock
  description: Apply crowbar.
  components:
    - type: AtmosAlarmable
      alarmedBy:
      - FireAlarm
      - AirAlarm
    - type: ApcPowerReceiver
    - type: ExtensionCableReceiver
    - type: DeviceNetworkComponent
      deviceNetId: Apc
      frequency: 1621
    - type: ApcNetworkConnection
    - type: InteractionOutline
    - type: Damageable
      damageContainer: Inorganic
      damageModifierSet: Metallic
    - type: Destructible
      thresholds:
      - trigger:
          !type:DamageTrigger
          damage: 500
        behaviors:
        - !type:DoActsBehavior
          acts: ["Destruction"]
    - type: Sprite
      netsync: false
      sprite: Structures/Doors/Airlocks/Standard/firelock.rsi
      layers:
        - state: closed
          map: ["enum.DoorVisualLayers.Base"]
        - state: closed_unlit
          shader: unshaded
          map: ["enum.DoorVisualLayers.BaseUnlit"]
        - state: welded
          map: ["enum.DoorVisualLayers.BaseWelded"]
        - state: bolted_unlit
          shader: unshaded
          map: ["enum.DoorVisualLayers.BaseBolted"]
        - state: panel_open
          map: ["enum.WiresVisualLayers.MaintenancePanel"]
    - type: Fixtures
      fixtures:
      - shape:
          !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: Door
      openDrawDepth: WallTops
      closeTimeOne: 0.1
      closeTimeTwo: 0.6
      openTimeOne: 0.1
      openTimeTwo: 0.6
      state: Open
      bumpOpen: false
      clickOpen: false
      crushDamage:
        types:
          Blunt: 15
      openSound:
        path: /Audio/Machines/airlock_open.ogg
      closeSound:
        path: /Audio/Machines/airlock_close.ogg
      denySound:
        path: /Audio/Machines/airlock_deny.ogg
    - type: Firelock
    - type: Appearance
      visuals:
        - type: AirlockVisualizer
          animationTime: 0.6
          emergencyAccessLayer: false
        - type: WiresVisualizer
    - type: Wires
      BoardName: "Firelock Control"
      LayoutId: Firelock
    - type: UserInterface
      interfaces:
        - key: enum.WiresUiKey.Key
          type: WiresBoundUserInterface
    - type: Airtight
      fixVacuum: true
    - type: Construction
      graph: Firelock
      node: Firelock

- type: entity
  id: FirelockGlass
  parent: Firelock
  name: glass firelock
  components:
    - type: Sprite
      sprite: Structures/Doors/Airlocks/Glass/firelock.rsi

- type: entity
  id: FirelockEdge
  parent: Firelock
  name: firelock
  components:
    - type: Sprite
      sprite: Structures/Doors/edge_door_hazard.rsi
    - type: Airtight
      fixVacuum: true
      noAirWhenFullyAirBlocked: false
      airBlockedDirection:
        - South
    - type: Fixtures
      fixtures:
      - shape:
          !type:PhysShapeAabb
          bounds: "-0.49,-0.49,0.49,-0.2" # don't want this colliding with walls or they won't close
        mask:
          - MobImpassable
        layer:
          - Opaque
          - Impassable
          - MobImpassable
          - VaultImpassable
          - SmallImpassable
