-
Notifications
You must be signed in to change notification settings - Fork 0
/
AdvancedSiloSorter_Part2.ic10
100 lines (86 loc) · 1.61 KB
/
AdvancedSiloSorter_Part2.ic10
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
#AdvancedSorter Part2
alias LeadSorter d0
alias GoldSorter d1
alias CopperSorter d2
alias SilverSorter d3
alias CobaltSorter d4
alias UraniumSorter d5
define ORECLASS 10
define INGOTClASS 19
define BIOMASS -831480639
define IRONORE 1758427767
define COAL 1724793494
define SILICONORE 1103972403
define LEADORE -190236170
define NICKELORE 1830218956
define GOLDORE -1348105509
define COPPERORE -707307845
define SILVERORE -916518678
define COBALTORE -983091249
define URANIUMORE -1516581844
define STACKER -2020231820
define STACKER_REVERSE 1585641623
alias itemClass r12
alias itemHash r11
alias occupied r10
alias output r9
alias instr r9
alias sortClassInstr r8
alias sortItemInstr r7
s db Setting 0
sleep 3
move sortClassInstr 3
sll r0 Equals 8
or sortClassInstr sortClassInstr r0
move sortItemInstr 1
Setup:
move r0 0
SetupLoop:
brdns dr0 3
s dr0 Mode 1 # Any
s dr0 On 1
clr dr0
add r0 r0 1
beq r0 6 Main
j SetupLoop
Main:
bdseal d0 HandleSorter0
bdseal d1 HandleSorter1
bdseal d2 HandleSorter2
bdseal d3 HandleSorter3
bdseal d4 HandleSorter4
bdseal d5 HandleSorter5
j End
HandleSorter0: # Lead
sll r0 LEADORE 8
or instr sortItemInstr r0
put d0 0 instr
j ra
HandleSorter1: # Gold
sll r0 GOLDORE 8
or instr sortItemInstr r0
put d1 0 instr
j ra
HandleSorter2: # Copper
sll r0 COPPERORE 8
or instr sortItemInstr r0
put d2 0 instr
j ra
HandleSorter3: # Silver
sll r0 SILVERORE 8
or instr sortItemInstr r0
put d3 0 instr
j ra
HandleSorter4: # Cobalt
sll r0 COBALTORE 8
or instr sortItemInstr r0
put d4 0 instr
j ra
HandleSorter5: # Uranium
sll r0 URANIUMORE 8
or instr sortItemInstr r0
put d5 0 instr
j ra
End:
s db Setting 1
s db On 0