summaryrefslogtreecommitdiff
path: root/init.lua
diff options
context:
space:
mode:
authorWuzzy <almikes@aol.com>2016-12-13 12:31:26 +0100
committerWuzzy <almikes@aol.com>2016-12-13 12:31:26 +0100
commitdfe653e1789538f9b669db2dcb788c71447cc7c9 (patch)
treeb019d49cc6dd7db8e497356fa9bab6aee517f890 /init.lua
parent4ae274b9e282cbd3de4b6d8779a2245cb12a1f0e (diff)
*_durability and make it more flexible
Diffstat (limited to 'init.lua')
-rw-r--r--init.lua7
1 files changed, 5 insertions, 2 deletions
diff --git a/init.lua b/init.lua
index d9fc140..4edab4d 100644
--- a/init.lua
+++ b/init.lua
@@ -832,8 +832,11 @@ doc.new_category("tools", {
end
datastring = datastring .. range_factoid(data.itemstring, data.def)
datastring = newline(datastring)
- if data.def._doc_items_uses ~= nil then
- datastring = datastring .. S("Uses: @1", data.def._doc_items_uses)
+ if type(data.def._doc_items_durability) == "number" then
+ datastring = datastring .. S("Durability: @1 uses", data.def._doc_items_durability)
+ datastring = newline(datastring)
+ elseif type(data.def._doc_items_durability) == "string" then
+ datastring = datastring .. S("Durability: @1", data.def._doc_items_durability)
datastring = newline(datastring)
end