summaryrefslogtreecommitdiff
path: root/init.lua
diff options
context:
space:
mode:
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