From aba1ce5b36393878dff35c5a3fe37dc8aa6ca474 Mon Sep 17 00:00:00 2001 From: Tim Date: Mon, 29 Aug 2016 18:28:24 +0200 Subject: allow reordering of itemstacks in sorting tube --- sorting_tubes.lua | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'sorting_tubes.lua') diff --git a/sorting_tubes.lua b/sorting_tubes.lua index 6d432ae..efe4b4f 100644 --- a/sorting_tubes.lua +++ b/sorting_tubes.lua @@ -119,8 +119,13 @@ if pipeworks.enable_mese_tube then if not pipeworks.may_configure(pos, player) then return 0 end update_formspec(pos) -- For old tubes local inv = minetest.get_meta(pos):get_inventory() - inv:set_stack(from_list, from_index, ItemStack("")) - return 0 + + if from_list:match("line%d") and to_list:match("line%d") then + return count + else + inv:set_stack(from_list, from_index, ItemStack("")) + return 0 + end end, }, }) -- cgit v1.2.3 From 4fdf73fbcd992786cdbb60431e739cdcfc2362a2 Mon Sep 17 00:00:00 2001 From: Tim Date: Mon, 29 Aug 2016 18:28:43 +0200 Subject: add list rings to pipework inventories --- sorting_tubes.lua | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) (limited to 'sorting_tubes.lua') diff --git a/sorting_tubes.lua b/sorting_tubes.lua index efe4b4f..edaa24a 100644 --- a/sorting_tubes.lua +++ b/sorting_tubes.lua @@ -31,7 +31,21 @@ if pipeworks.enable_mese_tube then "image[0,4;1,1;pipeworks_blue.png]".. "image[0,5;1,1;pipeworks_red.png]".. buttons_formspec.. - "list[current_player;main;0,7;8,4;]") + "list[current_player;main;0,7;8,4;]" .. + "listring[current_player;main]" .. + "listring[current_player;main]" .. + "listring[context;line1]" .. + "listring[current_player;main]" .. + "listring[context;line2]" .. + "listring[current_player;main]" .. + "listring[context;line3]" .. + "listring[current_player;main]" .. + "listring[context;line4]" .. + "listring[current_player;main]" .. + "listring[context;line5]" .. + "listring[current_player;main]" .. + "listring[context;line6]" + ) end pipeworks.register_tube("pipeworks:mese_tube", { -- cgit v1.2.3