- type: entity
  parent: [Clothing, ContentsExplosionResistanceBase]
  id: ClothingBackpack
  name: backpack
  description: You wear this on your back and put items into it.
  components:
  - type: Sprite
    sprite: Clothing/Back/Backpacks/backpack.rsi
    state: icon
  - type: Item
    size: Huge
  - type: Clothing
    quickEquip: false
    slots:
    - back
  - type: Storage
    grid:
    - 0,0,6,3
    maxItemSize: Huge
  - type: ContainerContainer
    containers:
      storagebase: !type:Container
        ents: []
  - type: UserInterface
    interfaces:
      enum.StorageUiKey.Key:
        type: StorageBoundUserInterface
  # to prevent bag open/honk spam
  - type: UseDelay
    delay: 0.5
  - type: ExplosionResistance
    damageCoefficient: 0.9
  - type: AllowsSleepInside # DeltaV - enable sleeping inside bags
  - type: Tag
    tags:
    - WhitelistChameleon
    - Backpack

- type: entity
  parent: ClothingBackpack
  id: ClothingBackpackClown
  name: giggles von honkerton
  description: It's a backpack made by Honk! Co.
  components:
  - type: Sprite
    sprite: Clothing/Back/Backpacks/clown.rsi
  - type: Storage
    storageOpenSound:
      collection: BikeHorn
      params:
        variation: 0.125
    storageInsertSound:
      collection: FootstepClown
      params:
        variation: 0.125

- type: entity
  parent: ClothingBackpack
  id: ClothingBackpackIan
  name: Ian's backpack
  description: Sometimes he wears it.
  components:
  - type: Sprite
    sprite: Clothing/Back/Backpacks/ian.rsi
  - type: Storage
    storageOpenSound:
      collection: IanBark

- type: entity
  parent: [ClothingBackpack, BaseSecurityContraband]
  id: ClothingBackpackSecurity
  name: security backpack
  description: It's a very robust backpack.
  components:
  - type: Sprite
    sprite: Clothing/Back/Backpacks/security.rsi

- type: entity
  parent: [ClothingBackpack, BaseSecurityContraband]
  id: ClothingBackpackBrigmedic
  name: combat medic backpack # starcup: rename brigmedic to combat medic
  description: It's a very sterile backpack.
  components:
  - type: Sprite
    sprite: Clothing/Back/Backpacks/brigmedic.rsi

- type: entity
  parent: ClothingBackpack
  id: ClothingBackpackEngineering
  name: engineering backpack
  description: It's a tough backpack for the daily grind of station life.
  components:
  - type: Sprite
    sprite: Clothing/Back/Backpacks/engineering.rsi

- type: entity
  parent: ClothingBackpack
  id: ClothingBackpackAtmospherics
  name: atmospherics backpack
  description: It's a backpack made of fire resistant fibers. Smells like plasma.
  components:
  - type: Sprite
    sprite: Clothing/Back/Backpacks/atmospherics.rsi

- type: entity
  parent: ClothingBackpack
  id: ClothingBackpackMedical
  name: medical backpack
  description: It's a backpack especially designed for use in a sterile environment.
  components:
  - type: Sprite
    sprite: Clothing/Back/Backpacks/medical.rsi

- type: entity
  parent: [ClothingBackpack, BaseCommandContraband]
  id: ClothingBackpackCaptain
  name: captain's backpack
  description: It's a special backpack made exclusively for Nanotrasen officers.
  components:
  - type: Sprite
    sprite: Clothing/Back/Backpacks/captain.rsi

- type: entity
  parent: ClothingBackpack
  id: ClothingBackpackMime
  name: mime backpack
  description: A silent backpack made for those silent workers. Silence Co.
  components:
  - type: Sprite
    sprite: Clothing/Back/Backpacks/mime.rsi
  - type: Storage
    storageOpenSound: null
    storageInsertSound: null

- type: entity
  parent: ClothingBackpack
  id: ClothingBackpackChemistry
  name: chemistry backpack
  description: A backpack specially designed to repel stains and hazardous liquids.
  components:
  - type: Sprite
    sprite: Clothing/Back/Backpacks/chemistry.rsi

- type: entity
  parent: ClothingBackpack
  id: ClothingBackpackHydroponics
  name: hydroponics backpack
  description: It's a backpack made of all-natural fibers.
  components:
  - type: Sprite
    sprite: Clothing/Back/Backpacks/hydroponics.rsi

- type: entity
  parent: ClothingBackpack
  id: ClothingBackpackScience
  name: science backpack
  description: A backpack specially designed to repel stains and hazardous liquids.
  components:
  - type: Sprite
    sprite: Clothing/Back/Backpacks/science.rsi

- type: entity
  parent: ClothingBackpack
  id: ClothingBackpackVirology
  name: virology backpack
  description: A backpack made of hypo-allergenic fibers. It's designed to help prevent the spread of disease. Smells like monkey.
  components:
  - type: Sprite
    sprite: Clothing/Back/Backpacks/virology.rsi

- type: entity
  parent: ClothingBackpack
  id: ClothingBackpackGenetics
  name: genetics backpack
  description: A backpack designed to be super tough, just in case someone hulks out on you.
  components:
  - type: Sprite
    sprite: Clothing/Back/Backpacks/genetics.rsi

- type: entity
  parent: ClothingBackpack
  id: ClothingBackpackCargo
  name: logistics backpack # DeltaV - Logistics Department replacing Cargo
  description: A robust backpack with countless neatly organized compartments. # DeltaV - Logistics Department replacing Cargo # starcup: rewritten for tone
  components:
    - type: Sprite
      sprite: Clothing/Back/Backpacks/cargo.rsi

- type: entity
  parent: ClothingBackpack
  id: ClothingBackpackSalvage
  name: salvage bag
  description: A robust backpack for stashing your loot.
  components:
    - type: Sprite
      sprite: Clothing/Back/Backpacks/salvage.rsi

- type: entity
  parent: ClothingBackpack
  id: ClothingBackpackMerc
  name: mercenary bag
  description: A backpack that has been in many dangerous places, a reliable combat backpack.
  components:
    - type: Sprite
      sprite: Clothing/Back/Backpacks/merc.rsi

#ERT
- type: entity
  parent: [ ClothingBackpack, BaseCentcommContraband ]
  id: ClothingBackpackERTLeader
  name: ERT leader backpack
  description: A spacious backpack with lots of pockets, worn by the Commander of an Emergency Response Team.
  components:
  - type: Sprite
    sprite: Clothing/Back/Backpacks/ertleader.rsi
  - type: Storage
    grid:
    - 0,0,10,3

- type: entity
  parent: ClothingBackpackERTLeader
  id: ClothingBackpackERTSecurity
  name: ERT security backpack
  description: A spacious backpack with lots of pockets, worn by Security Officers of an Emergency Response Team.
  components:
  - type: Sprite
    sprite: Clothing/Back/Backpacks/ertsec.rsi

- type: entity
  parent: ClothingBackpackERTLeader
  id: ClothingBackpackERTMedical
  name: ERT medical backpack
  description: A spacious backpack with lots of pockets, worn by Medical Officers of an Emergency Response Team.
  components:
  - type: Sprite
    sprite: Clothing/Back/Backpacks/ertmed.rsi

- type: entity
  parent: ClothingBackpackERTLeader
  id: ClothingBackpackERTEngineer
  name: ERT engineer backpack
  description: A spacious backpack with lots of pockets, worn by Engineers of an Emergency Response Team.
  components:
  - type: Sprite
    sprite: Clothing/Back/Backpacks/erteng.rsi

- type: entity
  parent: ClothingBackpackERTLeader
  id: ClothingBackpackERTJanitor
  name: ERT janitor backpack
  description: A spacious backpack with lots of pockets, worn by Janitors of an Emergency Response Team.
  components:
  - type: Sprite
    sprite: Clothing/Back/Backpacks/ertjanitor.rsi

- type: entity
  parent: ClothingBackpackERTLeader
  id: ClothingBackpackERTClown
  name: ERT clown backpack
  description: A spacious backpack with lots of pockets, worn by Clowns of an Emergency Response Team.
  components:
  - type: Sprite
    sprite: Clothing/Back/Backpacks/ertclown.rsi

- type: entity
  parent: ClothingBackpackERTLeader
  id: ClothingBackpackERTChaplain
  name: ERT chaplain backpack
  description: A spacious backpack with lots of pockets, worn by Chaplains of an Emergency Response Team.
  components:
  - type: Sprite
    sprite: Clothing/Back/Backpacks/ertchaplain.rsi

- type: entity
  parent: ClothingBackpackERTSecurity
  id: ClothingBackpackDeathSquad
  name: death squad backpack
  description: Holds the kit of CentComm's most feared agents.
  components:
    - type: Storage
      grid:
      - 0,0,7,6

#Syndicate
- type: entity
  parent: [ClothingBackpack, BaseSyndicateContraband]
  id: ClothingBackpackSyndicate
  name: syndicate backpack
  description:
  components:
  - type: Sprite
    sprite: Clothing/Back/Backpacks/syndicate.rsi
  - type: ExplosionResistance
    damageCoefficient: 0.1
  - type: Storage
    grid:
    - 0,0,7,3
    - 8,1,8,3
  - type: StaticPrice
    price: 1000

#Special
- type: entity
  parent: ClothingBackpack
  id: ClothingBackpackHolding
  name: bag of holding
  description: A backpack that opens into a localized pocket of bluespace.
  components:
  - type: Sprite
    sprite: Clothing/Back/Backpacks/holding.rsi
    state: holding
    layers:
    - state: holding
    - state: holding-unlit
      shader: unshaded
  - type: Clothing
    equippedPrefix: holding
  - type: Item
    size: Ginormous
  - type: Storage
    maxItemSize: Huge
    grid:
    - 0,0,19,9

- type: entity
  parent: ClothingBackpackClown
  id: ClothingBackpackCluwne
  name: jiggles von jonkerton
  suffix: Unremoveable
  description: It's a backpack made by Jonk! Co.
  components:
  - type: Sprite
    sprite: Clothing/Back/Backpacks/cluwne.rsi
  - type: Unremoveable
    deleteOnDrop: false

- type: entity
  parent: ClothingBackpack
  id: ClothingBackpackElectropack
  name: electropack
  suffix: SelfUnremovable
  description: Shocks on the signal. It is used to keep a particularly dangerous criminal under control.
  components:
  - type: Sprite
    sprite: Clothing/Back/Backpacks/electropack.rsi
    state: icon
  - type: Clothing
    stripDelay: 10
    equipDelay: 5 # to avoid accidentally falling into the trap associated with SelfUnremovableClothing
  - type: SelfUnremovableClothing
  - type: ShockOnTrigger
    targetContainer: true
    damage: 5
    duration: 3
  - type: TriggerOnSignal
  - type: DeviceLinkSink
    ports:
      - Trigger

# Debug
- type: entity
  parent: ClothingBackpack
  id: ClothingBackpackDebug
  name: wackpack
  description: What the fuck is this?
  suffix: Debug
  components:
  - type: Storage
    grid:
    - 0,0,3,3
    - 5,0,7,2
    - 0,5,7,5
    - 6,4,7,5
    - 9,2,10,3
    - 9,5,9,5

- type: entity
  parent: ClothingBackpack
  id: ClothingBackpackDebug2
  name: big wackpack
  description: What the fuck is this?
  suffix: Debug
  components:
  - type: Storage
    grid:
    - 0,0,39,24

- type: entity
  parent: ClothingBackpack
  id: ClothingBackpackDebug3
  name: gay wackpack
  description: What the fuck is this?
  suffix: Debug
  components:
  - type: Storage
    grid:
    - 0,0,0,3
    - 0,0,2,0
    - 0,3,2,3
    - 2,2,2,2
    - 4,1,4,3
    - 6,1,6,3
    - 5,2,5,2
    - 5,0,5,0
    - 9,2,9,3
    - 8,0,8,1
    - 10,0,10,1

- type: entity
  parent: ClothingBackpack
  id: ClothingBackpackDebug4
  name: offset wackpack
  description: What the fuck is this?
  suffix: Debug
  components:
  - type: Storage
    grid:
    - 5,5,11,8
