From ba0f8553ed5afde61ea9bec1360a089c7fcebcba Mon Sep 17 00:00:00 2001 From: lethosor Date: Wed, 8 Jul 2020 23:46:38 -0400 Subject: [PATCH] Misc updates, links --- docs/Core.rst | 12 +++++++++--- docs/Dev-intro.rst | 22 ++++++++++++++-------- docs/Plugins.rst | 2 ++ docs/Scripts.rst | 2 ++ 4 files changed, 27 insertions(+), 11 deletions(-) diff --git a/docs/Core.rst b/docs/Core.rst index 8f84c7b54..6ef1d0575 100644 --- a/docs/Core.rst +++ b/docs/Core.rst @@ -166,10 +166,13 @@ right place to do it. Most such plugins or scripts support the built-in ``enable`` and ``disable`` commands. Calling them at any time without arguments prints a list of enabled and disabled plugins, and shows whether that can be changed -through the same commands. +through the same commands. Passing plugin names to these commands will enable +or disable the specified plugins. For example, to enable the `manipulator` +plugin:: -To enable or disable plugins that support this, use their names as -arguments for the command:: + enable manipulator + +It is also possible to enable or disable multiple plugins at once:: enable manipulator search @@ -272,6 +275,9 @@ something. Usage:: Allows dealing with plugins individually by name, or all at once. +Note that plugins do not maintain their enabled state if they are reloaded, so +you may need to use `enable` to re-enable a plugin after reloading it. + .. _ls: diff --git a/docs/Dev-intro.rst b/docs/Dev-intro.rst index b1961378c..9a08533c0 100644 --- a/docs/Dev-intro.rst +++ b/docs/Dev-intro.rst @@ -37,6 +37,12 @@ Plugins can also register handlers to run on every tick, and can interface with the built-in `enable` and `disable` commands. For the full plugin API, see the skeleton plugins or ``PluginManager.cpp``. +Installed plugins live in the ``hack/plugins`` folder of a DFHack installation, +and the `load` family of commands can be used to load a recompiled plugin +without restarting DF. + +See `plugins-index` for a list of all plugins included in DFHack. + Scripts ------- @@ -45,7 +51,7 @@ is more complete and currently better-documented, however. Referring to existing scripts as well as the API documentation can be helpful when developing new scripts. -DFHack scripts live in a separate `scripts repository `_. +`Scripts included in DFHack ` live in a separate `scripts repository `_. This can be found in the ``scripts`` submodule if you have `cloned DFHack `, or the ``hack/scripts`` folder of an installed copy of DFHack. @@ -53,17 +59,17 @@ of an installed copy of DFHack. Core ---- -The DFHack core has a variety of low-level functions. It is responsible for -hooking into DF (via SDL), providing a console, and providing an interface -for plugins and scripts to interact with DF. +The `DFHack core ` has a variety of low-level functions. It is +responsible for hooking into DF (via SDL), providing a console, and providing an +interface for plugins and scripts to interact with DF. Modules ------- -A lot of shared code to interact with DF in more complicated ways is exposed by -**modules**. For example, the Units module contains functions for checking -various traits of units, changing nicknames properly, and more. Generally, -code that is useful to multiple plugins and scripts should go in the appropriate +A lot of shared code to interact with DF in more complicated ways is contained +in **modules**. For example, the Units module contains functions for checking +various traits of units, changing nicknames properly, and more. Generally, code +that is useful to multiple plugins and scripts should go in the appropriate module, if there is one. Several modules are also `exposed to Lua `, although diff --git a/docs/Plugins.rst b/docs/Plugins.rst index 0bd699e14..0185dbee5 100644 --- a/docs/Plugins.rst +++ b/docs/Plugins.rst @@ -1,3 +1,5 @@ +.. _plugins-index: + ############## DFHack Plugins ############## diff --git a/docs/Scripts.rst b/docs/Scripts.rst index 0e6ef415c..419385582 100644 --- a/docs/Scripts.rst +++ b/docs/Scripts.rst @@ -1,3 +1,5 @@ +.. _scripts-index: + ############## DFHack Scripts ##############