Code cleanup, new Stairs+ recipes.

This commit is contained in:
Calinou
2014-07-21 12:24:49 +02:00
parent 28741bf242
commit f7916005c2
11 changed files with 136 additions and 98 deletions

View File

@ -115,11 +115,11 @@ function stairsplus:register_stair(modname, subname, recipeitem, fields)
end
def.description = desc
if fields.drop then
def.drop = modname..":stair_"..fields.drop..alternate
def.drop = modname.. ":stair_" ..fields.drop..alternate
end
minetest.register_node(":"..modname..":stair_"..subname..alternate, def)
minetest.register_node(":" ..modname.. ":stair_" ..subname..alternate, def)
end
minetest.register_alias(":stairs:stair_"..subname, modname..":stair_"..subname)
minetest.register_alias(":stairs:stair_" ..subname, modname.. ":stair_" ..subname)
-- Some saw-less recipes:
@ -206,4 +206,20 @@ function stairsplus:register_stair(modname, subname, recipeitem, fields)
output = "moreblocks:stair_" .. subname,
recipe = {"moreblocks:panel_" .. subname, "moreblocks:panel_" .. subname, "moreblocks:panel_" .. subname},
})
minetest.register_craft({ -- See mirrored variation of the recipe below.
output = "moreblocks:stair_" .. subname .. "_alt",
recipe = {
{"moreblocks:panel_" .. subname, ""},
{"" , "moreblocks:panel_" .. subname},
},
})
minetest.register_craft({ -- Mirrored variation of the recipe above.
output = "moreblocks:stair_" .. subname .. "_alt",
recipe = {
{"" , "moreblocks:panel_" .. subname},
{"moreblocks:panel_" .. subname, ""},
},
})
end