forked from minetest-mods/moreblocks
Move recipe definitions to a separate file and function.
This commit is contained in:
parent
d5edcb2a10
commit
7d701da5b9
@ -57,4 +57,5 @@ stairsplus.register_single = function(category, alternate, info, modname, subnam
|
||||
def.drop = modname.. ":" .. category .. "_" .. fields.drop .. alternate
|
||||
end
|
||||
minetest.register_node(":" ..modname.. ":" .. category .. "_" .. subname .. alternate, def)
|
||||
stairsplus.register_recipes(category, alternate, modname, subname, recipeitem)
|
||||
end
|
@ -5,7 +5,7 @@ Copyright (c) 2011-2017 Hugo Locurcio and contributors.
|
||||
Licensed under the zlib license. See LICENSE.md for more information.
|
||||
--]]
|
||||
|
||||
-- Nodes will be called <modname>:{stair,slab,panel,micro}_<subname>
|
||||
-- Nodes will be called <modname>:{stair,slab,panel,micro,slope}_<subname>
|
||||
|
||||
local modpath = minetest.get_modpath("moreblocks").. "/stairsplus"
|
||||
|
||||
@ -71,6 +71,7 @@ end
|
||||
-- dofile(modpath.. "/aliases.lua") -- Not needed as of Q2 2013, uncomment to fix old maps.
|
||||
-- dofile(modpath.. "/conversion.lua") -- Not needed as of Q2 2013, uncomment to fix old maps.
|
||||
dofile(modpath .. "/defs.lua")
|
||||
dofile(modpath .. "/recipes.lua")
|
||||
dofile(modpath .. "/common.lua")
|
||||
dofile(modpath .. "/stairs.lua")
|
||||
dofile(modpath .. "/slabs.lua")
|
||||
|
@ -39,57 +39,6 @@ function stairsplus:register_micro(modname, subname, recipeitem, fields)
|
||||
for alternate, def in pairs(defs) do
|
||||
stairsplus.register_single("micro", alternate, def, modname, subname, recipeitem, fields)
|
||||
end
|
||||
minetest.register_alias(modname.. ":micro_" ..subname.. "_bottom", modname.. ":micro_" ..subname)
|
||||
|
||||
circular_saw.known_nodes[recipeitem] = {modname, subname}
|
||||
|
||||
-- Some saw-less recipes:
|
||||
|
||||
minetest.register_craft({
|
||||
type = "shapeless",
|
||||
output = modname .. ":micro_" .. subname .. " 7",
|
||||
recipe = {modname .. ":stair_" .. subname .. "_inner"},
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = modname .. ":micro_" .. subname .. " 6",
|
||||
type = "shapeless",
|
||||
recipe = {modname .. ":stair_" .. subname},
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
type = "shapeless",
|
||||
output = modname .. ":micro_" .. subname .. " 5",
|
||||
recipe = {modname .. ":stair_" .. subname .. "_outer"},
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
type = "shapeless",
|
||||
output = modname .. ":micro_" .. subname .. " 4",
|
||||
recipe = {modname .. ":slab_" .. subname},
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
type = "shapeless",
|
||||
output = modname .. ":micro_" .. subname .. " 4",
|
||||
recipe = {modname .. ":stair_" .. subname .. "_alt"},
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
type = "shapeless",
|
||||
output = modname .. ":micro_" .. subname .. " 3",
|
||||
recipe = {modname .. ":stair_" .. subname .. "_right_half"},
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
type = "shapeless",
|
||||
output = modname .. ":micro_" .. subname .. " 2",
|
||||
recipe = {modname .. ":panel_" .. subname},
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
type = "shapeless",
|
||||
output = recipeitem,
|
||||
recipe = {modname .. ":micro_" .. subname, modname .. ":micro_" .. subname, modname .. ":micro_" .. subname, modname .. ":micro_" .. subname, modname .. ":micro_" .. subname, modname .. ":micro_" .. subname, modname .. ":micro_" .. subname, modname .. ":micro_" .. subname},
|
||||
})
|
||||
end
|
||||
|
@ -39,37 +39,6 @@ function stairsplus:register_panel(modname, subname, recipeitem, fields)
|
||||
for alternate, def in pairs(defs) do
|
||||
stairsplus.register_single("panel", alternate, def, modname, subname, recipeitem, fields)
|
||||
end
|
||||
minetest.register_alias(modname.. ":panel_" ..subname.. "_bottom", modname.. ":panel_" ..subname)
|
||||
|
||||
circular_saw.known_nodes[recipeitem] = {modname, subname}
|
||||
|
||||
-- Some saw-less recipes:
|
||||
|
||||
minetest.register_craft({
|
||||
output = modname .. ":panel_" .. subname .. " 12",
|
||||
recipe = {
|
||||
{recipeitem, ""},
|
||||
{recipeitem, recipeitem},
|
||||
},
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = modname .. ":panel_" .. subname .. " 12",
|
||||
recipe = {
|
||||
{"", recipeitem},
|
||||
{recipeitem, recipeitem},
|
||||
},
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
type = "shapeless",
|
||||
output = modname .. ":panel_" .. subname,
|
||||
recipe = {modname .. ":micro_" .. subname, modname .. ":micro_" .. subname},
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
type = "shapeless",
|
||||
output = recipeitem,
|
||||
recipe = {modname .. ":panel_" .. subname, modname .. ":panel_" .. subname, modname .. ":panel_" .. subname, modname .. ":panel_" .. subname},
|
||||
})
|
||||
end
|
||||
|
443
stairsplus/recipes.lua
Normal file
443
stairsplus/recipes.lua
Normal file
@ -0,0 +1,443 @@
|
||||
--[[
|
||||
More Blocks: Stairs+
|
||||
|
||||
Copyright (c) 2011-2017 Hugo Locurcio and contributors.
|
||||
Licensed under the zlib license. See LICENSE.md for more information.
|
||||
--]]
|
||||
|
||||
|
||||
stairsplus.register_recipes = function(category, alternate, modname, subname, recipeitem)
|
||||
if category == "micro" and alternate == "" then
|
||||
minetest.register_craft({
|
||||
type = "shapeless",
|
||||
output = modname .. ":micro_" .. subname .. " 7",
|
||||
recipe = {modname .. ":stair_" .. subname .. "_inner"},
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
type = "shapeless",
|
||||
output = modname .. ":micro_" .. subname .. " 6",
|
||||
recipe = {modname .. ":stair_" .. subname},
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
type = "shapeless",
|
||||
output = modname .. ":micro_" .. subname .. " 5",
|
||||
recipe = {modname .. ":stair_" .. subname .. "_outer"},
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
type = "shapeless",
|
||||
output = modname .. ":micro_" .. subname .. " 4",
|
||||
recipe = {modname .. ":slab_" .. subname},
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
type = "shapeless",
|
||||
output = modname .. ":micro_" .. subname .. " 4",
|
||||
recipe = {modname .. ":stair_" .. subname .. "_alt"},
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
type = "shapeless",
|
||||
output = modname .. ":micro_" .. subname .. " 3",
|
||||
recipe = {modname .. ":stair_" .. subname .. "_right_half"},
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
type = "shapeless",
|
||||
output = modname .. ":micro_" .. subname .. " 2",
|
||||
recipe = {modname .. ":panel_" .. subname},
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
type = "shapeless",
|
||||
output = recipeitem,
|
||||
recipe = {modname .. ":micro_" .. subname, modname .. ":micro_" .. subname, modname .. ":micro_" .. subname, modname .. ":micro_" .. subname, modname .. ":micro_" .. subname, modname .. ":micro_" .. subname, modname .. ":micro_" .. subname, modname .. ":micro_" .. subname},
|
||||
})
|
||||
|
||||
minetest.register_alias(modname .. ":micro_" .. subname .. "_bottom", modname .. ":micro_" .. subname)
|
||||
elseif category == "panel" and alternate == "" then
|
||||
minetest.register_craft({
|
||||
output = modname .. ":panel_" .. subname .. " 12",
|
||||
recipe = {
|
||||
{recipeitem, ""},
|
||||
{recipeitem, recipeitem},
|
||||
},
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = modname .. ":panel_" .. subname .. " 12",
|
||||
recipe = {
|
||||
{"", recipeitem},
|
||||
{recipeitem, recipeitem},
|
||||
},
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
type = "shapeless",
|
||||
output = modname .. ":panel_" .. subname,
|
||||
recipe = {modname .. ":micro_" .. subname, modname .. ":micro_" .. subname},
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
type = "shapeless",
|
||||
output = recipeitem,
|
||||
recipe = {modname .. ":panel_" .. subname, modname .. ":panel_" .. subname, modname .. ":panel_" .. subname, modname .. ":panel_" .. subname},
|
||||
})
|
||||
|
||||
minetest.register_alias(modname.. ":panel_" ..subname.. "_bottom", modname.. ":panel_" ..subname)
|
||||
elseif category == "slab" then
|
||||
if alternate == "" then
|
||||
minetest.register_craft({
|
||||
output = modname .. ":slab_" .. subname .. " 6",
|
||||
recipe = {{recipeitem, recipeitem, recipeitem}},
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
type = "shapeless",
|
||||
output = modname .. ":slab_" .. subname,
|
||||
recipe = {modname .. ":micro_" .. subname, modname .. ":micro_" .. subname, modname .. ":micro_" .. subname, modname .. ":micro_" .. subname},
|
||||
})
|
||||
|
||||
-- uncomment this rule when conflict is no longer likely to happen
|
||||
-- https://github.com/minetest/minetest/issues/2881
|
||||
-- minetest.register_craft({
|
||||
-- type = "shapeless",
|
||||
-- output = modname .. ":slab_" .. subname,
|
||||
-- recipe = {modname .. ":panel_" .. subname, modname .. ":panel_" .. subname},
|
||||
-- })
|
||||
|
||||
-- then remove these two
|
||||
minetest.register_craft({
|
||||
output = modname .. ":slab_" .. subname,
|
||||
recipe = {{modname .. ":panel_" .. subname, modname .. ":panel_" .. subname}},
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = modname .. ":slab_" .. subname,
|
||||
recipe = {
|
||||
{modname .. ":panel_" .. subname},
|
||||
{modname .. ":panel_" .. subname},
|
||||
},
|
||||
})
|
||||
------------------------------
|
||||
|
||||
minetest.register_craft({
|
||||
type = "shapeless",
|
||||
output = recipeitem,
|
||||
recipe = {modname .. ":slab_" .. subname, modname .. ":slab_" .. subname},
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
type = "shapeless",
|
||||
output = modname .. ":slab_" .. subname .. " 3",
|
||||
recipe = {modname .. ":stair_" .. subname, modname .. ":stair_" .. subname},
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
type = "shapeless",
|
||||
output = modname .. ":slab_" .. subname,
|
||||
recipe = {modname .. ":slab_" .. subname .. "_quarter", modname .. ":slab_" .. subname .. "_quarter"},
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
type = "shapeless",
|
||||
output = modname .. ":slab_" .. subname,
|
||||
recipe = {modname .. ":slab_" .. subname .. "_2", modname .. ":slab_" .. subname .. "_2", modname .. ":slab_" .. subname .. "_2", modname .. ":slab_" .. subname .. "_2"},
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
type = "shapeless",
|
||||
output = modname .. ":slab_" .. subname,
|
||||
recipe = {modname .. ":slab_" .. subname .. "_1", modname .. ":slab_" .. subname .. "_1", modname .. ":slab_" .. subname .. "_1", modname .. ":slab_" .. subname .. "_1", modname .. ":slab_" .. subname .. "_1", modname .. ":slab_" .. subname .. "_1", modname .. ":slab_" .. subname .. "_1", modname .. ":slab_" .. subname .. "_1"},
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
type = "shapeless",
|
||||
output = modname .. ":slab_" .. subname,
|
||||
recipe = {modname .. ":slope_" .. subname .. "_half", modname .. ":slope_" .. subname .. "_half"},
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
type = "shapeless",
|
||||
output = modname .. ":slab_" .. subname,
|
||||
recipe = {modname .. ":slope_" .. subname .. "_outer_half", modname .. ":slope_" .. subname .. "_inner_half"},
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
type = "shapeless",
|
||||
output = modname .. ":slab_" .. subname,
|
||||
recipe = {modname .. ":slope_" .. subname .. "_outer_cut_half", modname .. ":slope_" .. subname .. "_inner_cut_half"},
|
||||
})
|
||||
elseif alternate == "_quarter" then
|
||||
minetest.register_craft({
|
||||
type = "shapeless",
|
||||
output = recipeitem,
|
||||
recipe = {modname .. ":slab_" .. subname .. "_quarter", modname .. ":slab_" .. subname .. "_quarter", modname .. ":slab_" .. subname .. "_quarter", modname .. ":slab_" .. subname .. "_quarter"},
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
type = "shapeless",
|
||||
output = recipeitem,
|
||||
recipe = {modname .. ":slab_" .. subname .. "_three_quarter", modname .. ":slab_" .. subname .. "_quarter"},
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
type = "shapeless",
|
||||
output = modname .. ":slab_" .. subname .. "_quarter",
|
||||
recipe = {modname .. ":slab_" .. subname .. "_2", modname .. ":slab_" .. subname .. "_2"},
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
type = "shapeless",
|
||||
output = modname .. ":slab_" .. subname .. "_quarter",
|
||||
recipe = {modname .. ":slab_" .. subname .. "_1", modname .. ":slab_" .. subname .. "_1", modname .. ":slab_" .. subname .. "_1", modname .. ":slab_" .. subname .. "_1"},
|
||||
})
|
||||
elseif alternate == "_three_quarter" then
|
||||
minetest.register_craft({
|
||||
type = "shapeless",
|
||||
output = modname .. ":slab_" .. subname .. "_three_quarter",
|
||||
recipe = {modname .. ":slab_" .. subname, modname .. ":slab_" .. subname .. "_quarter"},
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
type = "shapeless",
|
||||
output = modname .. ":slab_" .. subname .. "_three_quarter",
|
||||
recipe = {modname .. ":slab_" .. subname .. "_quarter", modname .. ":slab_" .. subname .. "_quarter", modname .. ":slab_" .. subname .. "_quarter"},
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
type = "shapeless",
|
||||
output = modname .. ":slab_" .. subname .. "_three_quarter",
|
||||
recipe = {modname .. ":slab_" .. subname .. "_2", modname .. ":slab_" .. subname .. "_2", modname .. ":slab_" .. subname .. "_2", modname .. ":slab_" .. subname .. "_2", modname .. ":slab_" .. subname .. "_2", modname .. ":slab_" .. subname .. "_2"},
|
||||
})
|
||||
elseif alternate == "_2" then
|
||||
minetest.register_craft({
|
||||
type = "shapeless",
|
||||
output = recipeitem,
|
||||
recipe = {modname .. ":slab_" .. subname .. "_2", modname .. ":slab_" .. subname .. "_2", modname .. ":slab_" .. subname .. "_2", modname .. ":slab_" .. subname .. "_2", modname .. ":slab_" .. subname .. "_2", modname .. ":slab_" .. subname .. "_2", modname .. ":slab_" .. subname .. "_2", modname .. ":slab_" .. subname .. "_2"},
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
type = "shapeless",
|
||||
output = recipeitem,
|
||||
recipe = {modname .. ":slab_" .. subname .. "_14", modname .. ":slab_" .. subname .. "_2"},
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
type = "shapeless",
|
||||
output = modname .. ":slab_" .. subname .. "_2",
|
||||
recipe = {modname .. ":slab_" .. subname .. "_1", modname .. ":slab_" .. subname .. "_1"},
|
||||
})
|
||||
elseif alternate == "_14" then
|
||||
minetest.register_craft({
|
||||
type = "shapeless",
|
||||
output = modname .. ":slab_" .. subname .. "_14",
|
||||
recipe = {modname .. ":slab_" .. subname .. "_three_quarter", modname .. ":slab_" .. subname .. "_2"},
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
type = "shapeless",
|
||||
output = modname .. ":slab_" .. subname .. "_14",
|
||||
recipe = {modname .. ":slab_" .. subname .. "_2", modname .. ":slab_" .. subname .. "_2", modname .. ":slab_" .. subname .. "_2", modname .. ":slab_" .. subname .. "_2", modname .. ":slab_" .. subname .. "_2", modname .. ":slab_" .. subname .. "_2", modname .. ":slab_" .. subname .. "_2"},
|
||||
})
|
||||
elseif alternate == "_15" then
|
||||
minetest.register_craft({
|
||||
type = "shapeless",
|
||||
output = recipeitem,
|
||||
recipe = {modname .. ":slab_" .. subname .. "_15", modname .. ":slab_" .. subname .. "_1"},
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
type = "shapeless",
|
||||
output = modname .. ":slab_" .. subname .. "_15",
|
||||
recipe = {modname .. ":slab_" .. subname .. "_14", modname .. ":slab_" .. subname .. "_1"},
|
||||
})
|
||||
end
|
||||
elseif category == "slope" then
|
||||
if alternate == "" then
|
||||
minetest.register_craft({
|
||||
type = "shapeless",
|
||||
output = recipeitem,
|
||||
recipe = {modname .. ":slope_" .. subname, modname .. ":slope_" .. subname},
|
||||
})
|
||||
elseif alternate == "_half" then
|
||||
minetest.register_craft({
|
||||
type = "shapeless",
|
||||
output = recipeitem,
|
||||
recipe = {modname .. ":slope_" .. subname .. "_half", modname .. ":slope_" .. subname .. "_half_raised"},
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
type = "shapeless",
|
||||
output = recipeitem,
|
||||
recipe = {modname .. ":slope_" .. subname .. "_half", modname .. ":slope_" .. subname .. "_half",
|
||||
modname .. ":slope_" .. subname .. "_half", modname .. ":slope_" .. subname .. "_half"},
|
||||
})
|
||||
elseif alternate == "_outer" then
|
||||
minetest.register_craft({
|
||||
type = "shapeless",
|
||||
output = recipeitem,
|
||||
recipe = {modname .. ":slope_" .. subname .. "_outer", modname .. ":slope_" .. subname .. "_inner"},
|
||||
})
|
||||
elseif alternate == "_outer_half" then
|
||||
minetest.register_craft({
|
||||
type = "shapeless",
|
||||
output = recipeitem,
|
||||
recipe = {modname .. ":slope_" .. subname .. "_outer_half", modname .. ":slope_" .. subname .. "_inner_half_raised"},
|
||||
})
|
||||
elseif alternate == "_inner_half" then
|
||||
minetest.register_craft({
|
||||
type = "shapeless",
|
||||
output = recipeitem,
|
||||
recipe = {modname .. ":slope_" .. subname .. "_outer_half_raised", modname .. ":slope_" .. subname .. "_inner_half"},
|
||||
})
|
||||
elseif alternate == "_outer_cut" then
|
||||
minetest.register_craft({
|
||||
type = "shapeless",
|
||||
output = recipeitem,
|
||||
recipe = {modname .. ":slope_" .. subname .. "_outer_cut", modname .. ":slope_" .. subname .. "_inner_cut"},
|
||||
})
|
||||
elseif alternate == "_outer_cut_half" then
|
||||
minetest.register_craft({
|
||||
type = "shapeless",
|
||||
output = recipeitem,
|
||||
recipe = {modname .. ":slope_" .. subname .. "_outer_cut_half", modname .. ":slope_" .. subname .. "_inner_cut_half_raised"},
|
||||
})
|
||||
elseif alternate == "_cut" then
|
||||
minetest.register_craft({
|
||||
type = "shapeless",
|
||||
output = recipeitem,
|
||||
recipe = {modname .. ":slope_" .. subname .. "_cut", modname .. ":slope_" .. subname .. "_cut"},
|
||||
})
|
||||
elseif alternate == "_half_raised" then
|
||||
minetest.register_craft({
|
||||
type = "shapeless",
|
||||
output = modname .. ":slope_" .. subname .. "_half_raised",
|
||||
recipe = {modname .. ":slope_" .. subname .. "_half", modname .. ":slope_" .. subname .. "_half",
|
||||
modname .. ":slope_" .. subname .. "_half"},
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
type = "shapeless",
|
||||
output = modname .. ":slope_" .. subname .. "_half_raised",
|
||||
recipe = {modname .. ":slab_" .. subname, modname .. ":slope_" .. subname .. "_half"},
|
||||
})
|
||||
elseif alternate == "_inner_half_raised" then
|
||||
minetest.register_craft({
|
||||
type = "shapeless",
|
||||
output = modname .. ":slope_" .. subname .. "_inner_half_raised",
|
||||
recipe = {modname .. ":slab_" .. subname, modname .. ":slope_" .. subname .. "_inner_half"},
|
||||
})
|
||||
elseif alternate == "_outer_half_raised" then
|
||||
minetest.register_craft({
|
||||
type = "shapeless",
|
||||
output = modname .. ":slope_" .. subname .. "_outer_half_raised",
|
||||
recipe = {modname .. ":slab_" .. subname, modname .. ":slope_" .. subname .. "_outer_half"},
|
||||
})
|
||||
elseif alternate == "_inner_cut_half_raised" then
|
||||
minetest.register_craft({
|
||||
type = "shapeless",
|
||||
output = modname .. ":slope_" .. subname .. "_inner_cut_half_raised",
|
||||
recipe = {modname .. ":slab_" .. subname, modname .. ":slope_" .. subname .. "_inner_cut_half"},
|
||||
})
|
||||
end
|
||||
elseif category == "stair" then
|
||||
if alternate == "" then
|
||||
minetest.register_craft({
|
||||
output = modname .. ":stair_" .. subname .. " 8",
|
||||
recipe = {
|
||||
{recipeitem, "", ""},
|
||||
{recipeitem, recipeitem, ""},
|
||||
{recipeitem, recipeitem, recipeitem},
|
||||
},
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = modname .. ":stair_" .. subname .. " 8",
|
||||
recipe = {
|
||||
{"", "", recipeitem},
|
||||
{"", recipeitem, recipeitem},
|
||||
{recipeitem, recipeitem, recipeitem},
|
||||
},
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
type = "shapeless",
|
||||
output = modname .. ":stair_" .. subname,
|
||||
recipe = {modname .. ":panel_" .. subname, modname .. ":slab_" .. subname},
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
type = "shapeless",
|
||||
output = modname .. ":stair_" .. subname,
|
||||
recipe = {modname .. ":panel_" .. subname, modname .. ":panel_" .. subname, modname .. ":panel_" .. subname},
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
type = "shapeless",
|
||||
output = modname .. ":stair_" .. subname,
|
||||
recipe = {modname .. ":micro_" .. subname, modname .. ":micro_" .. subname, modname .. ":micro_" .. subname, modname .. ":micro_" .. subname, modname .. ":micro_" .. subname, modname .. ":micro_" .. subname},
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
type = "shapeless",
|
||||
output = modname .. ":stair_" .. subname,
|
||||
recipe = {modname .. ":panel_" .. subname, modname .. ":panel_" .. subname, modname .. ":panel_" .. subname},
|
||||
})
|
||||
elseif alternate == "_inner" then
|
||||
minetest.register_craft({
|
||||
type = "shapeless",
|
||||
output = modname .. ":stair_" .. subname .. "_inner",
|
||||
recipe = {modname .. ":micro_" .. subname, modname .. ":micro_" .. subname, modname .. ":micro_" .. subname, modname .. ":micro_" .. subname, modname .. ":micro_" .. subname, modname .. ":micro_" .. subname, modname .. ":micro_" .. subname},
|
||||
})
|
||||
elseif alternate == "_outer" then
|
||||
minetest.register_craft({
|
||||
type = "shapeless",
|
||||
output = modname .. ":stair_" .. subname .. "_outer",
|
||||
recipe = {modname .. ":micro_" .. subname, modname .. ":slab_" .. subname},
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
type = "shapeless",
|
||||
output = modname .. ":stair_" .. subname .. "_outer",
|
||||
recipe = {modname .. ":micro_" .. subname, modname .. ":micro_" .. subname, modname .. ":micro_" .. subname, modname .. ":micro_" .. subname, modname .. ":micro_" .. subname},
|
||||
})
|
||||
elseif alternate == "_half" then
|
||||
minetest.register_craft({
|
||||
type = "shapeless",
|
||||
output = modname .. ":stair_" .. subname .. "_half",
|
||||
recipe = {modname .. ":micro_" .. subname, modname .. ":micro_" .. subname, modname .. ":micro_" .. subname},
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
type = "shapeless",
|
||||
output = modname .. ":stair_" .. subname .. "_half",
|
||||
recipe = {modname .. ":panel_" .. subname, modname .. ":micro_" .. subname},
|
||||
})
|
||||
elseif alternate == "_right_half" then
|
||||
minetest.register_craft({
|
||||
type = "shapeless",
|
||||
output = modname .. ":stair_" .. subname .. "_right_half",
|
||||
recipe = {modname .. ":stair_" .. subname .. "_half"},
|
||||
})
|
||||
elseif alternate == "_alt" then
|
||||
minetest.register_craft({ -- See mirrored variation of the recipe below.
|
||||
output = modname .. ":stair_" .. subname .. "_alt",
|
||||
recipe = {
|
||||
{modname .. ":panel_" .. subname, ""},
|
||||
{"" , modname .. ":panel_" .. subname},
|
||||
},
|
||||
})
|
||||
|
||||
minetest.register_craft({ -- Mirrored variation of the recipe above.
|
||||
output = modname .. ":stair_" .. subname .. "_alt",
|
||||
recipe = {
|
||||
{"" , modname .. ":panel_" .. subname},
|
||||
{modname .. ":panel_" .. subname, ""},
|
||||
},
|
||||
})
|
||||
end
|
||||
end
|
||||
end
|
@ -42,154 +42,4 @@ function stairsplus:register_slab(modname, subname, recipeitem, fields)
|
||||
end
|
||||
|
||||
circular_saw.known_nodes[recipeitem] = {modname, subname}
|
||||
|
||||
-- Some saw-less recipes:
|
||||
|
||||
minetest.register_craft({
|
||||
output = modname .. ":slab_" .. subname .. " 6",
|
||||
recipe = {{recipeitem, recipeitem, recipeitem}},
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
type = "shapeless",
|
||||
output = modname .. ":slab_" .. subname,
|
||||
recipe = {modname .. ":micro_" .. subname, modname .. ":micro_" .. subname, modname .. ":micro_" .. subname, modname .. ":micro_" .. subname},
|
||||
})
|
||||
|
||||
-- uncomment this rule when conflict is no longer likely to happen
|
||||
-- https://github.com/minetest/minetest/issues/2881
|
||||
-- minetest.register_craft({
|
||||
-- type = "shapeless",
|
||||
-- output = modname .. ":slab_" .. subname,
|
||||
-- recipe = {modname .. ":panel_" .. subname, modname .. ":panel_" .. subname},
|
||||
-- })
|
||||
|
||||
-- then remove these two
|
||||
minetest.register_craft({
|
||||
output = modname .. ":slab_" .. subname,
|
||||
recipe = {{modname .. ":panel_" .. subname, modname .. ":panel_" .. subname}},
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = modname .. ":slab_" .. subname,
|
||||
recipe = {
|
||||
{modname .. ":panel_" .. subname},
|
||||
{modname .. ":panel_" .. subname},
|
||||
},
|
||||
})
|
||||
------------------------------
|
||||
|
||||
minetest.register_craft({
|
||||
type = "shapeless",
|
||||
output = recipeitem,
|
||||
recipe = {modname .. ":slab_" .. subname, modname .. ":slab_" .. subname},
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
type = "shapeless",
|
||||
output = recipeitem,
|
||||
recipe = {modname .. ":slab_" .. subname .. "_quarter", modname .. ":slab_" .. subname .. "_quarter", modname .. ":slab_" .. subname .. "_quarter", modname .. ":slab_" .. subname .. "_quarter"},
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
type = "shapeless",
|
||||
output = recipeitem,
|
||||
recipe = {modname .. ":slab_" .. subname .. "_2", modname .. ":slab_" .. subname .. "_2", modname .. ":slab_" .. subname .. "_2", modname .. ":slab_" .. subname .. "_2", modname .. ":slab_" .. subname .. "_2", modname .. ":slab_" .. subname .. "_2", modname .. ":slab_" .. subname .. "_2", modname .. ":slab_" .. subname .. "_2"},
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
type = "shapeless",
|
||||
output = recipeitem,
|
||||
recipe = {modname .. ":slab_" .. subname .. "_three_quarter", modname .. ":slab_" .. subname .. "_quarter"},
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
type = "shapeless",
|
||||
output = recipeitem,
|
||||
recipe = {modname .. ":slab_" .. subname .. "_14", modname .. ":slab_" .. subname .. "_2"},
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
type = "shapeless",
|
||||
output = recipeitem,
|
||||
recipe = {modname .. ":slab_" .. subname .. "_15", modname .. ":slab_" .. subname .. "_1"},
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
type = "shapeless",
|
||||
output = modname .. ":slab_" .. subname,
|
||||
recipe = {modname .. ":slab_" .. subname .. "_quarter", modname .. ":slab_" .. subname .. "_quarter"},
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
type = "shapeless",
|
||||
output = modname .. ":slab_" .. subname,
|
||||
recipe = {modname .. ":slab_" .. subname .. "_2", modname .. ":slab_" .. subname .. "_2", modname .. ":slab_" .. subname .. "_2", modname .. ":slab_" .. subname .. "_2"},
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
type = "shapeless",
|
||||
output = modname .. ":slab_" .. subname,
|
||||
recipe = {modname .. ":slab_" .. subname .. "_1", modname .. ":slab_" .. subname .. "_1", modname .. ":slab_" .. subname .. "_1", modname .. ":slab_" .. subname .. "_1", modname .. ":slab_" .. subname .. "_1", modname .. ":slab_" .. subname .. "_1", modname .. ":slab_" .. subname .. "_1", modname .. ":slab_" .. subname .. "_1"},
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
type = "shapeless",
|
||||
output = modname .. ":slab_" .. subname .. "_quarter",
|
||||
recipe = {modname .. ":slab_" .. subname .. "_2", modname .. ":slab_" .. subname .. "_2"},
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
type = "shapeless",
|
||||
output = modname .. ":slab_" .. subname .. "_quarter",
|
||||
recipe = {modname .. ":slab_" .. subname .. "_1", modname .. ":slab_" .. subname .. "_1", modname .. ":slab_" .. subname .. "_1", modname .. ":slab_" .. subname .. "_1"},
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
type = "shapeless",
|
||||
output = modname .. ":slab_" .. subname .. "_2",
|
||||
recipe = {modname .. ":slab_" .. subname .. "_1", modname .. ":slab_" .. subname .. "_1"},
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
type = "shapeless",
|
||||
output = modname .. ":slab_" .. subname .. "_three_quarter",
|
||||
recipe = {modname .. ":slab_" .. subname, modname .. ":slab_" .. subname .. "_quarter"},
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
type = "shapeless",
|
||||
output = modname .. ":slab_" .. subname .. "_three_quarter",
|
||||
recipe = {modname .. ":slab_" .. subname .. "_quarter", modname .. ":slab_" .. subname .. "_quarter", modname .. ":slab_" .. subname .. "_quarter"},
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
type = "shapeless",
|
||||
output = modname .. ":slab_" .. subname .. "_three_quarter",
|
||||
recipe = {modname .. ":slab_" .. subname .. "_2", modname .. ":slab_" .. subname .. "_2", modname .. ":slab_" .. subname .. "_2", modname .. ":slab_" .. subname .. "_2", modname .. ":slab_" .. subname .. "_2", modname .. ":slab_" .. subname .. "_2"},
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
type = "shapeless",
|
||||
output = modname .. ":slab_" .. subname .. "_14",
|
||||
recipe = {modname .. ":slab_" .. subname .. "_three_quarter", modname .. ":slab_" .. subname .. "_2"},
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
type = "shapeless",
|
||||
output = modname .. ":slab_" .. subname .. "_14",
|
||||
recipe = {modname .. ":slab_" .. subname .. "_2", modname .. ":slab_" .. subname .. "_2", modname .. ":slab_" .. subname .. "_2", modname .. ":slab_" .. subname .. "_2", modname .. ":slab_" .. subname .. "_2", modname .. ":slab_" .. subname .. "_2", modname .. ":slab_" .. subname .. "_2"},
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
type = "shapeless",
|
||||
output = modname .. ":slab_" .. subname .. "_15",
|
||||
recipe = {modname .. ":slab_" .. subname .. "_14", modname .. ":slab_" .. subname .. "_1"},
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
type = "shapeless",
|
||||
output = modname .. ":slab_" .. subname .. " 3",
|
||||
recipe = {modname .. ":stair_" .. subname, modname .. ":stair_" .. subname},
|
||||
})
|
||||
end
|
||||
|
@ -41,110 +41,4 @@ function stairsplus:register_slope(modname, subname, recipeitem, fields)
|
||||
end
|
||||
|
||||
circular_saw.known_nodes[recipeitem] = {modname, subname}
|
||||
|
||||
-- Some saw-less recipes:
|
||||
|
||||
minetest.register_craft({
|
||||
type = "shapeless",
|
||||
output = recipeitem,
|
||||
recipe = {modname .. ":slope_" .. subname, modname .. ":slope_" .. subname},
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
type = "shapeless",
|
||||
output = recipeitem,
|
||||
recipe = {modname .. ":slope_" .. subname .. "_half", modname .. ":slope_" .. subname .. "_half_raised"},
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
type = "shapeless",
|
||||
output = recipeitem,
|
||||
recipe = {modname .. ":slope_" .. subname .. "_half", modname .. ":slope_" .. subname .. "_half",
|
||||
modname .. ":slope_" .. subname .. "_half", modname .. ":slope_" .. subname .. "_half"},
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
type = "shapeless",
|
||||
output = recipeitem,
|
||||
recipe = {modname .. ":slope_" .. subname .. "_outer", modname .. ":slope_" .. subname .. "_inner"},
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
type = "shapeless",
|
||||
output = recipeitem,
|
||||
recipe = {modname .. ":slope_" .. subname .. "_outer_half", modname .. ":slope_" .. subname .. "_inner_half_raised"},
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
type = "shapeless",
|
||||
output = recipeitem,
|
||||
recipe = {modname .. ":slope_" .. subname .. "_outer_half_raised", modname .. ":slope_" .. subname .. "_inner_half"},
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
type = "shapeless",
|
||||
output = recipeitem,
|
||||
recipe = {modname .. ":slope_" .. subname .. "_outer_cut", modname .. ":slope_" .. subname .. "_inner_cut"},
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
type = "shapeless",
|
||||
output = recipeitem,
|
||||
recipe = {modname .. ":slope_" .. subname .. "_outer_cut_half", modname .. ":slope_" .. subname .. "_inner_cut_half_raised"},
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
type = "shapeless",
|
||||
output = recipeitem,
|
||||
recipe = {modname .. ":slope_" .. subname .. "_cut", modname .. ":slope_" .. subname .. "_cut"},
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
type = "shapeless",
|
||||
output = modname .. ":slab_" .. subname,
|
||||
recipe = {modname .. ":slope_" .. subname .. "_half", modname .. ":slope_" .. subname .. "_half"},
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
type = "shapeless",
|
||||
output = modname .. ":slab_" .. subname,
|
||||
recipe = {modname .. ":slope_" .. subname .. "_outer_half", modname .. ":slope_" .. subname .. "_inner_half"},
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
type = "shapeless",
|
||||
output = modname .. ":slab_" .. subname,
|
||||
recipe = {modname .. ":slope_" .. subname .. "_outer_cut_half", modname .. ":slope_" .. subname .. "_inner_cut_half"},
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
type = "shapeless",
|
||||
output = modname .. ":slope_" .. subname .. "_half_raised",
|
||||
recipe = {modname .. ":slope_" .. subname .. "_half", modname .. ":slope_" .. subname .. "_half",
|
||||
modname .. ":slope_" .. subname .. "_half"},
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
type = "shapeless",
|
||||
output = modname .. ":slope_" .. subname .. "_half_raised",
|
||||
recipe = {modname .. ":slab_" .. subname, modname .. ":slope_" .. subname .. "_half"},
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
type = "shapeless",
|
||||
output = modname .. ":slope_" .. subname .. "_inner_half_raised",
|
||||
recipe = {modname .. ":slab_" .. subname, modname .. ":slope_" .. subname .. "_inner_half"},
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
type = "shapeless",
|
||||
output = modname .. ":slope_" .. subname .. "_outer_half_raised",
|
||||
recipe = {modname .. ":slab_" .. subname, modname .. ":slope_" .. subname .. "_outer_half"},
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
type = "shapeless",
|
||||
output = modname .. ":slope_" .. subname .. "_inner_cut_half_raised",
|
||||
recipe = {modname .. ":slab_" .. subname, modname .. ":slope_" .. subname .. "_inner_cut_half"},
|
||||
})
|
||||
end
|
||||
|
@ -41,100 +41,4 @@ function stairsplus:register_stair(modname, subname, recipeitem, fields)
|
||||
end
|
||||
|
||||
circular_saw.known_nodes[recipeitem] = {modname, subname}
|
||||
|
||||
-- Some saw-less recipes:
|
||||
|
||||
minetest.register_craft({
|
||||
output = modname .. ":stair_" .. subname .. " 8",
|
||||
recipe = {
|
||||
{recipeitem, "", ""},
|
||||
{recipeitem, recipeitem, ""},
|
||||
{recipeitem, recipeitem, recipeitem},
|
||||
},
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = modname .. ":stair_" .. subname .. " 8",
|
||||
recipe = {
|
||||
{"", "", recipeitem},
|
||||
{"", recipeitem, recipeitem},
|
||||
{recipeitem, recipeitem, recipeitem},
|
||||
},
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
type = "shapeless",
|
||||
output = modname .. ":stair_" .. subname,
|
||||
recipe = {modname .. ":panel_" .. subname, modname .. ":slab_" .. subname},
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
type = "shapeless",
|
||||
output = modname .. ":stair_" .. subname,
|
||||
recipe = {modname .. ":panel_" .. subname, modname .. ":panel_" .. subname, modname .. ":panel_" .. subname},
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
type = "shapeless",
|
||||
output = modname .. ":stair_" .. subname .. "_outer",
|
||||
recipe = {modname .. ":micro_" .. subname, modname .. ":slab_" .. subname},
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
type = "shapeless",
|
||||
output = modname .. ":stair_" .. subname .. "_half",
|
||||
recipe = {modname .. ":micro_" .. subname, modname .. ":micro_" .. subname, modname .. ":micro_" .. subname},
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
type = "shapeless",
|
||||
output = modname .. ":stair_" .. subname .. "_half",
|
||||
recipe = {modname .. ":panel_" .. subname, modname .. ":micro_" .. subname},
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
type = "shapeless",
|
||||
output = modname .. ":stair_" .. subname .. "_right_half",
|
||||
recipe = {modname .. ":stair_" .. subname .. "_half"},
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
type = "shapeless",
|
||||
output = modname .. ":stair_" .. subname,
|
||||
recipe = {modname .. ":micro_" .. subname, modname .. ":micro_" .. subname, modname .. ":micro_" .. subname, modname .. ":micro_" .. subname, modname .. ":micro_" .. subname, modname .. ":micro_" .. subname},
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
type = "shapeless",
|
||||
output = modname .. ":stair_" .. subname .. "_inner",
|
||||
recipe = {modname .. ":micro_" .. subname, modname .. ":micro_" .. subname, modname .. ":micro_" .. subname, modname .. ":micro_" .. subname, modname .. ":micro_" .. subname, modname .. ":micro_" .. subname, modname .. ":micro_" .. subname},
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
type = "shapeless",
|
||||
output = modname .. ":stair_" .. subname .. "_outer",
|
||||
recipe = {modname .. ":micro_" .. subname, modname .. ":micro_" .. subname, modname .. ":micro_" .. subname, modname .. ":micro_" .. subname, modname .. ":micro_" .. subname},
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
type = "shapeless",
|
||||
output = modname .. ":stair_" .. subname,
|
||||
recipe = {modname .. ":panel_" .. subname, modname .. ":panel_" .. subname, modname .. ":panel_" .. subname},
|
||||
})
|
||||
|
||||
minetest.register_craft({ -- See mirrored variation of the recipe below.
|
||||
output = modname .. ":stair_" .. subname .. "_alt",
|
||||
recipe = {
|
||||
{modname .. ":panel_" .. subname, ""},
|
||||
{"" , modname .. ":panel_" .. subname},
|
||||
},
|
||||
})
|
||||
|
||||
minetest.register_craft({ -- Mirrored variation of the recipe above.
|
||||
output = modname .. ":stair_" .. subname .. "_alt",
|
||||
recipe = {
|
||||
{"" , modname .. ":panel_" .. subname},
|
||||
{modname .. ":panel_" .. subname, ""},
|
||||
},
|
||||
})
|
||||
end
|
||||
|
Loading…
Reference in New Issue
Block a user