2014-07-02 19:43:13 +02:00
|
|
|
|
|
|
|
local S = technic.getter
|
|
|
|
|
2014-07-15 19:29:36 +02:00
|
|
|
technic.register_recipe_type("extracting", { description = S("Extracting") })
|
2014-07-02 19:43:13 +02:00
|
|
|
|
|
|
|
function technic.register_extractor_recipe(data)
|
|
|
|
data.time = data.time or 4
|
2014-07-02 22:24:38 +02:00
|
|
|
technic.register_recipe("extracting", data)
|
2014-07-02 19:43:13 +02:00
|
|
|
end
|
|
|
|
|
2023-12-27 03:43:48 +01:00
|
|
|
if minetest.get_modpath("dye") or minetest.get_modpath("mcl_dye") then
|
2015-01-18 22:24:18 +01:00
|
|
|
-- check if we are using dye or unifieddyes
|
|
|
|
local unifieddyes = minetest.get_modpath("unifieddyes")
|
2023-12-20 12:24:29 +01:00
|
|
|
|
2023-12-27 03:43:48 +01:00
|
|
|
for _, data in ipairs(extractor_recipes) do
|
2015-01-18 22:24:18 +01:00
|
|
|
technic.register_extractor_recipe({input = {data[1]}, output = data[2]})
|
|
|
|
end
|
|
|
|
|
|
|
|
-- overwrite the existing crafting recipes
|
|
|
|
local dyes = {"white", "red", "yellow", "blue", "violet", "orange"}
|
|
|
|
for _, color in ipairs(dyes) do
|
2018-10-05 19:46:33 +02:00
|
|
|
minetest.clear_craft({
|
|
|
|
type = "shapeless",
|
|
|
|
recipe = {"group:flower,color_"..color},
|
|
|
|
})
|
2015-01-18 22:24:18 +01:00
|
|
|
minetest.register_craft({
|
2018-10-05 19:46:33 +02:00
|
|
|
type = "shapeless",
|
|
|
|
output = "dye:"..color.." 1",
|
|
|
|
recipe = {"group:flower,color_"..color},
|
2015-01-18 22:24:18 +01:00
|
|
|
})
|
|
|
|
end
|
2018-10-05 19:46:33 +02:00
|
|
|
|
|
|
|
minetest.clear_craft({
|
|
|
|
type = "shapeless",
|
|
|
|
recipe = {"group:coal"},
|
|
|
|
})
|
2015-01-18 22:24:18 +01:00
|
|
|
minetest.register_craft({
|
|
|
|
type = "shapeless",
|
|
|
|
output = "dye:black 1",
|
|
|
|
recipe = {"group:coal"},
|
|
|
|
})
|
|
|
|
|
|
|
|
if unifieddyes then
|
2018-10-05 19:46:33 +02:00
|
|
|
minetest.clear_craft({
|
|
|
|
type = "shapeless",
|
|
|
|
recipe = {"default:cactus"},
|
|
|
|
})
|
2015-01-18 22:24:18 +01:00
|
|
|
minetest.register_craft({
|
|
|
|
type = "shapeless",
|
|
|
|
output = "dye:green 1",
|
|
|
|
recipe = {"default:cactus"},
|
|
|
|
})
|
|
|
|
end
|
|
|
|
end
|