# SPDX-FileCopyrightText: 2019 Swept <49448379+SweptWasTaken@users.noreply.github.com>
# SPDX-FileCopyrightText: 2020 DrSmugleaf <DrSmugleaf@users.noreply.github.com>
# SPDX-FileCopyrightText: 2020 Hugo Laloge <hugo.laloge@gmail.com>
# SPDX-FileCopyrightText: 2020 Paul Ritter <ritter.paul1@googlemail.com>
# SPDX-FileCopyrightText: 2020 Pieter-Jan Briers <pieterjan.briers+git@gmail.com>
# SPDX-FileCopyrightText: 2020 Swept <jamesurquhartwebb@gmail.com>
# SPDX-FileCopyrightText: 2020 Víctor Aguilera Puerto <6766154+Zumorica@users.noreply.github.com>
# SPDX-FileCopyrightText: 2020 Ygg01 <daniel.fath7@gmail.com>
# SPDX-FileCopyrightText: 2020 py01 <pyronetics01@gmail.com>
# 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 Fishfish458 <47410468+Fishfish458@users.noreply.github.com>
# SPDX-FileCopyrightText: 2022 Rane <60792108+Elijahrane@users.noreply.github.com>
# SPDX-FileCopyrightText: 2022 fishfish458 <fishfish458>
# SPDX-FileCopyrightText: 2022 metalgearsloth <comedian_vs_clown@hotmail.com>
# SPDX-FileCopyrightText: 2022 metalgearsloth <metalgearsloth@gmail.com>
# SPDX-FileCopyrightText: 2023 Arendian <137322659+Arendian@users.noreply.github.com>
# SPDX-FileCopyrightText: 2023 Colin-Tel <113523727+Colin-Tel@users.noreply.github.com>
# SPDX-FileCopyrightText: 2023 Ed <96445749+TheShuEd@users.noreply.github.com>
# SPDX-FileCopyrightText: 2023 Flareguy <78941145+Flareguy@users.noreply.github.com>
# SPDX-FileCopyrightText: 2023 Leon Friedrich <60421075+ElectroJr@users.noreply.github.com>
# SPDX-FileCopyrightText: 2023 deltanedas <39013340+deltanedas@users.noreply.github.com>
# SPDX-FileCopyrightText: 2023 deltanedas <@deltanedas:kde.org>
# SPDX-FileCopyrightText: 2024 AJCM-git <60196617+AJCM-git@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 BombasterDS <115770678+BombasterDS@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 Debug <49997488+DebugOk@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 Drayff <andrew.motrych@gmail.com>
# SPDX-FileCopyrightText: 2024 EmoGarbage404 <retron404@gmail.com>
# SPDX-FileCopyrightText: 2024 Kara <lunarautomaton6@gmail.com>
# SPDX-FileCopyrightText: 2024 Nemanja <98561806+EmoGarbage404@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 Piras314 <p1r4s@proton.me>
# SPDX-FileCopyrightText: 2024 Tayrtahn <tayrtahn@gmail.com>
# SPDX-FileCopyrightText: 2024 Winkarst <74284083+Winkarst-cpu@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 lzk <124214523+lzk228@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 metalgearsloth <31366439+metalgearsloth@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 username <113782077+whateverusername0@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 whateverusername0 <whateveremail>
# SPDX-FileCopyrightText: 2025 Aiden <28298836+Aidenkrz@users.noreply.github.com>
# SPDX-FileCopyrightText: 2025 Eagle <lincoln.mcqueen@gmail.com>
# SPDX-FileCopyrightText: 2025 Fishbait <Fishbait@git.ml>
# SPDX-FileCopyrightText: 2025 GoobBot <uristmchands@proton.me>
# SPDX-FileCopyrightText: 2025 VMSolidus <evilexecutive@gmail.com>
# SPDX-FileCopyrightText: 2025 fishbait <gnesse@gmail.com>
# SPDX-FileCopyrightText: 2025 gus <august.eymann@gmail.com>
# SPDX-FileCopyrightText: 2025 pheenty <fedorlukin2006@gmail.com>
# SPDX-FileCopyrightText: 2025 vanx <61917534+Vaaankas@users.noreply.github.com>
#
# SPDX-License-Identifier: AGPL-3.0-or-later

- type: entity
  id: ToolboxBase
  parent: BaseStorageItem
  abstract: true
  components:
  - type: Sprite
    layers:
      - map: [ base ]
        state: icon
  # Goobstation edit start
  - type: EmitSoundOnPickup
    sound:
      path: /Audio/_Goobstation/Items/handling/toolbox_pickup.ogg
  - type: EmitSoundOnDrop
    sound:
      path: /Audio/Items/toolbox_drop.ogg
  # Goobstation edit end
  - type: EmitSoundOnLand
    sound:
      path: /Audio/Items/toolbox_drop.ogg
  - type: Storage
    maxItemSize: Normal
    grid:
    - 0,0,6,3
    storageOpenSound: /Audio/Items/toolbox_open.ogg
    storageCloseSound: /Audio/Items/toolbox_close.ogg
    storageInsertSound: /Audio/Items/toolbox_insert.ogg
    storageRemoveSound: /Audio/Items/toolbox_remove.ogg
  - type: Item
    size: Ginormous
  - type: MeleeWeapon
    heavyStaminaCost: 10 # goob edit
    damage:
      types:
        Blunt: 12
    soundHit:
      path: "/Audio/Weapons/smash.ogg"
  - type: Tag
    tags:
    - Toolbox
    - DroneUsable # Goobstation
  - type: GenericVisualizer
    visuals:
      enum.StorageVisuals.Open:
        base:
          True: { state: icon-open }
          False: { state: icon }
  - type: Appearance
  - type: PhysicalComposition #Goobstation - Recycle update
    materialComposition:
      Steel: 125

- type: entity
  name: emergency toolbox
  parent: ToolboxBase
  id: ToolboxEmergency
  description: A bright red toolbox, stocked with emergency tools.
  components:
  - type: Sprite
    sprite: Objects/Tools/Toolboxes/toolbox_red.rsi
    state: icon
  - type: Item
    sprite: Objects/Tools/Toolboxes/toolbox_red.rsi

- type: entity
  name: mechanical toolbox
  parent: ToolboxBase
  id: ToolboxMechanical
  description: A blue box, stocked with mechanical tools.
  components:
  - type: Sprite
    sprite: Objects/Tools/Toolboxes/toolbox_blue.rsi
    state: icon
  - type: Item
    sprite: Objects/Tools/Toolboxes/toolbox_blue.rsi

- type: entity
  name: electrical toolbox
  parent: ToolboxBase
  id: ToolboxElectrical
  description: A toolbox typically stocked with electrical gear.
  components:
  - type: Sprite
    sprite: Objects/Tools/Toolboxes/toolbox_yellow.rsi
    state: icon
  - type: Item
    sprite: Objects/Tools/Toolboxes/toolbox_yellow.rsi

- type: entity
  name: electrical toolbox
  suffix: Syndicate, Turret
  parent: ToolboxElectrical
  id: ToolboxElectricalTurret
  description: A toolbox typically stocked with electrical gear.
  components:
  - type: Damageable
    damageContainer: Inorganic
  - type: Destructible
    thresholds:
      - trigger:
          !type:DamageTrigger
          damage: 100
        behaviors:
          - !type:DoActsBehavior
            acts: [ "Destruction" ]
      - trigger:
          !type:DamageTrigger
          damage: 1
        behaviors:
          - !type:DoActsBehavior
            acts: [ "Destruction" ]
          - !type:SpawnEntitiesBehavior
            spawn:
              WeaponTurretSyndicateDisposable:
                min: 1
                max: 1
  - type: StaticPrice
    price: 1350

- type: entity
  name: artistic toolbox
  parent: ToolboxBase
  id: ToolboxArtistic
  description: A toolbox typically stocked with artistic supplies.
  components:
  - type: Sprite
    sprite: Objects/Tools/Toolboxes/toolbox_green.rsi
    state: icon
  - type: Item
    sprite: Objects/Tools/Toolboxes/toolbox_green.rsi

- type: entity
  name: suspicious toolbox
  parent: [ToolboxBase, BaseSyndicateContraband]
  id: ToolboxSyndicate
  description: A sinister looking toolbox filled with elite syndicate tools.
  components:
  - type: Sprite
    sprite: Objects/Tools/Toolboxes/toolbox_syn.rsi
    state: icon
  - type: Item
    sprite: Objects/Tools/Toolboxes/toolbox_syn.rsi
  - type: Storage
    maxItemSize: Huge
    grid:
    - 0,0,7,3
  - type: MeleeWeapon
    flipAnimation: false # Horizontally symetrical sprites dont need this. neither does
    heavyStaminaCost: 10 # goob edit
    damage:
      types:
        Blunt: 20

- type: entity
  name: golden toolbox
  parent: ToolboxBase
  id: ToolboxGolden
  description: A solid gold toolbox. A rapper would kill for this.
  components:
  - type: Sprite
    sprite: Objects/Tools/Toolboxes/toolbox_gold.rsi
    state: icon
  - type: Item
    sprite: Objects/Tools/Toolboxes/toolbox_gold.rsi
