- type: entity
  id: MachineFlatpacker
  parent: [ BaseMachinePowered, ConstructibleMachine ]
  name: Flatpacker 1001
  description: An industrial machine used for expediting machine construction across the station.
  components:
  - type: Sprite
    sprite: Structures/Machines/flatpacker.rsi
    snapCardinals: true
    layers:
    - state: base
    - state: screen
      map: ["enum.PowerDeviceVisualLayers.Powered"]
      shader: unshaded
    - state: panel
      map: ["enum.WiresVisualLayers.MaintenancePanel"]
    - state: packing
      map: ["anim"]
      visible: false
    - state: inserting
      visible: false
      map: ["enum.MaterialStorageVisualLayers.Inserting"]
  - type: GenericVisualizer
    visuals:
      enum.PowerDeviceVisuals.Powered:
        enum.PowerDeviceVisualLayers.Powered:
          True: { visible: true }
          False: { visible: false }
      enum.FlatpackCreatorVisuals.Packing:
        anim:
          True: { visible: true }
          False: { visible: false }
  - type: FlatpackCreator
    baseMachineCost:
      Steel: 750
      Silver: 100
      Gold: 50
    baseComputerCost:
      Steel: 500
      Glass: 250
      Silver: 100
      Gold: 50
  - type: Machine
    board: FlatpackerMachineCircuitboard
  - type: MaterialStorage
    whitelist:
      tags:
      - Sheet
      - RawMaterial
      - Ingot
  - type: OreSiloClient
  - type: AmbientSound
    enabled: false
    volume: 5
    range: 3
    sound:
      path: /Audio/Items/rped.ogg
  - type: WiresPanel
  - type: WiresVisuals
  - type: Appearance
  - type: ActivatableUI
    key: enum.FlatpackCreatorUIKey.Key
  - type: ActivatableUIRequiresPower
  - type: UserInterface
    interfaces:
      enum.FlatpackCreatorUIKey.Key:
        type: FlatpackCreatorBoundUserInterface
  - type: ItemSlots
    slots:
      board_slot:
        name: flatpacker-item-slot-name
        whitelist:
          components:
          - MachineBoard
          - ComputerBoard
        whitelistFailPopup: flatpacker-item-cannot-be-flatpacked # Frontier
  - type: ContainerContainer
    containers:
      machine_board: !type:Container
      machine_parts: !type:Container
      board_slot: !type:ContainerSlot
  - type: Construction
    containers:
    - machine_parts
    - machine_board
    - board_slot
  - type: MaterialStorageMagnetPickup # Frontier
    range: 0.30 # Frontier
#  - type: StaticPrice # Frontier
#    price: 2000

- type: entity
  id: FlatpackerNoBoardEffect
  categories:
  - HideSpawnMenu
  components:
  - type: Sprite
    sprite: Structures/Machines/autolathe.rsi
    state: icon
    color: "#222222"
