From b5c297c1b73c03f203578f45fd1497ced857228c Mon Sep 17 00:00:00 2001 From: 1F616EMO Date: Sun, 1 Sep 2024 07:17:46 +0800 Subject: [PATCH] use node_dig again, and get rid of pcalls --- game.conf | 2 +- mods/default/functions.lua | 14 ++------------ 2 files changed, 3 insertions(+), 13 deletions(-) diff --git a/game.conf b/game.conf index 3f5e35db..52a773a6 100644 --- a/game.conf +++ b/game.conf @@ -1,4 +1,4 @@ title = Minetest Game author = Minetest description = A basic exploration, mining, crafting, and building, sandbox game with no NPCs, monsters, or animals. Minetest Game is usually used with mods added, and many mods are available for this game. Reliably maintained by Minetest Engine core developers. -min_minetest_version = 5.9 +min_minetest_version = 5.8 diff --git a/mods/default/functions.lua b/mods/default/functions.lua index 71be44e2..1f58af23 100644 --- a/mods/default/functions.lua +++ b/mods/default/functions.lua @@ -312,18 +312,7 @@ function default.dig_up(pos, node, digger, max_height) if up_node.name ~= node.name then break end - local noerr, success = xpcall(function() - return minetest.dig_node(up_pos, digger) - end, function(...) - in_dig_up = false - 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) - if not noerr then - error("Error raised during `default.dig_up` call") - elseif not success then + if not minetest.node_dig(up_pos, up_node, digger) then break end end @@ -334,6 +323,7 @@ minetest.register_globalstep(function() in_dig_up = false end) + -- -- Fence registration helper --