- type: entity
  id: ConveyorBelt
  name: conveyor belt
  description: A conveyor belt, commonly used to transport large numbers of items elsewhere quite quickly.
  placement:
    mode: SnapgridCenter
  components:
  - type: Rotatable
    rotateWhileAnchored: true
  - type: Clickable
  - type: InteractionOutline
  - type: Transform
    anchored: true
  - type: Sprite
    sprite: Structures/conveyor.rsi
    state: conveyor_stopped
    drawdepth: HighFloorObjects
  - type: SyncSprite
  - type: ApcPowerReceiver
  - type: ExtensionCableReceiver
  - type: Physics
    bodyType: Static
  - type: Fixtures
    fixtures:
      conveyor:
        shape: !type:PolygonShape
          vertices:
          - -0.50,-0.50
          - 0.50,-0.50
          - 0.50,0.50
          - -0.50,0.50
        layer:
        - ConveyorMask
        hard: False
  - type: Conveyor
  - type: DeviceNetwork
    deviceNetId: Wireless
    receiveFrequencyId: BasicDevice
  - type: WirelessNetworkConnection
    range: 200
  - type: DeviceLinkSink
    ports:
    - Reverse
    - Forward
    - Off
  - type: Appearance
  - type: GenericVisualizer
    visuals:
      enum.ConveyorVisuals.State:
        enum.ConveyorState.Off:
          Off: { state: conveyor_stopped }
          Forward: { state: conveyor_started }
          Reverse: { state: conveyor_started_r }
  - type: Construction
    graph: ConveyorGraph
    node: entity
  - type: Damageable
    damageModifierSet: Metallic
  - type: Injurable
    damageContainer: StructuralInorganic
  - type: Destructible
    thresholds:
    - trigger:
        !type:DamageTrigger
        damage: 200
      behaviors:
      # if ConveyorBeltAssembly becomes craftable, maybe spawn some of the ingredients?
      - !type:DoActsBehavior
        acts: [ "Destruction" ]

- type: entity
  id: ConveyorBeltAssembly
  parent: BaseItem
  name: conveyor belt assembly
  description: A conveyor belt assembly. Used to construct a conveyor belt.
  components:
  - type: Sprite
    sprite: Structures/conveyor.rsi
    layers:
    - state: conveyor_loose
      map: [ "base" ]
  - type: Item
    size: Normal
  - type: Construction
    graph: ConveyorGraph
    node: item
  - type: StackPrice
    price: 40
  - type: Stack
    stackType: ConveyorBeltStack
    count: 1
    baseLayer: base
    layerStates:
    - conveyor_loose # 0-item state
    - conveyor_loose
    - conveyor_loose_2
    - conveyor_loose_3
  - type: Appearance
