Fixed ignoring of "diggable" property of nodes.
parent
bd6d4666ab
commit
53ab2f8def
|
@ -370,8 +370,7 @@ end
|
||||||
|
|
||||||
function minetest.node_dig(pos, node, digger)
|
function minetest.node_dig(pos, node, digger)
|
||||||
local def = ItemStack({name=node.name}):get_definition()
|
local def = ItemStack({name=node.name}):get_definition()
|
||||||
-- Check if def ~= 0 because we always want to be able to remove unknown nodes
|
if not def.diggable or (def.can_dig and not def.can_dig(pos,digger)) then
|
||||||
if #def ~= 0 and 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 "
|
minetest.log("info", digger:get_player_name() .. " tried to dig "
|
||||||
.. node.name .. " which is not diggable "
|
.. node.name .. " which is not diggable "
|
||||||
.. minetest.pos_to_string(pos))
|
.. minetest.pos_to_string(pos))
|
||||||
|
|
|
@ -270,6 +270,7 @@ minetest.register_item(":unknown", {
|
||||||
on_place = minetest.item_place,
|
on_place = minetest.item_place,
|
||||||
on_drop = minetest.item_drop,
|
on_drop = minetest.item_drop,
|
||||||
groups = {not_in_creative_inventory=1},
|
groups = {not_in_creative_inventory=1},
|
||||||
|
diggable = true,
|
||||||
})
|
})
|
||||||
|
|
||||||
minetest.register_node(":air", {
|
minetest.register_node(":air", {
|
||||||
|
|
Loading…
Reference in New Issue