Skip to content

Commit

Permalink
add support for shift-clicking items
Browse files Browse the repository at this point in the history
From one inventory to the next.
It works with the first field if there are multiple.

Also some other formspec adjustments made.
  • Loading branch information
SwissalpS authored and BuckarooBanzay committed Oct 19, 2020
1 parent 239f0b7 commit 5e58743
Show file tree
Hide file tree
Showing 9 changed files with 13 additions and 13 deletions.
3 changes: 1 addition & 2 deletions steps/buildspecific.lua
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ missions.register_step({
"label[0,1;Node:]" ..
"list[nodemeta:" .. pos.x .. "," .. pos.y .. "," .. pos.z .. ";main;3,1;1,1;0]" ..

"list[current_player;main;0,2;8,4;]" ..
"list[current_player;main;0,2.5;8,4;]listring[]" ..

"button[0,7;8,1;save;Save]"

Expand Down Expand Up @@ -164,4 +164,3 @@ minetest.register_on_dignode(function(pos, oldnode, digger)
end
end)


6 changes: 3 additions & 3 deletions steps/chestput.lua
Original file line number Diff line number Diff line change
Expand Up @@ -110,10 +110,10 @@ missions.register_step({

"label[0,2;" .. name .. "]" ..

"button_exit[0,5;8,1;togglevisible;" .. visibleText .. "]" ..
"button_exit[0,6.5;8,1;togglevisible;" .. visibleText .. "]" ..

"list[current_player;main;0,6;8,1;]" ..
"button[0,7;8,1;save;Save]"
"list[current_player;main;0,2.5;8,4;]listring[]" ..
"button[0,7.3;8,1;save;Save]"

return formspec;
end,
Expand Down
3 changes: 2 additions & 1 deletion steps/chestreward.lua
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,8 @@ missions.register_step({

"label[0,2;" .. name .. "]" ..

"list[current_player;main;0,6;8,1;]" ..
"list[current_player;main;0,2.5;8,4;]listring[]" ..
-- "list[current_player;main;0,6;8,1;]listring[]" ..
"button[0,7;8,1;save;Save]"

return formspec;
Expand Down
2 changes: 1 addition & 1 deletion steps/digspecific.lua
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ missions.register_step({
"label[0,1;Node:]" ..
"list[nodemeta:" .. pos.x .. "," .. pos.y .. "," .. pos.z .. ";main;3,1;1,1;0]" ..

"list[current_player;main;0,2;8,4;]" ..
"list[current_player;main;0,2.5;8,4;]listring[]" ..

"button[0,7;8,1;save;Save]"

Expand Down
2 changes: 1 addition & 1 deletion steps/followup.lua
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ missions.register_step({
"label[3,1;Target]" ..
"list[nodemeta:" .. pos.x .. "," .. pos.y .. "," .. pos.z .. ";main;4,1;1,1;0]" ..
"label[0,2;" .. name .. "]" ..
"list[current_player;main;0,6;8,1;]" ..
"list[current_player;main;0,6;8,1;]listring[]" ..
"button[0,7;8,1;save;Save]"

return formspec;
Expand Down
2 changes: 1 addition & 1 deletion steps/givereward.lua
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ missions.register_step({
"label[0,1;Items]" ..
"list[nodemeta:" .. pos.x .. "," .. pos.y .. "," .. pos.z .. ";main;2,1;1,1;0]" ..

"list[current_player;main;0,6;8,1;]" ..
"list[current_player;main;0,6;8,1;]listring[]" ..
"button[0,7;8,1;save;Save]"

return formspec;
Expand Down
2 changes: 1 addition & 1 deletion steps/spawnmob.lua
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ missions.register_step({
"list[nodemeta:" .. pos.x .. "," .. pos.y .. "," .. pos.z .. ";main;0,6;1,1;0]" ..
"label[2,6;" .. name .. "]" ..

"list[current_player;main;0,7;8,1;]" ..
"list[current_player;main;0,7;8,1;]listring[]" ..

"button[0,8;8,1;save;Save]"

Expand Down
4 changes: 2 additions & 2 deletions steps/teleport.lua
Original file line number Diff line number Diff line change
Expand Up @@ -49,10 +49,10 @@ missions.register_step({
local formspec = "size[8,8;]" ..
"label[0,0;Teleport (Step #" .. ctx.stepnumber .. ")]" ..

"list[nodemeta:" .. pos.x .. "," .. pos.y .. "," .. pos.z .. ";main;0,1;1,1;0]" ..
"list[nodemeta:" .. pos.x .. "," .. pos.y .. "," .. pos.z .. ";main;3,1;1,1;0]" ..
"label[0,2;" .. name .. "]" ..

"list[current_player;main;0,3;8,4;]" ..
"list[current_player;main;0,2.7;8,4;]listring[]" ..

"button[0,7;8,1;save;Save]"

Expand Down
2 changes: 1 addition & 1 deletion steps/waypoint.lua
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ missions.register_step({

"button[4,5;4,1;togglevisible;" .. visibleText .. "]" ..

"list[current_player;main;0,6;8,4;]" ..
"list[current_player;main;0,6;8,4;]listring[]" ..

"button[0,5;4,1;save;Save]"

Expand Down

0 comments on commit 5e58743

Please sign in to comment.