Add listring functionality
Add shift-click functionality
| | |
| | | "invsize[8,9;]".. |
| | | "label[0,0;"..S("Nuclear Reactor Rod Compartment").."]".. |
| | | "list[current_name;src;2,1;3,2;]".. |
| | | "list[current_player;main;0,5;8,4;]" |
| | | "list[current_player;main;0,5;8,4;]".. |
| | | "listring[]" |
| | | |
| | | -- "Boxy sphere" |
| | | local nodebox = { |
| | |
| | | "label[4, 5.5;"..S("Out:").."]".. |
| | | "list[current_name;dst;5,5.5;4,1;]".. |
| | | |
| | | "list[current_player;main;0,7;8,4;]" |
| | | "listring[current_name;dst]".. |
| | | "listring[current_player;main]".. |
| | | "listring[current_name;src]".. |
| | | "listring[current_player;main]" |
| | | |
| | | local size = 1; |
| | | |
| | |
| | | "list[current_name;fuel;2,3;1,1;]".. |
| | | "list[current_name;src;2,1;2,1;]".. |
| | | "list[current_name;dst;5,1;2,2;]".. |
| | | "list[current_player;main;0,5;8,4;]" |
| | | "list[current_player;main;0,5;8,4;]".. |
| | | "listring[current_name;dst]".. |
| | | "listring[current_player;main]".. |
| | | "listring[current_name;src]".. |
| | | "listring[current_player;main]".. |
| | | "listring[current_name;fuel]".. |
| | | "listring[current_player;main]" |
| | | |
| | | minetest.register_node("technic:coal_alloy_furnace", { |
| | | description = machine_name, |
| | |
| | | "list[current_name;fuel;2,3;1,1;]".. |
| | | "list[current_name;src;2,1;2,1;]".. |
| | | "list[current_name;dst;5,1;2,2;]".. |
| | | "list[current_player;main;0,5;8,4;]") |
| | | "list[current_player;main;0,5;8,4;]".. |
| | | "listring[current_name;dst]".. |
| | | "listring[current_player;main]".. |
| | | "listring[current_name;src]".. |
| | | "listring[current_player;main]".. |
| | | "listring[current_name;fuel]".. |
| | | "listring[current_player;main]") |
| | | return |
| | | end |
| | | |
| | |
| | | "list[current_name;upgrade1;1,3;1,1;]".. |
| | | "list[current_name;upgrade2;2,3;1,1;]".. |
| | | "label[1,4;"..S("Upgrade Slots").."]".. |
| | | "list[current_player;main;0,5;8,4;]" |
| | | "list[current_player;main;0,5;8,4;]".. |
| | | "listring[current_player;main]".. |
| | | "listring[current_name;src]".. |
| | | "listring[current_player;main]".. |
| | | "listring[current_name;upgrade1]".. |
| | | "listring[current_player;main]".. |
| | | "listring[current_name;upgrade2]".. |
| | | "listring[current_player;main]" |
| | | |
| | | local run = function(pos, node) |
| | | local meta = minetest.get_meta(pos) |
| | |
| | | "button[0,1;2,1;mode_item;"..S("Stackwise").."]" or |
| | | "button[0,1;2,1;mode_stack;"..S("Itemwise").."]").. |
| | | "list[current_name;main;0,2;8,2;]".. |
| | | "list[current_player;main;0,5;8,4;]") |
| | | "list[current_player;main;0,5;8,4;]".. |
| | | "listring[]") |
| | | end |
| | | |
| | | minetest.register_node("technic:injector", { |
| | |
| | | "label[3,0;"..S("Charge").."]".. |
| | | "label[5,0;"..S("Discharge").."]".. |
| | | "label[1,3;"..S("Power level").."]".. |
| | | "list[current_player;main;0,5;8,4;]" |
| | | |
| | | "list[current_player;main;0,5;8,4;]".. |
| | | "listring[current_name;dst]".. |
| | | "listring[current_player;main]".. |
| | | "listring[current_name;src]".. |
| | | "listring[current_player;main]" |
| | | |
| | | if data.upgrade then |
| | | formspec = formspec.. |
| | | "list[current_name;upgrade1;3.5,3;1,1;]".. |
| | | "list[current_name;upgrade2;4.5,3;1,1;]".. |
| | | "label[3.5,4;"..S("Upgrade Slots").."]" |
| | | "label[3.5,4;"..S("Upgrade Slots").."]".. |
| | | "listring[current_name;upgrade1]".. |
| | | "listring[current_player;main]".. |
| | | "listring[current_name;upgrade2]".. |
| | | "listring[current_player;main]" |
| | | end |
| | | |
| | | local run = function(pos, node) |
| | |
| | | "label[0,0;"..S("Fuel-Fired %s Generator"):format(tier).."]".. |
| | | "list[current_name;src;3,1;1,1;]".. |
| | | "image[4,1;1,1;default_furnace_fire_bg.png]".. |
| | | "list[current_player;main;0,5;8,4;]" |
| | | "list[current_player;main;0,5;8,4;]".. |
| | | "listring[]" |
| | | |
| | | local desc = S("Fuel-Fired %s Generator"):format(tier) |
| | | |
| | |
| | | "list[current_name;src;3, 1;1, 1;]".. |
| | | "image[4, 1;1, 1;default_furnace_fire_bg.png^[lowpart:".. |
| | | (percent)..":default_furnace_fire_fg.png]".. |
| | | "list[current_player;main;0, 5;8, 4;]") |
| | | "list[current_player;main;0, 5;8, 4;]".. |
| | | "listring[]") |
| | | end |
| | | |
| | | minetest.register_node("technic:"..ltier.."_generator", { |
| | |
| | | "list[current_name;src;3, 1;1, 1;]".. |
| | | "image[4, 1;1, 1;default_furnace_fire_bg.png^[lowpart:".. |
| | | (percent)..":default_furnace_fire_fg.png]".. |
| | | "list[current_player;main;0, 5;8, 4;]") |
| | | "list[current_player;main;0, 5;8, 4;]".. |
| | | "listring[]") |
| | | return true |
| | | end, |
| | | }) |
| | |
| | | "list[current_name;src;"..(4-input_size)..",1;"..input_size..",1;]".. |
| | | "list[current_name;dst;5,1;2,2;]".. |
| | | "list[current_player;main;0,5;8,4;]".. |
| | | "label[0,0;"..machine_desc:format(tier).."]" |
| | | "label[0,0;"..machine_desc:format(tier).."]".. |
| | | "listring[current_name;dst]".. |
| | | "listring[current_player;main]".. |
| | | "listring[current_name;src]".. |
| | | "listring[current_player;main]" |
| | | if data.upgrade then |
| | | formspec = formspec.. |
| | | "list[current_name;upgrade1;1,3;1,1;]".. |
| | | "list[current_name;upgrade2;2,3;1,1;]".. |
| | | "label[1,4;"..S("Upgrade Slots").."]" |
| | | "label[1,4;"..S("Upgrade Slots").."]".. |
| | | "listring[current_name;upgrade1]".. |
| | | "listring[current_player;main]".. |
| | | "listring[current_name;upgrade2]".. |
| | | "listring[current_player;main]" |
| | | end |
| | | |
| | | local run = function(pos, node) |
| | |
| | | "list[current_player;main;"..data.loleft..","..data.lotop..";8,4;]".. |
| | | "background[-0.19,-0.25;"..(data.ovwidth+0.4)..","..(data.ovheight+0.75)..";technic_chest_form_bg.png]".. |
| | | "background["..data.hileft..",1;"..data.width..","..data.height..";technic_"..lname.."_chest_inventory.png]".. |
| | | "background["..data.loleft..","..data.lotop..";8,4;technic_main_inventory.png]" |
| | | "background["..data.loleft..","..data.lotop..";8,4;technic_main_inventory.png]".. |
| | | "listring[]" |
| | | if data.sort then |
| | | data.base_formspec = data.base_formspec.."button["..data.hileft..","..(data.height+1.1)..";1,0.8;sort;"..S("Sort").."]" |
| | | end |