aboutsummaryrefslogtreecommitdiff
path: root/stairsplus/slabs.lua
diff options
context:
space:
mode:
authorThomas--S <Thomas--S@users.noreply.github.com>2016-06-17 21:15:02 +0200
committerAuke Kok <sofar+github@foo-projects.org>2016-06-17 12:15:02 -0700
commitdb93277a988001bcce2a2d10999897be7b8ee017 (patch)
tree02c7ddb28d05202a427cb8fa2259cb660a434cb0 /stairsplus/slabs.lua
parent30fba0ea40edddb2ccff5dc07b8acef4136df4f1 (diff)
downloadmoreblocks-db93277a988001bcce2a2d10999897be7b8ee017.tar.gz
moreblocks-db93277a988001bcce2a2d10999897be7b8ee017.tar.bz2
moreblocks-db93277a988001bcce2a2d10999897be7b8ee017.zip
Add support for the alternative drop syntax (#46)
Until now, when the moreblocks node for a node with the alternative drop syntax were registered, the game crashed.
Diffstat (limited to 'stairsplus/slabs.lua')
-rw-r--r--stairsplus/slabs.lua2
1 files changed, 1 insertions, 1 deletions
diff --git a/stairsplus/slabs.lua b/stairsplus/slabs.lua
index cc3502c..e184981 100644
--- a/stairsplus/slabs.lua
+++ b/stairsplus/slabs.lua
@@ -48,7 +48,7 @@ function stairsplus:register_slab(modname, subname, recipeitem, fields)
def.on_place = minetest.rotate_node
def.description = ("%s (%d/16)"):format(desc_base, num)
def.groups = stairsplus:prepare_groups(fields.groups)
- if fields.drop then
+ if fields.drop and not type(fields.drop) == "table" then
def.drop = modname.. ":slab_" .. fields.drop .. alternate
end
minetest.register_node(":" .. modname .. ":slab_" .. subname .. alternate, def)