techage/furnace/recipes.lua
Joachim Stolberg f085883e55 missing recipes added
TA3 Terminal activated
minor improvements
2019-08-22 20:49:47 +02:00

133 lines
2.8 KiB
Lua

--[[
TechAge
=======
Copyright (C) 2019 Joachim Stolberg
GPL v3
See LICENSE.txt for more information
Cooking recipes for furnace
]]--
techage.furnace.register_recipe({
output = "techage:iron_ingot",
recipe = {"default:iron_lump"},
time = 2,
})
if techage.modified_recipes_enabled then
techage.furnace.register_recipe({
output = "default:bronze_ingot 4",
recipe = {"default:copper_ingot", "default:copper_ingot", "default:copper_ingot", "default:tin_ingot"},
time = 2,
})
techage.furnace.register_recipe({
output = "default:steel_ingot 4",
recipe = {"default:coal_lump", "default:iron_lump", "default:iron_lump", "default:iron_lump"},
time = 4,
})
end
if minetest.global_exists("wielded_light") then
techage.furnace.register_recipe({
output = "techage:meridium_ingot",
recipe = {"default:steel_ingot", "default:mese_crystal_fragment"},
heat = 4,
time = 3,
})
end
local function node_group(group)
local tbl = {}
for key,_ in pairs(minetest.registered_items) do
if minetest.get_item_group(key, group) > 0 then
tbl[#tbl + 1] = key
end
end
return tbl
end
minetest.after(1, function()
for key,_ in pairs(minetest.registered_items) do
if key ~= "" then
local tbl = minetest.get_all_craft_recipes(key)
if tbl then
for _,recipe in ipairs(tbl) do
if recipe and recipe.method == "cooking" then
if recipe.items[1] and string.split(recipe.items[1], ":")[1] == "group" then
for _,item in ipairs(node_group(string.split(recipe.items[1], ":")[2])) do
techage.furnace.register_recipe({
output = recipe.output,
recipe = {item},
time = math.floor((recipe.width + 1) / 2),
})
end
else
techage.furnace.register_recipe({
output = recipe.output,
recipe = recipe.items,
time = math.floor((recipe.width + 1) / 2),
})
end
end
end
end
end
end
end)
techage.furnace.register_recipe({
output = "techage:basalt_glass2",
recipe = {
"techage:basalt_gravel",
"techage:basalt_gravel",
},
time = 4,
})
techage.furnace.register_recipe({
output = "techage:basalt_glass",
recipe = {
"techage:sieved_basalt_gravel",
"techage:sieved_basalt_gravel",
},
time = 4,
})
techage.furnace.register_recipe({
output = "techage:basalt_glass_thin2 2",
recipe = {
"techage:basalt_gravel",
},
time = 4,
})
techage.furnace.register_recipe({
output = "techage:basalt_glass_thin 2",
recipe = {
"techage:sieved_basalt_gravel",
},
time = 4,
})
techage.furnace.register_recipe({
output = "techage:basalt_glass_thin_xl2",
recipe = {
"techage:basalt_gravel",
},
time = 4,
})
techage.furnace.register_recipe({
output = "techage:basalt_glass_thin_xl",
recipe = {
"techage:sieved_basalt_gravel",
},
time = 4,
})