Skip to content

Commit 70944dc

Browse files
committed
update docs for "a" and "b" gui scripts
also make gui/autobutcher more permissive about what screen it is run from
1 parent 184ab48 commit 70944dc

5 files changed

Lines changed: 81 additions & 43 deletions

File tree

docs/gui/advfort.rst

Lines changed: 41 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,53 @@
1-
21
gui/advfort
32
===========
43

54
.. dfhack-tool::
6-
:summary: todo.
5+
:summary: Perform fort-like jobs in adventure mode.
76
:tags: adventure gameplay
87

8+
This script allows performing jobs in adventure mode. For interactive help,
9+
press :kbd:`?` while the script is running.
910

10-
This script allows performing jobs in adventure mode. For more complete help
11-
press :kbd:`?` while the script is running. It's most comfortable to use this as a
12-
keybinding (see below for the default binding). Possible arguments:
11+
.. warning::
12+
Note that changes are only persisted for non-procedural sites, i.e. caves,
13+
camps, and player forts.
1314

14-
* ``-a``, ``--nodfassign``:
15-
uses a different method to assign job items, instead of relying on DF.
16-
* ``-i``, ``--inventory``:
17-
checks inventory for possible items to use in the job.
18-
* ``-c``, ``--cheat``:
19-
relaxes item requirements for buildings (e.g. walls from bones). Implies -a
20-
* ``-e [NAME]``, ``--entity [NAME]``:
21-
uses the given civ to determine available resources (specified as an entity raw ID). Defaults to ``MOUNTAIN``; if the entity name is omitted, uses the adventurer's civ
22-
* ``job``: selects the specified job (must be a valid ``job_type``, e.g. ``Dig`` or ``FellTree``)
15+
Usage
16+
-----
2317

24-
.. warning::
25-
changes only persist in non-procedural sites, namely player forts, caves, and camps.
18+
::
19+
20+
gui/advfort [<job type>] [<options>]
21+
22+
You can specify a job type (e.g. ``Dig``, ``FellTree``, etc.) to pre-select it
23+
in the ``gui/advfort`` UI. Otherwise you can just select the desired job type
24+
in the UI after it comes up.
25+
26+
Examples
27+
--------
28+
29+
``gui/advfort``
30+
Brings up the GUI for interactive job selection. Items that dwarves can use
31+
will be available in item selection lists.
32+
``gui/advfort -e``
33+
Brings up the GUI for interactive job selection. Items that the adventurer's
34+
civilization can use will be available in item selection lists.
35+
36+
Options
37+
-------
38+
39+
``-c``, ``--cheat``
40+
Relaxes item requirements for buildings (e.g. you can make walls from
41+
bones, which you cannot normally do).
42+
``-e [NAME]``, ``--entity [NAME]``
43+
Use the given civ (specified as an entity raw ID) to determine which
44+
resources are usable. Defaults to ``MOUNTAIN`` (i.e. Dwarf). If ``-e`` is
45+
specified but the entity name is omitted then it defaults to the
46+
adventurer's civ.
47+
48+
Screenshot
49+
----------
2650

27-
An example of a player digging in adventure mode:
51+
Here is an example of a player digging in adventure mode:
2852

2953
.. image:: /docs/images/advfort.png

docs/gui/autobutcher.rst

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,16 @@ gui/autobutcher
33
===============
44

55
.. dfhack-tool::
6-
:summary: todo.
6+
:summary: Automatically butcher excess livestock.
77
:tags: fort auto fps animals
88

9+
This is an in-game interface for `autobutcher`, which allows you to set
10+
thresholds for how many animals you want to keep and will automatically butcher
11+
the extras.
912

10-
An in-game interface for `autobutcher`. This script must be called
11-
from either the overall status screen or the animal list screen.
13+
Usage
14+
-----
15+
16+
::
17+
18+
gui/autobutcher

docs/gui/autogems.rst

Lines changed: 13 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3,25 +3,24 @@ gui/autogems
33
============
44

55
.. dfhack-tool::
6-
:summary: todo.
6+
:summary: Automatically cut rough gems.
77
:tags: fort auto workorders
88

9-
10-
11-
A frontend for the `autogems` plugin that allows configuring the gem types to be cut.
9+
This is a frontend for the `autogems` plugin that allows interactively
10+
configuring the gem types that you want to be cut.
1211

1312
The following controls apply to the gems currently listed:
1413

1514
- ``s``: Searches for matching gems
1615
- ``Shift+Enter``: Toggles the status of all listed gems
1716

18-
The following controls apply to the gems currently listed, as well as gems listed
19-
*before* the current search with ``s``, if applicable:
17+
The following controls apply to the gems currently listed, as well as gems
18+
listed *before* the current search with ``s``, if applicable:
2019

2120
- ``r``: Displays only "rock crystal" gems
2221
- ``c``: Displays only gems whose color matches the selected gem
2322
- ``m``: Displays only gems where at least one rough (uncut) gem is available
24-
somewhere on the map
23+
somewhere on the map
2524

2625
This behavior is intended to allow for things like a search for "lazuli"
2726
followed by pressing ``c`` to select all gems with the same color as lapis
@@ -30,3 +29,10 @@ with "lazuli" in their name (only 1).
3029

3130
``x`` clears all filters, which is currently the only way to undo filters
3231
(besides searching), and is useful to verify the gems selected.
32+
33+
Usage
34+
-----
35+
36+
::
37+
38+
gui/autogems

docs/gui/blueprint.rst

Lines changed: 17 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,8 @@
1-
21
gui/blueprint
32
=============
43

54
.. dfhack-tool::
6-
:summary: todo.
5+
:summary: Record a live game map in a quickfort blueprint.
76
:tags: fort design buildings map stockpiles
87

98

@@ -13,10 +12,23 @@ a blueprint file that you (or anyone else) can later play back with `quickfort`.
1312
This script provides a visual, interactive interface to make configuring and
1413
using the blueprint plugin much easier.
1514

16-
Usage::
15+
Usage
16+
-----
17+
18+
::
1719

1820
gui/blueprint [<name> [<phases>]] [<options>]
1921

20-
All parameters are optional. Anything you specify will override the initial
22+
All parameters are optional, but, if specified, they will override the initial
2123
values set in the interface. See the `blueprint` documentation for information
22-
on the possible parameters and options.
24+
on the possible options.
25+
26+
Examples
27+
--------
28+
29+
``gui/blueprint``
30+
Start the blueprint GUI with default initial values.
31+
``gui/blueprint tavern dig build --format pretty``
32+
Start the blueprint GUI with the blueprint name pre-set to ``tavern``, the
33+
``dig`` and ``build`` blueprint phases enabled (and all other phases turned
34+
off), and with the output format set to ``pretty``.

gui/autobutcher.lua

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -647,16 +647,5 @@ if not dfhack.isMapLoaded() then
647647
qerror('Map is not loaded.')
648648
end
649649

650-
if string.match(dfhack.gui.getCurFocus(true), '^dfhack/lua') then
651-
qerror("This script must not be called while other lua gui stuff is running.")
652-
end
653-
654-
-- maybe this is too strict, there is not really a reason why it can only be called from the status screen
655-
-- (other than the hotkey might overlap with other scripts)
656-
if (not string.match(dfhack.gui.getCurFocus(true), '^overallstatus') and not string.match(dfhack.gui.getCurFocus(true), '^pet/List/Unit')) then
657-
qerror("This script must either be called from the overall status screen or the animal list screen.")
658-
end
659-
660-
661650
local screen = WatchList{ }
662651
screen:show()

0 commit comments

Comments
 (0)