From 965dbff51517e9bd0edb77457e901919fd8d27ee Mon Sep 17 00:00:00 2001 From: Wuzzy Date: Fri, 16 Dec 2016 22:29:03 +0100 Subject: Differentiate b/w item/tool/node again --- init.lua | 32 ++++++++++++++++++++++++++++---- 1 file changed, 28 insertions(+), 4 deletions(-) diff --git a/init.lua b/init.lua index f2c49a4..95b10da 100644 --- a/init.lua +++ b/init.lua @@ -387,10 +387,22 @@ local factoids_header = function(data, ctype) datastring = newline2(datastring) if data.def.liquids_pointable == true then - datastring = datastring .. S("This item points to liquids.").."\n" + if ctype == "nodes" then + datastring = datastring .. S("This block points to liquids.").."\n" + elseif ctype == "tools" then + datastring = datastring .. S("This tool points to liquids.").."\n" + elseif ctype == "craftitems" then + datastring = datastring .. S("This item points to liquids.").."\n" + end end if data.def.on_use ~= nil then - datastring = datastring .. S("Punches with this item don't work as usual; melee combat and mining are either not possible or work differently.").."\n" + if ctype == "nodes" then + datastring = datastring .. S("Punches with this block don't work as usual; melee combat and mining are either not possible or work differently.").."\n" + elseif ctype == "tools" then + datastring = datastring .. S("Punches with this tool don't work as usual; melee combat and mining are either not possible or work differently.").."\n" + elseif ctype == "craftitems" then + datastring = datastring .. S("Punches with this item don't work as usual; melee combat and mining are either not possible or work differently.").."\n" + end end datastring = newline(datastring) @@ -416,9 +428,21 @@ local factoids_footer = function(data, playername, ctype) local gstring, gcount = groups_to_string(data.def.groups, miscgroups) if gstring ~= nil then if gcount == 1 then - datastring = datastring .. S("This item belongs to the @1 group.", gstring) .. "\n" + if ctype == "nodes" then + datastring = datastring .. S("This block belongs to the @1 group.", gstring) .. "\n" + elseif ctype == "tools" then + datastring = datastring .. S("This tool belongs to the @1 group.", gstring) .. "\n" + elseif ctype == "craftitems" then + datastring = datastring .. S("This item belongs to the @1 group.", gstring) .. "\n" + end else - datastring = datastring .. S("This item belongs to these groups: @1.", gstring) .. "\n" + if ctype == "nodes" then + datastring = datastring .. S("This block belongs to these groups: @1.", gstring) .. "\n" + elseif ctype == "tools" then + datastring = datastring .. S("This tool belongs to these groups: @1.", gstring) .. "\n" + elseif ctype == "craftitems" then + datastring = datastring .. S("This item belongs to these groups: @1.", gstring) .. "\n" + end end end datastring = newline2(datastring) -- cgit v1.2.3