From e0bf9a56e665ad3b38fbe10b144e768547b93980 Mon Sep 17 00:00:00 2001 From: Jordan Irwin Date: Fri, 30 Jul 2021 16:16:47 -0700 Subject: [PATCH] LDoc: add world path config file usage to HTML docs --- TODO.txt | 1 - docs/config.ld | 1 + docs/config.luadoc | 53 ++++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 54 insertions(+), 1 deletion(-) create mode 100644 docs/config.luadoc diff --git a/TODO.txt b/TODO.txt index 7238766..a79691b 100644 --- a/TODO.txt +++ b/TODO.txt @@ -8,6 +8,5 @@ TODO: - add "radius" option for pencil or "xlen", "ylen", & "zlen" options - add "xrotate" & "zrorate" modes for pencil - fix pencil "write" mode when pointing to side of node (node gets placed below) -- add config file usage to HTML docs - move HTML docs to gh-pages branch - change "cleaner" chat command to something like "cleanertool" or "ctool" diff --git a/docs/config.ld b/docs/config.ld index 08c3987..0bfde0f 100644 --- a/docs/config.ld +++ b/docs/config.ld @@ -20,6 +20,7 @@ file = { "api.lua", "chat.lua", "tools.lua", + "docs/config.luadoc", } new_type("chatcmd", "Chat Commands") diff --git a/docs/config.luadoc b/docs/config.luadoc new file mode 100644 index 0000000..89accf8 --- /dev/null +++ b/docs/config.luadoc @@ -0,0 +1,53 @@ + +--- World Path Configuration +-- +-- @topic config + + +--- Main configuration file. +-- +-- Registering items, entities, etc. for cleaning can be done in ***cleaner.json*** +-- in the world directory (`/cleaner.json`). If it does not exist +-- it will be created automatically when the server is started. +-- +-- It is formatted as follows: +-- +-- { +-- "entities" : +-- { +-- "remove" : [] +-- }, +-- "items" : +-- { +-- "replace" : {} +-- }, +-- "nodes" : +-- { +-- "remove" : [], +-- "replace" : {} +-- }, +-- "ores" : +-- { +-- "remove" : [] +-- } +-- } +-- +-- `remove` key works for nodes, entities, & ores. `replace` key works for +-- nodes & items. Their functions are self-explanatory. +-- +-- @json cleaner.json +-- @usage +-- Cleaning nodes example: +-- { +-- "nodes" : +-- { +-- "remove" : [ +-- "old:node_1", +-- "old:node_2", +-- ], +-- "replace" : { +-- "old:node_3" : "new:node_1", +-- "old:node_4" : "new:node_2", +-- } +-- }, +-- }