# SPDX-FileCopyrightText: 2021 Galactic Chimp <GalacticChimpanzee@gmail.com>
# SPDX-FileCopyrightText: 2021 Leon Friedrich <60421075+ElectroJr@users.noreply.github.com>
# SPDX-FileCopyrightText: 2021 Pieter-Jan Briers <pieterjan.briers+git@gmail.com>
# SPDX-FileCopyrightText: 2021 ShadowCommander <10494922+ShadowCommander@users.noreply.github.com>
# SPDX-FileCopyrightText: 2021 Swept <sweptwastaken@protonmail.com>
# SPDX-FileCopyrightText: 2021 SweptWasTaken <sweptwastaken@protonmail.com>
# SPDX-FileCopyrightText: 2022 Peptide90 <78795277+Peptide90@users.noreply.github.com>
# SPDX-FileCopyrightText: 2022 Rane <60792108+Elijahrane@users.noreply.github.com>
# SPDX-FileCopyrightText: 2022 Veritius <veritiusgaming@gmail.com>
# SPDX-FileCopyrightText: 2022 metalgearsloth <31366439+metalgearsloth@users.noreply.github.com>
# SPDX-FileCopyrightText: 2022 metalgearsloth <metalgearsloth@gmail.com>
# SPDX-FileCopyrightText: 2022 mirrorcult <lunarautomaton6@gmail.com>
# SPDX-FileCopyrightText: 2022 themias <89101928+themias@users.noreply.github.com>
# SPDX-FileCopyrightText: 2023 Kara <lunarautomaton6@gmail.com>
# SPDX-FileCopyrightText: 2023 Kevin Zheng <kevinz5000@gmail.com>
# SPDX-FileCopyrightText: 2023 Nemanja <98561806+EmoGarbage404@users.noreply.github.com>
# SPDX-FileCopyrightText: 2023 lzk <124214523+lzk228@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 GreyMario <mariomister541@gmail.com>
# SPDX-FileCopyrightText: 2024 Psychpsyo <60073468+Psychpsyo@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 RumiTiger <154005209+RumiTiger@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 slarticodefast <161409025+slarticodefast@users.noreply.github.com>
# SPDX-FileCopyrightText: 2025 Aiden <28298836+Aidenkrz@users.noreply.github.com>
# SPDX-FileCopyrightText: 2025 Aviu00 <93730715+Aviu00@users.noreply.github.com>
# SPDX-FileCopyrightText: 2025 Piras314 <p1r4s@proton.me>
#
# SPDX-License-Identifier: AGPL-3.0-or-later
# Plate
# In the future, I (Swept) want a system for putting stuff on plates and it'll provide more nutrition
# If it's on that plate. I've modified all load/slices to fit on the plate, so all we need
# is that system. Ideally, food on plates would have a system where when thrown, it would
# break the plate and the loaf would fall off.

# Large Plate

- type: entity
  name: large plate
  parent: BaseItem
  id: FoodPlate
  description: A large plate, excellent for bread.
  components:
  - type: Sprite
    sprite: Objects/Consumable/Food/plates.rsi
    state: plate
  - type: Item
    shape:
    - 0,0,1,0
    storedOffset: 0,-6
    inhandVisuals:
      left:
      - state: plate-inhand-left
      right:
      - state: plate-inhand-right
  - type: DamageOnLand
    damage:
      types:
        Blunt: 5
  - type: DamageOtherOnHit
    damage:
      types:
        Blunt: 5
  - type: Damageable
    damageContainer: Inorganic
  - type: Destructible
    thresholds:
    - trigger:
        !type:DamageTrigger
        damage: 5
      behaviors:
      - !type:PlaySoundBehavior
        sound:
          collection: GlassBreak
          params:
            volume: -8
      - !type:SpawnEntitiesBehavior
        spawn:
          FoodPlateTrash:
            min: 1
            max: 1
      - !type:DoActsBehavior
        acts: [ "Destruction" ]
  - type: Tag
    tags:
    - Trash
  - type: PhysicalComposition
    materialComposition:
      Glass: 60
  - type: SpaceGarbage
  - type: ThrowableBlocked # Goobstation
    behavior: Damage
    damage:
      types:
        Blunt: 5

- type: entity
  name: broken plate
  parent: BaseItem
  id: FoodPlateTrash
  description: A broken plate. Useless.
  components:
  - type: Sprite
    sprite: Objects/Consumable/Food/plates.rsi
    state: plate-trash
  - type: Item
    shape:
    - 0,0,1,0
    storedOffset: 0,-6
  - type: Tag
    tags:
    - Trash
  - type: SpaceGarbage

# Small Plate

- type: entity
  name: small plate
  parent: FoodPlate
  id: FoodPlateSmall
  description: A small plate. Delicate.
  components:
  - type: Sprite
    sprite: Objects/Consumable/Food/plates.rsi
    state: plate-small
  - type: Item
    storedOffset: 0,-3
    inhandVisuals:
      left:
      - state: plate-inhand-left
      right:
      - state: plate-inhand-right
# Needs the full thing because inherting is dumb sometimes.
  - type: Destructible
    thresholds:
    - trigger:
        !type:DamageTrigger
        damage: 5
      behaviors:
      - !type:PlaySoundBehavior
        sound:
          collection: GlassBreak
          params:
            volume: -8
      - !type:SpawnEntitiesBehavior
        spawn:
          FoodPlateSmallTrash:
            min: 1
            max: 1
      - !type:DoActsBehavior
        acts: [ "Destruction" ]
  - type: PhysicalComposition
    materialComposition:
      Glass: 30

- type: entity
  parent: FoodPlateTrash
  id: FoodPlateSmallTrash
  components:
  - type: Sprite
    sprite: Objects/Consumable/Food/plates.rsi
    state: plate-small-trash
  - type: Item
    storedOffset: 0,-3

# Plastic Plate

- type: entity
  name: plastic plate
  parent: BaseItem
  id: FoodPlatePlastic
  description: A large blue plastic plate, excellent for a birthday cake.
  components:
  - type: Sprite
    sprite: Objects/Consumable/Food/plates.rsi
    state: plate-plastic
  - type: Item
    shape:
    - 0,0,1,0
    storedOffset: 0,-6
    inhandVisuals:
      left:
      - state: plate-plastic-inhand-left
      right:
      - state: plate-plastic-inhand-right
  - type: Tag
    tags:
    - Trash

- type: entity
  name: plastic plate
  parent: BaseItem
  id: FoodPlateSmallPlastic
  description: A blue plastic plate, excellent for slices of birthday cake.
  components:
  - type: Sprite
    sprite: Objects/Consumable/Food/plates.rsi
    state: plate-small-plastic
  - type: Item
    shape:
    - 0,0,1,0
    storedOffset: 0,-3
    inhandVisuals:
      left:
      - state: plate-plastic-inhand-left
      right:
      - state: plate-plastic-inhand-right
  - type: Tag
    tags:
    - Trash

# Pie Tin

- type: entity
  name: pie tin
  parent: BaseItem
  id: FoodPlateTin
  description: A cheap foil tin for pies.
  components:
  - type: Sprite
    sprite: Objects/Consumable/Food/plates.rsi
    state: tin
  - type: Item
    size: Small
    shape:
    - 0,0,1,0
    storedOffset: 0,-3
  - type: Tag
    tags:
    - Trash
  - type: PhysicalComposition
    materialComposition:
      Steel: 60
  - type: SpaceGarbage

# Muffin Tin

- type: entity
  name: muffin tin
  parent: BaseItem
  id: FoodPlateMuffinTin
  description: A cheap foil tin for muffins.
  components:
  - type: Sprite
    sprite: Objects/Consumable/Food/plates.rsi
    state: muffin-tin
  - type: Item
    size: Small
    shape:
    - 0,0,1,0
    storedOffset: 0,-3
  - type: Tag
    tags:
    - Trash
  - type: PhysicalComposition
    materialComposition:
      Steel: 30
  - type: SpaceGarbage