- type: entity
  id: chem_master
  parent: BaseConstructible
  name: ChemMaster 4000
  description: An industrial grade chemical manipulator with pill and bottle production included.
  placement:
    mode: SnapgridCenter
  components:
  - type: Sprite
    sprite: Constructible/Power/mixer.rsi
    layers:
    - state: mixer_empty
    - state: mixer_screens
      shader: unshaded
  - type: Icon
    sprite: Constructible/Power/mixer.rsi
    state: mixer_loaded
  - type: ChemMaster
  - type: PowerReceiver
  - type: InteractionOutline
  - type: Anchorable
  - type: Physics
    bodyType: Static
    fixtures:
    - shape:
        !type:PhysShapeAabb
          bounds: "-0.4,-0.25,0.4,0.25"
      mass: 25
      mask:
      - SmallImpassable
      layer:
      - Opaque
      - MobImpassable
  - type: Damageable
  - type: Destructible
    thresholds:
    - trigger:
        !type:DamageTrigger
        damage: 50
      behaviors:
      - !type:SpawnEntitiesBehavior
        spawn:
          chem_master_broken:
            min: 1
            max: 1
      - !type:DoActsBehavior
        acts: [ "Destruction" ]
  - type: UserInterface
    interfaces:
    - key: enum.ChemMasterUiKey.Key
      type: ChemMasterBoundUserInterface

- type: entity
  id: chem_master_broken
  parent: BaseConstructibleDynamic
  name: ChemMaster 4000 [Broken]
  description: "An industrial grade chemical manipulator with pill and bottle production included. It's broken."
  abstract: true
  components:
  - type: Sprite
    sprite: Constructible/Power/mixer.rsi
    layers:
    - state: mixer_empty
    - state: mixer_screen_broken
      shader: unshaded
  - type: Icon
    sprite: Constructible/Power/mixer.rsi
    state: mixer_broken
  - type: InteractionOutline
  - type: Physics
    bodyType: Dynamic
    fixtures:
    - shape:
        !type:PhysShapeAabb
          bounds: "-0.4,-0.25,0.4,0.25"
      mass: 25
      mask:
        - SmallImpassable
      layer:
        - Opaque
        - MobImpassable
  - type: Damageable
  - type: Destructible
    thresholds:
    - trigger:
        !type:DamageTrigger
        damage: 25
      behaviors:
      - !type:SpawnEntitiesBehavior
        spawn:
          SheetSteel1:
            min: 1
            max: 1
      - !type:DoActsBehavior
        acts: [ "Destruction" ]
  - type: UserInterface
    interfaces:
    - key: enum.ChemMasterUiKey.Key
      type: ChemMasterBoundUserInterface
