Merge pull request #94 from oversword/issue-92

Use on_dig callback instead of removed after_dig_node callback
This commit is contained in:
Joachim Stolberg 2021-07-06 18:36:54 +02:00 committed by GitHub
commit de6e0a3cc3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 6 additions and 6 deletions

@ -111,8 +111,8 @@ minetest.register_node(NODE_NAME.."_defect", {
can_dig = function(pos) can_dig = function(pos)
return wh.can_dig(Box, pos) return wh.can_dig(Box, pos)
end, end,
after_dig_node = function(pos, oldnode, oldmetadata, digger) on_dig = function(pos, node, player)
wh.after_dig_node(Box, pos, oldnode, oldmetadata, digger) wh.on_dig_node(Box, pos, node, player)
end, end,
allow_metadata_inventory_put = function(pos, listname, index, stack, player) allow_metadata_inventory_put = function(pos, listname, index, stack, player)
return wh.allow_metadata_inventory_put(Box, pos, listname, index, stack, player) return wh.allow_metadata_inventory_put(Box, pos, listname, index, stack, player)

@ -111,8 +111,8 @@ minetest.register_node(NODE_NAME.."_defect", {
can_dig = function(pos) can_dig = function(pos)
return wh.can_dig(Box, pos) return wh.can_dig(Box, pos)
end, end,
after_dig_node = function(pos, oldnode, oldmetadata, digger) on_dig = function(pos, node, player)
wh.after_dig_node(Box, pos, oldnode, oldmetadata, digger) wh.on_dig_node(Box, pos, node, player)
end, end,
allow_metadata_inventory_put = function(pos, listname, index, stack, player) allow_metadata_inventory_put = function(pos, listname, index, stack, player)
return wh.allow_metadata_inventory_put(Box, pos, listname, index, stack, player) return wh.allow_metadata_inventory_put(Box, pos, listname, index, stack, player)

@ -111,8 +111,8 @@ minetest.register_node(NODE_NAME.."_defect", {
can_dig = function(pos) can_dig = function(pos)
return wh.can_dig(Box, pos) return wh.can_dig(Box, pos)
end, end,
after_dig_node = function(pos, oldnode, oldmetadata, digger) on_dig = function(pos, node, player)
wh.after_dig_node(Box, pos, oldnode, oldmetadata, digger) wh.on_dig_node(Box, pos, node, player)
end, end,
allow_metadata_inventory_put = function(pos, listname, index, stack, player) allow_metadata_inventory_put = function(pos, listname, index, stack, player)
return wh.allow_metadata_inventory_put(Box, pos, listname, index, stack, player) return wh.allow_metadata_inventory_put(Box, pos, listname, index, stack, player)