Skip to content

Commit

Permalink
Do the fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
Emojigit committed Aug 3, 2024
1 parent f19fa6e commit b49153c
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions mods/default/functions.lua
Original file line number Diff line number Diff line change
Expand Up @@ -313,11 +313,11 @@ function default.dig_up(pos, node, digger, max_height)
break
end
local noerr, success = xpcall(function()
minetest.dig_node(up_pos, digger)
return minetest.dig_node(up_pos, digger)
end, function(...)
in_dig_up = false
minetest.log("error", "Error raised during `default.dig_up` call:")
for line in debug.traceback(...):gmatch("([^\n]*)\n?") do
local errmsg = "Error raised during `default.dig_up` call: " .. minetest.error_handler(...)
for line in errmsg:gmatch("([^\n]*)\n?") do
minetest.log("error", line)
end
end)
Expand All @@ -330,6 +330,9 @@ function default.dig_up(pos, node, digger, max_height)
in_dig_up = false
end

minetest.register_globalstep(function()
in_dig_up = false
end)

--
-- Fence registration helper
Expand Down

0 comments on commit b49153c

Please sign in to comment.