Fix minetest.dig_node returning true when node isn't diggable (#10890)

This commit is contained in:
rubenwardy 2021-01-31 18:49:51 +00:00 committed by Nils Dagsson Moskopp
parent d5b8f2f904
commit a63c18ab3e
Signed by: erle
GPG Key ID: A3BC671C35191080
1 changed files with 4 additions and 2 deletions

View File

@ -557,7 +557,7 @@ function core.node_dig(pos, node, digger)
log("info", diggername .. " tried to dig "
.. node.name .. " which is not diggable "
.. core.pos_to_string(pos))
return
return false
end
if core.is_protected(pos, diggername) then
@ -566,7 +566,7 @@ function core.node_dig(pos, node, digger)
.. " at protected position "
.. core.pos_to_string(pos))
core.record_protection_violation(pos, diggername)
return
return false
end
log('action', diggername .. " digs "
@ -649,6 +649,8 @@ function core.node_dig(pos, node, digger)
local node_copy = {name=node.name, param1=node.param1, param2=node.param2}
callback(pos_copy, node_copy, digger)
end
return true
end
function core.itemstring_with_palette(item, palette_index)