aboutsummaryrefslogtreecommitdiff
path: root/builtin/misc_register.lua
diff options
context:
space:
mode:
authorWeblate <42@minetest.ru>2013-04-07 13:39:28 +0200
committerWeblate <42@minetest.ru>2013-04-07 13:39:28 +0200
commitfeb7de91ec34ef1ca3152270a7bc62b2e308f1bd (patch)
tree65c33378bae9b7ac565b979237b6d594b511171f /builtin/misc_register.lua
parent33052abf42886ef03c4f46196cab6f767259a672 (diff)
parent4468ea84e6d0faede5a01e8d97d359c537aa7ec8 (diff)
downloadminetest-feb7de91ec34ef1ca3152270a7bc62b2e308f1bd.tar.gz
minetest-feb7de91ec34ef1ca3152270a7bc62b2e308f1bd.tar.bz2
minetest-feb7de91ec34ef1ca3152270a7bc62b2e308f1bd.zip
Merge remote branch 'origin/master'
Diffstat (limited to 'builtin/misc_register.lua')
-rw-r--r--builtin/misc_register.lua12
1 files changed, 8 insertions, 4 deletions
diff --git a/builtin/misc_register.lua b/builtin/misc_register.lua
index f9c06a02a..4041fb9e2 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
@@ -249,8 +253,8 @@ minetest.register_item(":unknown", {
minetest.register_node(":air", {
description = "Air (you hacker you!)",
- inventory_image = "unknown_block.png",
- wield_image = "unknown_block.png",
+ inventory_image = "unknown_node.png",
+ wield_image = "unknown_node.png",
drawtype = "airlike",
paramtype = "light",
sunlight_propagates = true,
@@ -265,8 +269,8 @@ minetest.register_node(":air", {
minetest.register_node(":ignore", {
description = "Ignore (you hacker you!)",
- inventory_image = "unknown_block.png",
- wield_image = "unknown_block.png",
+ inventory_image = "unknown_node.png",
+ wield_image = "unknown_node.png",
drawtype = "airlike",
paramtype = "none",
sunlight_propagates = false,