From 63310ed33dc577dca627db2bfc291cc6130f590e Mon Sep 17 00:00:00 2001 From: Joachim Stolberg Date: Mon, 25 Dec 2023 21:55:45 +0100 Subject: [PATCH] Fix assembly tool bug with non-empty chests --- mod.conf | 1 + tools/assembly_tool.lua | 4 ++++ 2 files changed, 5 insertions(+) diff --git a/mod.conf b/mod.conf index ef5299e..8f76061 100644 --- a/mod.conf +++ b/mod.conf @@ -2,3 +2,4 @@ name = techage depends = default,doors,flowers,tubelib2,networks,basic_materials,bucket,stairs,screwdriver,minecart,lcdlib,safer_lua,doclib optional_depends = unified_inventory,wielded_light,unifieddyes,moreores,ethereal,mesecons,mesecons_materials,mesecons_mvps,digtron,bakedclay,moreblocks,i3,creative,craftguide,farming description = Techage, go through 5 tech ages in search of wealth and power! +supported_games = minetest_game diff --git a/tools/assembly_tool.lua b/tools/assembly_tool.lua index f878c72..53cb6a5 100644 --- a/tools/assembly_tool.lua +++ b/tools/assembly_tool.lua @@ -73,6 +73,10 @@ local function remove_node(pos, digger) return end + if ndef.can_dig and not ndef.can_dig(pos, digger) then + return + end + if number ~= "" and ndef and ndef.after_dig_node then minetest.remove_node(pos) ndef.after_dig_node(pos, node, oldmetadata, digger)