- type: entity
  id: ToolboxBase
  parent: BaseStorageItem
  abstract: true
  components:
  - type: Sprite
    layers:
      - map: [ base ]
        state: icon
  - 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
    damage:
      types:
        Blunt: 12
    soundHit:
      path: "/Audio/Weapons/smash.ogg"
  - type: Tag
    tags:
    - Toolbox
  - type: GenericVisualizer
    visuals:
      enum.StorageVisuals.Open:
        base:
          True: { state: icon-open }
          False: { state: icon }
  - type: Appearance

- 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
    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
