From 2654de583f13ecc080475ad45fc127be2dedd273 Mon Sep 17 00:00:00 2001 From: myk002 Date: Mon, 25 Jul 2022 10:23:05 -0700 Subject: [PATCH] update docs for filltraffic --- docs/plugins/filltraffic.rst | 58 ++++++++++++++++++------------------ plugins/filltraffic.cpp | 44 ++++++++------------------- 2 files changed, 41 insertions(+), 61 deletions(-) diff --git a/docs/plugins/filltraffic.rst b/docs/plugins/filltraffic.rst index d3e952204..5056ec830 100644 --- a/docs/plugins/filltraffic.rst +++ b/docs/plugins/filltraffic.rst @@ -1,43 +1,43 @@ -.. _alltraffic: .. _restrictice: .. _restrictliquids: filltraffic =========== -Set traffic designations using flood-fill starting at the cursor. -See also `alltraffic`, `restrictice`, and `restrictliquids`. Options: +Tags: +:dfhack-keybind:`` -:H: High Traffic -:N: Normal Traffic -:L: Low Traffic -:R: Restricted Traffic -:X: Fill across z-levels. -:B: Include buildings and stockpiles. -:P: Include empty space. +Usage: + +``filltraffic []`` + Set traffic designations using flood-fill starting at the cursor. Flood + filling stops at walls and doors. +``alltraffic `` + Set traffic designations for every single tile of the map - useful for + resetting traffic designations. +``restrictice`` + Restrict traffic on all tiles on top of visible ice. +``restrictliquids`` + Restrict traffic on all visible tiles with liquid. -Example: +Examples +-------- ``filltraffic H`` - When used in a room with doors, it will set traffic to HIGH in just that room. + When used in a room with doors, it will set traffic to HIGH in just that + room. -alltraffic -========== -Set traffic designations for every single tile of the map - useful for resetting -traffic designations. See also `filltraffic`, `restrictice`, and `restrictliquids`. +Options +------- -Options: +Traffic designations: -:H: High Traffic -:N: Normal Traffic -:L: Low Traffic -:R: Restricted Traffic +:H: High Traffic. +:N: Normal Traffic. +:L: Low Traffic. +:R: Restricted Traffic. -restrictice -=========== -Restrict traffic on all tiles on top of visible ice. -See also `alltraffic`, `filltraffic`, and `restrictliquids`. +Filltraffic extra options: -restrictliquids -=============== -Restrict traffic on all visible tiles with liquid. -See also `alltraffic`, `filltraffic`, and `restrictice`. +:X: Fill across z-levels. +:B: Include buildings and stockpiles. +:P: Include empty space. diff --git a/plugins/filltraffic.cpp b/plugins/filltraffic.cpp index ddb5ef877..781fce0a8 100644 --- a/plugins/filltraffic.cpp +++ b/plugins/filltraffic.cpp @@ -44,41 +44,21 @@ DFHACK_PLUGIN("filltraffic"); DFhackCExport command_result plugin_init ( color_ostream &out, std::vector &commands) { commands.push_back(PluginCommand( - "filltraffic","Flood-fill selected traffic designation from cursor", - filltraffic, Gui::cursor_hotkey, - " Flood-fill selected traffic type from the cursor.\n" - "Traffic Type Codes:\n" - " H: High Traffic\n" - " N: Normal Traffic\n" - " L: Low Traffic\n" - " R: Restricted Traffic\n" - "Other Options:\n" - " X: Fill across z-levels.\n" - " B: Include buildings and stockpiles.\n" - " P: Include empty space.\n" - "Example:\n" - " filltraffic H\n" - " When used in a room with doors,\n" - " it will set traffic to HIGH in just that room.\n" - )); + "filltraffic", + "Flood-fill selected traffic designation from cursor.", + filltraffic, Gui::cursor_hotkey)); commands.push_back(PluginCommand( - "alltraffic","Set traffic for the entire map", - alltraffic, false, - " Set traffic types for all tiles on the map.\n" - "Traffic Type Codes:\n" - " H: High Traffic\n" - " N: Normal Traffic\n" - " L: Low Traffic\n" - " R: Restricted Traffic\n" - )); + "alltraffic", + "Set traffic designation for the entire map.", + alltraffic)); commands.push_back(PluginCommand( - "restrictliquids","Restrict on every visible square with liquid", - restrictLiquid, false, "" - )); + "restrictliquids", + "Restrict traffic on every visible square with liquid.", + restrictLiquid)); commands.push_back(PluginCommand( - "restrictice","Restrict traffic on squares above visible ice", - restrictIce, false, "" - )); + "restrictice", + "Restrict traffic on squares above visible ice.", + restrictIce)); return CR_OK; }