Zefram
2014-08-14 1d0687556a52891aeadc0e8d9a58e44c53cb826b
commit | author | age
dd65a6 1 local S = technic.getter
Z 2
3 technic.register_recipe_type("separating", {
4     description = S("Separating"),
5     output_size = 2,
6 })
7
8 function technic.register_separating_recipe(data)
9     data.time = data.time or 10
10     technic.register_recipe("separating", data)
11 end
12
13 local rubber_tree_planks = minetest.get_modpath("moretrees") and "moretrees:rubber_tree_planks" or "default:wood"
14
15 local recipes = {
16     { "technic:bronze_dust 4",             "technic:copper_dust 3",       "technic:tin_dust"      },
17     { "technic:stainless_steel_dust 4",    "technic:wrought_iron_dust 3", "technic:chromium_dust" },
18     { "technic:brass_dust 3",              "technic:copper_dust 2",       "technic:zinc_dust"     },
19     { "moretrees:rubber_tree_trunk_empty", rubber_tree_planks.." 4",      "technic:raw_latex"     },
20     { "moretrees:rubber_tree_trunk",       rubber_tree_planks.." 4",      "technic:raw_latex"     },
21 }
22
b0faa7 23 local function uranium_dust(p)
Z 24     return "technic:uranium"..(p == 7 and "" or p).."_dust"
25 end
26 for p = 1, 34 do
27     table.insert(recipes, { uranium_dust(p).." 2", uranium_dust(p-1), uranium_dust(p+1) })
28 end
29
dd65a6 30 if minetest.get_modpath("bushes_classic") then
Z 31     for _, berry in ipairs({ "blackberry", "blueberry", "gooseberry", "raspberry", "strawberry" }) do
32         table.insert(recipes, { "bushes:"..berry.."_bush", "default:stick 20", "bushes:"..berry.." 4" })
33     end
34 end
35
36 for _, data in pairs(recipes) do
37     technic.register_separating_recipe({ input = { data[1] }, output = { data[2], data[3] } })
38 end