diff options
author | Tim <t4im@users.noreply.github.com> | 2016-08-29 18:28:24 +0200 |
---|---|---|
committer | Tim <t4im@users.noreply.github.com> | 2016-08-29 18:28:24 +0200 |
commit | aba1ce5b36393878dff35c5a3fe37dc8aa6ca474 (patch) | |
tree | 1a0e54ae97bf4305b4a582ecfb2012499a33d7d7 | |
parent | a65eaa7cf2b730ae1db2285a9ea354de4d598497 (diff) | |
download | pipeworks-aba1ce5b36393878dff35c5a3fe37dc8aa6ca474.tar pipeworks-aba1ce5b36393878dff35c5a3fe37dc8aa6ca474.tar.gz pipeworks-aba1ce5b36393878dff35c5a3fe37dc8aa6ca474.tar.bz2 pipeworks-aba1ce5b36393878dff35c5a3fe37dc8aa6ca474.tar.xz pipeworks-aba1ce5b36393878dff35c5a3fe37dc8aa6ca474.zip |
allow reordering of itemstacks in sorting tube
-rw-r--r-- | sorting_tubes.lua | 9 |
1 files changed, 7 insertions, 2 deletions
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, }, }) |