diff --git a/docs/plugins/debug.rst b/docs/plugins/debug.rst index 331e675ab..2b3b20359 100644 --- a/docs/plugins/debug.rst +++ b/docs/plugins/debug.rst @@ -1,6 +1,5 @@ debug ===== - Tags: :dfhack-keybind:`debugfilter` @@ -37,36 +36,37 @@ printing level selection. Usage: -- ``debugfilter category [] []`` +``debugfilter category [] []`` List available debug plugin and category names. If filters aren't givenm then all plugins/categories are matched. This command is a good way to test regex parameters before you pass them to ``set``. -- ``debugfilter filter []`` +``debugfilter filter []`` List active and passive debug print level changes. The optional ``id`` parameter is the id listed as first column in the filter list. If ``id`` is given, then the command shows extended information for the given filter only. -- ``debugfilter set [] [] []`` +``debugfilter set [] [] []`` Create a new debug filter to set category verbosity levels. This filter will not be saved when the DF process exists or the plugin is unloaded. -- ``debugfilter set persistent [] [] []`` +``debugfilter set persistent [] [] []`` Store the filter in the configuration file to until ``unset`` is used to remove it. -- ``debugfilter unset [ ...]`` +``debugfilter unset [ ...]`` Delete a space separated list of filters. -- ``debugfilter disable [ ...]`` +``debugfilter disable [ ...]`` Disable a space separated list of filters but keep it in the filter list. -- ``debugfilter enable [ ...]`` +``debugfilter enable [ ...]`` Enable a space sperate list of filters. -- ``debugfilter header [enable] | [disable] [ ...]`` +``debugfilter header [enable] | [disable] [ ...]`` Control which header metadata is shown along with each log message. Run it without parameters to see the list of configurable elements. Include an ``enable`` or ``disable`` keyword to change whether specific elements are shown. -Examples: +Example +------- -- ``debugfilter set Warning core script`` +``debugfilter set Warning core script`` Hide script execution log messages (e.g. "Loading script: dfhack-config/dfhack.init"), which are normally output at Info verbosity in the "core" plugin with the "script" category. diff --git a/docs/plugins/deramp.rst b/docs/plugins/deramp.rst index 7489e506e..7f4a8ce24 100644 --- a/docs/plugins/deramp.rst +++ b/docs/plugins/deramp.rst @@ -1,6 +1,5 @@ deramp ====== - Tags: :dfhack-keybind:`deramp` diff --git a/docs/plugins/dig-now.rst b/docs/plugins/dig-now.rst index 4628f10f5..cdb21c01a 100644 --- a/docs/plugins/dig-now.rst +++ b/docs/plugins/dig-now.rst @@ -1,6 +1,5 @@ dig-now ======= - Tags: :dfhack-keybind:`dig-now` @@ -33,31 +32,33 @@ Any ```` parameters can either be an ``,,`` triple (e.g. game cursor should be used. You can use the `position` command to get the current cursor position if you need it. -Examples: +Examples +-------- -- ``dig-now`` +``dig-now`` Dig designated tiles according to standard game rules. -- ``dig-now --clean`` +``dig-now --clean`` Dig all designated tiles, but don't generate any boulders, ores, or gems. -- ``dig-now --dump here`` +``dig-now --dump here`` Dig tiles and teleport all generated boulders, ores, and gems to the tile under the game cursor. -Options: +Options +------- -- ``-c``, ``--clean`` +``-c``, ``--clean`` Don't generate any boulders, ores, or gems. Equivalent to ``--percentages 0,0,0,0``. -- ``-d``, ``--dump `` +``-d``, ``--dump `` Dump any generated items at the specified coordinates. If the tile at those coordinates is open space or is a wall, items will be generated on the closest walkable tile below. -- ``-e``, ``--everywhere`` +``-e``, ``--everywhere`` Generate a boulder, ore, or gem for every tile that can produce one. Equivalent to ``--percentages 100,100,100,100``. -- ``-p``, ``--percentages ,,,`` +``-p``, ``--percentages ,,,`` Set item generation percentages for each of the tile categories. The ``vein`` category includes both the large oval clusters and the long stringy mineral veins. Default is ``25,33,100,100``. -- ``-z``, ``--cur-zlevel`` +``-z``, ``--cur-zlevel`` Restricts the bounds to the currently visible z-level. diff --git a/docs/plugins/dig.rst b/docs/plugins/dig.rst index c4811883b..edb9b8007 100644 --- a/docs/plugins/dig.rst +++ b/docs/plugins/dig.rst @@ -3,17 +3,39 @@ dig === -This plugin makes many automated or complicated dig patterns easy. - -Basic commands: - -:digv: Designate all of the selected vein for digging. -:digvx: Also cross z-levels, digging stairs as needed. Alias for ``digv x``. -:digl: Like ``digv``, for layer stone. Also supports an ``undo`` option - to remove designations, for if you accidentally set 50 levels at once. -:diglx: Also cross z-levels, digging stairs as needed. Alias for ``digl x``. - +Tags: :dfhack-keybind:`digv` +:dfhack-keybind:`digvx` +:dfhack-keybind:`digl` +:dfhack-keybind:`diglx` +:dfhack-keybind:`digcircle` +:dfhack-keybind:`digtype` +:dfhack-keybind:`digexp` + +Make complicated dig patterns easy. + +Usage: + +``digv [x] [-p]`` + Designate all of the selected vein for digging. +``digvx [-p]`` + Also cross z-levels, digging stairs as needed. Alias for ``digv x``. +``digl [x] [undo] [-p]`` + Like ``digv``, for layer stone. If ``undo`` is specified, removes the + layer designation instead (for if you accidentally set 50 levels at once). +``diglx [-p]`` + Also cross z-levels, digging stairs as needed. Alias for ``digl x``. +``digcircle [] [] [] [] [-p]`` + Designate circles. The diameter is the number of tiles across the center of + the circle that you want to dig. See the `digcircle`_ section below for an + explanation of the options. +``digtype [] +For every tile on the map of the same vein type as the selected tile, +this command designates it to have the same designation as the +selected tile. If the selected tile has no designation, they will be +dig designated. + +``digexp [] [] .. note:: @@ -24,15 +46,9 @@ Basic commands: digcircle ========= -A command for easy designation of filled and hollow circles. -It has several types of options. - -Shape: - -:hollow: Set the circle to hollow (default) -:filled: Set the circle to filled -:#: Diameter in tiles (default = 0, does nothing) + Designate filled or hollow circles. If neither ``hollow`` nor ``filled`` + is specified, the default is ``hollow``. The diameter is the number of tiles Action: :set: Set designation (default) diff --git a/library/Core.cpp b/library/Core.cpp index 72ddc33aa..a926391d9 100644 --- a/library/Core.cpp +++ b/library/Core.cpp @@ -1311,12 +1311,14 @@ void fInitthread(void * iodata) // A thread function... for the interactive console. void fIOthread(void * iodata) { + static const char * HISTORY_FILE = "dfhack-config/dfhack.history"; + IODATA * iod = ((IODATA*) iodata); Core * core = iod->core; PluginManager * plug_mgr = ((IODATA*) iodata)->plug_mgr; CommandHistory main_history; - main_history.load("dfhack.history"); + main_history.load(HISTORY_FILE); Console & con = core->getConsole(); if (plug_mgr == 0) @@ -1357,7 +1359,7 @@ void fIOthread(void * iodata) { // a proper, non-empty command was entered main_history.add(command); - main_history.save("dfhack.history"); + main_history.save(HISTORY_FILE); } auto rv = core->runCommand(con, command);