summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWuzzy <almikes@aol.com>2016-12-13 14:02:18 +0100
committerWuzzy <almikes@aol.com>2016-12-13 14:02:18 +0100
commit664a758e749800c2268fc9167cafdc620c6867bf (patch)
tree82c6f9c5f93fce653df46f96a139049cb60bea2e
parent98b8c7000f30c0f23659e029d4be215ad74e112e (diff)
Move durability info down
-rw-r--r--init.lua29
1 files changed, 15 insertions, 14 deletions
diff --git a/init.lua b/init.lua
index 1be1196..bea901a 100644
--- a/init.lua
+++ b/init.lua
@@ -856,20 +856,6 @@ doc.new_category("tools", {
datastring = newline(datastring)
end
datastring = datastring .. range_factoid(data.itemstring, data.def)
- datastring = newline(datastring)
- if type(data.def._doc_items_durability) == "number" then
- -- Fixed number of uses
- datastring = datastring .. S("Durability: @1 uses", data.def._doc_items_durability)
- datastring = newline(datastring)
- elseif type(data.def._doc_items_durability) == "string" then
- -- Manually described durability
- datastring = datastring .. S("Durability: @1", data.def._doc_items_durability)
- datastring = newline(datastring)
- else
- -- Automatically detect durability for mining tools
- datastring = datastring .. mining_durability_factoid(data.def.tool_capabilities)
- datastring = newline(datastring)
- end
datastring = newline2(datastring)
@@ -885,6 +871,21 @@ doc.new_category("tools", {
datastring = datastring .. toolcaps_to_text(data.def.tool_capabilities)
datastring = newline2(datastring)
+ -- Durability info
+ if type(data.def._doc_items_durability) == "number" then
+ -- Fixed number of uses
+ datastring = datastring .. S("Durability: @1 uses", data.def._doc_items_durability)
+ datastring = newline(datastring)
+ elseif type(data.def._doc_items_durability) == "string" then
+ -- Manually described durability
+ datastring = datastring .. S("Durability: @1", data.def._doc_items_durability)
+ datastring = newline(datastring)
+ else
+ -- Automatically detect durability for mining tools
+ datastring = datastring .. mining_durability_factoid(data.def.tool_capabilities)
+ datastring = newline(datastring)
+ end
+
datastring = datastring .. get_custom_factoids("tools", "groups", data)
datastring = newline2(datastring)