diff options
author | Diego MartÃnez <kaeza@users.sf.net> | 2013-04-05 02:51:31 -0300 |
---|---|---|
committer | PilzAdam <pilzadam@minetest.net> | 2013-04-05 15:14:37 +0200 |
commit | 2fb0e547a01a6e61b821737e61315bad3312e41e (patch) | |
tree | 505569dda61d277d3cbcd810f6a869fb08b78449 /builtin | |
parent | 1a5dcfd0c879ab5315b35de49ded26b93f83b45e (diff) | |
download | minetest-2fb0e547a01a6e61b821737e61315bad3312e41e.tar.gz minetest-2fb0e547a01a6e61b821737e61315bad3312e41e.tar.bz2 minetest-2fb0e547a01a6e61b821737e61315bad3312e41e.zip |
Use the nodebox as selection box if it's not set manually
Diffstat (limited to 'builtin')
-rw-r--r-- | builtin/misc_register.lua | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/builtin/misc_register.lua b/builtin/misc_register.lua index f9c06a02a..d1e28fdab 100644 --- a/builtin/misc_register.lua +++ b/builtin/misc_register.lua @@ -103,6 +103,10 @@ function minetest.register_item(name, itemdef) -- Apply defaults and add to registered_* table if itemdef.type == "node" then + -- Use the nodebox as selection box if it's not set manually + if itemdef.drawtype == "nodebox" and not itemdef.selection_box then + itemdef.selection_box = itemdef.node_box + end setmetatable(itemdef, {__index = minetest.nodedef_default}) minetest.registered_nodes[itemdef.name] = itemdef elseif itemdef.type == "craft" then |