-
Notifications
You must be signed in to change notification settings - Fork 0
/
Coaler
91 lines (68 loc) · 2.92 KB
/
Coaler
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
component = require("component")
compressor = component.advanced_air_compressor
transposer1 = "a08f3aa3-e4a4-45d8-ab10-14eca5aab9a4"
transposer2 = "1187effb-116e-4b79-8d43-7bdfee44618e"
compressorhash1 = "91246d04-ee67-4bb8-a4bd-c0a88baf1af4"
compressorhash2 = "49a300bd-cea9-41f2-890a-27a2b3937776"
inv1 = component.proxy(transposer1)
inv2 = component.proxy(transposer2)
compressor1 = component.proxy(compressorhash1)
compressor2 = component.proxy(compressorhash2)
gpu = component.gpu
width, height = gpu.getResolution()
slot1 = 1
slot2 = 1
invstack1 = true
invstack2 = true
while invstack1 == true or invstack2 == true do
if compressor1.getPressure() > 4 then
if compressor1.getTemperature() > 450 then
gpu.setForeground(0xFFFFFF)
print(" Compressor1 Heat ("..compressor1.getTemperature()..")")
gpu.setForeground(0xFF0000)
print(" "..math.floor(compressor1.getTemperature()))
end
os.sleep(1)
else
print(" Compressor1 Underpressure ("..compressor1.getPressure()..") "..compressor1.getTemperature().."°")
if inv1.getSlotStackSize(3, slot1) == 0 then
slot1 = slot1+1
if slot1 > inv1.getInventorySize(3) then
invstack1 = false
print(" Nothin in inv1 found!!")
slot1 = 1
end
else
coalstack1 = inv1.getSlotStackSize(2, 1)
if coalstack1 < 2 then
inv1.transferItem(3, 2, 2, slot1, 1)
os.sleep(2.5)
end
end
end
if compressor2.getPressure() > 4 then
if compressor1.getTemperature() > 450 then
gpu.setForeground(0xFFFFFF)
print(" Compressor2 Heat ("..compressor2.getTemperature()..")")
gpu.setForeground(0xFF0000)
print(" "..math.floor(compressor1.getTemperature()))
end
os.sleep(1)
else
print(" Compressor2 Underpressure ("..compressor2.getPressure()..") "..compressor1.getTemperature().."°")
if inv2.getSlotStackSize(2, slot2) == 0 then
slot2 = slot2+1
if slot2 > inv2.getInventorySize(2) then
invstack2 = false
print(" Nothin in inv2 found!!")
slot2 = 1
end
else
coalstack2 = inv2.getSlotStackSize(3, 1)
if coalstack2 < 2 then
inv2.transferItem(2, 3, 2, slot2, 1)
os.sleep(2.5)
end
end
end
end