summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--API.md1
-rw-r--r--init.lua9
2 files changed, 10 insertions, 0 deletions
diff --git a/API.md b/API.md
index 773a5d5..fb2d839 100644
--- a/API.md
+++ b/API.md
@@ -188,6 +188,7 @@ Add a custom factoid (see above) for the specified category.
optimize the final text display. This currently determines where in the
entry text the factoid appears. Possible values:
* For all items:
+ * `"use"`: It's about using the item in some way (written right after the fixed usage help)
* `"groups"`: Group-related factoid (very vague)
* `"misc"`: Factoid doesn't fit anywhere else, is shown near the end
* For nodes only:
diff --git a/init.lua b/init.lua
index adb79f9..b3fc35f 100644
--- a/init.lua
+++ b/init.lua
@@ -318,6 +318,9 @@ doc.new_category("nodes", {
datastring = datastring .. S("Usage help: @1", usagehelp)
datastring = newline2(datastring)
end
+ datastring = datastring .. get_custom_factoids("nodes", "use", data)
+ datastring = newline2(datastring)
+
datastring = datastring .. S("Maximum stack size: @1", data.def.stack_max) .. "\n"
datastring = datastring .. range_factoid(data.itemstring, data.def) .. "\n"
@@ -819,6 +822,9 @@ doc.new_category("tools", {
datastring = datastring .. S("Usage help: @1", usagehelp)
datastring = newline2(datastring)
end
+ datastring = datastring .. get_custom_factoids("tools", "use", data)
+ datastring = newline2(datastring)
+
if data.itemstring ~= "" then
datastring = datastring .. S("Maximum stack size: @1", data.def.stack_max).. "\n"
end
@@ -896,6 +902,9 @@ doc.new_category("craftitems", {
datastring = datastring .. S("Usage help: @1", usagehelp)
datastring = newline2(datastring)
end
+ datastring = datastring .. get_custom_factoids("craftitems", "use", data)
+ datastring = newline2(datastring)
+
datastring = datastring .. S("Maximum stack size: @1", data.def.stack_max).. "\n"
datastring = datastring .. range_factoid(data.itemstring, data.def) .. "\n"