Fixed ignoring of "diggable" property of nodes.
author0gb.us <0gb.us@0gb.us>
Tue, 29 Oct 2013 00:25:10 +0000 (17:25 -0700)
committerShadowNinja <noreply@gmail.com>
Fri, 1 Nov 2013 14:58:41 +0000 (10:58 -0400)
builtin/item.lua
builtin/misc_register.lua

index 7f20d30c583aa8939af7aa8442d490c55da0b46c..99614581d441fffcea52908a3fddebce021ce962 100644 (file)
@@ -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))
index aa8399f1631770845fc18316b04df05a7905e25f..242fe60928ea9929ccc0cf6a919e85401818f735 100644 (file)
@@ -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", {