# SPDX-FileCopyrightText: 2021 20kdc <asdd2808@gmail.com>
# SPDX-FileCopyrightText: 2021 Galactic Chimp <GalacticChimpanzee@gmail.com>
# SPDX-FileCopyrightText: 2021 Pieter-Jan Briers <pieterjan.briers+git@gmail.com>
# SPDX-FileCopyrightText: 2021 Swept <sweptwastaken@protonmail.com>
# SPDX-FileCopyrightText: 2021 Ygg01 <y.laughing.man.y@gmail.com>
# SPDX-FileCopyrightText: 2021 mirrorcult <lunarautomaton6@gmail.com>
# SPDX-FileCopyrightText: 2022 Jessica M <jessica@jessicamaybe.com>
# SPDX-FileCopyrightText: 2022 Kara <lunarautomaton6@gmail.com>
# SPDX-FileCopyrightText: 2022 Leon Friedrich <60421075+ElectroJr@users.noreply.github.com>
# SPDX-FileCopyrightText: 2022 Vera Aguilera Puerto <gradientvera@outlook.com>
# SPDX-FileCopyrightText: 2023 Interrobang01 <113810873+Interrobang01@users.noreply.github.com>
# SPDX-FileCopyrightText: 2023 Jeff <velcroboy333@hotmail.com>
# SPDX-FileCopyrightText: 2023 MisterMecky <mrmecky@hotmail.com>
# SPDX-FileCopyrightText: 2023 Psychpsyo <60073468+Psychpsyo@users.noreply.github.com>
# SPDX-FileCopyrightText: 2023 Velcroboy <107660393+ChilbroBaggins@users.noreply.github.com>
# SPDX-FileCopyrightText: 2023 Velcroboy <107660393+IamVelcroboy@users.noreply.github.com>
# SPDX-FileCopyrightText: 2023 deltanedas <39013340+deltanedas@users.noreply.github.com>
# SPDX-FileCopyrightText: 2023 deltanedas <@deltanedas:kde.org>
# SPDX-FileCopyrightText: 2023 metalgearsloth <31366439+metalgearsloth@users.noreply.github.com>
# SPDX-FileCopyrightText: 2023 potato1234_x <79580518+potato1234x@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 Tayrtahn <tayrtahn@gmail.com>
# SPDX-FileCopyrightText: 2024 Verm <32827189+Vermidia@users.noreply.github.com>
# SPDX-FileCopyrightText: 2025 Aiden <28298836+Aidenkrz@users.noreply.github.com>
# SPDX-FileCopyrightText: 2025 SX_7 <sn1.test.preria.2002@gmail.com>
#
# SPDX-License-Identifier: AGPL-3.0-or-later
# 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: 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: Drink
    solution: food
  - 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: 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: BaseFoodCondimentPacket
  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: BaseFoodCondimentPacket
  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: BaseFoodCondimentPacket
  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: BaseFoodCondimentPacket
  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: BaseFoodCondimentPacket
  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: BaseFoodCondimentPacket
  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: BaseFoodCondimentPacket
  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: StatusEffectOnCollideGhost # Goobstation - Wraith
    whitelist:
      tags:
      - WeakToSalt
    statusEffect: Corporeal
    duration: 15
  - type: SaltLinePlacer # Goobstation - Wraith
    saltLine: SaltLine
  - type: ConsumeOnSaltLine # Goobstation - Wraith
    amount: 1

- type: entity
  parent: BaseFoodCondimentPacket
  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: Drink
    solution: food
  - 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
  id: BaseFoodShaker
  abstract: true
  name: empty shaker
  description: A shaker used to store and dispense spices.
  components:
  - type: Item
    size: Tiny
  - type: Drink
    solution: food
  - 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: FoodShakerSaltEmpty #Goobstation - shaker making
  id: FoodShakerSalt
  name: salt shaker
  description: Salt. From space oceans, presumably.
  components:
  - type: SolutionContainerManager
    solutions:
      food:
        reagents:
        - ReagentId: TableSalt
          Quantity: 20

- type: entity
  parent: FoodShakerPepperEmpty #Goobstation - shaker making
  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