Output
|
Part
|
Scripts
|
1
|
chips
|
Name
|
Lines
|
Code
|
craft 3:1
|
19
|
|
; Chips
:global double craft_inventory
:local int tier
:local double count
:local double board_lo
:local double board_hi
:local double circuit_lo
:local double circuit_hi
tier = global.int.get("craft_tier:3.1")
count = global.double.get("craft_count:3.1")
gotoif(99, tier < 1 | tier > 10 | count < 1.0)
; Verify ingot resources
; Also craft lower tier chips for input
executesync("craft 3:1:in")
; Ensure we have enough ingots (lo)
board_lo = count * i2d((864410 / (10 ^ tier)) % 10)
circuit_lo = count * 2.0
global.int.set("craft_tier:ingot", tier * 2 - 1)
global.double.set("craft_count:ingot", max(0.0, board_lo - craft_inventory * (count("plate", tier * 2 - 1) + count("plate.circuit", tier * 2 - 1))) + max(0.0, ceil((circuit_lo - craft_inventory * (count("cable", tier * 2 - 1) + count("circuit", tier * 2 - 1)))/2.0)))
executesync("craft ingot")
; Ensure we have enough ingots (hi)
board_hi = count * i2d((862210 / (10 ^ tier)) % 10)
circuit_hi = count * i2d((224420 / (10 ^ tier)) % 10)
global.int.set("craft_tier:ingot", tier * 2)
global.double.set("craft_count:ingot", max(0.0, board_hi - craft_inventory * (count("plate", tier * 2) + count("plate.circuit", tier * 2))) + max(0.0, ceil((circuit_hi - craft_inventory * (count("cable", tier * 2) + count("circuit", tier * 2)))/2.0)))
executesync("craft ingot")
gotoif(99, global.int.get("craft_status") > 199)
execute("craft 3:1:board")
execute("craft 3:1:circuit")
waituntil(count("plate.circuit", tier * 2 - 1) >= board_lo & count("plate.circuit", tier * 2) >= board_hi & count("circuit", tier * 2 - 1) >= circuit_lo & count("circuit", tier * 2) >= circuit_hi)
craft("chip", tier, count)
|
CWNyYWZ0IDM6MQAAAAAAAAAAEwAAAA1sb2NhbC5pbnQuc2V0CGNvbnN0YW50BAR0aWVyDmdsb2JhbC5p
bnQuZ2V0CGNvbnN0YW50BA5jcmFmdF90aWVyOjMuMRBsb2NhbC5kb3VibGUuc2V0CGNvbnN0YW50BAVj
b3VudBFnb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bnN0YW50BAVjb3VudA==
|
|
craft 3:1:in
|
18
|
|
:global double craft_inventory
:local int tier
:local double count
tier = global.int.get("craft_tier:3.1")
count = global.double.get("craft_count:3.1")
; Ingots (lo)
; board_lo = global.double.get("craft_count:3.1") * i2d((864410 / (10 ^ mytier)) % 10)
; circuit_lo = global.double.get("craft_count:3.1") * 2.0
global.int.set("craft_tier:ingot", tier * 2 - 1)
global.double.set("craft_count:ingot", max(0.0, count * i2d((864410 / (10 ^ tier)) % 10) - craft_inventory * (count("plate", tier * 2 - 1) + count("plate.circuit", tier * 2 - 1))) + max(0.0, ceil((count*2.0 - craft_inventory * (count("cable", tier * 2 - 1) + count("circuit", tier * 2 - 1)))/2.0)))
global.int.set("craft_verify:ingot", 1)
executesync("craft ingot")
gotoif(99, global.int.get("craft_status") > 199)
; Ingots (hi)
; board_hi = global.double.get("craft_count:3.1") * i2d((862210 / (10 ^ mytier)) % 10)
; circuit_hi = global.double.get("craft_count:3.1") * i2d((224420 / (10 ^ mytier)) % 10)
global.int.set("craft_tier:ingot", tier * 2)
global.double.set("craft_count:ingot", max(0.0, count * i2d((862210 / (10 ^ tier)) % 10) - craft_inventory * (count("plate", tier * 2) + count("plate.circuit", tier * 2))) + max(0.0, ceil((count * i2d((224420 / (10 ^ tier)) % 10) - craft_inventory * (count("cable", tier * 2) + count("circuit", tier * 2)))/2.0)))
global.int.set("craft_verify:ingot", 1)
executesync("craft ingot")
gotoif(99, global.int.get("craft_status") > 199)
; Input chips
global.int.set("craft_tier:3.1", tier - 1)
global.double.set("craft_count:3.1", count * 2.0 * (floor(664200.0 / (10.0 ^ i2d(tier))) % 10.0) - craft_inventory * count("chip", tier - 1))
executesync("craft part:1")
gotoif(99, global.int.get("craft_status") > 199)
; Restore state for this tier
global.int.set("craft_tier:3.1", tier)
global.double.set("craft_count:3.1", count)
|
DGNyYWZ0IDM6MTppbgAAAAAAAAAAEgAAAA1sb2NhbC5pbnQuc2V0CGNvbnN0YW50BAR0aWVyDmdsb2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5jb3Vu
dAhjb25zdGFudAQEY2hpcA5hcml0aG1ldGljLmludA1sb2NhbC5pbnQuZ2V0CGNvbnN0YW50BAR0aWVy
CGNvbnN0YW50BAEtCGNvbnN0YW50AgEAAAATZ2VuZXJpYy5leGVjdXRlc3luYwhjb25zdGFudAQMY3Jh
ZnQgcGFydDoxDmdlbmVyaWMuZ290b2lmCGNvbnN0YW50AmMAAAAOY29tcGFyaXNvbi5pbnQOZ2xvYmFs
LmludC5nZXQIY29uc3RhbnQEDGNyYWZ0X3N0YXR1cwhjb25zdGFudAQBPghjb25zdGFudALHAAAADmds
b2JhbC5pbnQuc2V0CGNvbnN0YW50BA5jcmFmdF90aWVyOjMuMQ1sb2NhbC5pbnQuZ2V0CGNvbnN0YW50
BAR0aWVyEWdsb2JhbC5kb3VibGUuc2V0CGNvbnN0YW50BA9jcmFmdF9jb3VudDozLjEQbG9jYWwuZG91
YmxlLmdldAhjb25zdGFudAQFY291bnQ=
|
|
craft 3:1:board
|
15
|
|
:global double craft_inventory
:local int tier
:local double board_lo
:local double board_hi
tier = global.int.get("craft_tier:3.1")
board_lo = global.double.get("craft_count:3.1") * i2d((864410 / (10 ^ tier)) % 10)
board_hi = global.double.get("craft_count:3.1") * i2d((862210 / (10 ^ tier)) % 10)
; Craft plates
lo1: gotoif(hi1, board_lo <= craft_inventory * (count("plate.circuit", tier * 2 - 1) + count("plate", tier * 2 - 1)))
waitwhile(active("presser"))
produce("ingot", tier * 2 - 1, board_lo - craft_inventory * (count("plate.circuit", tier * 2 - 1) + count("plate", tier * 2 - 1)), "presser")
hi1: gotoif(lo2, board_hi <= craft_inventory * (count("plate.circuit", tier * 2) + count("plate", tier * 2)))
waitwhile(active("presser"))
produce("ingot", tier * 2, board_hi - craft_inventory * (count("plate.circuit", tier * 2) + count("plate", tier * 2)), "presser")
; Craft circuit boards
lo2: gotoif(hi2, board_lo <= craft_inventory * (count("plate.circuit", tier * 2 - 1)))
waitwhile(active("refinery") | count("plate", tier * 2 - 1) < board_lo - craft_inventory * (count("plate.circuit", tier * 2 - 1)))
produce("plate", tier * 2 - 1, board_lo - craft_inventory * (count("plate.circuit", tier * 2 - 1)), "refinery")
hi2: gotoif(99, board_hi <= craft_inventory * (count("plate.circuit", tier * 2)))
waitwhile(active("refinery") | count("plate", tier * 2) < board_hi - craft_inventory * (count("plate.circuit", tier * 2)))
produce("plate", tier * 2, board_hi - craft_inventory * (count("plate.circuit", tier * 2)), "refinery")
|
D2NyYWZ0IDM6MTpib2FyZAAAAAAAAAAADwAAAA1sb2NhbC5pbnQuc2V0CGNvbnN0YW50BAR0aWVyDmds
b2JhbC5pbnQuZ2V0CGNvbnN0YW50BA5jcmFmdF90aWVyOjMuMRBsb2NhbC5kb3VibGUuc2V0CGNvbnN0
YW50BAhib2FyZF9sbxFhcml0aG1ldGljLmRvdWJsZRFnbG9iYWwuZG91YmxlLmdldAhjb25zdGFudAQP
Y3JhZnRfY291bnQ6My4xCGNvbnN0YW50BAEqA2kyZA5hcml0aG1ldGljLmludA5hcml0aG1ldGljLmlu
dAhjb25zdGFudAKaMA0ACGNvbnN0YW50BAEvDmFyaXRobWV0aWMuaW50CGNvbnN0YW50AgoAAAAIY29u
c3RhbnQEA3Bvdw1sb2NhbC5pbnQuZ2V0CGNvbnN0YW50BAR0aWVyCGNvbnN0YW50BANtb2QIY29uc3Rh
bnQCCgAAABBsb2NhbC5kb3VibGUuc2V0CGNvbnN0YW50BAhib2FyZF9oaRFhcml0aG1ldGljLmRvdWJs
ZRFnbG9iYWwuZG91YmxlLmdldAhjb25zdGFudAQPY3JhZnRfY291bnQ6My4xCGNvbnN0YW50BAEqA2ky
ZA5hcml0aG1ldGljLmludA5hcml0aG1ldGljLmludAhjb25zdGFudAICKA0ACGNvbnN0YW50BAEvDmFy
aXRobWV0aWMuaW50CGNvbnN0YW50AgoAAAAIY29uc3RhbnQEA3Bvdw1sb2NhbC5pbnQuZ2V0CGNvbnN0
YW50BAR0aWVyCGNvbnN0YW50BANtb2QIY29u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ibGUQbG9jYWwuZG91YmxlLmdldAhjb25zdGFudAQIYm9hcmRfaGkIY29uc3RhbnQEAS0RYXJp
dGhtZXRpYy5kb3VibGURZ2xvYmFsLmRvdWJsZS5nZXQIY29uc3RhbnQED2NyYWZ0X2ludmVudG9yeQhj
b25zdGFudAQBKhNmYWN0b3J5Lml0ZW1zLmNvdW50CGNvbnN0YW50BA1wbGF0ZS5jaXJjdWl0DmFyaXRo
bWV0aWMuaW50DWxvY2FsLmludC5nZXQIY29uc3RhbnQEBHRpZXIIY29uc3RhbnQEASoIY29uc3RhbnQC
AgAAAA9mYWN0b3J5LnByb2R1Y2UIY29uc3RhbnQEBXBsYXRlDmFyaXRobWV0aWMuaW50DWxvY2FsLmlu
dC5nZXQIY29uc3RhbnQEBHRpZXIIY29uc3RhbnQEASoIY29uc3RhbnQCAgAAABFhcml0aG1ldGljLmRv
dWJsZRBsb2NhbC5kb3VibGUuZ2V0CGNvbnN0YW50BAhib2FyZF9oaQhjb25zdGFudAQBLRFhcml0aG1l
dGljLmRvdWJsZRFnbG9iYWwuZG91YmxlLmdldAhjb25zdGFudAQPY3JhZnRfaW52ZW50b3J5CGNvbnN0
YW50BAEqE2ZhY3RvcnkuaXRlbXMuY291bnQIY29uc3RhbnQEDXBsYXRlLmNpcmN1aXQOYXJpdGhtZXRp
Yy5pbnQNbG9jYWwuaW50LmdldAhjb25zdGFudAQEdGllcghjb25zdGFudAQBKghjb25zdGFudAICAAAA
CGNvbnN0YW50BAhyZWZpbmVyeQ==
|
|
craft 3:1:circuit
|
15
|
|
:global double craft_inventory
:local int tier
:local double circuit_lo
:local double circuit_hi
tier = global.int.get("craft_tier:3.1")
circuit_lo = global.double.get("craft_count:3.1") * 2.0
circuit_hi = global.double.get("craft_count:3.1") * i2d((224420 / (10 ^ tier)) % 10)
; Craft cables
lo1: gotoif(hi1, circuit_lo <= craft_inventory * (count("circuit", tier * 2 - 1) + count("cable", tier * 2 - 1)))
waitwhile(active("refinery"))
produce("ingot", tier * 2 - 1, ceil((circuit_lo - craft_inventory * (count("circuit", tier * 2 - 1) + count("cable", tier * 2 - 1))) / 2.0), "refinery")
hi1: gotoif(lo2, circuit_hi <= craft_inventory * (count("circuit", tier * 2) + count("cable", tier * 2)))
waitwhile(active("refinery"))
produce("ingot", tier * 2, ceil((circuit_hi - craft_inventory * (count("circuit", tier * 2) + count("cable", tier * 2))) / 2.0), "refinery")
; Craft circuit wires
lo2: gotoif(hi2, circuit_lo <= craft_inventory * count("circuit", tier * 2 - 1))
waitwhile(count("cable", tier * 2 - 1) < circuit_lo - craft_inventory * count("circuit", tier * 2 - 1) | active("assembler"))
produce("cable", tier * 2 - 1, circuit_lo - craft_inventory * count("circuit", tier * 2 - 1), "assembler")
hi2: gotoif(99, circuit_hi <= craft_inventory * count("circuit", tier * 2))
waitwhile(count("cable", tier * 2) < circuit_hi - craft_inventory * count("circuit", tier * 2) | active("assembler"))
produce("cable", tier * 2, circuit_hi - craft_inventory * count("circuit", tier * 2), "assembler")
|
EWNyYWZ0IDM6MTpjaXJjdWl0AAAAAAAAAAAPAAAADWxvY2FsLmludC5zZXQIY29uc3RhbnQEBHRpZXIO
Z2xvYmFsLmludC5nZXQIY29uc3RhbnQEDmNyYWZ0X3RpZXI6My4xEGxvY2FsLmRvdWJsZS5zZXQIY29u
c3RhbnQECmNpcmN1aXRfbG8RYXJpdGhtZXRpYy5kb3VibGURZ2xvYmFsLmRvdWJsZS5nZXQIY29uc3Rh
bnQED2NyYWZ0X2NvdW50OjMuMQhjb25zdGFudAQBKghjb25zdGFudAMAAAAAAAAAQBBsb2NhbC5kb3Vi
bGUuc2V0CGNvbnN0YW50BApjaXJjdWl0X2hpEWFyaXRobWV0aWMuZG91YmxlEWdsb2JhbC5kb3VibGUu
Z2V0CGNvbnN0YW50BA9jcmFmdF9jb3VudDozLjEIY29uc3RhbnQEASoDaTJkDmFyaXRobWV0aWMuaW50
DmFyaXRobWV0aWMuaW50CGNvbnN0YW50AqRsAwAIY29uc3RhbnQ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|
|
; Regular plates
:global int craft_status
:local double count
:local int tier
tier = global.int.get("craft_tier:3.2")
count = global.double.get("craft_count:3.2")
gotoif(99, tier < 1 | tier > 10 | count < 1.0)
global.int.set("craft_tier:ingot", tier)
global.double.set("craft_count:ingot", count)
executesync("craft ingot")
gotoif(99, craft_status > 199)
waitwhile(active("presser"))
produce("ingot", tier, count, "presser")
|
|
|
|
3
|
dense plates
|
Name
|
Lines
|
Code
|
craft 3:3
|
14
|
|
; Dense plates
:global double craft_inventory
:local int tier
:local double count
:local double plates
tier = global.int.get("craft_tier:3.3")
count = global.double.get("craft_count:3.3")
gotoif(99, tier < 1 | tier > 10 | count < 1.0)
plates = count * 9.0 - craft_inventory * count("plate.stack", tier)
global.int.set("craft_tier:ingot", tier)
global.double.set("craft_count:ingot", plates)
executesync("craft ingot")
gotoif(99, global.int.get("craft_status") > 199)
plates: gotoif(stacks, plates <= craft_inventory * count("plate", tier))
waitwhile(active("presser"))
produce("ingot", tier, plates - craft_inventory * count("plate", tier), "presser")
stacks: waitwhile(count("plate", tier) < plates | active("presser"))
craft("plate.stack", tier, count - craft_inventory * count("plate.stack", tier))
produce("plate.stack", tier, count, "presser")
|
|
|
|
4
|
blocks
|
Name
|
Lines
|
Code
|
craft 3:4
|
10
|
|
; Blocks
:global double craft_inventory
:local int tier
:local double count
:local double platesperblock
:local double stacks
:local double plates
tier = global.int.get("craft_tier:3.4")
count = global.double.get("craft_count:3.4")
gotoif(99, tier < 1 | tier > 10 | count < 1.0)
plates: platesperblock = 4.0 * round((33332222220.0 / (10.0 ^ i2d(tier))) % 10.0)
global.int.set("craft_tier:3.3", tier)
global.double.set("craft_count:3.3", count * platesperblock - craft_inventory * count("plate.dense", tier))
executesync("craft part:3")
gotoif(99, global.int.get("craft_status") > 199)
waitwhile(count("plate.dense", tier) < count * platesperblock)
craft("block", tier, count)
|
|
|
|
5
|
cables
|
Name
|
Lines
|
Code
|
craft 3:5
|
9
|
|
; Cables
:global double craft_inventory
:local int tier
:local double count
tier = global.int.get("craft_tier:3.5")
count = global.double.get("craft_count:3.5")
gotoif(99, tier < 1 | tier > 10 | count < 1.0)
global.int.set("craft_tier:ingot", tier)
global.double.set("craft_count:ingot", count / 2.0)
executesync("craft ingot")
gotoif(99, global.int.get("craft_status") > 199)
waitwhile(active("refinery"))
produce("ingot", tier, ceil(count / 2.0), "refinery")
|
|
|
|
6
|
insulated cables
|
Name
|
Lines
|
Code
|
craft 3:6
|
17
|
|
; Insulated cables
:global double craft_inventory
:local int tier
:local double count
:local double cables
:local double rubber
tier = global.int.get("craft_tier:3.6")
count = global.double.get("craft_count:3.6")
gotoif(99, tier < 1 | tier > 10 | count < 1.0)
cables = count * max(max(1.0, i2d(tier) - 2.0), max(10.0 - (5.0 * ((i2d(tier) - 8.0) ^ 2.0)), ceil(((i2d(tier) - 1.0) ^ 1.5) - 11.0)))
rubber = count * max(0.0, ((2.0 * i2d(tier)) - 4.0) - max(0.0, 2.0 - ((i2d(tier) - 8.0) * (i2d(tier) - 9.0))))
global.int.set("craft_tier:ingot", tier)
global.double.set("craft_count:ingot", (cables - count("cable", tier)) / 2.0)
executesync("craft ingot")
gotoif(99, global.int.get("craft_status") > 199)
cables: gotoif(rubber, cables <= craft_inventory * count("cable", tier))
waitwhile(active("refinery"))
produce("ingot", tier, ceil((cables - craft_inventory * count("cable", tier)) / 2.0), "refinery")
rubber: gotoif(craft, rubber <= count("plate.rubber", 1))
waitwhile(active("presser"))
produce("rubber", tier, rubber, "presser")
craft: waituntil(count("cable", tier) >= cables & count("plate.rubber", 1) >= rubber)
craft("cable.insulated", tier, count)
|
|
|
|
7
|
rods
|
Name
|
Lines
|
Code
|
craft 3:7
|
9
|
|
; Rods
:global double craft_inventory
:local int tier
:local double count
tier = global.int.get("craft_tier:3.7")
count = global.double.get("craft_count:3.7")
gotoif(99, tier < 1 | tier > 10 | count < 1.0)
global.int.set("craft_tier:ingot", tier)
global.double.set("craft_count:ingot", count / 2.0)
executesync("craft ingot")
gotoif(99, global.int.get("craft_status") > 199)
waitwhile(active("refinery"))
produce("ingot", tier, ceil(count / 2.0), "shaper")
|
|
|
|
8
|
motors
|
Name
|
Lines
|
Code
|
craft 3:8
|
14
|
|
; Motor
:global double craft_inventory
:local int tier
:local double count
:local double plates
tier = global.int.get("craft_tier:3.8")
count = global.double.get("craft_count:3.8")
gotoif(99, tier < 1 | tier > 10 | count < 1.0)
; ingots
global.int.set("craft_tier:ingot", tier)
global.double.set("craft_count:ingot", count * 5.625) ; TODO count existing bits
executesync("craft ingot")
gotoif(99, global.int.get("craft_status") > 199)
execute("craft part:8:rods")
execute("craft part:8:wire")
; plates
;plates = count * 4.0
gotoif(wait, count * 4.0 <= craft_inventory * count("plate", global.int.get("craft_tier:3.2")))
waitwhile(active("presser"))
produce("ingot", tier, count * 4.0 - craft_inventory * count("plate", tier), "presser")
wait: waituntil(count("plate", tier) >= count * 4.0 & count("rod", tier) >= count * 2.0 & count("screw", tier) >= count & count("wire", tier) >= count)
craft("motor", tier, count)
|
|
|
craft 3:8:rods
|
14
|
|
:global double craft_inventory
:local int tier
:local double count
:local double rods
;:local double screws
; rods & screws
tier = global.int.get("craft_tier:3.8")
count = global.double.get("craft_count:3.8")
;screws = count
rods = count * 2.0 + max(0.0, ceil((count - craft_inventory * count("screw", tier))/4.0))
; gotoif
waitwhile(active("shaper"))
produce("ingot", tier, ceil((rods - craft_inventory * count("rod", tier))/2.0), "shaper")
; gotoif
waitwhile(count("rod", tier) < (count - craft_inventory * count("screw", tier))/4.0 | active("cutter"))
produce("rod", tier, ceil((count - craft_inventory * count("screw", tier))/4.0), "cutter")
|
|
|
craft 3:8:wire
|
14
|
|
:global double craft_inventory
:local int tier
:local double count
; rods & screws
tier = global.int.get("craft_tier:3.8")
count = global.double.get("craft_count:3.8")
gotoif(wire, count <= craft_inventory * (count("cable", tier) + count("wire", tier)))
waitwhile(active("refinery"))
produce("ingot", tier, ceil((count - craft_inventory * (count("cable", tier) + count("wire", tier)))/2.0), "refinery")
wire: gotoif(99, count <= craft_inventory * count("wire", tier))
waitwhile(count("cable", tier) < count - count - craft_inventory * count("wire", tier) | active("refinery"))
produce("cable", tier, count - craft_inventory * count("wire", tier), "refinery")
|
|
|
|
9
|
pumps
|
Name
|
Lines
|
Code
|
craft 3:9
|
19
|
|
; Pumps
:global double craft_inventory
:local int tier
:local double count
:local double rods
tier = global.int.get("craft_tier:3.9")
count = global.double.get("craft_count:3.9")
gotoif(99, tier < 1 | tier > 10 | count < 1.0)
; ingots
global.int.set("craft_tier:ingot", tier)
global.double.set("craft_count:ingot", count * 8.625) ; TODO count existing bits
executesync("craft ingot")
gotoif(99, global.int.get("craft_status") > 199)
global.int.set("craft_tier:3.8", tier)
global.double.set("craft_count:3.8", count - craft_inventory * count("motor", tier))
executesync("craft 3:8")
gotoif(99, global.int.get("craft_status") > 199)
execute("craft 3:9:plates")
; 2 rings
rods = count * 2.0 - count("ring", tier)
waitwhile(active("shaper"))
produce("ingot", tier, ceil((rods - craft_inventory * count("rod", tier))/2.0), "shaper")
waitwhile(count("rod", tier) < rods | active("shaper"))
produce("rod", tier, count*2.0 - craft_inventory * count("ring", tier), "shaper")
waituntil(count("plate", tier) >= count*2.0 & count("plate.rubber", 1) >= count*4.0 & count("ring", tier) >= count*2.0)
craft("pump", tier, count)
|
|
|
craft 3:9:plates
|
?
|
|
; Pumps
:global double craft_inventory
:local int tier
:local double count
tier = global.int.get("craft_tier:3.9")
count = global.double.get("craft_count:3.9")
; 2 rings
;plates = count * 2.0
; TODO gotoif
plates: waitwhile(active("presser"))
produce("ingot", tier, count*2.0 - craft_inventory * count("plate", tier), "presser")
; TODO gotoif
rubber: waitwhile(active("presser"))
produce("rubber", 1, count*4.0 - craft_inventory * count("plate.rubber", tier), "presser")
|
|
|
|