Skip to content

Commit

Permalink
Fixed ignoring of "diggable" property of nodes.
Browse files Browse the repository at this point in the history
  • Loading branch information
0gb-us authored and ShadowNinja committed Nov 1, 2013
1 parent bd6d466 commit 53ab2f8
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
3 changes: 1 addition & 2 deletions builtin/item.lua
Expand Up @@ -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))
Expand Down
1 change: 1 addition & 0 deletions builtin/misc_register.lua
Expand Up @@ -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", {
Expand Down

0 comments on commit 53ab2f8

Please sign in to comment.