est31
2015-06-18 d732c8dfbd818e9b0b4a04620af40399b35c74ab
Add listring functionality

Add shift-click functionality
9 files modified
74 ■■■■ changed files
technic/machines/HV/nuclear_reactor.lua 3 ●●●● patch | view | raw | blame | history
technic/machines/LV/cnc.lua 5 ●●●● patch | view | raw | blame | history
technic/machines/LV/coal_alloy_furnace.lua 16 ●●●● patch | view | raw | blame | history
technic/machines/MV/tool_workshop.lua 9 ●●●● patch | view | raw | blame | history
technic/machines/other/injector.lua 3 ●●●● patch | view | raw | blame | history
technic/machines/register/battery_box.lua 14 ●●●● patch | view | raw | blame | history
technic/machines/register/generator.lua 9 ●●●●● patch | view | raw | blame | history
technic/machines/register/machine_base.lua 12 ●●●● patch | view | raw | blame | history
technic_chests/register.lua 3 ●●●● patch | view | raw | blame | history
technic/machines/HV/nuclear_reactor.lua
@@ -32,7 +32,8 @@
    "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 = {
technic/machines/LV/cnc.lua
@@ -73,7 +73,10 @@
    "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;
technic/machines/LV/coal_alloy_furnace.lua
@@ -20,7 +20,13 @@
    "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,
@@ -125,7 +131,13 @@
                    "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
technic/machines/MV/tool_workshop.lua
@@ -23,7 +23,14 @@
    "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)
technic/machines/other/injector.lua
@@ -58,7 +58,8 @@
                "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", {
technic/machines/register/battery_box.lua
@@ -71,13 +71,21 @@
        "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)
technic/machines/register/generator.lua
@@ -32,7 +32,8 @@
        "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)
    
@@ -81,7 +82,8 @@
                "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", {
@@ -159,7 +161,8 @@
                "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,
    })
technic/machines/register/machine_base.lua
@@ -42,12 +42,20 @@
        "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)
technic_chests/register.lua
@@ -209,7 +209,8 @@
            "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