diff options
author | Calinou <Calinou@users.noreply.github.com> | 2015-11-06 17:28:01 +0100 |
---|---|---|
committer | Calinou <Calinou@users.noreply.github.com> | 2015-11-06 17:28:01 +0100 |
commit | d3ba90d012de2a6e0f2cff86083ace8ce1766cc4 (patch) | |
tree | c5266d8ad8ef63aaf424b05b3a334d1b02aacd56 /stairsplus/slopes.lua | |
parent | f02a871c30c302014dda49c278f62ccaf29dc620 (diff) | |
parent | 54a7102291c024315483d18d8f4c662fde45ce41 (diff) |
Merge pull request #24 from pyrollo/master
Make stairplus:register_* functions work without using register_all.
Diffstat (limited to 'stairsplus/slopes.lua')
-rw-r--r-- | stairsplus/slopes.lua | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/stairsplus/slopes.lua b/stairsplus/slopes.lua index da51657..49058e3 100644 --- a/stairsplus/slopes.lua +++ b/stairsplus/slopes.lua @@ -113,7 +113,7 @@ local box_slope_outer_half_raised = { -- Node will be called <modname>:slope_<subname> function register_slope(modname, subname, recipeitem, groups, images, description, drop, light) - return stairsplus:register_slope(modname, subname, recipeitem, { + stairsplus:register_slope(modname, subname, recipeitem, { groups = groups, tiles = images, description = description, @@ -222,20 +222,23 @@ function stairsplus:register_slope(modname, subname, recipeitem, fields) local desc = S("%s Slope"):format(fields.description) for alternate, def in pairs(defs) do + for k, v in pairs(fields) do + def[k] = v + end def.drawtype = "mesh" 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.. ":slope_" ..fields.drop..alternate end minetest.register_node(":" ..modname.. ":slope_" ..subname..alternate, def) end + circular_saw.known_nodes[recipeitem] = {modname, subname} + -- Some saw-less recipes: minetest.register_craft({ |