1
0
mirror of https://github.com/mt-mods/pipeworks.git synced 2025-06-29 23:00:49 +02:00

make all tubes call the routing functions

using their after_place/after_dig callbacks
This commit is contained in:
Vanessa Ezekowitz
2015-02-07 02:45:17 -05:00
parent e33b662274
commit 364633d884
5 changed files with 19 additions and 24 deletions

View File

@ -32,12 +32,8 @@ minetest.register_node("pipeworks:trashcan", {
meta:set_string("infotext", "Trash Can")
meta:get_inventory():set_size("trash", 1)
end,
after_place_node = function(pos)
pipeworks.scan_for_tube_objects(pos)
end,
after_dig_node = function(pos)
pipeworks.scan_for_tube_objects(pos)
end,
after_place_node = pipeworks.after_place,
after_dig_node = pipeworks.after_dig,
on_metadata_inventory_put = function(pos, listname, index, stack, player)
minetest.get_meta(pos):get_inventory():set_stack(listname, index, ItemStack(""))
end,