diff options
author | Wuzzy <almikes@aol.com> | 2016-11-18 14:46:37 +0100 |
---|---|---|
committer | Wuzzy <almikes@aol.com> | 2016-11-18 14:46:37 +0100 |
commit | b48752a2205a86621e35acfc3292cda932ddaf65 (patch) | |
tree | 0a509bc88a8714894eacfd645b1d12113f029b71 /API.md | |
parent | 20f546ddf63f2530fa2987fb5fd4d055fe1ab1a4 (diff) |
Add doc.set_category_order
Diffstat (limited to 'API.md')
-rw-r--r-- | API.md | 21 |
1 files changed, 21 insertions, 0 deletions
@@ -67,6 +67,7 @@ These functions are available: * `doc.new_category`: Adds a new category * `doc.new_entry`: Adds a new entry +* `doc.set_category_order`: Sets the order of categories in the category list * `doc.show_entry`: Shows a particular entry to a player * `doc.show_category`: Shows the entry list of a category to a player * `doc.show_doc`: Opens the main Documentation System form for a player @@ -199,6 +200,26 @@ the category definition. #### Return value Always `nil`. +### `doc.set_category_order(category_list)` +Sets the order of categories in the category list. +The Documentation System starts with this default order: + + {"basics", "online", "nodes", "tools", "craftitems"} + +This function can be called at any time, but it recommended to only call +this function once for the entire server session and to only call it +from subgame mods, to avoid contradictions. If this function is called a +second time by any mod, a warning is written into the log. + +#### Parameters +* `category_list`: List of category IDs in the order they should appear + in the category list. All unspecified categories will be appended to + the end + +#### Return value +Always `nil`. + + ### `doc.show_doc(playername)` Opens the main documentation formspec for the player (Main tab). |