DragonOSA RedPower revival

Manager and Sortron

Keep an inventory at exact stock levels with the Manager, or sort items from a program with the Sortron.

Manager

The Manager keeps the inventory it stands against at the stock levels you set, pulling missing items from other Managers through the tubes and sending out the rest.

Set it up

  1. Place it against an inventory and point its tube face away with a screwdriver.
  2. Connect BluePower at 60 V or more.
  3. Put real items in its 24 target slots (six columns, four rows). Their combined counts are the stock you want; duplicates add up.

Hoppers can reach the targets from the four sides, so keep stray hoppers away from it.

Modes and selectors

Left and right mouse buttons cycle each control in opposite directions.

Control Choices
Mode 1: import what is missing and export excess. 2: export types not on the list, keep listed types.
Priority 0 to 9. A Manager requests missing stock from a lower-priority Manager on the tubes.
Paint 0 for unpainted, 1 to 16 for the colours.

A Manager must list an item before it will supply it to a higher-priority one. In mode 1, a satisfied target list gives a weak redstone signal of strength 1.

Power

Action Cost
Exporting surplus or requested items 25 W per item for one update
Each successful request from another Manager 100 W for the requester
Taking in items free

Sortron

The Sortron is a programmable sorter: a computer tells it what to take from an inventory and where to send it.

  • Its Redbus address is 4. Connect ribbon to the computer; its connectors take ribbon and blue alloy wire on all six sides.
  • Supply BluePower at 60 V or more. Each newly moved item costs 50 W for one update.
  • A screwdriver sets the tube outlet; the source inventory or input tube goes on the opposite face.
  • Shift-right-click with a screwdriver to type an exact address.

Registers

Registers hold unsigned bytes; values of several bytes are low byte first.

Register Purpose
0 Command: 0 idle, 1 inventory size, 2 inspect slot, 3 extract slot, 4 receive matching items, 255 error
1 Quantity requested, inspected or extracted; receive counts down to zero
2–3 Source slot; command 1 returns the inventory size here
4–7 Item hash of the inspected slot; zero matches any item when receiving
8–9 Tool damage
10–11 Maximum tool damage
12 Output tube colour: 0 unpainted, 1–16 colours
13 Input tube colour: 0 any, 1–16 that colour

Commands take two ticks and retry every twenty ticks when the voltage is low. The Sortron does not extract from minecarts.

The Forth XP disk has words for it (SORTSLOTS, SORTSLOT@, SORTPULL and more); see RedForth. From DragonBASIC, use RBREAD and RBWRITE.

Note

Item hashes come from the current game's item identifiers. Programs from 1.7.10 with hard-coded hashes need to read the hashes again in a new world.