cucina_vegana/recipes_5xx.lua

66 lines
2.7 KiB
Lua
Raw Normal View History

2019-02-14 16:45:33 +01:00
-- *******************************************
2019-07-16 22:59:13 +02:00
-- ** Support for 5.0 **
2019-02-14 16:45:33 +01:00
-- *******************************************
2019-02-14 21:18:28 +01:00
local modname = minetest.get_current_modname()
2019-02-14 16:45:33 +01:00
2019-07-17 22:44:09 +02:00
local nodes = { { name = "default:sand_with_kelp", -- Name
2019-02-14 16:45:33 +01:00
output = "cucina_vegana:vegan_sushi", -- Output
recipe = { -- Recipe
{"cucina_vegana:imitation_fish", "cucina_vegana:bowl_rice", ""},
{"default:sand_with_kelp", "", ""}
},
repclaements = nil -- Replacements
-- replacements = {{"cucina_vegana:molasses", "vessels:drinking_glass"}}
2019-07-16 22:59:13 +02:00
},
2019-02-14 16:45:33 +01:00
}
for node, value in ipairs(nodes) do
--print("[MT 5.x.x] Found " .. value.name .. " to register.")
if(minetest.registered_nodes[value.name] or minetest.registered_items[value.name]) then
minetest.register_craft({
output = value.output,
recipe = value.recipe,
replacements = value.replacements
2019-02-14 16:45:33 +01:00
})
2019-07-16 22:59:13 +02:00
2019-02-14 21:18:28 +01:00
minetest.log("info", "[MOD] " .. modname .. " Added a 5.x.x-Recipe with " .. value.name .. "\".")
2019-04-24 21:06:31 +02:00
--print("[MT 5.x.x] " .. value.output .. " Recipe with " .. value.name .. " registered.")
2019-07-16 22:59:13 +02:00
2019-02-14 16:45:33 +01:00
end -- if(minetest.registered_nodes
end -- for node
2019-07-16 22:59:13 +02:00
local berries = {
"default:blueberries",
"farming:blueberries",
"bushes:blueberry"
}
2019-07-16 22:59:13 +02:00
local press = {
"default:stone",
"default:cobble",
"default:desert_stone",
"default:desert_cobble"
}
for bkey,berry in ipairs(berries) do
for mkey,mat in ipairs(press) do
minetest.log("info", "[MOD] " .. modname .. " Registering Berry: " .. berry .. " with " .. mat .. ".")
minetest.register_craft({
output = "cucina_vegana:blueberry_puree",
recipe = {
{mat, berry, berry},
{mat, berry, berry},
{mat, berry, berry},
},
replacements = {
2020-03-01 02:10:55 +01:00
{mat, mat .. " 3"}
}
}) -- minetest.register_craft
2019-07-16 22:59:13 +02:00
end -- for mkey, mat
2019-07-16 22:59:13 +02:00
end -- for bkey, berry