From 9779dae8b64d08edc0caf1dfee92c33d192be6ea Mon Sep 17 00:00:00 2001 From: BadToad2000 Date: Sat, 23 Jul 2016 00:20:45 -0500 Subject: [PATCH 1/3] Use listring so SHIFT-CLICK quickly moves between inventories. listring allows the user to quickly move items from chest/furnace/etc. to their inventory. --- mods/default/nodes.lua | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/mods/default/nodes.lua b/mods/default/nodes.lua index b8b115e..009de9c 100644 --- a/mods/default/nodes.lua +++ b/mods/default/nodes.lua @@ -781,6 +781,7 @@ default.chest_formspec = "size[8,9]".. "list[current_name;main;0,0;8,4;]".. "list[current_player;main;0,5;8,4;]" + .."listring[current_name;main]".."listring[current_player;main]" function default.get_locked_chest_formspec(pos) local spos = pos.x .. "," .. pos.y .. "," ..pos.z @@ -788,6 +789,7 @@ function default.get_locked_chest_formspec(pos) "size[8,9]".. "list[nodemeta:".. spos .. ";main;0,0;8,4;]".. "list[current_player;main;0,5;8,4;]" + .."listring[[nodemeta:".. spos ..";main]".."listring[current_player;main]" return formspec end @@ -993,6 +995,9 @@ function default.get_furnace_active_formspec(pos, percent) "list[current_name;src;2,1;1,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 formspec end @@ -1013,6 +1018,9 @@ default.furnace_inactive_formspec = "list[current_name;src;2,1;1,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("default:furnace", { description = "Furnace", From b68b1a70b0ef07a3e78df4e50b52d144a838bf09 Mon Sep 17 00:00:00 2001 From: BadToad2000 Date: Sat, 23 Jul 2016 00:24:54 -0500 Subject: [PATCH 2/3] More listring changes. --- mods/adventuretest/register_functions.lua | 19 ++++++++++--------- mods/bones/init.lua | 3 ++- mods/cottages/nodes_anvil.lua | 4 +++- mods/cottages/nodes_barrel.lua | 5 ++++- mods/cottages/nodes_furniture.lua | 7 ++++--- mods/cottages/nodes_straw.lua | 9 +++++++-- mods/moreblocks/circular_saw.lua | 7 ++++++- 7 files changed, 36 insertions(+), 18 deletions(-) diff --git a/mods/adventuretest/register_functions.lua b/mods/adventuretest/register_functions.lua index 6def3c3..ab24c3f 100644 --- a/mods/adventuretest/register_functions.lua +++ b/mods/adventuretest/register_functions.lua @@ -59,17 +59,18 @@ local function adventuretest_dignode(pos, node, digger) end end - -- EXPERIENCE - if minetest.registered_nodes[node.name] ~= nil then - if minetest.registered_nodes[node.name]["skill"] ~= nil then - default.drop_item(pos,"experience:1_exp") - skills.add_exp(name,5) - end - end - - -- ENERGY if digger ~= nil and digger ~= "" then local name= digger:get_player_name() + + -- EXPERIENCE + if minetest.registered_nodes[node.name] ~= nil then + if minetest.registered_nodes[node.name]["skill"] ~= nil then + default.drop_item(pos,"experience:1_exp") + skills.add_exp(name,5) + end + end + + -- ENERGY pd.increment(name,"energy",-0.05) pd.increment(name,STAT_DUG,1) diff --git a/mods/bones/init.lua b/mods/bones/init.lua index 90cc3f6..fc354eb 100644 --- a/mods/bones/init.lua +++ b/mods/bones/init.lua @@ -255,7 +255,8 @@ function bones_on_dieplayer (player) meta:set_string("formspec", "size[8,9;]".. "list[current_name;main;0,0;8,4;]".. - "list[current_player;main;0,5;8,4;]") + "list[current_player;main;0,5;8,4;]" + .."listring[current_name;main]".."listring[current_player;main]") meta:set_string("infotext", player:get_player_name().."'s fresh bones") meta:set_string("owner", player:get_player_name()) meta:set_int("time", 0) diff --git a/mods/cottages/nodes_anvil.lua b/mods/cottages/nodes_anvil.lua index 4a6f060..2bf4596 100644 --- a/mods/cottages/nodes_anvil.lua +++ b/mods/cottages/nodes_anvil.lua @@ -45,7 +45,9 @@ local cottages_anvil_formspec = "label[0,-0.5;"..S("Anvil").."]".. "label[0,3.0;"..S("Punch anvil with hammer to").."]".. "label[0,3.3;"..S("repair tool in workpiece-slot.").."]".. - "list[current_player;main;0,4;8,4;]"; + "list[current_player;main;0,4;8,4;]" + .."listring[current_player;main]".."listring[current_name;hammer]" + .."listring[current_player;main]".."listring[current_name;input]" minetest.register_node("cottages:anvil", { diff --git a/mods/cottages/nodes_barrel.lua b/mods/cottages/nodes_barrel.lua index a56b870..03ce6aa 100644 --- a/mods/cottages/nodes_barrel.lua +++ b/mods/cottages/nodes_barrel.lua @@ -39,7 +39,10 @@ barrel.on_construct = function( pos ) "list[current_name;input;3,0.5;1,1;]".. "label[5,3.3;"..S("Fill:").."]".. "list[current_name;output;5,3.8;1,1;]".. - "list[current_player;main;0,5;8,4;]"); + "list[current_player;main;0,5;8,4;]" + .."listring[current_name;output]".."listring[current_player;main]" + .."listring[current_name;input]".."listring[current_player;main]" + ) meta:set_string( 'liquid_type', '' ); -- which liquid is in the barrel? diff --git a/mods/cottages/nodes_furniture.lua b/mods/cottages/nodes_furniture.lua index 2c03b10..6d39445 100644 --- a/mods/cottages/nodes_furniture.lua +++ b/mods/cottages/nodes_furniture.lua @@ -5,9 +5,9 @@ -- * a bed seperated into foot and head reagion so that it can be placed manually; it has -- no other functionality than decoration! -- * a sleeping mat - mostly for NPC that cannot afford a bet yet --- * bench - if you don't have 3dforniture:chair, then this is the next best thing +-- * bench - if you don't have 3dfurniture:chair, then this is the next best thing -- * table - very simple one --- * shelf - for stroring things; this one is 3d +-- * shelf - for storing things; this one is 3d -- * stovepipe - so that the smoke from the furnace can get away -- * washing place - put it over a water source and you can 'wash' yourshelf --------------------------------------------------------------------------------------- @@ -224,7 +224,8 @@ minetest.register_node("cottages:shelf", { meta:set_string("formspec", "size[8,8]".. "list[current_name;main;0,0;8,3;]".. - "list[current_player;main;0,4;8,4;]") + "list[current_player;main;0,4;8,4;]" + .."listring[current_name;main]".."listring[current_player;main]") meta:set_string("infotext", S("open storage shelf")) local inv = meta:get_inventory(); inv:set_size("main", 24); diff --git a/mods/cottages/nodes_straw.lua b/mods/cottages/nodes_straw.lua index 3506a9a..3940eca 100644 --- a/mods/cottages/nodes_straw.lua +++ b/mods/cottages/nodes_straw.lua @@ -97,7 +97,10 @@ local cottages_formspec_treshing_floor = "label[0,-0.5;"..S("Threshing floor").."]".. "label[0,2.5;"..S("Punch threshing floor with a stick").."]".. "label[0,3.0;"..S("to get straw and seeds from wheat.").."]".. - "list[current_player;main;0,4;8,4;]"; + "list[current_player;main;0,4;8,4;]" + .."listring[current_name;straw]".."listring[current_player;main]" + .."listring[current_name;seeds]".."listring[current_player;main]" + .."listring[current_name;harvest]".."listring[current_player;main]" minetest.register_node("cottages:threshing_floor", { drawtype = "nodebox", @@ -352,7 +355,9 @@ local cottages_handmill_formspec = "size[8,8]".. "label[0,-0.3;"..S("Mill").."]".. "label[0,2.5;"..S("Punch this hand-driven mill").."]".. "label[0,3.0;"..S("to convert wheat seeds into flour.").."]".. - "list[current_player;main;0,4;8,4;]"; + "list[current_player;main;0,4;8,4;]" + .."listring[current_name;flour]".."listring[current_player;main]" + .."listring[current_name;seeds]".."listring[current_player;main]" minetest.register_node("cottages:handmill", { description = S("mill, powered by punching"), diff --git a/mods/moreblocks/circular_saw.lua b/mods/moreblocks/circular_saw.lua index 88c6260..1ac1dec 100644 --- a/mods/moreblocks/circular_saw.lua +++ b/mods/moreblocks/circular_saw.lua @@ -320,7 +320,12 @@ function circular_saw.on_construct(pos) "field[0.3,3.5;1,1;max_offered;" ..S("Max").. ":;${max_offered}]" .. "button[1,3.2;1,1;Set;" ..S("Set").. "]" .. "list[current_name;output;2.8,0;8,6;]" .. - "list[current_player;main;1.5,6.25;8,4;]") + "list[current_player;main;1.5,6.25;8,4;]".. + "listring[current_name;output]".."listring[current_player;main]".. + "listring[current_name;input]".."listring[current_player;main]".. + "listring[current_name;micro]".."listring[current_player;main]".. + "listring[current_name;recyle]".."listring[current_player;main]".. + ) meta:set_int("anz", 0) -- No microblocks inside yet. meta:set_string("max_offered", 99) -- How many items of this kind are offered by default? From 93b57256af4a6d5de49294bb145522a599d625fd Mon Sep 17 00:00:00 2001 From: BadToad2000 Date: Mon, 25 Jul 2016 14:36:38 -0500 Subject: [PATCH 3/3] Fix right-click on town plot markers. Additionally: - address some deprecated procedure calls. - ensure doors are not "group:wood" (only planks are used in crafting, and tidies crafting guide) --- mods/adventuretest/register_functions.lua | 8 -------- mods/boats/init.lua | 2 +- mods/cottages/nodes_furniture.lua | 6 +++--- mods/default/nodes.lua | 8 ++++---- mods/handle_schematics/init.lua | 10 +++++----- mods/magic/magicmissle.lua | 2 +- mods/mg_villages/map_of_world.lua | 2 +- mods/mg_villages/protection.lua | 23 ++++++++++++----------- mods/moreblocks/circular_saw.lua | 12 ++++++++---- mods/throwing/init.lua | 2 +- mods/ts_doors/init.lua | 6 +++--- mods/workbench/init.lua | 6 ++++-- 12 files changed, 43 insertions(+), 44 deletions(-) diff --git a/mods/adventuretest/register_functions.lua b/mods/adventuretest/register_functions.lua index 58b1ed6..a7109ae 100644 --- a/mods/adventuretest/register_functions.lua +++ b/mods/adventuretest/register_functions.lua @@ -75,14 +75,6 @@ local function adventuretest_dignode(pos, node, digger) -- ENERGY pd.increment(name,"energy",-0.05) - -- EXPERIENCE - if minetest.registered_nodes[node.name] ~= nil then - if minetest.registered_nodes[node.name]["skill"] ~= nil then - default.drop_item(pos,"experience:1_exp") - skills.add_exp(name,5) - end - end - pd.increment(name,STAT_DUG,1) local dug = pd.get(name,STAT_DUG) if dug % 100 == 0 then diff --git a/mods/boats/init.lua b/mods/boats/init.lua index a47c5a0..c5b063e 100644 --- a/mods/boats/init.lua +++ b/mods/boats/init.lua @@ -79,7 +79,7 @@ function boat.on_rightclick(self, clicker) minetest.after(0.2, function() default.player_set_animation(clicker, "sit" , 30) end) - self.object:setyaw(clicker:get_look_yaw() - math.pi / 2) + self.object:setyaw(clicker:get_look_horizontal() - math.pi / 2) end end diff --git a/mods/cottages/nodes_furniture.lua b/mods/cottages/nodes_furniture.lua index 6d39445..b56b038 100644 --- a/mods/cottages/nodes_furniture.lua +++ b/mods/cottages/nodes_furniture.lua @@ -9,7 +9,7 @@ -- * table - very simple one -- * shelf - for storing things; this one is 3d -- * stovepipe - so that the smoke from the furnace can get away --- * washing place - put it over a water source and you can 'wash' yourshelf +-- * washing place - put it over a water source and you can 'wash' yourself --------------------------------------------------------------------------------------- -- TODO: change the textures of the bed (make the clothing white, foot path not entirely covered with cloth) @@ -224,8 +224,8 @@ minetest.register_node("cottages:shelf", { meta:set_string("formspec", "size[8,8]".. "list[current_name;main;0,0;8,3;]".. - "list[current_player;main;0,4;8,4;]" - .."listring[current_name;main]".."listring[current_player;main]") + "list[current_player;main;0,4;8,4;]".. + "listring[current_name;main]".."listring[current_player;main]") meta:set_string("infotext", S("open storage shelf")) local inv = meta:get_inventory(); inv:set_size("main", 24); diff --git a/mods/default/nodes.lua b/mods/default/nodes.lua index 40b0c2f..dbaf3b1 100644 --- a/mods/default/nodes.lua +++ b/mods/default/nodes.lua @@ -815,16 +815,16 @@ minetest.register_node("default:sign_wall", { default.chest_formspec = "size[8,9]".. "list[current_name;main;0,0;8,4;]".. - "list[current_player;main;0,5;8,4;]" - .."listring[current_name;main]".."listring[current_player;main]" + "list[current_player;main;0,5;8,4;]".. + "listring[]" function default.get_locked_chest_formspec(pos) local spos = pos.x .. "," .. pos.y .. "," ..pos.z local formspec = "size[8,9]".. "list[nodemeta:".. spos .. ";main;0,0;8,4;]".. - "list[current_player;main;0,5;8,4;]" - .."listring[[nodemeta:".. spos ..";main]".."listring[current_player;main]" + "list[current_player;main;0,5;8,4;]".. + "listring[]" return formspec end diff --git a/mods/handle_schematics/init.lua b/mods/handle_schematics/init.lua index a3b043a..a253a61 100644 --- a/mods/handle_schematics/init.lua +++ b/mods/handle_schematics/init.lua @@ -42,15 +42,15 @@ dofile(handle_schematics.modpath.."/replacements_get_table.lua") -- uses build_chest.* namespace -- a chest for spawning buildings manually ---dofile(handle_schematics.modpath.."/build_chest.lua") +dofile(handle_schematics.modpath.."/build_chest.lua") -- makes the replacements from replacements_group.* available to the build chest ---dofile(handle_schematics.modpath.."/build_chest_handle_replacements.lua"); +dofile(handle_schematics.modpath.."/build_chest_handle_replacements.lua"); -- creates 2d previews of the schematic from left/right/back/front/top ---dofile(handle_schematics.modpath.."/build_chest_preview_image.lua"); +dofile(handle_schematics.modpath.."/build_chest_preview_image.lua"); -- reads a file and adds the files listed there as menu entries ---dofile(handle_schematics.modpath.."/build_chest_add_schems_from_file.lua"); +dofile(handle_schematics.modpath.."/build_chest_add_schems_from_file.lua"); -- locate schematics through directories ---dofile(handle_schematics.modpath.."/build_chest_add_schems_by_directory.lua"); +dofile(handle_schematics.modpath.."/build_chest_add_schems_by_directory.lua"); -- the main functionality of the mod; -- provides the function handle_schematics.place_building_from_file diff --git a/mods/magic/magicmissle.lua b/mods/magic/magicmissle.lua index ff32464..19747e7 100644 --- a/mods/magic/magicmissle.lua +++ b/mods/magic/magicmissle.lua @@ -139,7 +139,7 @@ local magicmissle_spell = { local dir = user:get_look_dir() obj:setvelocity({x=dir.x*19, y=dir.y*19, z=dir.z*19}) obj:setacceleration({x=dir.x*-3, y=-1, z=dir.z*-3}) - obj:setyaw(user:get_look_yaw()+math.pi) + obj:setyaw(user:get_look_horizontal()+math.pi) obj:get_luaentity().player = user magic.update_magic(user,name) else diff --git a/mods/mg_villages/map_of_world.lua b/mods/mg_villages/map_of_world.lua index 7df3c40..0fe1d81 100644 --- a/mods/mg_villages/map_of_world.lua +++ b/mods/mg_villages/map_of_world.lua @@ -128,7 +128,7 @@ mg_villages.map_of_world = function( pname ) end -- code and arrows taken from mapp mod - local yaw = player:get_look_yaw() + local yaw = player:get_look_horizontal() local rotate = 0; if yaw ~= nil then -- Find rotation and texture based on yaw. diff --git a/mods/mg_villages/protection.lua b/mods/mg_villages/protection.lua index 6563a2c..4994f61 100644 --- a/mods/mg_villages/protection.lua +++ b/mods/mg_villages/protection.lua @@ -44,8 +44,8 @@ minetest.is_protected = function(pos, name) local is_houseowner = false; for nr, p in pairs( mg_villages.all_villages[ village_id ].to_add_data.bpos ) do - trustedusers = p.can_edit - trustedUser = false + local trustedusers = p.can_edit + local trustedUser = false if trustedusers ~= nil then for _,trusted in pairs(trustedusers) do if trusted == name then @@ -136,8 +136,10 @@ mg_villages.plotmarker_formspec = function( pos, formname, fields, player ) return; end - local owner = mg_villages.all_villages[ village_id ].to_add_data.bpos[ plot_nr ].owner; - local btype = mg_villages.all_villages[ village_id ].to_add_data.bpos[ plot_nr ].btype; + local village = mg_villages.all_villages[ village_id ]; + local plot = village.to_add_data.bpos[ plot_nr ]; + -- local owner = mg_villages.all_villages[ village_id ].to_add_data.bpos[ plot_nr ].owner; + local btype = plot.btype; local owner_name = plot.owner; if( not( owner_name ) or owner_name == "" ) then @@ -160,8 +162,7 @@ mg_villages.plotmarker_formspec = function( pos, formname, fields, player ) -- create the header local formspec = "size[13,10]".. "label[3.3,0.0;Plot No.: "..tostring( plot_nr )..", with "..tostring( mg_villages.BUILDINGS[ plot.btype ].scm ).."]".. - "label[0.3,0.4;Located at:]" .."label[3.3,0.4;"..(minetest.pos_to_string( pos ) or '?')..", which is "..tostring( distance ).." m away]" - .."label[7.3,0.4;from the village center]".. + "label[0.3,0.4;Located at:]" .."label[3.3,0.4;"..(minetest.pos_to_string( pos ) or '?')..", which is "..tostring( distance ).."m from the village center]".. "label[0.3,0.8;Part of village:]" .."label[3.3,0.8;"..(village.name or "- name unknown -").."]" .."label[7.3,0.8;located at "..(village_pos).."]".. "label[0.3,1.2;Owned by:]" .."label[3.3,1.2;"..(owner_name).."]".. @@ -338,10 +339,9 @@ mg_villages.plotmarker_formspec = function( pos, formname, fields, player ) local original_formspec = "size[8,3]".. "button[7.0,0.0;1.0,0.5;info;Info]".. "label[1.0,0.5;Plot No.: "..tostring( plot_nr ).."]".. - "label[2.5,0.5;Building:]".. - "label[3.5,0.5;"..tostring( mg_villages.BUILDINGS[btype].scm ).."]".. + "label[2.5,0.5;Building: "..tostring( mg_villages.BUILDINGS[btype].scm ).." ]".. "field[20,20;0.1,0.1;pos2str;Pos;"..minetest.pos_to_string( pos ).."]"; - local formspec = ""; + local formspec = ""; local ifinhabit = ""; -- Get Price @@ -368,8 +368,9 @@ mg_villages.plotmarker_formspec = function( pos, formname, fields, player ) if (not(owner) or owner=='') then formspec = original_formspec .. - "label[1,1;You can buy this plot for]".. - "label[3.8,1;"..tostring( price_stack:get_count() ).." x ]".. + --"label[1,1;You can buy this plot for]".. + --"label[3.8,1;"..tostring( price_stack:get_count() ).." x ]".. + "label[1,1;You can buy this plot for "..tostring( price_stack:get_count() ).." x ]".. "item_image[4.3,0.8;1,1;"..( price_stack:get_name() ).."]".. ifinhabit.. "button[2,2.5;1.5,0.5;buy;Buy plot]".. diff --git a/mods/moreblocks/circular_saw.lua b/mods/moreblocks/circular_saw.lua index 1ac1dec..3ebfc17 100644 --- a/mods/moreblocks/circular_saw.lua +++ b/mods/moreblocks/circular_saw.lua @@ -321,10 +321,14 @@ function circular_saw.on_construct(pos) "button[1,3.2;1,1;Set;" ..S("Set").. "]" .. "list[current_name;output;2.8,0;8,6;]" .. "list[current_player;main;1.5,6.25;8,4;]".. - "listring[current_name;output]".."listring[current_player;main]".. - "listring[current_name;input]".."listring[current_player;main]".. - "listring[current_name;micro]".."listring[current_player;main]".. - "listring[current_name;recyle]".."listring[current_player;main]".. + "listring[current_name;output]".. + "listring[current_player;main]".. + "listring[current_name;input]".. + "listring[current_player;main]".. + "listring[current_name;micro]".. + "listring[current_player;main]".. + "listring[current_name;recyle]".. + "listring[current_player;main]" ) meta:set_int("anz", 0) -- No microblocks inside yet. diff --git a/mods/throwing/init.lua b/mods/throwing/init.lua index 142ce4b..675ad9a 100644 --- a/mods/throwing/init.lua +++ b/mods/throwing/init.lua @@ -21,7 +21,7 @@ local throwing_shoot_arrow = function(itemstack, player) local dir = player:get_look_dir() obj:setvelocity({x=dir.x*19, y=dir.y*19, z=dir.z*19}) obj:setacceleration({x=dir.x*-3, y=weapon_def.drop_rate, z=dir.z*-3}) - obj:setyaw(player:get_look_yaw()+math.pi) + obj:setyaw(player:get_look_horizontal()+math.pi) obj:get_luaentity().player = player obj:get_luaentity().max_damage = obj:get_luaentity().max_damage + weapon_def.damage_modifier minetest.sound_play("throwing_sound", {object=player}) diff --git a/mods/ts_doors/init.lua b/mods/ts_doors/init.lua index 304de32..55123cb 100755 --- a/mods/ts_doors/init.lua +++ b/mods/ts_doors/init.lua @@ -14,7 +14,7 @@ function ts_doors.register_door(recipe, description, texture) tiles = {{ name = "[combine:32x38:0,0=" .. texture .. ":0,16=" .. texture .. ":0,32=" .. texture .. ":16,0=" .. texture .. ":16,16=" .. texture .. ":16,32=" .. texture .. "^[transformR270^[colorize:#fff:30^ts_doors_base.png^[noalpha^[makealpha:0,255,0", backface_culling = true }}, description = description .. " Door", inventory_image = "[combine:32x38:0,0=" .. texture .. ":0,16=" .. texture .. ":16,0=" .. texture .. ":16,16=" .. texture .. "^[transformR270^[colorize:#fff:30^ts_doors_base_inv.png^[noalpha^[makealpha:0,255,0", - groups = groups, + groups = door_groups, recipe = { {recipe, recipe}, {recipe, recipe}, @@ -23,14 +23,14 @@ function ts_doors.register_door(recipe, description, texture) }) - groups.level = 2 + door_groups.level = 2 doors.register("ts_door_locked_" .. recipe:gsub(":", "_"), { tiles = {{ name = "[combine:32x38:0,0=" .. texture .. ":0,16=" .. texture .. ":0,32=" .. texture .. ":16,0=" .. texture .. ":16,16=" .. texture .. ":16,32=" .. texture .. "^[transformR270^[colorize:#fff:30^ts_doors_base_locked.png^[noalpha^[makealpha:0,255,0", backface_culling = true }}, description = description .. " Locked Door", inventory_image = "[combine:32x38:0,0=" .. texture .. ":0,16=" .. texture .. ":16,0=" .. texture .. ":16,16=" .. texture .. "^[transformR270^[colorize:#fff:30^ts_doors_base_locked_inv.png^[noalpha^[makealpha:0,255,0", protected = true, - groups = groups, + groups = door_groups, sound_open = "doors_steel_door_open", sound_close = "doors_steel_door_close", recipe = { diff --git a/mods/workbench/init.lua b/mods/workbench/init.lua index fde9cea..27999b0 100644 --- a/mods/workbench/init.lua +++ b/mods/workbench/init.lua @@ -49,6 +49,8 @@ local function inventory_set_formspec(player, size) .."list[current_player;main;"..(fsize_x-msize_x)..","..(fsize_y-msize_y+1.25)..";"..msize_x..","..(msize_y - 1)..";"..msize_x.."]" .."list[current_player;craft;"..(fsize_x-size-2)..",0;"..size..","..size..";]" .."list[current_player;craftpreview;"..(fsize_x-1)..","..(size/2-0.5)..";1,1;]" + .."listring[current_player;main]" + .."listring[current_player;craft]" for i = 0, msize_x - 1, 1 do formspec = formspec.."image["..(fsize_x-msize_x + i)..","..(fsize_y-msize_y)..";1,1;gui_hb_bg.png]" end @@ -56,8 +58,8 @@ local function inventory_set_formspec(player, size) -- add the shortcut buttons if size ~= 3 then formspec = formspec .. "image_button[0.25,0.25;1,1;inventory_plus_zcg.png;zcg;]" - formspec = formspec .. "image_button[1.25,0.25;1,1;inventory_plus_skins.png;skins;]" - formspec = formspec .. "image_button[0.25,1.25;1,1;inventory_plus_armor.png;armor;]" + .. "image_button[1.25,0.25;1,1;inventory_plus_skins.png;skins;]" + .. "image_button[0.25,1.25;1,1;inventory_plus_armor.png;armor;]" end player:set_inventory_formspec(formspec)