From b68b1a70b0ef07a3e78df4e50b52d144a838bf09 Mon Sep 17 00:00:00 2001 From: BadToad2000 Date: Sat, 23 Jul 2016 00:24:54 -0500 Subject: [PATCH] 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?