# TODO: Removes the icon components from all these when that gets fixed.

- type: entity
  parent: BaseItem
  id: BaseFoodCondiment
  abstract: true
  components:
  - type: DrawableSolution
    solution: food
  - type: DrainableSolution
    solution: food
  - type: ExaminableSolution
    solution: food
  - type: Sprite
    sprite: Objects/Consumable/Food/condiments.rsi
  - type: Icon
    sprite: Objects/Consumable/Food/condiments.rsi
  - type: TrashOnSolutionEmpty
    solution: food
  - type: SpaceGarbage
  - type: StaticPrice
    price: 0

# Packets

- type: entity
  parent: BaseFoodCondiment
  id: BaseFoodCondimentPacket
  name: condiment packet
  abstract: true
  description: A small plastic pack with condiments to put on your food.
  components:
  - type: Item
    size: Tiny
  - type: Edible
    edible: Food # usually contains powders like flour or condiments like ketchup
    solution: food
    destroyOnEmpty: false
    utensil: Spoon
  - type: Openable
    sound:
      collection: packetOpenSounds
  # Since this one is closed, the only way to insert liquid is with a syringe.
  - type: InjectableSolution
    solution: food
  # Note NOT refillable.
  # It be a shame if it turned out ALL drinks were ALWAYS refillable.... ffs.
  # Well its fixed now, but I want to share my pain.
  - type: SolutionContainerManager
    solutions:
      food:
        maxVol: 10
  - type: SolutionTransfer
    maxTransferAmount: 10
  - type: Sprite
    layers:
      - state: packet-trans-2
        map: ["enum.SolutionContainerLayers.Fill"]
        visible: true
      - state: packet-layer
        map: ["enum.OpenableVisuals.Layer"]
      - state: packet-label
  - type: GenericVisualizer
    visuals:
      enum.OpenableVisuals.Opened:
        enum.OpenableVisuals.Layer:
          True: {state: "packet-layer-open"}
          False: {state: "packet-layer"}
  - type: Icon
    state: packet-empty
  - type: PhysicalComposition
    materialComposition:
      Plastic: 50
  - type: Tag
    tags:
      - Packet
  - type: ExaminableSolution
    exactVolume: true

- type: entity
  parent: BaseFoodCondimentPacket
  id: BaseFoodCondimentPacketDrink
  abstract: true
  components:
  - type: Edible
    edible: Drink # slurping sounds!

- type: entity
  parent: BaseFoodCondimentPacket
  id: FoodCondimentPacketAstrotame
  name: Astrotame
  description: The sweetness of a thousand sugars but none of the calories.
  components:
  - type: SolutionContainerManager
    solutions:
      food:
        maxVol: 10
        reagents:
        - ReagentId: Astrotame
          Quantity: 10
  - type: Sprite
    layers:
      - state: packet-trans-2
        map: ["enum.SolutionContainerLayers.Fill"]
        visible: true
      - state: packet-layer
        map: ["enum.OpenableVisuals.Layer"]
      - state: packet-label-a
  - type: Icon
    state: packet-astrotame
  - type: Appearance
  - type: SolutionContainerVisuals
    maxFillLevels: 2
    fillBaseName: packet-trans-

- type: entity
  parent: BaseFoodCondimentPacketDrink
  id: FoodCondimentPacketBbq
  name: BBQ sauce
  description: Hand wipes not included.
  components:
  - type: SolutionContainerManager
    solutions:
      food:
        maxVol: 10
        reagents:
        - ReagentId: BbqSauce
          Quantity: 10
  - type: Icon
    state: packet-bbq
  - type: Appearance
  - type: SolutionContainerVisuals
    maxFillLevels: 2
    fillBaseName: packet-trans-

- type: entity
  parent: BaseFoodCondimentPacketDrink
  id: FoodCondimentPacketCornoil
  name: corn oil
  description: Corn oil. A delicious oil used in cooking. Made from corn.
  components:
  - type: SolutionContainerManager
    solutions:
      food:
        maxVol: 10
        reagents:
        - ReagentId: Cornoil
          Quantity: 10
  - type: Icon
    state: packet-cornoil
  - type: Appearance
  - type: SolutionContainerVisuals
    maxFillLevels: 2
    fillBaseName: packet-trans-

- type: entity
  parent: BaseFoodCondimentPacketDrink
  id: FoodCondimentPacketColdsauce
  name: coldsauce
  description: Coldsauce. Leaves the tongue numb in its passage.
  components:
  - type: SolutionContainerManager
    solutions:
      food:
        maxVol: 10
        reagents:
        - ReagentId: Coldsauce
          Quantity: 10
  - type: Icon
    state: packet-frostoil
  - type: Appearance
  - type: SolutionContainerVisuals
    maxFillLevels: 2
    fillBaseName: packet-trans-

- type: entity
  parent: BaseFoodCondimentPacketDrink
  id: FoodCondimentPacketHorseradish
  name: horseradish sauce
  description: A packet of smelly horseradish sauce.
  components:
  - type: SolutionContainerManager
    solutions:
      food:
        maxVol: 10
        reagents:
        - ReagentId: HorseradishSauce
          Quantity: 10
  - type: Icon
    state: packet-greygoo
  - type: Appearance
  - type: SolutionContainerVisuals
    maxFillLevels: 2
    fillBaseName: packet-solid-

- type: entity
  parent: BaseFoodCondimentPacketDrink
  id: FoodCondimentPacketHotsauce
  name: hotsauce
  description: You can almost TASTE the stomach ulcers now!
  components:
  - type: SolutionContainerManager
    solutions:
      food:
        maxVol: 10
        reagents:
        - ReagentId: Hotsauce
          Quantity: 10
  - type: Icon
    state: packet-hotsauce
  - type: Appearance
  - type: SolutionContainerVisuals
    maxFillLevels: 2
    fillBaseName: packet-trans-

- type: entity
  parent: BaseFoodCondimentPacketDrink
  id: FoodCondimentPacketKetchup
  name: ketchup
  description: You feel more American already.
  components:
  - type: SolutionContainerManager
    solutions:
      food:
        reagents:
        - ReagentId: Ketchup
          Quantity: 10
  - type: Sprite
  - type: Icon
    state: packet-ketchup
  - type: Appearance
  - type: SolutionContainerVisuals
    maxFillLevels: 2
    fillBaseName: packet-solid-

- type: entity
  parent: BaseFoodCondimentPacketDrink
  id: FoodCondimentPacketMustard
  name: mustard
  description: A condiment made from the ground-up seeds of the Mustard plant.
  components:
  - type: SolutionContainerManager
    solutions:
      food:
        reagents:
        - ReagentId: Mustard
          Quantity: 10
  - type: Icon
    state: packet-mustard
  - type: Appearance
  - type: SolutionContainerVisuals
    maxFillLevels: 2
    fillBaseName: packet-solid-

- type: entity
  parent: BaseFoodCondimentPacket
  id: FoodCondimentPacketPepper
  name: black pepper
  description: Often used to flavor food or make people sneeze.
  components:
  - type: SolutionContainerManager
    solutions:
      food:
        reagents:
        - ReagentId: Blackpepper
          Quantity: 10
  - type: Icon
    state: packet-pepper
  - type: Appearance
  - type: SolutionContainerVisuals
    maxFillLevels: 2
    fillBaseName: packet-solid-

- type: entity
  parent: BaseFoodCondimentPacket
  id: FoodCondimentPacketSalt
  name: salt
  description: Salt. From space oceans, presumably.
  components:
  - type: SolutionContainerManager
    solutions:
      food:
        reagents:
        - ReagentId: TableSalt
          Quantity: 10
  - type: Sprite
    layers:
      - state: packet-solid-2
        map: ["enum.SolutionContainerLayers.Fill"]
        visible: true
      - state: packet-layer
        map: ["enum.OpenableVisuals.Layer"]
      - state: packet-label
        color: black
  - type: Icon
    state: packet-salt
  - type: Appearance
  - type: SolutionContainerVisuals
    maxFillLevels: 2
    fillBaseName: packet-solid-

- type: entity
  parent: BaseFoodCondimentPacketDrink
  id: FoodCondimentPacketSoy
  name: soy sauce
  description: A salty soy-based flavoring.
  components:
  - type: SolutionContainerManager
    solutions:
      food:
        reagents:
        - ReagentId: Soysauce
          Quantity: 10
  - type: Icon
    state: packet-soysauce
  - type: Appearance
  - type: SolutionContainerVisuals
    maxFillLevels: 2
    fillBaseName: packet-solid-

- type: entity
  parent: BaseFoodCondimentPacket
  id: FoodCondimentPacketSugar
  name: sugar
  description: Tasty spacey sugar!
  components:
  - type: SolutionContainerManager
    solutions:
      food:
        reagents:
        - ReagentId: Sugar
          Quantity: 10
  - type: Icon
    state: packet-sugar
  - type: Appearance
  - type: SolutionContainerVisuals
    maxFillLevels: 2
    fillBaseName: packet-solid-

# Bottles

- type: entity
  parent: BaseFoodCondiment
  id: BaseFoodCondimentBottle
  abstract: true
  name: condiment bottle
  description: A thin glass bottle used to store condiments.
  components:
  - type: Edible
    edible: Drink
    solution: food
    destroyOnEmpty: false
    utensil: None
  - type: Openable
    sound:
      collection: pop
    closeable: true
  - type: SolutionContainerManager
    solutions:
      food:
        maxVol: 30
  - type: RefillableSolution
    solution: food
  - type: Spillable
    solution: food
  - type: SolutionTransfer
    canChangeTransferAmount: true
    minTransferAmount: 5
    maxTransferAmount: 30
  - type: Sprite
    state: bottle-empty
  - type: Appearance
  - type: SolutionContainerVisuals
    maxFillLevels: 6
    fillBaseName: bottle-alpha-
  - type: GenericVisualizer
    visuals:
      enum.OpenableVisuals.Opened:
        enum.OpenableVisuals.Layer:
          True: {state: "bottle-open"}
          False: {state: "bottle-empty"}
  - type: PhysicalComposition
    materialComposition:
      Glass: 50

- type: entity
  parent: BaseFoodCondimentBottle
  id: FoodCondimentBottleColdsauce
  name: coldsauce bottle
  description: Leaves the tongue numb in its passage.
  components:
  - type: SolutionContainerManager
    solutions:
      food:
        reagents:
        - ReagentId: Coldsauce
          Quantity: 30
  - type: Sprite
    layers:
    - state: bottle-empty
      map: ["enum.OpenableVisuals.Layer"]
    - state: label-c
    - state: bottle-alpha-6
      map: ["enum.SolutionContainerLayers.Fill"]
      visible: true
  - type: Icon
    state: bottle-coldsauce
  - type: Tag
    tags:
      - Coldsauce

- type: entity
  parent: BaseFoodCondimentBottle
  id: FoodCondimentBottleEnzyme
  name: universal enzyme
  description: Used in cooking various dishes.
  components:
  - type: SolutionContainerManager
    solutions:
      food:
        reagents:
        - ReagentId: Enzyme
          Quantity: 30
  - type: Sprite
    layers:
    - state: bottle-empty
      map: ["enum.OpenableVisuals.Layer"]
    - state: label-e
    - state: bottle-alpha-6
      map: ["enum.SolutionContainerLayers.Fill"]
      visible: true
  - type: Icon
    state: bottle-enzyme
  - type: Tag
    tags:
      - Enzyme

- type: entity
  parent: BaseFoodCondimentBottle
  id: FoodCondimentBottleVinegar
  name: vinegar bottle
  description: Used in cooking to enhance flavor.
  components:
  - type: SolutionContainerManager
    solutions:
      food:
        reagents:
        - ReagentId: Vinegar
          Quantity: 30
  - type: Sprite
    layers:
    - state: bottle-empty
      map: ["enum.OpenableVisuals.Layer"]
    - state: label-v
    - state: bottle-alpha-6
      map: ["enum.SolutionContainerLayers.Fill"]
      visible: true
  - type: Icon
    state: bottle-vinegar

- type: entity
  parent: BaseFoodCondimentBottle
  id: FoodCondimentBottleHotsauce
  name: hotsauce bottle
  description: You can almost TASTE the stomach ulcers now!
  components:
  - type: SolutionContainerManager
    solutions:
      food:
        reagents:
        - ReagentId: Hotsauce
          Quantity: 30
  - type: Sprite
    layers:
    - state: bottle-empty
      map: ["enum.OpenableVisuals.Layer"]
    - state: label-h
    - state: bottle-alpha-6
      map: ["enum.SolutionContainerLayers.Fill"]
      visible: true
  - type: Icon
    state: bottle-hotsauce
  - type: Tag
    tags:
      - Hotsauce

- type: entity
  parent: BaseFoodCondimentBottle
  id: FoodCondimentBottleKetchup
  name: ketchup bottle
  description: You feel more American already.
  components:
  - type: SolutionContainerManager
    solutions:
      food:
        reagents:
        - ReagentId: Ketchup
          Quantity: 30
  - type: Sprite
    layers:
    - state: bottle-empty
      map: ["enum.OpenableVisuals.Layer"]
    - state: label-k
    - state: bottle-alpha-6
      map: ["enum.SolutionContainerLayers.Fill"]
      visible: true
  - type: Icon
    state: bottle-ketchup
  - type: Tag
    tags:
      - Ketchup

- type: entity
  parent: BaseFoodCondimentBottle
  id: FoodCondimentBottleBBQ
  name: BBQ sauce bottle
  description: Hand wipes not included.
  components:
  - type: SolutionContainerManager
    solutions:
      food:
        reagents:
        - ReagentId: BbqSauce
          Quantity: 30
  - type: Sprite
    layers:
    - state: bottle-empty
      map: ["enum.OpenableVisuals.Layer"]
    - state: label-b
    - state: bottle-alpha-6
      map: ["enum.SolutionContainerLayers.Fill"]
      visible: true
  # So there's no error.
  - type: Icon
    state: bottle-ketchup
  - type: Tag
    tags:
      - BBQsauce

# Shakers

- type: entity
  parent: BaseFoodCondiment # TODO: This should not inherit TrashOnSolutionEmpty, SpaceGarbage and the price of 0
  id: BaseFoodShaker
  abstract: true
  name: empty shaker
  description: A shaker used to store and dispense spices.
  components:
  - type: Item
    size: Tiny
  - type: Edible
    edible: Drink
    solution: food
    destroyOnEmpty: false
    utensil: None # don't conflict with stirring
  - type: SolutionContainerManager
    solutions:
      food:
        maxVol: 20
  - type: SolutionTransfer
    canChangeTransferAmount: true
    minTransferAmount: 5
    maxTransferAmount: 20
  - type: Destructible
    thresholds:
    - trigger:
        !type:DamageTrigger
        damage: 5
      behaviors:
      - !type:PlaySoundBehavior
        sound:
          collection: GlassBreak
      - !type:SpillBehavior { }
      - !type:SpawnEntitiesBehavior
        spawn:
          ShardGlass:
            min: 1
            max: 1
        transferForensics: true
      - !type:DoActsBehavior
        acts: [ "Destruction" ]
  - type: Sprite
    state: shaker-empty
  - type: RefillableSolution
    solution: food

- type: entity
  parent: BaseFoodShaker
  id: FoodShakerSalt
  name: salt shaker
  description: Salt. From space oceans, presumably.
  components:
  - type: SolutionContainerManager
    solutions:
      food:
        reagents:
        - ReagentId: TableSalt
          Quantity: 20
  - type: Sprite
    state: shaker-salt
  - type: Icon
    state: shaker-salt
  - type: Tag
    tags:
      - SaltShaker

- type: entity
  parent: BaseFoodShaker
  id: FoodShakerPepper
  name: pepper shaker
  description: Often used to flavor food or make people sneeze.
  components:
  - type: SolutionContainerManager
    solutions:
      food:
        reagents:
        - ReagentId: Blackpepper
          Quantity: 20
  - type: Sprite
    state: shaker-pepper
  - type: Icon
    state: shaker-pepper
  - type: Tag
    tags:
      - PepperShaker
