|
@@ -0,0 +1,317 @@
|
|
1
|
+local recipes = {
|
|
2
|
+ ["technic:mv_centrifuge"] = {
|
|
3
|
+ craft = {
|
|
4
|
+ {"basic_materials:motor", "technic:copper_plate", "technic:diamond_drill_head"},
|
|
5
|
+ {"technic:copper_plate", "technic:machine_casing", "technic:copper_plate"},
|
|
6
|
+ {"pipeworks:one_way_tube", "technic:mv_cable", "pipeworks:mese_filter"}
|
|
7
|
+ }
|
|
8
|
+ },
|
|
9
|
+ ["basic_materials:motor"] = {
|
|
10
|
+ craft = {
|
|
11
|
+ {"default:mese_crystal_fragment", "basic_materials:copper_wire", "basic_materials:plastic_sheet"},
|
|
12
|
+ {"default:copper_ingot", "default:steel_ingot", "default:steel_ingot"},
|
|
13
|
+ {"default:mese_crystal_fragment", "basic_materials:copper_wire", "basic_materials:plastic_sheet"}
|
|
14
|
+ },
|
|
15
|
+ produces = 2
|
|
16
|
+ },
|
|
17
|
+ ["technic:copper_plate"] = {
|
|
18
|
+ compress = {
|
|
19
|
+ item = "technic:copper_ingot",
|
|
20
|
+ amount = 5
|
|
21
|
+ }
|
|
22
|
+ },
|
|
23
|
+ ["technic:diamond_drill_head"] = {
|
|
24
|
+ craft = {
|
|
25
|
+ {"technic:stainless_steel_ingot", "default:diamond", "technic:stainless_steel_ingot"},
|
|
26
|
+ {"default:diamond", "", "default:diamond"},
|
|
27
|
+ {"technic:stainless_steel_ingot", "default:diamond", "technic:stainless_steel_ingot"}
|
|
28
|
+ }
|
|
29
|
+ },
|
|
30
|
+ ["technic:stainless_steel_ingot"] = {
|
|
31
|
+ alloy = {
|
|
32
|
+ ["technic:carbon_steel_ingot"] = 3,
|
|
33
|
+ ["technic:chromium_ingot"] = 1
|
|
34
|
+ },
|
|
35
|
+ produces = 4
|
|
36
|
+ },
|
|
37
|
+ ["technic:carbon_steel_ingot"] = {
|
|
38
|
+ alloy = {
|
|
39
|
+ ["default:steel_ingot"] = 1,
|
|
40
|
+ ["technic:coal_dust"] = 1
|
|
41
|
+ }
|
|
42
|
+ },
|
|
43
|
+ ["technic:machine_casing"] = {
|
|
44
|
+ craft = {
|
|
45
|
+ {"technic:cast_iron_ingot", "technic:cast_iron_ingot", "technic:cast_iron_ingot"},
|
|
46
|
+ {"technic:cast_iron_ingot", "basic_materials:brass_ingot", "technic:cast_iron_ingot"},
|
|
47
|
+ {"technic:cast_iron_ingot", "technic:cast_iron_ingot", "technic:cast_iron_ingot"}
|
|
48
|
+ }
|
|
49
|
+ },
|
|
50
|
+ ["basic_materials:brass_ingot"] = {
|
|
51
|
+ alloy = {
|
|
52
|
+ ["default:copper_ingot"] = 2,
|
|
53
|
+ ["technic:zinc_ingot"] = 1
|
|
54
|
+ },
|
|
55
|
+ produces = 3
|
|
56
|
+ },
|
|
57
|
+ ["technic:cast_iron_ingot"] = {
|
|
58
|
+ smelt = "default:steel_ingot"
|
|
59
|
+ },
|
|
60
|
+ ["pipeworks:one_way_tube"] = {
|
|
61
|
+ craft = {
|
|
62
|
+ {"basic_materials:plastic_sheet", "basic_materials:plastic_sheet", "basic_materials:plastic_sheet"},
|
|
63
|
+ {"default:stick", "default:mese_crystal", "basic_materials:plastic_sheet"},
|
|
64
|
+ {"basic_materials:plastic_sheet", "basic_materials:plastic_sheet", "basic_materials:plastic_sheet"}
|
|
65
|
+ },
|
|
66
|
+ produces = 2
|
|
67
|
+ },
|
|
68
|
+ ["technic:mv_cable"] = {
|
|
69
|
+ craft = {
|
|
70
|
+ {"technic:rubber", "technic:rubber", "technic:rubber"},
|
|
71
|
+ {"technic:lv_cable", "technic:lv_cable", "technic:lv_cable"},
|
|
72
|
+ {"technic:rubber", "technic:rubber", "technic:rubber"}
|
|
73
|
+ },
|
|
74
|
+ produces = 3
|
|
75
|
+ },
|
|
76
|
+ ["technic:rubber"] = {
|
|
77
|
+ alloy = {
|
|
78
|
+ ["technic:raw_latex"] = 4,
|
|
79
|
+ ["technic:coal_dust"] = 2
|
|
80
|
+ },
|
|
81
|
+ produces = 6
|
|
82
|
+ },
|
|
83
|
+ ["technic:raw_latex"] = {
|
|
84
|
+ extract = {
|
|
85
|
+ item = "technic:rubber_tree_grindings",
|
|
86
|
+ amount = 4
|
|
87
|
+ }
|
|
88
|
+ },
|
|
89
|
+ ["technic:lv_cable"] = {
|
|
90
|
+ craft = {
|
|
91
|
+ {"default:paper", "default:paper", "default:paper"},
|
|
92
|
+ {"default:copper_ingot", "default:copper_ingot", "default:copper_ingot"},
|
|
93
|
+ {"default:paper", "default:paper", "default:paper"}
|
|
94
|
+ },
|
|
95
|
+ produces = 6
|
|
96
|
+ },
|
|
97
|
+ ["default:paper"] = {
|
|
98
|
+ craft = {
|
|
99
|
+ {"", "", ""},
|
|
100
|
+ {"default:papyrus", "default:papyrus", "default:papyrus"},
|
|
101
|
+ {"", "", ""}
|
|
102
|
+ },
|
|
103
|
+ produces = 4
|
|
104
|
+ },
|
|
105
|
+ ["pipeworks:mese_filter"] = {
|
|
106
|
+ craft = {
|
|
107
|
+ {"default:steel_ingot", "default:steel_ingot", "basic_materials:plastic_sheet"},
|
|
108
|
+ {"default:stick", "default:mese", "basic_materials:plastic_sheet"},
|
|
109
|
+ {"default:steel_ingot", "default:steel_ingot", "basic_materials:plastic_sheet"}
|
|
110
|
+ },
|
|
111
|
+ produces = 2
|
|
112
|
+ },
|
|
113
|
+ ["default:mese"] = {
|
|
114
|
+ craft = {
|
|
115
|
+ {"default:mese_crystal", "default:mese_crystal", "default:mese_crystal"},
|
|
116
|
+ {"default:mese_crystal", "default:mese_crystal", "default:mese_crystal"},
|
|
117
|
+ {"default:mese_crystal", "default:mese_crystal", "default:mese_crystal"}
|
|
118
|
+ }
|
|
119
|
+ },
|
|
120
|
+ ["default:mese_crystal_fragment"] = {
|
|
121
|
+ craft = {
|
|
122
|
+ {"", "", ""},
|
|
123
|
+ {"", "default:mese_crystal", ""},
|
|
124
|
+ {"", "", ""}
|
|
125
|
+ },
|
|
126
|
+ produces = 9
|
|
127
|
+ },
|
|
128
|
+ ["basic_materials:copper_wire"] = {
|
|
129
|
+ craft = {
|
|
130
|
+ {"default:copper_ingot", "basic_materials:empty_spool", ""},
|
|
131
|
+ {"basic_materials:empty_spool", "", ""},
|
|
132
|
+ {"", "", ""}
|
|
133
|
+ },
|
|
134
|
+ produces = 2
|
|
135
|
+ },
|
|
136
|
+ ["basic_materials:empty_spool"] = {
|
|
137
|
+ craft = {
|
|
138
|
+ {"basic_materials:plastic_sheet", "basic_materials:plastic_sheet", "basic_materials:plastic_sheet"},
|
|
139
|
+ {"", "basic_materials:plastic_sheet", ""},
|
|
140
|
+ {"basic_materials:plastic_sheet", "basic_materials:plastic_sheet", "basic_materials:plastic_sheet"}
|
|
141
|
+ },
|
|
142
|
+ produces = 3
|
|
143
|
+ },
|
|
144
|
+ ["basic_materials:plastic_sheet"] = {
|
|
145
|
+ smelt = "basic_materials:paraffin"
|
|
146
|
+ },
|
|
147
|
+ ["basic_materials:paraffin"] = {
|
|
148
|
+ smelt = "basic_materials:oil_extract"
|
|
149
|
+ },
|
|
150
|
+ ["technic:solar_panel"] = {
|
|
151
|
+ craft = {
|
|
152
|
+ {"technic:doped_silicon_wafer", "technic:doped_silicon_wafer", "technic:doped_silicon_wafer"},
|
|
153
|
+ {"basic_materials:silver_wire", "technic:lv_cable", "mesecons_materials:glue"},
|
|
154
|
+ {"", "", ""}
|
|
155
|
+ }
|
|
156
|
+ },
|
|
157
|
+ ["technic:doped_silicon_wafer"] = {
|
|
158
|
+ alloy = {
|
|
159
|
+ ["technic:silicon_wafer"] = 1,
|
|
160
|
+ ["technic:gold_dust"] = 1
|
|
161
|
+ }
|
|
162
|
+ },
|
|
163
|
+ ["technic:silicon_wafer"] = {
|
|
164
|
+ alloy = {
|
|
165
|
+ ["default:sand"] = 2,
|
|
166
|
+ ["technic:coal_dust"] = 2
|
|
167
|
+ }
|
|
168
|
+ },
|
|
169
|
+ ["basic_materials:silver_wire"] = {
|
|
170
|
+ craft = {
|
|
171
|
+ {"moreores:silver_ingot", "basic_materials:empty_spool", ""},
|
|
172
|
+ {"basic_materials:empty_spool", "", ""},
|
|
173
|
+ {"", "", ""}
|
|
174
|
+ },
|
|
175
|
+ produces = 2
|
|
176
|
+ },
|
|
177
|
+ ["mesecons_materials:glue"] = {
|
|
178
|
+ smelt = "technic:raw_latex"
|
|
179
|
+ },
|
|
180
|
+ ["technic:solar_array_lv"] = {
|
|
181
|
+ craft = {
|
|
182
|
+ {"technic:solar_panel", "technic:solar_panel", "technic:solar_panel"},
|
|
183
|
+ {"technic:carbon_steel_ingot", "technic:lv_transformer", "technic:carbon_steel_ingot"},
|
|
184
|
+ {"", "technic:lv_cable", ""}
|
|
185
|
+ }
|
|
186
|
+ },
|
|
187
|
+ ["technic:lv_transformer"] = {
|
|
188
|
+ craft = {
|
|
189
|
+ {"mesecons_materials:fiber", "default:steel_ingot", "mesecons_materials:fiber"},
|
|
190
|
+ {"technic:copper_coil", "default:steel_ingot", "technic:copper_coil"},
|
|
191
|
+ {"default:steel_ingot", "default:steel_ingot", "default:steel_ingot"}
|
|
192
|
+ }
|
|
193
|
+ },
|
|
194
|
+ ["mesecons_materials:fiber"] = {
|
|
195
|
+ smelt = "mesecons_materials:glue",
|
|
196
|
+ produces = 6
|
|
197
|
+ },
|
|
198
|
+ ["technic:copper_coil"] = {
|
|
199
|
+ craft = {
|
|
200
|
+ {"basic_materials:copper_wire", "default:steel_ingot", "basic_materials:copper_wire"},
|
|
201
|
+ {"default:steel_ingot", "", "default:steel_ingot"},
|
|
202
|
+ {"basic_materials:copper_wire", "default:steel_ingot", "basic_materials:copper_wire"}
|
|
203
|
+ }
|
|
204
|
+ },
|
|
205
|
+ ["technic:solar_array_mv"] = {
|
|
206
|
+ craft = {
|
|
207
|
+ {"technic:solar_array_lv", "technic:solar_array_lv", "technic:solar_array_lv"},
|
|
208
|
+ {"technic:carbon_steel_ingot", "technic:mv_transformer", "technic:carbon_steel_ingot"},
|
|
209
|
+ {"", "technic:mv_cable", ""}
|
|
210
|
+ }
|
|
211
|
+ },
|
|
212
|
+ ["technic:mv_transformer"] = {
|
|
213
|
+ craft = {
|
|
214
|
+ {"mesecons_materials:fiber", "technic:carbon_steel_ingot", "mesecons_materials:fiber"},
|
|
215
|
+ {"technic:copper_coil", "technic:carbon_steel_ingot", "technic:copper_coil"},
|
|
216
|
+ {"technic:carbon_steel_ingot", "technic:carbon_steel_ingot", "technic:carbon_steel_ingot"}
|
|
217
|
+ }
|
|
218
|
+ },
|
|
219
|
+}
|
|
220
|
+
|
|
221
|
+local items = {
|
|
222
|
+ -- ["technic:mv_centrifuge"] = 31 -- 34 minus 3 I already have
|
|
223
|
+ ["technic:mv_transformer"] = 1
|
|
224
|
+}
|
|
225
|
+
|
|
226
|
+local function get_count(goal, recipe)
|
|
227
|
+ local count = goal / (recipe.produces or 1)
|
|
228
|
+ if count ~= math.floor(count) then
|
|
229
|
+ count = math.floor(count) + 1
|
|
230
|
+ end
|
|
231
|
+ return count
|
|
232
|
+end
|
|
233
|
+
|
|
234
|
+local steps = {}
|
|
235
|
+
|
|
236
|
+local active = true
|
|
237
|
+while active do
|
|
238
|
+ active = false
|
|
239
|
+ for item, count in pairs(items) do
|
|
240
|
+ if recipes[item] then
|
|
241
|
+ active = item
|
|
242
|
+ local current = recipes[item]
|
|
243
|
+ local _count = get_count(count, current)
|
|
244
|
+ if current.craft then
|
|
245
|
+ table.insert(steps, "craft "..item.." "..tostring(_count).." times")
|
|
246
|
+ local new = {}
|
|
247
|
+ for y=1,3 do
|
|
248
|
+ for x=1,3 do
|
|
249
|
+ if current.craft[y][x] ~= "" then
|
|
250
|
+ item = current.craft[y][x]
|
|
251
|
+ if new[item] then
|
|
252
|
+ new[item] = new[item] + _count
|
|
253
|
+ else
|
|
254
|
+ new[item] = _count
|
|
255
|
+ end
|
|
256
|
+ end
|
|
257
|
+ end
|
|
258
|
+ end
|
|
259
|
+ for item, count in pairs(new) do
|
|
260
|
+ if items[item] then
|
|
261
|
+ items[item] = items[item] + count
|
|
262
|
+ else
|
|
263
|
+ items[item] = count
|
|
264
|
+ end
|
|
265
|
+ end
|
|
266
|
+ elseif current.compress then
|
|
267
|
+ table.insert(steps, "compress "..item.." "..tostring(_count).." times")
|
|
268
|
+ if current.compress.amount then
|
|
269
|
+ _count = _count * current.compress.amount
|
|
270
|
+ end
|
|
271
|
+ if items[current.compress.item] then
|
|
272
|
+ items[current.compress.item] = items[current.compress.item] + _count
|
|
273
|
+ else
|
|
274
|
+ items[current.compress.item] = _count
|
|
275
|
+ end
|
|
276
|
+ elseif current.alloy then
|
|
277
|
+ table.insert(steps, "alloy "..item.." "..tostring(_count).." times")
|
|
278
|
+ for item, amount in pairs(current.alloy) do
|
|
279
|
+ if items[item] then
|
|
280
|
+ items[item] = items[item] + _count * amount
|
|
281
|
+ else
|
|
282
|
+ items[item] = _count * amount
|
|
283
|
+ end
|
|
284
|
+ end
|
|
285
|
+ elseif current.smelt then
|
|
286
|
+ table.insert(steps, "smelt "..item.." "..tostring(_count).." times")
|
|
287
|
+ if items[current.smelt] then
|
|
288
|
+ items[current.smelt] = items[current.smelt] + _count
|
|
289
|
+ else
|
|
290
|
+ items[current.smelt] = _count
|
|
291
|
+ end
|
|
292
|
+ elseif current.extract then
|
|
293
|
+ table.insert(steps, "extract "..item.." "..tostring(_count).." times")
|
|
294
|
+ if current.extract.amount then
|
|
295
|
+ _count = _count * current.extract.amount
|
|
296
|
+ end
|
|
297
|
+ if items[current.extract.item] then
|
|
298
|
+ items[current.extract.item] = items[current.extract.item] + _count
|
|
299
|
+ else
|
|
300
|
+ items[current.extract.item] = _count
|
|
301
|
+ end
|
|
302
|
+ end
|
|
303
|
+ break
|
|
304
|
+ end
|
|
305
|
+ end
|
|
306
|
+ if active then
|
|
307
|
+ items[active] = nil
|
|
308
|
+ end
|
|
309
|
+end
|
|
310
|
+
|
|
311
|
+for k,v in pairs(items) do
|
|
312
|
+ print(k,v)
|
|
313
|
+end
|
|
314
|
+
|
|
315
|
+for i=#steps,1,-1 do
|
|
316
|
+ print(steps[i])
|
|
317
|
+end
|