From d01e61c6583262fc01fcc47efdffc4547526a396 Mon Sep 17 00:00:00 2001 From: lethosor Date: Fri, 22 Jan 2021 21:05:20 -0500 Subject: [PATCH] Fix some error message formatting and add some cross-links to docs Followup to #1747 --- docs/Plugins.rst | 8 ++++++++ docs/guides/quickfort-user-guide.rst | 27 ++++++++++++++------------- plugins/buildingplan.cpp | 4 ++-- 3 files changed, 24 insertions(+), 15 deletions(-) diff --git a/docs/Plugins.rst b/docs/Plugins.rst index 8adf91c05..544a40844 100644 --- a/docs/Plugins.rst +++ b/docs/Plugins.rst @@ -716,6 +716,8 @@ to always have one or two doors/beds/tables/chairs/etc available, and place as many as you like. The plugins then take over and fulfill the orders, with minimal space dedicated to stockpiles. +.. _buildingplan-filters: + Item filtering -------------- @@ -745,6 +747,8 @@ Note that Quickfort mode is only for compatibility with the legacy Python Quickf DFHack `quickfort` script does not need Quickfort mode to be enabled. The `quickfort` script will successfully integrate with buildingplan as long as the buildingplan plugin is enabled. +.. _buildingplan-settings: + Global settings --------------- @@ -755,6 +759,10 @@ can also be set from the ``DFHack#`` prompt once a map is loaded (or from your buildingplan set +and displayed with:: + + buildingplan set + The available settings are: +----------------+---------+---------------------------------------+ diff --git a/docs/guides/quickfort-user-guide.rst b/docs/guides/quickfort-user-guide.rst index d51e84ffc..8be74ac51 100644 --- a/docs/guides/quickfort-user-guide.rst +++ b/docs/guides/quickfort-user-guide.rst @@ -1019,21 +1019,22 @@ prevents a building designation from being canceled when a dwarf picks up the job but can't find the materials. As long as the `buildingplan` plugin is enabled, quickfort will use it to manage -construction. The buildingplan plugin also has an "enabled" setting for each -building type, but that setting only applies to the buildingplan user interface. -In addition, buildingplan has a "quickfort_mode" setting for compatibility with -legacy Python Quickfort. This setting has no effect on DFHack Quickfort, which -will use buildingplan to manage everything designated in a ``#build`` blueprint +construction. The buildingplan plugin has an `"enabled" setting +` for each building type, but those settings only apply +to buildings created through the buildingplan user interface. In addition, +buildingplan has a "quickfort_mode" setting for compatibility with legacy Python +Quickfort. This setting has no effect on DFHack Quickfort, which will use +buildingplan to manage everything designated in a ``#build`` blueprint regardless of the buildingplan UI settings. -However, quickfort *does* use buildingplan's filters for each building type. For -example, you can use the buildingplan UI to set the type of stone you want your -walls made out of. Or you can specify that all buildingplan-managed tables must -be of Masterful quality. The current filter settings are saved with planned -buildings when the ``#build`` blueprint is run. This means you can set the -filters the way you want for one blueprint, run the blueprint, and then freely -change them again for the next blueprint, even if the first set of buildings -haven't been built yet. +However, quickfort *does* use `buildingplan's filters ` +for each building type. For example, you can use the buildingplan UI to set the +type of stone you want your walls made out of. Or you can specify that all +buildingplan-managed tables must be of Masterful quality. The current filter +settings are saved with planned buildings when the ``#build`` blueprint is run. +This means you can set the filters the way you want for one blueprint, run the +blueprint, and then freely change them again for the next blueprint, even if the +first set of buildings haven't been built yet. Note that buildings are still constructed immediately if you already have the materials. However, with buildingplan you now have the freedom to apply diff --git a/plugins/buildingplan.cpp b/plugins/buildingplan.cpp index 14c3a1918..e68f9ca4b 100644 --- a/plugins/buildingplan.cpp +++ b/plugins/buildingplan.cpp @@ -954,7 +954,7 @@ static command_result buildingplan_cmd(color_ostream &out, vector & par out.printerr( "ERROR: A map must be loaded before you can read or set" "buildingplan global settings. Try adding your" - "'buildingplan set' commands to the onMapLoad.init" "file."); + "'buildingplan set' commands to the onMapLoad.init file.\n"); return CR_FAILURE; } @@ -985,7 +985,7 @@ static command_result buildingplan_cmd(color_ostream &out, vector & par } else { - out.printerr("ERROR: invalid syntax"); + out.printerr("ERROR: invalid syntax\n"); } }