From 2551bd977a0fb6b5c8b6d0f49539fb3933f08c7f Mon Sep 17 00:00:00 2001 From: SwissalpS Date: Mon, 19 Oct 2020 00:36:39 +0200 Subject: [PATCH] allow shift-clicking stacks at least for Mk1 for now. Others require more effort to create workaround using one inventory for all slots. --- technic/machines/other/constructor.lua | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/technic/machines/other/constructor.lua b/technic/machines/other/constructor.lua index 7cf2856..d99788e 100644 --- a/technic/machines/other/constructor.lua +++ b/technic/machines/other/constructor.lua @@ -146,14 +146,15 @@ local function make_constructor(mark, length) on_construct = function(pos) local meta = minetest.get_meta(pos) local formspec = "size[8,9;]".. - "label[0,0;"..S("Constructor Mk%d"):format(mark).."]".. - "list[current_player;main;0,5;8,4;]" + "label[0,0;"..S("Constructor Mk%d"):format(mark).."]" for i = 1, length do formspec = formspec .."label[5,"..(i - 1)..";"..S("Slot %d"):format(i).."]" .."list[current_name;slot"..i ..";6,"..(i - 1)..";1,1;]" end + formspec = formspec .. "list[current_player;main;0,5;8,4;]" + if 1 == mark then formspec = formspec .. "listring[]" end meta:set_string("formspec", formspec) meta:set_string("infotext", S("Constructor Mk%d"):format(mark)) local inv = meta:get_inventory() @@ -205,3 +206,4 @@ end make_constructor(1, 1) make_constructor(2, 2) make_constructor(3, 4) +