From a1110b36e8015a78a58130c727de67b850d40acc Mon Sep 17 00:00:00 2001 From: PeridexisErrant Date: Sat, 7 Nov 2015 11:35:44 +1100 Subject: [PATCH] Add shortlink for issues, update links Also moved search above local table of contents in sidebar, which can get very long. --- conf.py | 5 +++-- docs/Binpatches.rst | 13 +++++-------- docs/Compile.rst | 7 ++++--- docs/Contributing.rst | 24 ++++++++++++++---------- docs/Plugins.rst | 9 ++++----- 5 files changed, 30 insertions(+), 28 deletions(-) diff --git a/conf.py b/conf.py index 7b0a7c4c5..6c4f768db 100644 --- a/conf.py +++ b/conf.py @@ -106,7 +106,8 @@ extlinks = { 'Bay12 forums thread '), 'dffd': ('http://dffd.bay12games.com/file.php?id=%s', 'DFFD file '), 'bug': ('http://www.bay12games.com/dwarves/mantisbt/view.php?id=%s', - 'Bug ') + 'Bug '), + 'issue': ('https://github.com/DFHack/dfhack/issues/%s', 'Issue '), } # Add any paths that contain templates here, relative to this directory. @@ -235,9 +236,9 @@ html_last_updated_fmt = '%Y-%m-%d' html_sidebars = { '**': [ 'about.html', - 'localtoc.html', 'relations.html', 'searchbox.html', + 'localtoc.html', ] } diff --git a/docs/Binpatches.rst b/docs/Binpatches.rst index 145dead89..e1ae1c0ef 100644 --- a/docs/Binpatches.rst +++ b/docs/Binpatches.rst @@ -32,8 +32,7 @@ decent skill in `memory research `. * See `this commit `_, when the 0.34.11 patches were discarded, for example patches. -* `Issue #546 `_ is about the - future of the binpatches, and may be useful reading. +* :issue:`546` is about the future of the binpatches, and may be useful reading. If you want to write a patch, the armory patches discussed here and documented below would probably be the best place to start. @@ -56,7 +55,7 @@ the version appropriate for the currently loaded executable. This is the preferred method; it's easier to debug, does not cause persistent problems, and leaves file checksums alone. As with many other commands, users -can simply add it to ``dfhack.init`` to reapply the patch every time DF is run. +can simply add it to `dfhack.init` to reapply the patch every time DF is run. Patching on disk @@ -152,8 +151,8 @@ these rules is intended by Toady; the rest are invented by this plugin. gui/assign-rack --------------- -Bind to a key (the example config uses P), and activate when viewing a weapon -rack in the ``q`` mode. +Bind to a key (the example config uses :kbd:`P`), and activate when viewing a weapon +rack in the :kbd:`q` mode. .. image:: images/assign-rack.png @@ -166,9 +165,7 @@ work again. The existing issues are: * Even if assigned by the script, **the game will unassign the racks again without a binary patch**. This patch is called ``weaponrack-unassign``, - and has not been updated since 0.34.11. See `the bug report`_ for more info. - -.. _`the bug report`: http://www.bay12games.com/dwarves/mantisbt/view.php?id=1445 + and has not been updated since 0.34.11. See :bug:`1445` for more info. * Haulers still take equipment stored in the armory away to the stockpiles, unless `fix-armory` is used. diff --git a/docs/Compile.rst b/docs/Compile.rst index 752b9b5fd..e140c6b28 100644 --- a/docs/Compile.rst +++ b/docs/Compile.rst @@ -135,7 +135,7 @@ following environment variable:: brew install cmake brew install gcc45 - Using `MacPorts `_:: + Using `MacPorts `_:: sudo port install gcc45 +universal cmake +universal git-core +universal @@ -149,7 +149,8 @@ following environment variable:: If this is the first time you've run cpan, you will need to go through the setup process. Just stick with the defaults for everything and you'll be fine. - If you are running Snow Leopard or later, open a separate Terminal window and run:: + If you are running Snow Leopard (ie 10.6 or earlier), good luck! + You'll need to open a separate Terminal window and run:: sudo ln -s /usr/include/libxml2/libxml /usr/include/libxml @@ -214,7 +215,7 @@ Build There are several different batch files in the ``build`` folder along with a script that's used for picking the DF path. -First, run set_df_path.vbs and point the dialog that pops up at your +First, run ``set_df_path.vbs`` and point the dialog that pops up at your DF folder that you want to use for development. Next, run one of the scripts with ``generate`` prefix. These create the MSVC solution file(s): diff --git a/docs/Contributing.rst b/docs/Contributing.rst index 5691fbcc0..cd2495922 100644 --- a/docs/Contributing.rst +++ b/docs/Contributing.rst @@ -11,7 +11,6 @@ Several things should be kept in mind when contributing code to DFHack. Code Format ----------- - * Four space indents for C++. Never use tabs for indentation in any language. * LF (Unix style) line terminators * Avoid trailing whitespace @@ -25,14 +24,18 @@ Code Format How to get new code into DFHack ------------------------------- - -* Submit pull requests to the ``develop`` branch, not the master branch. The master branch always points at the most recent release. -* Use new branches for each feature/fix so that your changes can be merged independently (i.e. not the master or develop branch of your fork). +* Submit pull requests to the ``develop`` branch, not the ``master`` branch. + (The ``master`` branch always points at the most recent release) +* Use a new branch for each feature or bugfix so that your changes can be merged independently + (i.e. not the master or develop branch of your fork). * If possible, compile on multiple platforms when changing anything that compiles -* Update ``NEWS`` and ``docs/Authors.rst`` when applicable +* It must pass CI - run ``python travis/all.py`` to check this. +* Update ``NEWS.rst`` and ``docs/Authors.rst`` when applicable. * Create a GitHub pull request once finished -* Work done against GitHub issues tagged "bug" get priority -* Submit ideas and bug reports as issues on GitHub. Posts in the forum thread can easily get missed or forgotten. +* Submit ideas and bug reports as :issue:`issues on GitHub <>`. + Posts in the forum thread can easily get missed or forgotten. +* Work on :issue:`reported problems ` + will take priority over ideas or suggestions. .. _contributing-memory-research: @@ -62,7 +65,8 @@ All the plugins can be found in the 'plugins' folder. There's no in-depth docume on how to write one yet, but it should be easy enough to copy one and just follow the pattern. ``plugins/skeleton/skeleton.cpp`` is provided for this purpose. -Other than through plugins, it is possible to use DFHack via remote access interface, or by writing Lua scripts. +Other than through plugins, it is possible to use DFHack via remote access interface, +or by writing scripts in Lua or Ruby. There are plenty of examples in the scripts folder. The most important parts of DFHack are the Core, Console, Modules and Plugins. @@ -164,10 +168,10 @@ text. Use double-backticks to put commands in monospaced font, like this:: You can use ``cleanowned scattered x`` to dump tattered or abandoned items. If the command takes more than three arguments, format the list as a table -called Options. The table *only* lists arguments, not full commands. +called Usage. The table *only* lists arguments, not full commands. Input values are specified in angle brackets. Example:: - Options: + Usage: :arg1: A simple argument. :arg2 : Does something based on the input value. diff --git a/docs/Plugins.rst b/docs/Plugins.rst index 8e36de861..3434233fd 100644 --- a/docs/Plugins.rst +++ b/docs/Plugins.rst @@ -217,6 +217,8 @@ periodically when enabled with the built-in enable/disable commands: The default is 1200 ticks, or 1 day. Ticks are only counted when the game is unpaused. +.. _fixveins: + fixveins ======== Removes invalid references to mineral inclusions and restores missing ones. @@ -1890,8 +1892,7 @@ Usage: ``infiniteSky enable/disable`` Enables/disables monitoring of constructions. If you build anything in the second to highest z-level, it will allocate one more sky level. This is so you can continue to build stairs upward. -`Sometimes `_ -new z-levels disappear and cause cave-ins. +:issue:`Sometimes <254>` new z-levels disappear and cause cave-ins. Saving and loading after creating new z-levels should fix the problem. .. _liquids: @@ -1901,9 +1902,7 @@ liquids Allows adding magma, water and obsidian to the game. It replaces the normal dfhack command line and can't be used from a hotkey. Settings will be remembered as long as dfhack runs. Intended for use in combination with the command -``liquids-here`` (which can be bound to a hotkey). - -See also `this issue. `_ +``liquids-here`` (which can be bound to a hotkey). See also :issue:`80`. .. note::