Codeable Splitter

Buildingtype

buildable network component

Factory Connectors

1x Conveyor Input & 3x Conveyor Output

Max Network Connections

2

Build Gun Ingame
300
300

The splitter allows you to control the flow of items.

It has one conveyor input and three outputs.

It has an inventory. When the inventory is empty, it will automatically transfer one item from the input to the inventory..

Each output also has its own output inventory, where the code can move items from the input inventory into it. If the inventory is full, the code cannot move any item into the output inventory. As long as the output inventory contains a item the corresponding conveyor output can grab these items.

Interface

Parent

Functions

Transfer Item transferItem (Int Output output, Bool Transfered transfered out)

Allows to transfer an item from the input queue to the given output queue if possible.

Flags

RuntimeSync RuntimeParallel

Parameters
Name Type Description

Output output

Int

The index of the output queue you want to transfer the next item to (0 = left, 1 = middle, 2 = right)

Return Values
Name Type Description

Transfered transfered

Bool out

true if it was able to transfer the item.

Get Input getInput (Struct(Item) Item item out)

Returns the next item in the input queue.

Flags

RuntimeSync RuntimeParallel

Return Values
Name Type Description

Item item

Struct(Item) out

The next item in the input queue.

Can Output canOutput (Int Output output, Bool Can Transfer canTransfer out)

Allows to check if we can transfer an item to the given output queue.

Flags

RuntimeSync

Parameters
Name Type Description

Output output

Int

The index of the output queue you want to check (0 = left, 1 = middle, 2 = right)

Return Values
Name Type Description

Can Transfer canTransfer

Bool out

True if you could transfer an item to the given output queue.

Signals

Item Request ItemRequest (Struct(Item) Item item)

Triggers when a new item is ready in the input queue.

Flags

Parameters
Name Type Description

Item item

Struct(Item) out

The new item in the input queue.

Item Outputted ItemOutputted (Int Output output, Struct(Item) Item item)

Triggers when an item is popped from on of the output queues (aka it got transferred to a conveyor).

Flags

Parameters
Name Type Description

Output output

Int

The index of the output queue from which the item got removed.

Item item

Struct(Item) out

The item removed from the output queue.