diff options
Diffstat (limited to 'stairsplus/panels.lua')
-rw-r--r-- | stairsplus/panels.lua | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/stairsplus/panels.lua b/stairsplus/panels.lua index 2220fe4..4fb3f13 100644 --- a/stairsplus/panels.lua +++ b/stairsplus/panels.lua @@ -10,7 +10,7 @@ local S = moreblocks.intllib -- Node will be called <modname>:panel_<subname> function register_panel(modname, subname, recipeitem, groups, images, description, drop, light) - return stairsplus:register_panel(modname, subname, recipeitem, { + stairsplus:register_panel(modname, subname, recipeitem, { groups = groups, tiles = images, description = description, @@ -68,14 +68,15 @@ function stairsplus:register_panel(modname, subname, recipeitem, fields) local desc = S("%s Panel"):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.. ":panel_" ..fields.drop..alternate end @@ -83,6 +84,8 @@ function stairsplus:register_panel(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({ |