# SPDX-FileCopyrightText: 2024 BombasterDS <115770678+BombasterDS@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 Piras314 <p1r4s@proton.me>
# SPDX-FileCopyrightText: 2025 Aiden <28298836+Aidenkrz@users.noreply.github.com>
#
# SPDX-License-Identifier: AGPL-3.0-or-later

- type: entity
  id: SuitStorageHEV
  name: H.E.V suit storage unit
  description: A fancy hi-tech storage unit made for storing H.E.V suit.
  parent: [ BaseItemCabinetGlass, BaseStructure ]
  suffix: Empty
  components:
  - type: InteractionOutline
  - type: Lock
  - type: LockVisuals
  - type: Anchorable
    delay: 2
  - type: Transform
    noRot: true
  - type: Weldable
  - type: Sprite
    noRot: true
    sprite: _Goobstation/Structures/Storage/hev_storage.rsi
    layers:
    - state: base
    - state: suit
      map: ["enum.ItemCabinetVisuals.Layer"]
      visible: true
    - state: glass
      map: ["enum.OpenableVisuals.Layer"]
    - state: locked
      shader: unshaded
      map: ["enum.LockVisualLayers.Lock"]
  - type: Fixtures
    fixtures:
      fix1:
        shape:
          !type:PhysShapeAabb
          bounds: "-0.25,-0.48,0.25,0.48"
        density: 350
        mask:
        - MachineMask
        layer:
        - MachineLayer
  - type: Damageable
    damageContainer: StructuralInorganic
    damageModifierSet: Glass
  - type: MeleeSound
    soundGroups:
      Brute:
        collection: GlassSmash
  - type: Destructible
    thresholds:
    - trigger:
        !type:DamageTrigger
        damage: 400
      behaviors:
        - !type:DoActsBehavior
          acts: [ "Destruction" ]
    - trigger:
        !type:DamageTrigger
        damage: 200
      behaviors:
      - !type:DoActsBehavior
        acts: ["Destruction"]
      - !type:PlaySoundBehavior
        sound:
          collection: WindowShatter
          params:
            volume: -6
      - !type:SpawnEntitiesBehavior
        spawn:
          SheetSteel1:
            min: 1
            max: 1
          ShardGlassReinforced:
            min: 2
            max: 2
  - type: ItemSlots
    slots:
      ItemCabinet:
        ejectOnInteract: true
        whitelist:
          tags:
          - HEVSuit
        ejectSound: /Audio/Machines/machine_switch.ogg
  - type: AccessReader
    access: [["Engineering"]]

- type: entity
  id: SuitStorageHEVFilled
  parent: SuitStorageHEV
  suffix: Filled
  components:
  - type: ContainerFill
    containers:
      ItemCabinet:
      - ClothingOuterSuitHEV