diff options
author | Wuzzy <almikes@aol.com> | 2016-12-13 12:31:26 +0100 |
---|---|---|
committer | Wuzzy <almikes@aol.com> | 2016-12-13 12:31:26 +0100 |
commit | dfe653e1789538f9b669db2dcb788c71447cc7c9 (patch) | |
tree | b019d49cc6dd7db8e497356fa9bab6aee517f890 /init.lua | |
parent | 4ae274b9e282cbd3de4b6d8779a2245cb12a1f0e (diff) |
*_durability and make it more flexible
Diffstat (limited to 'init.lua')
-rw-r--r-- | init.lua | 7 |
1 files changed, 5 insertions, 2 deletions
@@ -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 |