- type: entity
  id: BaseLathe
  name: "Lathe"
  components:
  - type: Clickable
  - type: InteractionOutline
  - type: Collidable
  - type: SnapGrid
    offset: Center
  - type: Lathe
  - type: MaterialStorage
  - type: UserInterface
    interfaces:
    - key: enum.LatheUiKey.Key
      type: LatheBoundUserInterface
  - type: PowerDevice

- type: entity
  parent: BaseLathe
  id: autolathe
  name: "Autolathe"
  components:
  - type: Sprite
    sprite: Buildings/autolathe.rsi
    layers:
    - state: autolathe
    - state: autolathe_unlit
      shader: unshaded
      map: ["enum.PowerDeviceVisualLayers.Powered"]
  - type: Icon
    sprite: Buildings/autolathe.rsi
    state: autolathe
  - type: Collidable
    shapes:
    - !type:PhysShapeAabb
      layer: 15
  - type: SnapGrid
    offset: Center
  - type: Lathe
  - type: LatheDatabase
    static: true
    recipes:
      - Brutepack
      - Ointment
      - LightTube
      - LightBulb
      - MetalStack
      - GlassStack
      - Wirecutter
      - Screwdriver
      - Welder
      - Wrench
      - CableStack
      - Crowbar
      - Multitool
  - type: Appearance
    visuals:
    - type: PowerDeviceVisualizer2D

- type: entity
  parent: BaseLathe
  id: protolathe
  name: "Protolathe"
  components:
  - type: Sprite
    sprite: Buildings/research.rsi
    layers:
    - state: protolathe
    - state: protolathe_unlit
      shader: unshaded
      map: ["enum.PowerDeviceVisualLayers.Powered"]
  - type: Icon
    sprite: Buildings/research.rsi
    state: protolathe
  - type: Collidable
    shapes:
    - !type:PhysShapeAabb
      layer: 15
  - type: SnapGrid
    offset: Center
  - type: ResearchClient
  - type: TechnologyDatabase
  - type: ProtolatheDatabase
    protolatherecipes:
      - Brutepack
      - Ointment
      - LightTube
      - LightBulb
      - MetalStack
      - GlassStack
      - Wirecutter
      - Screwdriver
      - Welder
      - Wrench
      - CableStack
      - Crowbar
      - Multitool
  - type: UserInterface
    interfaces:
    - key: enum.LatheUiKey.Key
      type: LatheBoundUserInterface
    - key: enum.ResearchClientUiKey.Key
      type: ResearchClientBoundUserInterface
  - type: Appearance
    visuals:
    - type: PowerDeviceVisualizer2D
