# SPDX-License-Identifier: AGPL-3.0-or-later

- type: entity
  id: CigPackBase
  parent: [ BaseStorageItem, BaseBagOpenClose ]
  name: cigarette pack
  abstract: true
  components:
  - type: Sprite
    layers:
    - state: closed
      map: ["closeLayer"]
    - state: open
      map: ["openLayer"]
      visible: false
    - state: cig1
      map: ["cig1"]
      sprite: Objects/Consumable/Smokeables/Cigarettes/Packs/visualizer.rsi
      visible: false
    - state: cig2
      map: ["cig2"]
      sprite: Objects/Consumable/Smokeables/Cigarettes/Packs/visualizer.rsi
      visible: false
    - state: cig3
      map: ["cig3"]
      sprite: Objects/Consumable/Smokeables/Cigarettes/Packs/visualizer.rsi
      visible: false
    - state: cig4
      map: ["cig4"]
      sprite: Objects/Consumable/Smokeables/Cigarettes/Packs/visualizer.rsi
      visible: false
    - state: cig5
      map: ["cig5"]
      sprite: Objects/Consumable/Smokeables/Cigarettes/Packs/visualizer.rsi
      visible: false
    - state: cig6
      map: ["cig6"]
      sprite: Objects/Consumable/Smokeables/Cigarettes/Packs/visualizer.rsi
      visible: false
  - type: Tag
    tags:
    - CigPack
    - Trash
  - type: PhysicalComposition #Goobstation - Recycle update
    materialComposition:
      Steel: 50
  - type: SpaceGarbage
  - type: Item
    size: Tiny
    shape: # Yes, this is cursed, but it breaks otherwise, dont question it.
    - 0,0,0,1
  - type: Storage
    grid:
    - 0,0,4,1
    whitelist: #Goobstation - whitelisted cig pack strorage
      tags:
      - Cigarette
      - Lighter
      - MedicalPatch
  - type: EntityTableContainerFill
    containers:
      storagebase:
        id: Cigarette
        amount: 10
  - type: ItemCounter
    count:
      tags: [Cigarette]
    composite: true
    layerStates:
    - cig1
    - cig2
    - cig3
    - cig4
    - cig5
    - cig6
  - type: Appearance

- type: entity
  id: CigPackMixedBase
  parent: [ BaseStorageItem, BaseBagOpenClose ]
  name: soaked cigarette pack
  abstract: true
  components:
  - type: Sprite
    layers:
    - state: closed
      map: ["closeLayer"]
    - state: open
      map: ["openLayer"]
      visible: false
    - state: cig1
      map: ["cig1"]
      sprite: Objects/Consumable/Smokeables/Cigarettes/Packs/visualizer.rsi
      visible: false
    - state: cig2
      map: ["cig2"]
      sprite: Objects/Consumable/Smokeables/Cigarettes/Packs/visualizer.rsi
      visible: false
    - state: cig3
      map: ["cig3"]
      sprite: Objects/Consumable/Smokeables/Cigarettes/Packs/visualizer.rsi
      visible: false
    - state: cig4
      map: ["cig4"]
      sprite: Objects/Consumable/Smokeables/Cigarettes/Packs/visualizer.rsi
      visible: false
    - state: cig5
      map: ["cig5"]
      sprite: Objects/Consumable/Smokeables/Cigarettes/Packs/visualizer.rsi
      visible: false
    - state: cig6
      map: ["cig6"]
      sprite: Objects/Consumable/Smokeables/Cigarettes/Packs/visualizer.rsi
      visible: false
  - type: Tag
    tags:
    - CigPack
    - Trash
  - type: PhysicalComposition #Goobstation - Recycle update
    materialComposition:
      Steel: 50
  - type: SpaceGarbage
  - type: Item
    size: Tiny
    shape: # Yes, this is cursed, but it breaks otherwise, dont question it.
    - 0,0,0,1
  - type: Storage
    grid:
    - 0,0,4,1
    whitelist: #Goobstation - whitelisted cig pack strorage
      tags:
      - Cigarette
      - Lighter
      - MedicalPatch
  - type: ItemCounter
    count:
      tags: [Cigarette]
    composite: true
    layerStates:
    - cig1
    - cig2
    - cig3
    - cig4
    - cig5
    - cig6
  - type: Appearance

- type: entity
  id: CigPackGreen
  parent: CigPackBase
  name: Spessman's Smokes packet
  description: A label on the packaging reads, Wouldn't a slow death make a change?
  components:
  - type: Sprite
    sprite: Objects/Consumable/Smokeables/Cigarettes/Packs/green.rsi
  - type: Item
    sprite: Objects/Consumable/Smokeables/Cigarettes/Packs/green.rsi

- type: entity
  id: CigPackRed
  parent: CigPackBase
  name: DromedaryCo packet
  description: The most popular brand of Space Cigarettes, sponsors of the Space Olympics.
  components:
  - type: Sprite
    sprite: Objects/Consumable/Smokeables/Cigarettes/Packs/red.rsi
  - type: Item
    sprite: Objects/Consumable/Smokeables/Cigarettes/Packs/red.rsi

- type: entity
  id: CigPackBlue
  parent: CigPackBase
  name: AcmeCo packet
  description: For those who somehow want to obtain the record for the most amount of cancerous tumors.
  components:
  - type: Sprite
    sprite: Objects/Consumable/Smokeables/Cigarettes/Packs/blue.rsi
  - type: Item
    sprite: Objects/Consumable/Smokeables/Cigarettes/Packs/blue.rsi

- type: entity
  id: CigPackBlack
  parent: CigPackBase
  name: Nomads packet
  description: Nomads's extra strong, for when your life is more extra hard.
  components:
  - type: Sprite
    sprite: Objects/Consumable/Smokeables/Cigarettes/Packs/black.rsi
  - type: Item
    sprite: Objects/Consumable/Smokeables/Cigarettes/Packs/black.rsi

- type: entity
  id: CigPackSyndicate
  parent: [CigPackBase, BaseSyndicateContraband]
  name: Interdyne herbals packet
  description: Elite cigarettes for elite syndicate agents. Infused with medicine for when you need to do more than calm your nerves.
  components:
  - type: Sprite
    sprite: Objects/Consumable/Smokeables/Cigarettes/Packs/syndicate.rsi
  - type: Item
    sprite: Objects/Consumable/Smokeables/Cigarettes/Packs/syndicate.rsi
  - type: EntityTableContainerFill
    containers:
      storagebase:
        id: CigaretteSyndicate
        amount: 10

- type: entity
  id: CigPackMixed
  parent: CigPackMixedBase
  name: Dan's soaked smokes
  suffix: Mixed
  description: Dan worked with NT chemistry to dispose of excess chemicals, ENJOY.
  components:
  - type: Sprite
    sprite: Objects/Consumable/Smokeables/Cigarettes/Packs/mixed.rsi
  - type: Item
    sprite: Objects/Consumable/Smokeables/Cigarettes/Packs/mixed.rsi
  - type: EntityTableContainerFill
    containers:
      storagebase: !type:NestedSelector
        rolls: !type:RangeNumberSelector
          range: 2, 9
        tableId: RandomSoakedSmokeTable

# Entity tables

- type: entityTable
  id: RandomSoakedSmokeTable
  table: !type:GroupSelector
    children:
    - id: CigaretteLicoxide
      weight: 1
    - id: CigaretteFrezon
      weight: 1
    - id: CigarettePhlogiston
      weight: 1
    - id: CigaretteWeldingFuel
      weight: 3
    - id: CigaretteMold
      weight: 3
    - id: CigaretteRadium
      weight: 3
    - id: CigaretteOmnizine
      weight: 4
    - id: CigaretteTricordrazine
      weight: 4
    - id: CigaretteIron
      weight: 4
    - id: CigaretteDylovene
      weight: 4
    - id: CigaretteDermaline
      weight: 4
    - id: CigaretteArithrazine
      weight: 4
    - id: CigaretteBicaridine
      weight: 4
    - id: CigaretteDexalin
      weight: 4
    - id: CigaretteHaloperidol
      weight: 6
    - id: CigaretteLaughter
      weight: 6
    - id: CigaretteLipolicide
      weight: 6
    - id: CigaretteSodiumPolyacrylate
      weight: 6
    - id: CigaretteRobustHarvest
      weight: 6
    - id: CigaretteBanana
      weight: 7
    - id: CigaretteBlackPepper
      weight: 7
    - id: CigaretteCapsaicinOil
      weight: 7
    - id: CigaretteBbqSauce
      weight: 7
    - id: CigaretteNutriment
      weight: 7
    - id: CigaretteSaline
      weight: 7

