From ca06d1d9c55531ece4aa8527ac2e101706e4c719 Mon Sep 17 00:00:00 2001 From: myk002 Date: Sun, 24 Jul 2022 16:08:35 -0700 Subject: [PATCH] update docs for dig (again) --- docs/plugins/dig.rst | 37 ++++++++++++++--------- plugins/dig.cpp | 70 ++++++++++++++++++-------------------------- 2 files changed, 51 insertions(+), 56 deletions(-) diff --git a/docs/plugins/dig.rst b/docs/plugins/dig.rst index 941172ef7..8fbf1a910 100644 --- a/docs/plugins/dig.rst +++ b/docs/plugins/dig.rst @@ -17,24 +17,33 @@ Make complicated dig patterns easy. Usage: ``digv [x] [-p]`` - Designate all of the selected vein for digging. + :index:`Designate all of the selected vein for digging. + ` ``digvx [-p]`` - Also cross z-levels, digging stairs as needed. Alias for ``digv x``. + :index:`Dig a vein across z-levels, digging stairs as needed. + ` + This is an 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). + :index:`Dig all of the selected layer stone. + ` If ``undo`` is specified, + removes the 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``. + :index:`Dig layer stone across z-levels, digging stairs as needed. + ` This + is an 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 - options. + :index:`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 options. ``digtype [] [-p]`` - Designate all vein tiles of the selected type. See the `digtype`_ section - below for options. + :index:`Designate all vein tiles of the selected type. + ` See the `digtype`_ + section below for options. ``digexp [] [] [-p]`` - Designate dig patterns for exploratory mining. See the `digexp`_ section - below for options + :index:`Designate dig patterns for exploratory mining. + ` See the `digexp`_ + section below for options All commands support specifying the priority of the dig designations with ``-p``, where the number is from 1 to 7. If a priority is not specified, @@ -43,8 +52,8 @@ the priority selected in-game is used as the default. Examples -------- -``digcircle filled 3`` - Dig a filled circle with a diameter of 3 tiles. +``digcircle filled 3 -p2`` + Dig a filled circle with a diameter of 3 tiles at dig priority 2. ``digcircle`` Do it again (previous parameters are reused). ``expdig diag5 hidden`` diff --git a/plugins/dig.cpp b/plugins/dig.cpp index 6c33f206a..ddc2cd97e 100644 --- a/plugins/dig.cpp +++ b/plugins/dig.cpp @@ -28,7 +28,6 @@ command_result digv (color_ostream &out, vector & parameters); command_result digvx (color_ostream &out, vector & parameters); command_result digl (color_ostream &out, vector & parameters); command_result diglx (color_ostream &out, vector & parameters); -command_result digauto (color_ostream &out, vector & parameters); command_result digexp (color_ostream &out, vector & parameters); command_result digcircle (color_ostream &out, vector & parameters); command_result digtype (color_ostream &out, vector & parameters); @@ -40,44 +39,37 @@ REQUIRE_GLOBAL(world); DFhackCExport command_result plugin_init ( color_ostream &out, std::vector &commands) { commands.push_back(PluginCommand( - "digv","Dig a whole vein.",digv,Gui::cursor_hotkey, - " Designates a whole vein under the cursor for digging.\n" - "Options:\n" - " x - follow veins through z-levels with stairs.\n" - )); + "digv", + "Dig a whole vein.", + digv, + Gui::cursor_hotkey)); commands.push_back(PluginCommand( - "digvx","Dig a whole vein, following through z-levels.",digvx,Gui::cursor_hotkey, - " Designates a whole vein under the cursor for digging.\n" - " Also follows the vein between z-levels with stairs, like 'digv x' would.\n" - )); + "digvx", + "Dig a whole vein, following through z-levels.", + digvx, + Gui::cursor_hotkey)); commands.push_back(PluginCommand( - "digl","Dig layerstone.",digl,Gui::cursor_hotkey, - " Designates layerstone under the cursor for digging.\n" - " Veins will not be touched.\n" - "Options:\n" - " x - follow layer through z-levels with stairs.\n" - " undo - clear designation (can be used together with 'x').\n" - )); + "digl", + "Dig layerstone.", + digl, + Gui::cursor_hotkey)); commands.push_back(PluginCommand( - "diglx","Dig layerstone, following through z-levels.",diglx,Gui::cursor_hotkey, - " Designates layerstone under the cursor for digging.\n" - " Also follows the stone between z-levels with stairs, like 'digl x' would.\n" - )); - commands.push_back(PluginCommand("digexp","Select or designate an exploratory pattern.",digexp)); - commands.push_back(PluginCommand("digcircle","Dig designate a circle (filled or hollow)",digcircle)); - //commands.push_back(PluginCommand("digauto","Mark a tile for continuous digging.",autodig)); - commands.push_back(PluginCommand("digtype", "Dig all veins of a given type.", digtype,Gui::cursor_hotkey, - "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.\n" - "If an argument is given, the designation of the selected tile is ignored, and all appropriate tiles are set to the specified designation.\n" - "Options:\n" - " dig\n" - " channel\n" - " ramp\n" - " updown - up/down stairs\n" - " up - up stairs\n" - " down - down stairs\n" - " clear - clear designation\n" - )); + "diglx", + "Dig layerstone, following through z-levels.", + diglx, + Gui::cursor_hotkey)); + commands.push_back(PluginCommand( + "digexp", + "Select or designate an exploratory pattern.", + digexp)); + commands.push_back(PluginCommand( + "digcircle", + "Dig designate a circle (filled or hollow)", + digcircle)); + commands.push_back(PluginCommand( + "digtype", + "Dig all veins of a given type.", + digtype,Gui::cursor_hotkey)); return CR_OK; } @@ -1420,12 +1412,6 @@ command_result digl (color_ostream &out, vector & parameters) return CR_OK; } - -command_result digauto (color_ostream &out, vector & parameters) -{ - return CR_NOT_IMPLEMENTED; -} - command_result digtype (color_ostream &out, vector & parameters) { //mostly copy-pasted from digv