- type: entity
  id: BodyBag_Container
  name: body bag
  description: A plastic bag designed for the storage and transportation of cadavers.
  components:
  - type: Sprite
    netsync: false
    sprite: Objects/Specific/Morgue/bodybags.rsi
    layers:
    - state: bag
    - state: open_overlay
      map: ["enum.StorageVisualLayers.Door"]
    - state: label_overlay
      map: ["enum.BodyBagVisualLayers.Label"]
  - type: Icon
    sprite: Objects/Specific/Morgue/bodybags.rsi
    state: bag
  - type: Clickable
  - type: InteractionOutline
  - type: MovedByPressure
  - type: Physics
    mass: 5
    anchored: false
    shapes:
    - !type:PhysShapeAabb
      bounds: "-0.45,-0.5,0.1,0.5"
      layer:
      - Clickable
  - type: BodyBagEntityStorage
    CanWeldShut: false
    Capacity: 1
    closeSound: /Audio/Misc/zip.ogg
    openSound: /Audio/Misc/zip.ogg
  - type: Appearance
    visuals:
    - type: StorageVisualizer
      state_open: open_overlay
      state_closed: bag
    - type: BodyBagVisualizer
  - type: Pullable
  
- type: entity
  id: BodyBag_Item
  name: body bag
  description: A plastic bag designed for the storage and transportation of cadavers.
  parent: BaseItem
  components:
  - type: Sprite
    netsync: false
    sprite: Objects/Specific/Morgue/bodybags.rsi
    state: item
#  - type: BodyBagItem #TODO: we need some kind of generic placable, like thus:
# - type: Placeable
#   prototype: someId
#   snap: Center
  
  
- type: entity
  id: Morgue
  name: morgue
  description: Used to keep bodies in until someone fetches them. Includes a high-tech alert system for false-positives!
  components:
  - type: Sprite
    netsync: false
    sprite: Objects/Specific/Morgue/morgue.rsi
    layers:
    - state: morgue_closed
      map: ["enum.MorgueVisualLayers.Base"]
    - state: morgue_nomob_light
      visible: false
      map: ["enum.MorgueVisualLayers.Light"]
      shader: unshaded
  - type: Clickable
  - type: InteractionOutline
  - type: Physics
    mass: 25
    anchored: true
    shapes:
    - !type:PhysShapeAabb
      bounds: "-0.5, -0.5, 0.5, 0.5"
      mask:
       - Impassable
       - MobImpassable
       - VaultImpassable
       - SmallImpassable
      layer:
       - Opaque
       - MobImpassable
       - VaultImpassable
       - SmallImpassable
  - type: MorgueEntityStorage
    CanWeldShut: false
    IsCollidableWhenOpen: true
    Capacity: 1
    closeSound: /Audio/Items/deconstruct.ogg
    openSound: /Audio/Items/deconstruct.ogg
    trayPrototype: MorgueTray
  - type: Appearance
    visuals:
    - type: MorgueVisualizer
      state_open: morgue_open
      state_closed: morgue_closed
      light_contents: morgue_nomob_light
      light_mob: morgue_nosoul_light
      light_soul: morgue_soul_light
  - type: SnapGrid
    offset: Center
    
- type: entity
  id: MorgueTray
  name: morgue tray
  description: If you lay down to have a rest on this, you'll soon have a problem.
  components:
  - type: Sprite
    netsync: false
    sprite: Objects/Specific/Morgue/morgue.rsi
    state: morgue_tray
  - type: Clickable
  - type: InteractionOutline
  - type: Physics
    mass: 15
    anchored: true
    shapes:
    - !type:PhysShapeAabb
      bounds: "-0.5, -0.5, 0.5, 0.5"
      layer:
       - Clickable
  - type: MorgueTray


- type: entity
  id: Crematorium
  name: crematorium
  description: A human incinerator. Works well on barbecue nights.
  components:
  - type: Sprite
    netsync: false
    sprite: Objects/Specific/Morgue/morgue.rsi
    layers:
    - state: crema_closed
      map: ["enum.CrematoriumVisualLayers.Base"]
    - state: crema_contents_light
      visible: false
      map: ["enum.CrematoriumVisualLayers.Light"]
      shader: unshaded
  - type: Clickable
  - type: InteractionOutline
  - type: Physics
    mass: 25
    anchored: true
    shapes:
    - !type:PhysShapeAabb
      bounds: "-0.5, -0.5, 0.5, 0.5"
      mask:
       - Impassable
       - MobImpassable
       - VaultImpassable
       - SmallImpassable
      layer:
       - Opaque
       - MobImpassable
       - VaultImpassable
       - SmallImpassable
  - type: CrematoriumEntityStorage
    CanWeldShut: false
    IsCollidableWhenOpen: true
    Capacity: 1
    closeSound: /Audio/Items/deconstruct.ogg
    openSound: /Audio/Items/deconstruct.ogg
    trayPrototype: CrematoriumTray
    doSoulBeep: false
  - type: LoopingSound
  - type: Appearance
    visuals:
    - type: CrematoriumVisualizer
      state_open: crema_open
      state_closed: crema_closed
      light_contents: crema_contents_light
      light_burning: crema_active_light
  - type: SnapGrid
    offset: Center
      
- type: entity
  id: CrematoriumTray
  name: crematorium tray
  parent: MorgueTray
  components:
  - type: Sprite
    netsync: false
    sprite: Objects/Specific/Morgue/morgue.rsi
    state: crema_tray

- type: entity
  id: Ash
  name: ash
  description: This used to be something, but now it's not.
  parent: BaseItem
  components:
  - type: Sprite
    netsync: false
    sprite: Objects/Consumable/Trash/ash.rsi
    state: icon