Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion docs/Tags.rst
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ for the tag assignment spreadsheet.
- `map <map-tag-index>`: Tools that interact with the game map.
- `military <military-tag-index>`: Tools that interact with the military.
- `plants <plants-tag-index>`: Tools that interact with grass, trees, shrubs, and crops.
- `stockpiles <stockpiles-tag-index>`: Tools that interact with stockpiles.
- `stockpile <stockpile-tag-index>`: Tools that interact with stockpiles.
- `units <units-tag-index>`: Tools that interact with units.
- `workorders <workorders-tag-index>`: Tools that interact with workorders.

Expand Down
3 changes: 2 additions & 1 deletion docs/changelog.txt
Original file line number Diff line number Diff line change
Expand Up @@ -65,11 +65,12 @@ Template for new versions:
- Fix broken weather lookup in ``World::ReadCurrentWeather``
- Fixed a possible hang or assertion failure when pressing a hotkey while a DFHack GUI window was open but unfocused
- In ``Screen`` module, Fix out-of-bounds color table access when Lua pens use ``COLOR_RESET``
- rename the ``stockpiles`` tool tag to ``stockpile`` so it no longer collides with the `stockpiles` plugin in `gui/launcher`
- `3dveins`: fix failure on embarks that cross midmap tiles
- `aquifer`: make ``--skip-top`` and top-relative ``--levels`` take effect for the ``drain``, ``convert``, and ``add`` actions instead of being silently ignored
- `autodump`: ``destroy`` no longer leaves the contents of destroyed containers in limbo or crashes when destroying unit-held items
- `timestream`: deal properly with units who have breathing difficulties
- `buildingplan`: fix "Unlink all" only unlinking some mechanisms (or crashing) when freeing mechanisms from the building
- `timestream`: deal properly with units who have breathing difficulties

## Misc Improvements
- Added ``Coord2d`` and ``Coord3d`` C++ templates, providing a standard set operations for 2-tuples and 3-tuples of any numeric type
Expand Down
2 changes: 1 addition & 1 deletion docs/dev/Documentation.rst
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@ And documentation for the ``autodump`` plugin might look like::

.. dfhack-tool::
:summary: Automatically set items in a stockpile to be dumped.
:tags: fort armok fps productivity items stockpiles
:tags: fort armok fps productivity items stockpile
:no-command:

.. dfhack-command:: autodump
Expand Down
2 changes: 1 addition & 1 deletion docs/plugins/blueprint.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ blueprint

.. dfhack-tool::
:summary: Record a live game map in a quickfort blueprint.
:tags: fort design buildings map stockpiles
:tags: fort design buildings map stockpile

With ``blueprint``, you can export the structure of a portion of your fortress
in a blueprint file that you (or anyone else) can later play back with
Expand Down
2 changes: 1 addition & 1 deletion docs/plugins/logistics.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ logistics

.. dfhack-tool::
:summary: Automatically mark and route items in monitored stockpiles.
:tags: fort auto animals items stockpiles
:tags: fort auto animals items stockpile

Commands act upon the stockpile selected in the UI unless another stockpile
identifier is specified on the commandline.
Expand Down
2 changes: 1 addition & 1 deletion docs/plugins/stockpiles.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ stockpiles

.. dfhack-tool::
:summary: Import, export, or modify stockpile settings.
:tags: fort design productivity stockpiles
:tags: fort design productivity stockpile

Commands act upon the stockpile selected in the UI unless another stockpile
identifier is specified on the commandline.
Expand Down
33 changes: 22 additions & 11 deletions docs/sphinx_extensions/dfhack/tool_docs.py
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,12 @@ def add_index_entries(self, name) -> None:
if 'unavailable' not in tags:
self.env.domaindata['all']['objects'].append(indexdata)
for tag in tags:
self.env.domaindata[tag]['objects'].append(indexdata)
# tolerate tags missing from Tags.rst: the scripts submodule pin
# can lag behind tag renames in either repo
if tag in self.env.domaindata:
self.env.domaindata[tag]['objects'].append(indexdata)
else:
logger.info('%s: ignoring unregistered tag: %s', docname, tag)

@staticmethod
def wrap_box(*children: List[nodes.Node]) -> nodes.Admonition:
Expand Down Expand Up @@ -173,16 +178,22 @@ def render_content(self) -> List[nodes.Node]:
tags = self.options.get('tags', [])
self.env.domaindata['tag-repo']['doctags'][self.env.docname] = tags
for tag in tags:
tag_paragraph += [
addnodes.pending_xref(tag, nodes.inline(text=tag), **{
'reftype': 'ref',
'refdomain': 'std',
'reftarget': tag + '-tag-index',
'refexplicit': True,
'refwarn': True,
}),
nodes.inline(text=' | '),
]
# link only tags registered in Tags.rst; the scripts submodule
# pin can lag behind tag renames in either repo
if tag in self.env.domaindata:
tag_paragraph += addnodes.pending_xref(tag,
nodes.inline(text=tag), **{
'reftype': 'ref',
'refdomain': 'std',
'reftarget': tag + '-tag-index',
'refexplicit': True,
'refwarn': True,
})
else:
logger.info('%s: ignoring unregistered tag: %s',
self.env.docname, tag)
tag_paragraph += nodes.inline(text=tag)
tag_paragraph += nodes.inline(text=' | ')
tag_paragraph.pop()

ret_nodes = [tag_paragraph]
Expand Down
Loading