diff options
author | 0gb.us <0gb.us@0gb.us> | 2013-10-28 17:25:10 -0700 |
---|---|---|
committer | ShadowNinja <noreply@gmail.com> | 2013-11-01 10:58:41 -0400 |
commit | 53ab2f8defa119477965b57218ec1f78c487a7e3 (patch) | |
tree | 15bfc7269285bd94eb62e158f15a254507d3c27e /builtin | |
parent | bd6d4666abe20247437ede28f73955d413fe5e22 (diff) | |
download | minetest-53ab2f8defa119477965b57218ec1f78c487a7e3.tar.gz minetest-53ab2f8defa119477965b57218ec1f78c487a7e3.tar.bz2 minetest-53ab2f8defa119477965b57218ec1f78c487a7e3.zip |
Fixed ignoring of "diggable" property of nodes.
Diffstat (limited to 'builtin')
-rw-r--r-- | builtin/item.lua | 3 | ||||
-rw-r--r-- | builtin/misc_register.lua | 1 |
2 files changed, 2 insertions, 2 deletions
diff --git a/builtin/item.lua b/builtin/item.lua index 7f20d30c5..99614581d 100644 --- a/builtin/item.lua +++ b/builtin/item.lua @@ -370,8 +370,7 @@ end function minetest.node_dig(pos, node, digger) local def = ItemStack({name=node.name}):get_definition() - -- Check if def ~= 0 because we always want to be able to remove unknown nodes - if #def ~= 0 and not def.diggable or (def.can_dig and not def.can_dig(pos,digger)) then + if not def.diggable or (def.can_dig and not def.can_dig(pos,digger)) then minetest.log("info", digger:get_player_name() .. " tried to dig " .. node.name .. " which is not diggable " .. minetest.pos_to_string(pos)) diff --git a/builtin/misc_register.lua b/builtin/misc_register.lua index aa8399f16..242fe6092 100644 --- a/builtin/misc_register.lua +++ b/builtin/misc_register.lua @@ -270,6 +270,7 @@ minetest.register_item(":unknown", { on_place = minetest.item_place, on_drop = minetest.item_drop, groups = {not_in_creative_inventory=1}, + diggable = true, }) minetest.register_node(":air", { |