diff options
Diffstat (limited to 'stairsplus/stairs.lua')
-rw-r--r-- | stairsplus/stairs.lua | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/stairsplus/stairs.lua b/stairsplus/stairs.lua index 3be0e23..dde6d50 100644 --- a/stairsplus/stairs.lua +++ b/stairsplus/stairs.lua @@ -10,7 +10,7 @@ local S = moreblocks.intllib -- Node will be called <modname>:stair_<subname> function register_stair(modname, subname, recipeitem, groups, images, description, drop, light) - return stairsplus:register_stair(modname, subname, recipeitem, { + stairsplus:register_stair(modname, subname, recipeitem, { groups = groups, tiles = images, description = description, @@ -108,14 +108,15 @@ function stairsplus:register_stair(modname, subname, recipeitem, fields) local desc = S("%s Stairs"):format(fields.description) for alternate, def in pairs(defs) do + for k, v in pairs(fields) do + def[k] = v + end def.drawtype = "nodebox" def.paramtype = "light" def.paramtype2 = "facedir" def.on_place = minetest.rotate_node - for k, v in pairs(fields) do - def[k] = v - end def.description = desc + def.groups = stairsplus:prepare_groups(fields.groups) if fields.drop then def.drop = modname .. ":stair_" .. fields.drop .. alternate end @@ -123,6 +124,8 @@ function stairsplus:register_stair(modname, subname, recipeitem, fields) end minetest.register_alias("stairs:stair_" .. subname, modname .. ":stair_" .. subname) + circular_saw.known_nodes[recipeitem] = {modname, subname} + -- Some saw-less recipes: minetest.register_craft({ |