mirror of
https://github.com/mt-mods/pipeworks.git
synced 2024-12-26 02:40:23 +01:00
use on_destruct instead of after_dig_node to clean up the cache entry to avoid any leaking during worldediting
This commit is contained in:
parent
b009e46590
commit
3bcf3b5f2f
@ -251,6 +251,8 @@ minetest.register_node("pipeworks:autocrafter", {
|
|||||||
after_place_node = pipeworks.scan_for_tube_objects,
|
after_place_node = pipeworks.scan_for_tube_objects,
|
||||||
after_dig_node = function(pos)
|
after_dig_node = function(pos)
|
||||||
pipeworks.scan_for_tube_objects(pos)
|
pipeworks.scan_for_tube_objects(pos)
|
||||||
|
end,
|
||||||
|
on_destruct = function(pos)
|
||||||
autocrafterCache[minetest.hash_node_position(pos)] = nil
|
autocrafterCache[minetest.hash_node_position(pos)] = nil
|
||||||
end,
|
end,
|
||||||
allow_metadata_inventory_put = function(pos, listname, index, stack, player)
|
allow_metadata_inventory_put = function(pos, listname, index, stack, player)
|
||||||
|
Loading…
Reference in New Issue
Block a user