summaryrefslogtreecommitdiff
path: root/init.lua
diff options
context:
space:
mode:
authorWuzzy <almikes@aol.com>2016-12-16 22:29:03 +0100
committerWuzzy <almikes@aol.com>2016-12-16 22:29:03 +0100
commit965dbff51517e9bd0edb77457e901919fd8d27ee (patch)
treefaa1811a4870d68f3aa571328493e6c36f545b3e /init.lua
parent3df6447208e1274333abd98fef6998b4516a9f8a (diff)
Differentiate b/w item/tool/node again
Diffstat (limited to 'init.lua')
-rw-r--r--init.lua32
1 files 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)