diff --git a/technic/machines/HV/forcefield.lua b/technic/machines/HV/forcefield.lua index 28bc5b1..41fe1fe 100644 --- a/technic/machines/HV/forcefield.lua +++ b/technic/machines/HV/forcefield.lua @@ -42,8 +42,7 @@ local function update_forcefield(pos, meta, active, first) local shape = meta:get_int("shape") local range = meta:get_int("range") local vm = VoxelManip() - local MinEdge, MaxEdge = vm:read_from_map(vector.subtract(pos, range), - vector.add(pos, range)) + local MinEdge, MaxEdge = vm:read_from_map(vector.subtract(pos, range), vector.add(pos, range)) local area = VoxelArea:new({ MinEdge = MinEdge, MaxEdge = MaxEdge }) local data = vm:get_data() @@ -90,7 +89,7 @@ local function update_forcefield(pos, meta, active, first) end local function set_forcefield_formspec(meta) - local formspec = "size[5,2.25]" .. + local formspec = "size[5,2.25]".. "field[0.3,0.5;2,1;range;"..S("Range")..";"..meta:get_int("range").."]" -- The names for these toggle buttons are explicit about which -- state they'll switch to, so that multiple presses (arising diff --git a/technic/machines/HV/nuclear_reactor.lua b/technic/machines/HV/nuclear_reactor.lua index 7ed3050..7b0cdb7 100644 --- a/technic/machines/HV/nuclear_reactor.lua +++ b/technic/machines/HV/nuclear_reactor.lua @@ -28,11 +28,10 @@ minetest.register_craft({ } }) -local reactor_formspec = -"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;]" .. +local reactor_formspec = "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;]".. "listring[]" -- "Boxy sphere" diff --git a/technic/machines/HV/quarry.lua b/technic/machines/HV/quarry.lua index dd033d6..ab6407b 100644 --- a/technic/machines/HV/quarry.lua +++ b/technic/machines/HV/quarry.lua @@ -16,10 +16,10 @@ local quarry_eject_dir = vector.new(0, 1, 0) local function set_quarry_formspec(meta) local radius = meta:get_int("size") - local formspec = "size[6,4.3]" .. - "list[context;cache;0,1;4,3;]" .. - "item_image[4.8,0;1,1;technic:quarry]" .. - "label[0,0.2;"..S("%s Quarry"):format("HV").."]" .. + local formspec = "size[6,4.3]".. + "list[context;cache;0,1;4,3;]".. + "item_image[4.8,0;1,1;technic:quarry]".. + "label[0,0.2;"..S("%s Quarry"):format("HV").."]".. "field[4.3,3.5;2,1;size;"..S("Radius:")..";"..radius.."]" if meta:get_int("enabled") == 0 then formspec = formspec.."button[4,1;2,1;enable;"..S("Disabled").."]" @@ -197,7 +197,7 @@ end local function send_move_error(player) minetest.chat_send_player(player:get_player_name(), - S("Manually taking/removing from cache by hand is not possible. " .. + S("Manually taking/removing from cache by hand is not possible. ".. "If you can't wait, restart or disable the quarry to start automatic purge.")) return 0 end diff --git a/technic/machines/LV/cnc.lua b/technic/machines/LV/cnc.lua index 2d5ff19..615a369 100644 --- a/technic/machines/LV/cnc.lua +++ b/technic/machines/LV/cnc.lua @@ -48,46 +48,46 @@ local twosize_products = { } local cnc_formspec = -"invsize[9,11;]" .. - "label[1,0;"..S("Choose Milling Program:").."]" .. - "image_button[1,0.5;1,1;technic_cnc_slope.png;slope; ]" .. - "image_button[2,0.5;1,1;technic_cnc_slope_edge.png;slope_edge; ]" .. - "image_button[3,0.5;1,1;technic_cnc_slope_inner_edge.png;slope_inner_edge; ]" .. - "image_button[4,0.5;1,1;technic_cnc_pyramid.png;pyramid; ]" .. - "image_button[5,0.5;1,1;technic_cnc_spike.png;spike; ]" .. - "image_button[6,0.5;1,1;technic_cnc_cylinder.png;cylinder; ]" .. - "image_button[7,0.5;1,1;technic_cnc_oblate_spheroid.png;oblate_spheroid; ]" .. - "image_button[8,0.5;1,1;technic_cnc_stick.png;stick; ]" .. +"invsize[9,11;]".. + "label[1,0;"..S("Choose Milling Program:").."]".. + "image_button[1,0.5;1,1;technic_cnc_slope.png;slope; ]".. + "image_button[2,0.5;1,1;technic_cnc_slope_edge.png;slope_edge; ]".. + "image_button[3,0.5;1,1;technic_cnc_slope_inner_edge.png;slope_inner_edge; ]".. + "image_button[4,0.5;1,1;technic_cnc_pyramid.png;pyramid; ]".. + "image_button[5,0.5;1,1;technic_cnc_spike.png;spike; ]".. + "image_button[6,0.5;1,1;technic_cnc_cylinder.png;cylinder; ]".. + "image_button[7,0.5;1,1;technic_cnc_oblate_spheroid.png;oblate_spheroid; ]".. + "image_button[8,0.5;1,1;technic_cnc_stick.png;stick; ]".. - "image_button[1,1.5;1,1;technic_cnc_slope_upsdwn.png;slope_upsdown; ]" .. - "image_button[2,1.5;1,1;technic_cnc_slope_edge_upsdwn.png;slope_edge_upsdown; ]" .. - "image_button[3,1.5;1,1;technic_cnc_slope_inner_edge_upsdwn.png;slope_inner_edge_upsdown; ]" .. - "image_button[4,1.5;1,1;technic_cnc_cylinder_horizontal.png;cylinder_horizontal; ]" .. - "image_button[5,1.5;1,1;technic_cnc_sphere.png;sphere; ]" .. + "image_button[1,1.5;1,1;technic_cnc_slope_upsdwn.png;slope_upsdown; ]".. + "image_button[2,1.5;1,1;technic_cnc_slope_edge_upsdwn.png;slope_edge_upsdown; ]".. + "image_button[3,1.5;1,1;technic_cnc_slope_inner_edge_upsdwn.png;slope_inner_edge_upsdown; ]".. + "image_button[4,1.5;1,1;technic_cnc_cylinder_horizontal.png;cylinder_horizontal; ]".. + "image_button[5,1.5;1,1;technic_cnc_sphere.png;sphere; ]".. - "image_button[1,2.5;1,1;technic_cnc_slope_lying.png;slope_lying; ]" .. - "image_button[2,2.5;1,1;technic_cnc_onecurvededge.png;onecurvededge; ]" .. - "image_button[3,2.5;1,1;technic_cnc_twocurvededge.png;twocurvededge; ]" .. + "image_button[1,2.5;1,1;technic_cnc_slope_lying.png;slope_lying; ]".. + "image_button[2,2.5;1,1;technic_cnc_onecurvededge.png;onecurvededge; ]".. + "image_button[3,2.5;1,1;technic_cnc_twocurvededge.png;twocurvededge; ]".. - "label[1,3.5;"..S("Slim Elements half / normal height:").."]" .. + "label[1,3.5;"..S("Slim Elements half / normal height:").."]".. - "image_button[1,4;1,0.5;technic_cnc_full.png;full; ]" .. - "image_button[1,4.5;1,0.5;technic_cnc_half.png;half; ]" .. - "image_button[2,4;1,1;technic_cnc_element_straight.png;element_straight; ]" .. - "image_button[3,4;1,1;technic_cnc_element_end.png;element_end; ]" .. - "image_button[4,4;1,1;technic_cnc_element_cross.png;element_cross; ]" .. - "image_button[5,4;1,1;technic_cnc_element_t.png;element_t; ]" .. - "image_button[6,4;1,1;technic_cnc_element_edge.png;element_edge; ]" .. + "image_button[1,4;1,0.5;technic_cnc_full.png;full; ]".. + "image_button[1,4.5;1,0.5;technic_cnc_half.png;half; ]".. + "image_button[2,4;1,1;technic_cnc_element_straight.png;element_straight; ]".. + "image_button[3,4;1,1;technic_cnc_element_end.png;element_end; ]".. + "image_button[4,4;1,1;technic_cnc_element_cross.png;element_cross; ]".. + "image_button[5,4;1,1;technic_cnc_element_t.png;element_t; ]".. + "image_button[6,4;1,1;technic_cnc_element_edge.png;element_edge; ]".. - "label[0, 5.5;"..S("In:").."]" .. - "list[current_name;src;0.5,5.5;1,1;]" .. - "label[4, 5.5;"..S("Out:").."]" .. - "list[current_name;dst;5,5.5;4,1;]" .. + "label[0, 5.5;"..S("In:").."]".. + "list[current_name;src;0.5,5.5;1,1;]".. + "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]" .. + "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; diff --git a/technic/machines/LV/music_player.lua b/technic/machines/LV/music_player.lua index 286dd87..92881d7 100644 --- a/technic/machines/LV/music_player.lua +++ b/technic/machines/LV/music_player.lua @@ -71,19 +71,19 @@ end local function set_display(meta) meta:set_string("formspec", - "size[4,4.5]" .. - "item_image[0,0;1,1;technic:music_player]" .. - "label[1,0;"..S("%s Music Player"):format("LV").."]" .. - "button[0,1;1,1;track1;1]" .. - "button[1,1;1,1;track2;2]" .. - "button[2,1;1,1;track3;3]" .. - "button[0,2;1,1;track4;4]" .. - "button[1,2;1,1;track5;5]" .. - "button[2,2;1,1;track6;6]" .. - "button[0,3;1,1;track7;7]" .. - "button[1,3;1,1;track8;8]" .. - "button[2,3;1,1;track9;9]" .. - "button[3,1;1,1;stop;Stop]" .. + "size[4,4.5]".. + "item_image[0,0;1,1;technic:music_player]".. + "label[1,0;"..S("%s Music Player"):format("LV").."]".. + "button[0,1;1,1;track1;1]".. + "button[1,1;1,1;track2;2]".. + "button[2,1;1,1;track3;3]".. + "button[0,2;1,1;track4;4]".. + "button[1,2;1,1;track5;5]".. + "button[2,2;1,1;track6;6]".. + "button[0,3;1,1;track7;7]".. + "button[1,3;1,1;track8;8]".. + "button[2,3;1,1;track9;9]".. + "button[3,1;1,1;stop;Stop]".. "label[0,4;"..minetest.formspec_escape(meta:get_int("active") == 0 and S("Stopped") or S("Current track %s"):format(meta:get_int("current_track"))).."]") diff --git a/technic/machines/MV/tool_workshop.lua b/technic/machines/MV/tool_workshop.lua index 19e4abb..ae6683a 100644 --- a/technic/machines/MV/tool_workshop.lua +++ b/technic/machines/MV/tool_workshop.lua @@ -17,19 +17,19 @@ minetest.register_craft({ local workshop_demand = { 5000, 3500, 2000 } local workshop_formspec = -"invsize[8,9;]" .. - "list[current_name;src;3,1;1,1;]" .. - "label[0,0;"..S("%s Tool Workshop"):format("MV").."]" .. - "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;]" .. - "listring[current_player;main]" .. - "listring[current_name;src]" .. - "listring[current_player;main]" .. - "listring[current_name;upgrade1]" .. - "listring[current_player;main]" .. - "listring[current_name;upgrade2]" .. +"invsize[8,9;]".. + "list[current_name;src;3,1;1,1;]".. + "label[0,0;"..S("%s Tool Workshop"):format("MV").."]".. + "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;]".. + "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) diff --git a/technic/machines/other/anchor.lua b/technic/machines/other/anchor.lua index 7a8975a..072b6d1 100644 --- a/technic/machines/other/anchor.lua +++ b/technic/machines/other/anchor.lua @@ -50,17 +50,17 @@ end local function set_display(pos, meta) meta:set_string("infotext", S(meta:get_int("enabled") ~= 0 and "%s Enabled" or "%s Disabled"):format(desc)) meta:set_string("formspec", - "size[5,3.5]" .. - "item_image[0,0;1,1;technic:admin_anchor]" .. - "label[1,0;"..minetest.formspec_escape(desc).."]" .. - "label[0,1;"..minetest.formspec_escape(S("Owner:").." "..meta:get_string("owner")).."]" .. + "size[5,3.5]".. + "item_image[0,0;1,1;technic:admin_anchor]".. + "label[1,0;"..minetest.formspec_escape(desc).."]".. + "label[0,1;"..minetest.formspec_escape(S("Owner:").." "..meta:get_string("owner")).."]".. (meta:get_int("locked") == 0 and "button[3,1;2,1;lock;"..minetest.formspec_escape(S("Unlocked")).."]" or - "button[3,1;2,1;unlock;"..minetest.formspec_escape(S("Locked")).."]") .. - "field[0.25,2.3;1,1;radius;"..minetest.formspec_escape(S("Radius:"))..";"..meta:get_int("radius").."]" .. + "button[3,1;2,1;unlock;"..minetest.formspec_escape(S("Locked")).."]").. + "field[0.25,2.3;1,1;radius;"..minetest.formspec_escape(S("Radius:"))..";"..meta:get_int("radius").."]".. (meta:get_int("enabled") == 0 and "button[3,2;2,1;enable;"..minetest.formspec_escape(S("Disabled")).."]" or - "button[3,2;2,1;disable;"..minetest.formspec_escape(S("Enabled")).."]") .. + "button[3,2;2,1;disable;"..minetest.formspec_escape(S("Enabled")).."]").. "label[0,3;"..minetest.formspec_escape(S("Keeping %d/%d map blocks loaded"):format(#currently_forceloaded_positions(meta), #compute_forceload_positions(pos, meta))).."]") end diff --git a/technic/machines/other/coal_alloy_furnace.lua b/technic/machines/other/coal_alloy_furnace.lua index 378056b..cca9d1a 100644 --- a/technic/machines/other/coal_alloy_furnace.lua +++ b/technic/machines/other/coal_alloy_furnace.lua @@ -13,18 +13,18 @@ minetest.register_craft({ local machine_name = S("Fuel-Fired Alloy Furnace") local formspec = -"size[8,9]" .. - "label[0,0;"..machine_name.."]" .. - "image[2,2;1,1;default_furnace_fire_bg.png]" .. - "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;]" .. - "listring[current_name;dst]" .. - "listring[current_player;main]" .. - "listring[current_name;src]" .. - "listring[current_player;main]" .. - "listring[current_name;fuel]" .. +"size[8,9]".. + "label[0,0;"..machine_name.."]".. + "image[2,2;1,1;default_furnace_fire_bg.png]".. + "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;]".. + "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", { @@ -128,19 +128,19 @@ minetest.register_abm({ meta:set_string("infotext", S("%s Active"):format(machine_name).." ("..percent.."%)") technic.swap_node(pos, "technic:coal_alloy_furnace_active") meta:set_string("formspec", - "size[8,9]" .. - "label[0,0;"..machine_name.."]" .. - "image[2,2;1,1;default_furnace_fire_bg.png^[lowpart:" .. - (100 - percent)..":default_furnace_fire_fg.png]" .. - "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;]" .. - "listring[current_name;dst]" .. - "listring[current_player;main]" .. - "listring[current_name;src]" .. - "listring[current_player;main]" .. - "listring[current_name;fuel]" .. + "size[8,9]".. + "label[0,0;"..machine_name.."]".. + "image[2,2;1,1;default_furnace_fire_bg.png^[lowpart:".. + (100 - percent)..":default_furnace_fire_fg.png]".. + "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;]".. + "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 diff --git a/technic/machines/other/constructor.lua b/technic/machines/other/constructor.lua index 2823eb6..9912496 100644 --- a/technic/machines/other/constructor.lua +++ b/technic/machines/other/constructor.lua @@ -131,8 +131,8 @@ local function make_constructor(mark, length) sounds = default.node_sound_stone_defaults(), on_construct = function(pos) local meta = minetest.get_meta(pos) - local formspec = "size[8,9;]" .. - "label[0,0;"..S("Constructor Mk%d"):format(mark).."]" .. + local formspec = "size[8,9;]".. + "label[0,0;"..S("Constructor Mk%d"):format(mark).."]".. "list[current_player;main;0,5;8,4;]" for i = 1, length do formspec = formspec diff --git a/technic/machines/other/injector.lua b/technic/machines/other/injector.lua index 22e362a..42e7595 100644 --- a/technic/machines/other/injector.lua +++ b/technic/machines/other/injector.lua @@ -49,14 +49,14 @@ minetest.register_craft({ local function set_injector_formspec(meta) local is_stack = meta:get_string("mode") == "whole stacks" meta:set_string("formspec", - "invsize[8,9;]" .. - "item_image[0,0;1,1;technic:injector]" .. - "label[1,0;"..S("Self-Contained Injector").."]" .. + "invsize[8,9;]".. + "item_image[0,0;1,1;technic:injector]".. + "label[1,0;"..S("Self-Contained Injector").."]".. (is_stack and "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;]" .. + "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;]".. "listring[]") end diff --git a/technic/machines/register/battery_box.lua b/technic/machines/register/battery_box.lua index e2aa966..a680acb 100644 --- a/technic/machines/register/battery_box.lua +++ b/technic/machines/register/battery_box.lua @@ -61,29 +61,29 @@ function technic.register_battery_box(data) local ltier = string.lower(tier) local formspec = - "invsize[8,9;]" .. - "image[1,1;1,2;technic_power_meter_bg.png]" .. - "list[current_name;src;3,1;1,1;]" .. - "image[4,1;1,1;technic_battery_reload.png]" .. - "list[current_name;dst;5,1;1,1;]" .. - "label[0,0;"..S("%s Battery Box"):format(tier).."]" .. - "label[3,0;"..S("Charge").."]" .. - "label[5,0;"..S("Discharge").."]" .. - "label[1,3;"..S("Power level").."]" .. - "list[current_player;main;0,5;8,4;]" .. - "listring[current_name;dst]" .. - "listring[current_player;main]" .. - "listring[current_name;src]" .. + "invsize[8,9;]".. + "image[1,1;1,2;technic_power_meter_bg.png]".. + "list[current_name;src;3,1;1,1;]".. + "image[4,1;1,1;technic_battery_reload.png]".. + "list[current_name;dst;5,1;1,1;]".. + "label[0,0;"..S("%s Battery Box"):format(tier).."]".. + "label[3,0;"..S("Charge").."]".. + "label[5,0;"..S("Discharge").."]".. + "label[1,3;"..S("Power level").."]".. + "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").."]" .. - "listring[current_name;upgrade1]" .. - "listring[current_player;main]" .. - "listring[current_name;upgrade2]" .. + 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").."]".. + "listring[current_name;upgrade1]".. + "listring[current_player;main]".. + "listring[current_name;upgrade2]".. "listring[current_player;main]" end @@ -144,7 +144,7 @@ function technic.register_battery_box(data) local charge_percent = math.floor(current_charge / max_charge * 100) meta:set_string("formspec", - formspec .. + formspec.. "image[1,1;1,2;technic_power_meter_bg.png" .. "^[lowpart:"..charge_percent .. ":technic_power_meter_fg.png]") diff --git a/technic/machines/register/generator.lua b/technic/machines/register/generator.lua index 726c596..1717b81 100644 --- a/technic/machines/register/generator.lua +++ b/technic/machines/register/generator.lua @@ -33,11 +33,11 @@ function technic.register_generator(data) for k, v in pairs(groups) do active_groups[k] = v end local generator_formspec = - "invsize[8,9;]" .. - "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;]" .. + "invsize[8,9;]".. + "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;]".. "listring[]" local desc = S("Fuel-Fired %s Generator"):format(tier) @@ -84,12 +84,12 @@ function technic.register_generator(data) local percent = math.floor((burn_time / burn_totaltime) * 100) meta:set_string("infotext", desc.." ("..percent.."%)") meta:set_string("formspec", - "size[8, 9]" .. - "label[0, 0;"..minetest.formspec_escape(desc).."]" .. - "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;]" .. + "size[8, 9]".. + "label[0, 0;"..minetest.formspec_escape(desc).."]".. + "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;]".. "listring[]") end @@ -169,12 +169,12 @@ function technic.register_generator(data) meta:set_int("burn_time", burn_time) local percent = math.floor(burn_time / burn_totaltime * 100) meta:set_string("formspec", - "size[8, 9]" .. - "label[0, 0;"..minetest.formspec_escape(desc).."]" .. - "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;]" .. + "size[8, 9]".. + "label[0, 0;"..minetest.formspec_escape(desc).."]".. + "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;]".. "listring[]") return true end, diff --git a/technic/machines/register/machine_base.lua b/technic/machines/register/machine_base.lua index 0324a96..a1bd6b5 100644 --- a/technic/machines/register/machine_base.lua +++ b/technic/machines/register/machine_base.lua @@ -37,23 +37,23 @@ function technic.register_base_machine(data) for k, v in pairs(groups) do active_groups[k] = v end local formspec = - "invsize[8,9;]" .. - "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).."]" .. - "listring[current_name;dst]" .. - "listring[current_player;main]" .. - "listring[current_name;src]" .. + "invsize[8,9;]".. + "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).."]".. + "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").."]" .. - "listring[current_name;upgrade1]" .. - "listring[current_player;main]" .. - "listring[current_name;upgrade2]" .. + formspec = formspec.. + "list[current_name;upgrade1;1,3;1,1;]".. + "list[current_name;upgrade2;2,3;1,1;]".. + "label[1,4;"..S("Upgrade Slots").."]".. + "listring[current_name;upgrade1]".. + "listring[current_player;main]".. + "listring[current_name;upgrade2]".. "listring[current_player;main]" end diff --git a/technic/machines/supply_converter.lua b/technic/machines/supply_converter.lua index 4123bde..bc1d421 100644 --- a/technic/machines/supply_converter.lua +++ b/technic/machines/supply_converter.lua @@ -10,7 +10,7 @@ local S = technic.getter local function set_supply_converter_formspec(meta) - local formspec = "size[5,2.25]" .. + local formspec = "size[5,2.25]".. "field[0.3,0.5;2,1;power;"..S("Input Power")..";"..meta:get_int("power").."]" -- The names for these toggle buttons are explicit about which -- state they'll switch to, so that multiple presses (arising diff --git a/technic/tools/prospector.lua b/technic/tools/prospector.lua index f97a0e6..e27f8cd 100644 --- a/technic/tools/prospector.lua +++ b/technic/tools/prospector.lua @@ -64,33 +64,33 @@ minetest.register_tool("technic:prospector", { end local look_diameter = toolmeta.look_radius * 2 + 1 minetest.show_formspec(user:get_player_name(), "technic:prospector_control", - "size[7,8.5]" .. - "item_image[0,0;1,1;"..toolstack:get_name().."]" .. - "label[1,0;"..minetest.formspec_escape(toolstack:get_definition().description).."]" .. + "size[7,8.5]".. + "item_image[0,0;1,1;"..toolstack:get_name().."]".. + "label[1,0;"..minetest.formspec_escape(toolstack:get_definition().description).."]".. (toolmeta.target ~= "" and - "label[0,1.5;Current target:]" .. - "label[0,2;"..minetest.formspec_escape(minetest.registered_nodes[toolmeta.target].description).."]" .. + "label[0,1.5;Current target:]".. + "label[0,2;"..minetest.formspec_escape(minetest.registered_nodes[toolmeta.target].description).."]".. "item_image[0,2.5;1,1;"..toolmeta.target.."]" or - "label[0,1.5;No target set]") .. + "label[0,1.5;No target set]").. (pointed and - "label[3.5,1.5;May set new target:]" .. - "label[3.5,2;"..minetest.formspec_escape(minetest.registered_nodes[pointed].description).."]" .. - "item_image[3.5,2.5;1,1;"..pointed.."]" .. + "label[3.5,1.5;May set new target:]".. + "label[3.5,2;"..minetest.formspec_escape(minetest.registered_nodes[pointed].description).."]".. + "item_image[3.5,2.5;1,1;"..pointed.."]".. "button_exit[3.5,3.65;2,0.5;target_"..pointed..";Set target]" or - "label[3.5,1.5;No new target available]") .. - "label[0,4.5;Region cross section:]" .. - "label[0,5;"..look_diameter.."x"..look_diameter.."]" .. - "label[3.5,4.5;Set region cross section:]" .. - "button_exit[3.5,5.15;1,0.5;look_radius_0;1x1]" .. - "button_exit[4.5,5.15;1,0.5;look_radius_1;3x3]" .. - "button_exit[5.5,5.15;1,0.5;look_radius_3;7x7]" .. - "label[0,6;Region depth:]" .. - "label[0,6.5;"..toolmeta.look_depth.."]" .. - "label[3.5,6;Set region depth:]" .. - "button_exit[3.5,6.65;1,0.5;look_depth_7;7]" .. - "button_exit[4.5,6.65;1,0.5;look_depth_14;14]" .. - "button_exit[5.5,6.65;1,0.5;look_depth_21;21]" .. - "label[0,7.5;Accuracy:]" .. + "label[3.5,1.5;No new target available]").. + "label[0,4.5;Region cross section:]".. + "label[0,5;"..look_diameter.."x"..look_diameter.."]".. + "label[3.5,4.5;Set region cross section:]".. + "button_exit[3.5,5.15;1,0.5;look_radius_0;1x1]".. + "button_exit[4.5,5.15;1,0.5;look_radius_1;3x3]".. + "button_exit[5.5,5.15;1,0.5;look_radius_3;7x7]".. + "label[0,6;Region depth:]".. + "label[0,6.5;"..toolmeta.look_depth.."]".. + "label[3.5,6;Set region depth:]".. + "button_exit[3.5,6.65;1,0.5;look_depth_7;7]".. + "button_exit[4.5,6.65;1,0.5;look_depth_14;14]".. + "button_exit[5.5,6.65;1,0.5;look_depth_21;21]".. + "label[0,7.5;Accuracy:]".. "label[0,8;98%]") return end, diff --git a/technic_chests/common.lua b/technic_chests/common.lua index 21f8162..41c6aca 100644 --- a/technic_chests/common.lua +++ b/technic_chests/common.lua @@ -55,20 +55,20 @@ function technic.chests.inv_take(pos, listname, index, stack, player) end function technic.chests.on_inv_move(pos, from_list, from_index, to_list, to_index, count, player) - minetest.log("action", player:get_player_name() .. + minetest.log("action", player:get_player_name().. " moves stuff in chest at " .. minetest.pos_to_string(pos)) end function technic.chests.on_inv_put(pos, listname, index, stack, player) - minetest.log("action", player:get_player_name() .. - " moves "..stack:get_name() .. + minetest.log("action", player:get_player_name().. + " moves "..stack:get_name().. " to chest at "..minetest.pos_to_string(pos)) end function technic.chests.on_inv_take(pos, listname, index, stack, player) - minetest.log("action", player:get_player_name() .. - " takes "..stack:get_name() .. + minetest.log("action", player:get_player_name().. + " takes "..stack:get_name().. " from chest at "..minetest.pos_to_string(pos)) end diff --git a/technic_chests/register.lua b/technic_chests/register.lua index da6470f..5deeb79 100644 --- a/technic_chests/register.lua +++ b/technic_chests/register.lua @@ -203,13 +203,13 @@ function technic.chests:definition(name, data) local locked_after_place = nil local front = { "technic_"..lname.."_chest_front.png" } - data.base_formspec = "size["..data.ovwidth..","..data.ovheight.."]" .. - "label[0,0;"..S("%s Chest"):format(name).."]" .. - "list[context;main;"..data.hileft..",1;"..data.width..","..data.height..";]" .. - "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]" .. + data.base_formspec = "size["..data.ovwidth..","..data.ovheight.."]".. + "label[0,0;"..S("%s Chest"):format(name).."]".. + "list[context;main;"..data.hileft..",1;"..data.width..","..data.height..";]".. + "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]".. "listring[]" if data.sort then data.base_formspec = data.base_formspec.."button["..data.hileft..","..(data.height + 1.1)..";1,0.8;sort;"..S("Sort").."]" diff --git a/wrench/init.lua b/wrench/init.lua index ce543a8..859acac 100644 --- a/wrench/init.lua +++ b/wrench/init.lua @@ -118,9 +118,9 @@ minetest.register_tool("wrench:wrench", { if def.owned then local owner = meta:get_string("owner") if owner and owner ~= placer:get_player_name() then - minetest.log("action", placer:get_player_name() .. - " tried to pick up a owned node belonging to " .. - owner.." at " .. + minetest.log("action", placer:get_player_name().. + " tried to pick up a owned node belonging to ".. + owner.." at ".. minetest.pos_to_string(pos)) return end