diff --git a/docs/Core.rst b/docs/Core.rst index 17b6d3174..51d0ec955 100644 --- a/docs/Core.rst +++ b/docs/Core.rst @@ -237,7 +237,7 @@ The following commands are *not* built-in, but offer similarly useful functions. * `multicmd` * `nopause` * `quicksave` -* `rb_eval` +* `rb` * `repeat` @@ -350,7 +350,7 @@ This section is for odd but important notes that don't fit anywhere else. double quotes. To include a double quote character, use ``\"``. * If the first non-whitespace character is ``:``, the command is parsed in - an alternative mode which is very useful for the `lua` and `rb_eval` commands. + an alternative mode which is very useful for the `lua` and `rb` commands. The following two command lines are exactly equivalent:: :foo a b "c d" e f diff --git a/docs/Plugins.rst b/docs/Plugins.rst index 7df79e625..3b8b7d132 100644 --- a/docs/Plugins.rst +++ b/docs/Plugins.rst @@ -370,7 +370,7 @@ Usage: ``command-prompt [entry]`` If called with an entry, it starts with that text filled in. Most useful for developers, who can set a keybinding to open a laungage interpreter for lua or Ruby by starting with the -`:lua ` or `:rb_eval ` commands. +`:lua ` or `:rb ` commands. Otherwise somewhat similar to `gui/quickcmd`. @@ -390,12 +390,12 @@ Type ``hotkeys`` into the DFHack console to open the screen, or bind the command to a globally active hotkey. The default keybinding is :kbd:`Ctrl`:kbd:`F1`. See also `hotkey-notes`. -.. _rb_eval: +.. _rb: -rb_eval -======= -Evaluate the following arguments as a ruby string. Best used as -``:rb_eval [string]``, for the special parsing mode. +rb +== +Ruby language plugin, which evaluates the following arguments as a ruby string. +Best used as ``:rb [string]``, for the special parsing mode. Alias ``rb_eval``. .. _manipulator: @@ -627,6 +627,42 @@ twaterlvl ========= Toggle between displaying/not displaying liquid depth as numbers. +.. _sort-items: + +sort-items +========== +Sort the visible item list:: + + sort-items order [order...] + +Sort the item list using the given sequence of comparisons. +The ``<`` prefix for an order makes undefined values sort first. +The ``>`` prefix reverses the sort order for defined values. + +Item order examples:: + + description material wear type quality + +The orderings are defined in ``hack/lua/plugins/sort/*.lua`` + +.. _sort-units: + +sort-units +========== +Sort the visible unit list:: + + sort-units order [order...] + +Sort the unit list using the given sequence of comparisons. +The ``<`` prefix for an order makes undefined values sort first. +The ``>`` prefix reverses the sort order for defined values. + +Unit order examples:: + + name age arrival squad squad_position profession + +The orderings are defined in ``hack/lua/plugins/sort/*.lua`` + .. _stocks: stocks @@ -2099,6 +2135,15 @@ or 'snow', with those words as commands (eg ``weather rain``). Mods and Cheating ================= +.. _add-spatter: + +add-spatter +=========== +This plugin makes reactions with names starting with ``SPATTER_ADD_`` +produce contaminants on the items instead of improvements. The plugin is +intended to give some use to all those poisons that can be bought from caravans, +so they're immune to being washed away by water or destroyed by `clean`. + .. _adv-bodyswap: adv-bodyswap @@ -2153,6 +2198,38 @@ Options: :building: Subsequent items will become part of the currently selected building. Good for loading traps; do not use with workshops (or deconstruct to use the item). +.. _diggingInvaders: + +diggingInvaders +=============== +Makes invaders dig or destroy constructions to get to your dwarves. + +To enable/disable the pluging, use: ``diggingInvaders (1|enable)|(0|disable)`` + +Basic usage: + +:add GOBLIN: registers the race GOBLIN as a digging invader. Case-sensitive. +:remove GOBLIN: unregisters the race GOBLIN as a digging invader. Case-sensitive. +:now: makes invaders try to dig now, if plugin is enabled +:clear: clears all digging invader races +:edgesPerTick n: makes the pathfinding algorithm work on at most n edges per tick. + Set to 0 or lower to make it unlimited. + +You can also use ``diggingInvaders setCost (race) (action) n`` to set the +pathing cost of particular action, or ``setDelay`` to set how long it takes. +Costs and delays are per-tile, and the table shows default values. + +============================== ======= ====== ================================= +Action Cost Delay Notes +============================== ======= ====== ================================= +``walk`` 1 0 base cost in the path algorithm +``destroyBuilding`` 2 1,000 delay adds to the job_completion_timer of destroy building jobs that are assigned to invaders +``dig`` 10,000 1,000 digging soil or natural stone +``destroyRoughConstruction`` 1,000 1,000 constructions made from boulders +``destroySmoothConstruction`` 100 100 constructions made from blocks or bars +============================== ======= ====== ================================= + + .. _fastdwarf: fastdwarf @@ -2347,15 +2424,3 @@ can easily result in inconsistent state once this plugin is available again. The effects may be as weird as negative power being generated. -.. _add-spatter: - -add-spatter -=========== -This plugin makes reactions with names starting with ``SPATTER_ADD_`` -produce contaminants on the items instead of improvements. The produced -contaminants are immune to being washed away by water or destroyed by `clean`. - -The plugin is intended to give some use to all those poisons that can -be bought from caravans. It's most useful when combined with -`tweak` ``fix-dimensions`` and ``advmode-contained`` to patch :bug:`808`. -