Fix listrings in machine formspecs to make it possible to move items with shift

Fixes #12
This commit is contained in:
2024-05-11 12:53:18 +02:00
parent 961e08647f
commit 36c5b3c8ac
13 changed files with 37 additions and 49 deletions

View File

@@ -26,13 +26,12 @@ reactor.getFormspec=function(pos)
local formspec={
"list[context;fuel;1,1;"..size..","..size.."]",
industrialtest.internal.getItemSlotBg(1,1,size,size),
"listring[context;fuel]",
"list[context;charged;7,2.8;1,1]",
industrialtest.internal.getItemSlotBg(7.7,2.8,1,1),
"listring[context;charged]",
"button[7.7,1;1,0.8;toggle;"..minetest.formspec_escape(switchText).."]",
"box[9,1;0.3,4.8;#202020]",
(charged>0 and "box[9,"..(1+4.8-(charged*4.8))..";0.3,"..(charged*4.8)..";#FF1010]" or "")
(charged>0 and "box[9,"..(1+4.8-(charged*4.8))..";0.3,"..(charged*4.8)..";#FF1010]" or ""),
"listring[context;fuel]"
}
return table.concat(formspec,"")
end