- type: entity
  id: BodyBag
  parent: [ BaseDeployFoldable, BasePaperLabelableVisualized ]
  name: body bag
  description: A plastic bag designed for the storage and transportation of cadavers to stop body decomposition.
  components:
  - type: Item
    size: Small
    heldPrefix: bag
  - type: Sprite
    drawdepth: SmallObjects # I guess body bags need appear above a coroner's table?
    sprite: Objects/Specific/Medical/Morgue/bodybags.rsi
    layers:
    - state: bag
      map: ["unfoldedLayer", "enum.StorageVisualLayers.Base"]
    - state: bag_folded
      map: ["foldedLayer"]
      visible: false
    - state: open_overlay
      map: ["enum.StorageVisualLayers.Door"]
    - state: paper
      map: ["enum.PaperLabelVisuals.Layer"]
  - type: Icon
    sprite: Objects/Specific/Medical/Morgue/bodybags.rsi
    state: bag
  - type: Tag
    tags:
    - BodyBag
  - type: Clickable
  - type: InteractionOutline
  - type: MovedByPressure
  - type: Physics
    bodyType: Dynamic
  - type: Transform
    noRot: true
  - type: Fixtures
    fixtures:
      fix1:
        shape:
          !type:PhysShapeAabb
          bounds: "-0.25,-0.4,0.25,0.1"
        density: 80
        mask:
        - ItemMask
  - type: EntityStorage
    capacity: 1
    isCollidableWhenOpen: true
    whitelist: # Use a tag whitelist rather than filtering for PerishableComponent to avoid chefs using body bags for food preservation
      tags:
        - VimPilot # Pets
        - CanPilot # People
    closeSound:
      path: /Audio/Misc/zip.ogg
    openSound:
      path: /Audio/Misc/zip.ogg
  - type: EntityStorageLayingDownOverride
  - type: Appearance
  - type: EntityStorageVisuals
    stateDoorOpen: open_overlay
  - type: GenericVisualizer
    visuals:
      enum.PaperLabelVisuals.HasLabel:
        enum.PaperLabelVisuals.Layer:
          True: {visible: true}
          False: {visible: false}
      enum.PaperLabelVisuals.LabelType:
        enum.PaperLabelVisuals.Layer:
          Paper: { state: paper }
          Bounty: { state: bounty }
          CaptainsPaper: { state: captains_paper }
          Invoice: { state: invoice }
      enum.FoldedVisuals.State:
        foldedLayer:
          True: {visible: true}
          False: {visible: false}
        unfoldedLayer:
          True: {visible: false}
          False: {visible: true}
  - type: Pullable
  - type: AntiRottingContainer
  - type: ContainerContainer
    containers:
      entity_storage: !type:Container
      paper_label: !type:ContainerSlot
  - type: StaticPrice
    price: 50

- type: entity
  id: BodyBagFolded
  name: body bag
  description: A plastic bag designed for the storage and transportation of cadavers to stop body decomposition.
  parent: BodyBag
  suffix: folded
  components:
  - type: Foldable
    folded: true
#  - type: BodyBagItem #TODO: we need some kind of generic placable, like thus:
# - type: Placeable
#   prototype: someId
#   snap: Center

- type: entity
  parent: BaseItem
  id: Ash
  name: ash
  description: This used to be something, but now it's not.
  components:
  - type: Item
    size: Tiny
  - type: Sprite
    sprite: Objects/Materials/materials.rsi
    state: ash
  - type: Tag
    tags:
    - Burnt
    - Trash
  - type: SolutionContainerManager
    solutions:
      food:
        maxVol: 50
        reagents:
        - ReagentId: Ash
          Quantity: 10
  - type: SolutionSpiker
    sourceSolution: food
    ignoreEmpty: true
  - type: ScoopableSolution
    solution: food
  - type: Extractable
    grindableSolutionName: food

- type: entity
  parent: Ash
  id: Ectoplasm
  name: ectoplasm
  description: Much less deadly in this form.
  components:
    - type: Sprite
      sprite: Mobs/Ghosts/revenant.rsi
      state: ectoplasm
    - type: Tag
      tags:
        - Trash
        - Ectoplasm
    - type: SolutionContainerManager
      solutions:
        food:
          maxVol: 50
          reagents:
            - ReagentId: Ash
              Quantity: 25
            - ReagentId: Arcryox
              Quantity: 25
    - type: GuideHelp
      guides:
      - MinorAntagonists
