From 9959ef1b36a5d839d3a71c062c71de39957b1a10 Mon Sep 17 00:00:00 2001 From: Josh Cooper Date: Fri, 18 Nov 2022 10:47:39 -0800 Subject: [PATCH] Implements plugin: channel-safely v1.0.1a --- docs/plugins/channel-safely.rst | 6 ++++-- plugins/channel-safely/channel-safely-plugin.cpp | 2 +- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/docs/plugins/channel-safely.rst b/docs/plugins/channel-safely.rst index 703600f43..1fce8043d 100644 --- a/docs/plugins/channel-safely.rst +++ b/docs/plugins/channel-safely.rst @@ -18,7 +18,7 @@ Usage enable channel-safely channel-safely set channel-safely enable|disable - channel-safely run once + channel-safely runonce When enabled the map will be scanned for channel designations which will be grouped together based on adjacency and z-level. These groups will then be analyzed for safety @@ -32,7 +32,7 @@ Examples ``channel-safely`` The plugin reports its configured status. -``channel-safely run once`` +``channel-safely runonce`` Runs the safety procedures once. You can use this if you prefer initiating scans manually. ``channel-safely disable require-vision`` @@ -47,6 +47,7 @@ Examples Features -------- + :require-vision: Toggle whether the dwarves need vision of a tile before channeling to it can be deemed unsafe. (default: enabled) :monitor: Toggle whether to monitor the conditions of active digs. (default: disabled) :resurrect: Toggle whether to resurrect units involved in cave-ins, and if monitor is enabled @@ -56,6 +57,7 @@ Features Settings -------- + :refresh-freq: The rate at which full refreshes are performed. This can be expensive if you're undertaking many mega projects. (default:600, twice a day) :monitor-freq: The rate at which active jobs are monitored. (default:1) diff --git a/plugins/channel-safely/channel-safely-plugin.cpp b/plugins/channel-safely/channel-safely-plugin.cpp index b6abbf2d2..d4107bc56 100644 --- a/plugins/channel-safely/channel-safely-plugin.cpp +++ b/plugins/channel-safely/channel-safely-plugin.cpp @@ -584,7 +584,7 @@ DFhackCExport command_result plugin_onupdate(color_ostream &out, state_change_ev command_result channel_safely(color_ostream &out, std::vector ¶meters) { if (!parameters.empty()) { if (parameters.size() >= 2 && parameters.size() <= 3) { - if (parameters[0] == "run" && parameters[1] == "once") { + if (parameters[0] == "runonce") { CSP::UnpauseEvent(); return DFHack::CR_OK; }