# SPDX-FileCopyrightText: 2021 Galactic Chimp <GalacticChimpanzee@gmail.com>
# SPDX-FileCopyrightText: 2021 Swept <sweptwastaken@protonmail.com>
# SPDX-FileCopyrightText: 2022 Emisse <99158783+Emisse@users.noreply.github.com>
# SPDX-FileCopyrightText: 2022 Leon Friedrich <60421075+ElectroJr@users.noreply.github.com>
# SPDX-FileCopyrightText: 2022 Veritius <veritiusgaming@gmail.com>
# SPDX-FileCopyrightText: 2022 metalgearsloth <31366439+metalgearsloth@users.noreply.github.com>
# SPDX-FileCopyrightText: 2022 mirrorcult <lunarautomaton6@gmail.com>
# SPDX-FileCopyrightText: 2023 Nemanja <98561806+EmoGarbage404@users.noreply.github.com>
# SPDX-FileCopyrightText: 2023 Puro <103608145+PuroSlavKing@users.noreply.github.com>
# SPDX-FileCopyrightText: 2023 Whisper <121047731+QuietlyWhisper@users.noreply.github.com>
# SPDX-FileCopyrightText: 2023 lzk <124214523+lzk228@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 Aidenkrz <aiden@djkraz.com>
# SPDX-FileCopyrightText: 2024 Gyrandola <pasta.frollagg@gmail.com>
# SPDX-FileCopyrightText: 2024 Ilya246 <57039557+Ilya246@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 Kara <lunarautomaton6@gmail.com>
# SPDX-FileCopyrightText: 2024 deltanedas <39013340+deltanedas@users.noreply.github.com>
# SPDX-FileCopyrightText: 2025 Aiden <28298836+Aidenkrz@users.noreply.github.com>
#
# SPDX-License-Identifier: AGPL-3.0-or-later
# TODO: same as fire extinguisher make it use a base structure theres lots of copy paste
- type: entity
  parent: BaseItemCabinetGlass
  id: FireAxeCabinet
  name: fire axe cabinet
  description: There is a small label that reads "For Emergency use only" along with details for safe use of the axe. As if.
  placement:
    mode: SnapgridCenter
  components:
  - type: Damageable
    damageContainer: StructuralInorganic
    damageModifierSet: Glass
  - type: Destructible
    thresholds:
    - trigger:
        !type:DamageTrigger
        damage: 300
      behaviors:
      - !type:DoActsBehavior
        acts: [ "Destruction" ]
    - trigger:
        !type:DamageTrigger
        damage: 200 #20ish crowbar hits
      behaviors:
      - !type:EmptyAllContainersBehaviour
      - !type:DoActsBehavior
        acts: [ "Destruction" ]
      - !type:PlaySoundBehavior
        sound:
          collection: MetalGlassBreak
  - type: MeleeSound
    soundGroups:
      Brute:
        collection: GlassSmash
  - type: WallMount
  - type: Clickable
  - type: InteractionOutline
  - type: Sprite
    sprite: Structures/Wallmounts/fireaxe_cabinet.rsi
    layers:
    - state: cabinet
    - state: fireaxe
      map: ["enum.ItemCabinetVisuals.Layer"]
      visible: true
    - state: glass
      map: ["enum.OpenableVisuals.Layer"]
  - type: ItemSlots
    slots:
      ItemCabinet:
        ejectOnInteract: true
        whitelist:
          tags:
          - FireAxe
  - type: Lock
  - type: AccessReader
    access: [["Atmospherics"], ["Command"]]

- type: entity
  parent: FireAxeCabinet
  id: FireAxeCabinetOpen
  suffix: Open
  components:
  - type: Openable
    opened: true
  - type: Lock
    locked: false

- type: entity
  parent: FireAxeCabinet
  id: FireAxeCabinetFilled
  suffix: Filled
  components:
  - type: ContainerFill
    containers:
      ItemCabinet:
      - FireAxe

- type: entity
  parent: [FireAxeCabinetFilled, FireAxeCabinetOpen]
  id: FireAxeCabinetFilledOpen
  suffix: Filled, Open