- type: entity
  id: KitchenReagentGrinder
  parent: [ BaseMachinePowered, SmallConstructibleMachine, BaseSmallConstructibleMachineDestructible ]
  name: reagent grinder
  description: From BlenderTech. Will It Blend? Let's find out!
  components:
  - type: ReagentGrinder
    grindSound:
      params:
        volume: -2.5
        rolloffFactor: 2
      path: /Audio/Machines/blender.ogg
    juiceSound:
      params:
        volume: -2.5
        rolloffFactor: 2
      path: /Audio/Machines/juicer.ogg
  - type: ActivatableUI
    key: enum.ReagentGrinderUiKey.Key
  - type: UserInterface
    interfaces:
      enum.ReagentGrinderUiKey.Key:
        type: ReagentGrinderBoundUserInterface
  - type: Appearance
  - type: GenericVisualizer
    visuals:
      enum.ReagentGrinderVisualState.BeakerAttached:
        grinder:
          True: {state: "grinder_beaker_attached"}
          False: {state: "grinder_empty"}
  - type: Physics
  - type: Fixtures
    fixtures:
      fix1:
        shape:
          !type:PhysShapeAabb
          bounds: "-0.17,0,0.20,0.4"
        mask:
        - TabletopMachineMask
        layer:
        - TabletopMachineLayer
  - type: Destructible
    thresholds:
    - trigger: !type:DamageTrigger
        damage: 100
      behaviors:
      - !type:PlaySoundBehavior
        sound:
          collection: MetalBreak
  - type: Sprite
    sprite: Structures/Machines/grinder.rsi
    drawdepth: LargeObjects
    snapCardinals: true
    offset: "0.0,0.4"
    layers:
    - map: [ "grinder" ]
      state: "grinder_empty"
  - type: ApcPowerReceiver
    powerLoad: 5
  - type: PowerState
    idlePowerDraw: 5
    workingPowerDraw: 750 # medium power blender
  - type: ItemSlots
    slots:
      beakerSlot:
        whitelist:
          components:
          - FitsInDispenser
  - type: Machine
    board: ReagentGrinderMachineCircuitboard
  - type: ContainerContainer
    containers:
      beakerSlot: !type:ContainerSlot
      inputContainer: !type:Container
      machine_board: !type:Container
      machine_parts: !type:Container

- type: entity
  id: KitchenReagentGrinderBeaker
  parent: KitchenReagentGrinder
  suffix: beaker
  components:
  - type: ContainerFill
    containers:
      beakerSlot:
      - Beaker

- type: entity
  id: KitchenReagentGrinderBeakerLarge
  parent: KitchenReagentGrinder
  suffix: large beaker
  components:
  - type: ContainerFill
    containers:
      beakerSlot:
      - LargeBeaker

- type: entity
  parent: [SolutionToolGinormous, Recycler] #too different so different parent
  id: ReagentGrinderIndustrial
  name: industrial reagent grinder
  description: An industrial reagent grinder.
  components:
  - type: MaterialReclaimer
    whitelist:
      components:
      - Extractable #same as reagent grinder
    blacklist:
      tags:
      - HighRiskItem #ian meat
    efficiency: 0.9
    reclaimMaterials: false # Materials have ExtractableComponent, which is whitelisted, so we have to avoid infinite recycling loops
    onlyReclaimDrainable: false
    solutionContainerId: solution
  - type: Sprite
    sprite: Structures/Machines/industrial_reagent_grinder.rsi
    layers:
      - state: industrial-reagent-grinder-off
  - type: Machine
    board: ReagentGrinderIndustrialMachineCircuitboard
  - type: GenericVisualizer
    visuals:
      enum.ConveyorVisuals.State:
        enum.ConveyorState.Off:
          Forward: { state: industrial-reagent-grinder-on }
          Reverse: { state: industrial-reagent-grinder-on }
          Off: { state: industrial-reagent-grinder-off }
  - type: ContainerContainer
    containers:
      machine_board: !type:Container
      machine_parts: !type:Container
  - type: Construction
    graph: Machine
    node: machine
    containers:
    - machine_parts
    - machine_board
  - type: DrainableSolution
    solution: solution
  - type: ExaminableSolution
    solution: solution
