Added comments, minor cleanup

This commit is contained in:
Snorre Selmer 2023-03-30 16:40:34 +02:00
parent 9e5dccc05b
commit 1e1f1155c0
4 changed files with 13 additions and 5 deletions

View File

@ -1,3 +1,8 @@
# Controls Sorters to sort items based on hash.
# Reads item-hashes from stack to decide if it
# should be split off or passed on.
# Connect one Sorter to each screw on the IC.
alias counter r0
move counter 0
@ -8,6 +13,7 @@ alias IsItem r4
define INPUTSLOT 0
# Replace hashes below with the ones you need.
push 1724793494 # Coal
push -983091249 # Cobalt
push -707307845 # Copper
@ -20,12 +26,15 @@ push -190236170 # Lead
#push -1516581844 # Uranium
start:
# Loops over screws to instruct attached Sorters,
# loops over all sorters every tick.
bdseal dr0 sort
add counter counter 1
bgt counter 5 reset
j start
sort:
# Compares Sorter input-slot with hash in stack
move sp counter
add sp sp 1
peek hash
@ -38,6 +47,7 @@ s dr0 Output IsItem
j ra
reset:
# Resets counter to 0 zero so we can loop over again
move counter 0
yield
j start

View File

@ -1,6 +1,4 @@
# automatic gas-canister filler.
# only works with player-made cans, starter-cans
# have different hashes that won't work
# Automatic gas-canister filler.
# !!! Remember to set volume pump to no more !!!
# !!! than 10l! I have mine at 2l for safety !!!