-
Notifications
You must be signed in to change notification settings - Fork 0
/
AdvancedSiloSorter_Part1.ic10
110 lines (91 loc) · 1.77 KB
/
AdvancedSiloSorter_Part1.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
101
102
103
104
105
106
107
108
109
110
#AdvancedSorter
alias ManualInputSorter d0
alias IceSorter d1
alias IronSorter d2
alias CoalSorter d3
alias SiliconSorter d4
alias NickelSorter 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 instr r9
alias sortClassInstr r8
alias sortItemInstr r7
s db Setting 0
sleep 3
sb STACKER On 1
sb STACKER Setting 500
sb STACKER_REVERSE On 1
sb STACKER_REVERSE Setting 500
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: # Manual Input
sll r0 SortingClass.Ores 16
or instr sortClassInstr r0
put d0 0 instr
sll r0 SortingClass.Ices 16
or instr sortClassInstr r0
put d0 1 instr
j ra
HandleSorter1: # Ice
sll r0 SortingClass.Ices 16
or instr sortClassInstr r0
put d1 0 instr
j ra
HandleSorter2: # Iron
sll r0 IRONORE 8
or instr sortItemInstr r0
put d2 0 instr
j ra
HandleSorter3: # Coal
sll r0 COAL 8
or instr sortItemInstr r0
put d3 0 instr
j ra
HandleSorter4: # Silicon
sll r0 SILICONORE 8
or instr sortItemInstr r0
put d4 0 instr
j ra
HandleSorter5: # Nickel
sll r0 NICKELORE 8
or instr sortItemInstr r0
put d5 0 instr
End:
s db Setting 1
s db On 0