From 5866a2272016dd53efd0c9ecd9ae24a812e4332a Mon Sep 17 00:00:00 2001 From: Oversword Date: Tue, 6 Jul 2021 05:55:03 +0100 Subject: [PATCH] Use on_dig callback instead of removed after_dig_node callback --- techpack_warehouse/box_copper.lua | 4 ++-- techpack_warehouse/box_gold.lua | 4 ++-- techpack_warehouse/box_steel.lua | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/techpack_warehouse/box_copper.lua b/techpack_warehouse/box_copper.lua index d2f3e56..83f8077 100644 --- a/techpack_warehouse/box_copper.lua +++ b/techpack_warehouse/box_copper.lua @@ -111,8 +111,8 @@ minetest.register_node(NODE_NAME.."_defect", { can_dig = function(pos) return wh.can_dig(Box, pos) end, - after_dig_node = function(pos, oldnode, oldmetadata, digger) - wh.after_dig_node(Box, pos, oldnode, oldmetadata, digger) + on_dig = function(pos, node, player) + wh.on_dig_node(Box, pos, node, player) end, allow_metadata_inventory_put = function(pos, listname, index, stack, player) return wh.allow_metadata_inventory_put(Box, pos, listname, index, stack, player) diff --git a/techpack_warehouse/box_gold.lua b/techpack_warehouse/box_gold.lua index 7d206b8..742acce 100644 --- a/techpack_warehouse/box_gold.lua +++ b/techpack_warehouse/box_gold.lua @@ -111,8 +111,8 @@ minetest.register_node(NODE_NAME.."_defect", { can_dig = function(pos) return wh.can_dig(Box, pos) end, - after_dig_node = function(pos, oldnode, oldmetadata, digger) - wh.after_dig_node(Box, pos, oldnode, oldmetadata, digger) + on_dig = function(pos, node, player) + wh.on_dig_node(Box, pos, node, player) end, allow_metadata_inventory_put = function(pos, listname, index, stack, player) return wh.allow_metadata_inventory_put(Box, pos, listname, index, stack, player) diff --git a/techpack_warehouse/box_steel.lua b/techpack_warehouse/box_steel.lua index 83655c6..c64fda8 100644 --- a/techpack_warehouse/box_steel.lua +++ b/techpack_warehouse/box_steel.lua @@ -111,8 +111,8 @@ minetest.register_node(NODE_NAME.."_defect", { can_dig = function(pos) return wh.can_dig(Box, pos) end, - after_dig_node = function(pos, oldnode, oldmetadata, digger) - wh.after_dig_node(Box, pos, oldnode, oldmetadata, digger) + on_dig = function(pos, node, player) + wh.on_dig_node(Box, pos, node, player) end, allow_metadata_inventory_put = function(pos, listname, index, stack, player) return wh.allow_metadata_inventory_put(Box, pos, listname, index, stack, player)