diff options
author | Novatux <nathanael.courant@laposte.net> | 2014-08-15 11:51:23 +0200 |
---|---|---|
committer | Novatux <nathanael.courant@laposte.net> | 2014-08-15 11:51:23 +0200 |
commit | b77146f29cd1456dff4a3b9e023e6067e9580318 (patch) | |
tree | f856556332cc33e75b69a09e632608d399e574e6 | |
parent | 8cc2ecb55f48c367d452de1053cb0fdefca00ec8 (diff) | |
download | pipeworks-b77146f29cd1456dff4a3b9e023e6067e9580318.tar pipeworks-b77146f29cd1456dff4a3b9e023e6067e9580318.tar.gz pipeworks-b77146f29cd1456dff4a3b9e023e6067e9580318.tar.bz2 pipeworks-b77146f29cd1456dff4a3b9e023e6067e9580318.tar.xz pipeworks-b77146f29cd1456dff4a3b9e023e6067e9580318.zip |
Fix old mese tube detection
-rwxr-xr-x | tubes.lua | 5 |
1 files changed, 4 insertions, 1 deletions
@@ -241,7 +241,7 @@ if pipeworks.enable_mese_tube then local function update_formspec(pos) local meta = minetest.get_meta(pos) local old_formspec = meta:get_string("formspec") - if string.find(old_formspec, "button0") then -- Old version + if string.find(old_formspec, "button1") then -- Old version local inv = meta:get_inventory() for i = 1, 6 do for _, stack in ipairs(inv:get_list("line"..i)) do @@ -323,6 +323,7 @@ if pipeworks.enable_mese_tube then inv:is_empty("line4") and inv:is_empty("line5") and inv:is_empty("line6")) end, allow_metadata_inventory_put = function(pos, listname, index, stack, player) + update_formspec(pos) -- For old tubes local inv = minetest.get_meta(pos):get_inventory() local stack_copy = ItemStack(stack) stack_copy:set_count(1) @@ -330,11 +331,13 @@ if pipeworks.enable_mese_tube then return 0 end, allow_metadata_inventory_take = function(pos, listname, index, stack, player) + update_formspec(pos) -- For old tubes local inv = minetest.get_meta(pos):get_inventory() inv:set_stack(listname, index, ItemStack("")) return 0 end, allow_metadata_inventory_move = function(pos, from_list, from_index, to_list, to_index, count, player) + update_formspec(pos) -- For old tubes local inv = minetest.get_meta(pos):get_inventory() inv:set_stack(from_list, from_index, ItemStack("")) return 0 |