- type: entity
  id: Recycler
  parent: BaseMachinePowered
  name: recycler
  description: A large crushing machine used to recycle small items inefficiently. There are lights on the side.
  components:
  - type: AmbientSound
    enabled: false
    volume: -8
    range: 5
    sound:
      # TODO: https://freesound.org/people/derjuli/sounds/448133/ CC-NC-
      path: /Audio/Ambience/Objects/circular_saw.ogg
  - type: Fixtures
    fixtures:
      brrt:
        shape:
          !type:PhysShapeAabb
          bounds: "-0.15,-0.15,0.15,0.15"
        hard: false
        layer:
        - FullTileLayer
      collision:
        shape:
          !type:PhysShapeAabb
          bounds: "-0.49,-0.49,0.49,0.49"
        hard: true
        mask:
        - Impassable
        layer:
        - Opaque
        - BulletImpassable
      conveyor:
        shape: !type:PolygonShape
          vertices:
          - -0.55,-0.55
          - 0.55,-0.55
          - 0.55,0.55
          - -0.55,0.55
        layer:
        - Impassable
        - MidImpassable
        - LowImpassable
        hard: False
  - type: DeviceLinkSink
    ports:
      - Reverse
      - Forward
      - Off
  - type: Transform
    anchored: true
    noRot: false
  - type: Sprite
    drawdepth: Doors
    sprite: Structures/Machines/recycling.rsi
    layers:
    - state: grinder-o0
      map: ["enum.RecyclerVisualLayers.Main"]
  - type: Appearance
  - type: RecyclerVisuals

  - type: CollideMaterialReclaimer
  - type: MaterialReclaimer
    enabled: false
    scaleProcessSpeed: false #instant!
    minimumProcessDuration: 0
    whitelist:
      components:
      - PhysicalComposition
      - MobState
      - SpaceGarbage
      tags:
      - Trash
      - Recyclable
    blacklist:
      components:
      - Material
      - Pda
      - IdCard
      tags:
      - HighRiskItem
    sound:
      path: /Audio/Effects/saw.ogg
      params:
        volume: -3
    cutOffSound: false
  - type: MaterialStorage
    insertOnInteract: false
  - type: Conveyor
  - type: Rotatable
  - type: Repairable
    doAfterDelay: 5
    fuelCost: 25
  - type: Destructible
    thresholds:
    - trigger:
        !type:DamageTrigger
        damage: 300
      behaviors:
      - !type:DoActsBehavior
        acts: ["Breakage"]
      - !type:PlaySoundBehavior
        sound:
          collection: MetalBreak
  - type: InteractionPopup
    successChance: 1.0
    interactSuccessString: petting-success-recycler
    interactFailureString: petting-failure-generic
    interactSuccessSound:
      path: /Audio/Items/drill_hit.ogg
  - type: SpookySpeaker
    speakChance: 0.1
    cooldown: 120
    messageSet: SpookySpeakerMessagesRecycler
  - type: Speech
    speechVerb: Robotic
    speechSounds: SyndieBorg
