- type: entity
  id: DisposalPipeBase
  abstract: true
  placement:
    mode: SnapgridCenter
    snap:
    - Disposal
  components:
  - type: Clickable
  - type: InteractionOutline
  - type: Physics
    anchored: true
  - type: SnapGrid
    offset: Center
  - type: Anchorable
  - type: Damageable
  - type: Breakable
  - type: Rotatable

- type: entity
  id: DisposalHolder
  name: disposal holder
  components:
  - type: DisposalHolder

- type: entity
  id: DisposalPipe
  parent: DisposalPipeBase
  name: disposal pipe segment
  description: A huge pipe segment used for constructing disposal systems
  components:
  - type: Sprite
    drawdepth: BelowFloor
    sprite: Constructible/Power/disposal.rsi
    state: conpipe-s
  - type: Icon
    sprite: Constructible/Power/disposal.rsi
    state: conpipe-s
  - type: DisposalTransit
  - type: Appearance
    visuals:
    - type: DisposalVisualizer
      state_free: conpipe-s
      state_anchored: pipe-s
      state_broken: pipe-b

- type: entity
  id: DisposalTrunk
  parent: DisposalPipeBase
  name: disposal trunk
  description: A pipe trunk used as an entry point for disposal systems
  components:
  - type: Sprite
    drawdepth: BelowFloor
    sprite: Constructible/Power/disposal.rsi
    state: conpipe-t
  - type: Icon
    sprite: Constructible/Power/disposal.rsi
    state: conpipe-t
  - type: DisposalEntry
  - type: Appearance
    visuals:
    - type: DisposalVisualizer
      state_free: conpipe-t
      state_anchored: pipe-t
      state_broken: pipe-b

- type: entity
  id: DisposalUnit
  name: disposal unit
  description: A pneumatic waste disposal unit
  placement:
    mode: SnapgridCenter
    snap:
    - Disposal
  components:
  - type: Sprite
    netsync: false
    sprite: Constructible/Power/disposal.rsi
    layers:
    - state: condisposal
      map: ["enum.DisposalUnitVisualLayers.Base"]
    - state: dispover-handle
      map: ["enum.DisposalUnitVisualLayers.Handle"]
    - state: dispover-ready
      map: ["enum.DisposalUnitVisualLayers.Light"]
  - type: Icon
    sprite: Constructible/Power/disposal.rsi
    state: disposal
  - type: PowerReceiver
  - type: DisposalUnit
    flushTime: 2
  - type: Clickable
  - type: InteractionOutline
  - type: Physics
    anchored: true
    shapes:
    - !type:PhysShapeAabb
      bounds: "-0.3,-0.3,0.3,0.3"
      layer:
      - Impassable
      - MobImpassable
  - type: Collidable
    anchored: true
    shapes:
    - !type:PhysShapeAabb
      bounds: "-0.3,-0.3,0.3,0.3"
      layer:
      - Impassable
      - MobImpassable
  - type: SnapGrid
    offset: Center
  - type: Anchorable
  - type: Destructible
    thresholdvalue: 100
  - type: Appearance
    visuals:
    - type: DisposalUnitVisualizer
      state_unanchored: condisposal
      state_anchored: disposal
      state_charging: disposal-charging
      overlay_charging: dispover-charge
      overlay_ready: dispover-ready
      overlay_full: dispover-full
      overlay_engaged: dispover-handle
      state_flush: disposal-flush
      flush_sound: /Audio/Machines/disposalflush.ogg
      flush_time: 2
  - type: UserInterface
    interfaces:
    - key: enum.DisposalUnitUiKey.Key
      type: DisposalUnitBoundUserInterface

- type: entity
  id: DisposalJunction
  parent: DisposalPipeBase
  name: disposal junction
  description: A three-way junction. The arrow indicates where items exit
  components:
  - type: Sprite
    drawdepth: BelowFloor
    sprite: Constructible/Power/disposal.rsi
    state: conpipe-j1
  - type: Icon
    sprite: Constructible/Power/disposal.rsi
    state: conpipe-j1
  - type: DisposalJunction
    degrees:
    - 0
    - -90
    - 180
  - type: Appearance
    visuals:
    - type: DisposalVisualizer
      state_free: conpipe-j1
      state_anchored: pipe-j1
      state_broken: pipe-b
  - type: Flippable
    entity: DisposalJunctionFlipped

- type: entity
  id: DisposalJunctionFlipped
  parent: DisposalJunction
  name: flipped disposal junction
  components:
  - type: Sprite
    drawdepth: BelowFloor
    sprite: Constructible/Power/disposal.rsi
    state: conpipe-j2
  - type: Icon
    sprite: Constructible/Power/disposal.rsi
    state: conpipe-j2
  - type: DisposalJunction
    degrees:
    - 0
    - 90
    - 180
  - type: Appearance
    visuals:
    - type: DisposalVisualizer
      state_free: conpipe-j2
      state_anchored: pipe-j2
      state_broken: pipe-b
  - type: Flippable
    entity: DisposalJunction

- type: entity
  id: DisposalYJunction
  parent: DisposalPipeBase
  name: disposal y-junction
  description: A three-way junction with another exit point.
  components:
  - type: Sprite
    drawdepth: BelowFloor
    sprite: Constructible/Power/disposal.rsi
    state: conpipe-y
  - type: Icon
    sprite: Constructible/Power/disposal.rsi
    state: conpipe-y
  - type: DisposalJunction
    degrees:
    - 0
    - 90
    - -90
  - type: Appearance
    visuals:
    - type: DisposalVisualizer
      state_free: conpipe-y
      state_anchored: pipe-y
      state_broken: pipe-b

- type: entity
  id: DisposalBend
  parent: DisposalPipeBase
  name: disposal bend
  description: A tube bent at a 90 degree angle.
  components:
  - type: Sprite
    drawdepth: BelowFloor
    sprite: Constructible/Power/disposal.rsi
    state: conpipe-c
  - type: Icon
    sprite: Constructible/Power/disposal.rsi
    state: conpipe-c
  - type: DisposalBend
  - type: Appearance
    visuals:
    - type: DisposalVisualizer
      state_free: conpipe-c
      state_anchored: pipe-c
      state_broken: pipe-b
