# 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: 50
  - type: SpaceGarbage

- 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: 25

- 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
  parent: BaseItem
  id: FoodPlatePlastic
  name: large plastic plate
  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
  parent: BaseItem
  id: FoodPlateSmallPlastic
  name: small plastic plate
  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: 50
  - type: SpaceGarbage

# Muffin Tin

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