2020-05-31 23:31:18 +03:00
|
|
|
--[[
|
|
|
|
|
|
|
|
TechAge
|
|
|
|
=======
|
|
|
|
|
|
|
|
Copyright (C) 2019-2020 Joachim Stolberg
|
|
|
|
|
2020-10-25 23:32:47 +03:00
|
|
|
AGPL v3
|
2020-05-31 23:31:18 +03:00
|
|
|
See LICENSE.txt for more information
|
2022-01-04 21:43:30 +03:00
|
|
|
|
2020-05-31 23:31:18 +03:00
|
|
|
Cooking recipes for furnace
|
2022-01-04 21:43:30 +03:00
|
|
|
|
2020-05-31 23:31:18 +03:00
|
|
|
]]--
|
|
|
|
|
|
|
|
|
|
|
|
techage.furnace.register_recipe({
|
2022-01-04 21:43:30 +03:00
|
|
|
output = "techage:iron_ingot",
|
|
|
|
recipe = {"default:iron_lump"},
|
2020-05-31 23:31:18 +03:00
|
|
|
time = 2,
|
|
|
|
})
|
|
|
|
|
|
|
|
techage.furnace.register_recipe({
|
2022-01-04 21:43:30 +03:00
|
|
|
output = "default:obsidian",
|
|
|
|
recipe = {"default:cobble"},
|
2020-05-31 23:31:18 +03:00
|
|
|
time = 8,
|
|
|
|
})
|
|
|
|
|
|
|
|
if techage.modified_recipes_enabled then
|
|
|
|
techage.furnace.register_recipe({
|
2022-01-04 21:43:30 +03:00
|
|
|
output = "default:bronze_ingot 4",
|
|
|
|
recipe = {"default:copper_ingot", "default:copper_ingot", "default:copper_ingot", "default:tin_ingot"},
|
2020-05-31 23:31:18 +03:00
|
|
|
time = 2,
|
|
|
|
})
|
|
|
|
|
|
|
|
techage.furnace.register_recipe({
|
2022-01-04 21:43:30 +03:00
|
|
|
output = "default:steel_ingot 4",
|
|
|
|
recipe = {"default:coal_lump", "default:iron_lump", "default:iron_lump", "default:iron_lump"},
|
2020-05-31 23:31:18 +03:00
|
|
|
time = 4,
|
|
|
|
})
|
|
|
|
end
|
|
|
|
|
|
|
|
if minetest.global_exists("wielded_light") then
|
|
|
|
techage.furnace.register_recipe({
|
2022-01-04 21:43:30 +03:00
|
|
|
output = "techage:meridium_ingot",
|
|
|
|
recipe = {"default:steel_ingot", "default:mese_crystal_fragment"},
|
2020-05-31 23:31:18 +03:00
|
|
|
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({
|
2022-01-04 21:43:30 +03:00
|
|
|
output = recipe.output,
|
|
|
|
recipe = {item},
|
2020-05-31 23:31:18 +03:00
|
|
|
time = math.floor((recipe.width + 1) / 2),
|
|
|
|
})
|
|
|
|
end
|
|
|
|
else
|
|
|
|
techage.furnace.register_recipe({
|
2022-01-04 21:43:30 +03:00
|
|
|
output = recipe.output,
|
|
|
|
recipe = recipe.items,
|
2020-05-31 23:31:18 +03:00
|
|
|
time = math.floor((recipe.width + 1) / 2),
|
|
|
|
})
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end)
|
|
|
|
|
|
|
|
techage.furnace.register_recipe({
|
|
|
|
output = "techage:basalt_glass2",
|
|
|
|
recipe = {
|
2022-01-04 21:43:30 +03:00
|
|
|
"techage:basalt_gravel",
|
|
|
|
"techage:basalt_gravel",
|
2020-05-31 23:31:18 +03:00
|
|
|
},
|
|
|
|
time = 4,
|
|
|
|
})
|
|
|
|
|
|
|
|
techage.furnace.register_recipe({
|
|
|
|
output = "techage:basalt_glass",
|
|
|
|
recipe = {
|
2022-01-04 21:43:30 +03:00
|
|
|
"techage:sieved_basalt_gravel",
|
|
|
|
"techage:sieved_basalt_gravel",
|
2020-05-31 23:31:18 +03:00
|
|
|
},
|
|
|
|
time = 4,
|
|
|
|
})
|
|
|
|
|
|
|
|
techage.furnace.register_recipe({
|
|
|
|
output = "techage:basalt_glass_thin2 2",
|
|
|
|
recipe = {
|
2022-01-04 21:43:30 +03:00
|
|
|
"techage:basalt_gravel",
|
2020-05-31 23:31:18 +03:00
|
|
|
},
|
|
|
|
time = 4,
|
|
|
|
})
|
|
|
|
|
|
|
|
techage.furnace.register_recipe({
|
|
|
|
output = "techage:basalt_glass_thin 2",
|
|
|
|
recipe = {
|
2022-01-04 21:43:30 +03:00
|
|
|
"techage:sieved_basalt_gravel",
|
2020-05-31 23:31:18 +03:00
|
|
|
},
|
|
|
|
time = 4,
|
|
|
|
})
|
|
|
|
|
|
|
|
techage.furnace.register_recipe({
|
|
|
|
output = "techage:basalt_glass_thin_xl2",
|
|
|
|
recipe = {
|
2022-01-04 21:43:30 +03:00
|
|
|
"techage:basalt_gravel",
|
2020-05-31 23:31:18 +03:00
|
|
|
},
|
|
|
|
time = 4,
|
|
|
|
})
|
|
|
|
|
|
|
|
techage.furnace.register_recipe({
|
|
|
|
output = "techage:basalt_glass_thin_xl",
|
|
|
|
recipe = {
|
2022-01-04 21:43:30 +03:00
|
|
|
"techage:sieved_basalt_gravel",
|
2020-05-31 23:31:18 +03:00
|
|
|
},
|
|
|
|
time = 4,
|
|
|
|
})
|
|
|
|
|
|
|
|
techage.furnace.register_recipe({
|
|
|
|
output = "basic_materials:concrete_block 4",
|
|
|
|
recipe = {
|
2022-01-04 21:43:30 +03:00
|
|
|
"basic_materials:wet_cement",
|
2020-05-31 23:31:18 +03:00
|
|
|
"default:sand",
|
|
|
|
"default:gravel",
|
|
|
|
"techage:steelmat",
|
|
|
|
},
|
|
|
|
time = 4,
|
|
|
|
})
|
2020-06-19 00:23:53 +03:00
|
|
|
|
|
|
|
if minetest.global_exists("moreores") then
|
2022-01-04 21:43:30 +03:00
|
|
|
|
2020-06-19 00:23:53 +03:00
|
|
|
if techage.modified_recipes_enabled then
|
|
|
|
minetest.clear_craft({output = "moreores:mithril_ingot"})
|
|
|
|
minetest.clear_craft({output = "moreores:silver_ingot"})
|
|
|
|
end
|
2022-01-04 21:43:30 +03:00
|
|
|
|
2020-06-19 00:23:53 +03:00
|
|
|
techage.furnace.register_recipe({
|
|
|
|
output = 'moreores:silver_ingot',
|
|
|
|
recipe = {'moreores:silver_lump'},
|
|
|
|
time = 2,
|
|
|
|
})
|
|
|
|
|
|
|
|
techage.furnace.register_recipe({
|
|
|
|
output = 'moreores:mithril_ingot',
|
|
|
|
recipe = {'moreores:mithril_lump'},
|
|
|
|
time = 5,
|
|
|
|
})
|
|
|
|
|
|
|
|
end
|