From 09f0607db28cdfc133dbd8a7e93da143441cdf59 Mon Sep 17 00:00:00 2001 From: myk002 Date: Sat, 13 Feb 2021 11:07:14 -0800 Subject: [PATCH 1/3] add deprecation warnings to fortplan --- docs/Plugins.rst | 8 ++++++-- docs/changelog.txt | 3 +++ plugins/fortplan.cpp | 9 ++++++++- 3 files changed, 17 insertions(+), 3 deletions(-) diff --git a/docs/Plugins.rst b/docs/Plugins.rst index 54bb5213e..24dd90c43 100644 --- a/docs/Plugins.rst +++ b/docs/Plugins.rst @@ -52,7 +52,7 @@ Options (If only region and name are given, export all): :place: Export stockpile commands to "-place.csv" :query: Export query commands to "-query.csv" -Goes very well with `fortplan`, for re-importing. +Goes very well with `quickfort`, for re-importing. .. _remotefortressreader: @@ -2355,8 +2355,12 @@ fortplan ======== Usage: ``fortplan [filename]`` +**Fortplan is deprecated.** Please use DFHack's more powerful `quickfort` +command instead. You can use your existing .csv files. Just move them to the +``blueprints`` folder in your DF installation, and instead of ``fortplan file.csv`` run ``quickfort run file.csv``. + Designates furniture for building according to a ``.csv`` file with -quickfort-style syntax. Companion to `digfort`. +quickfort-style syntax. The first line of the file must contain the following:: diff --git a/docs/changelog.txt b/docs/changelog.txt index 3cf180c23..3d327981d 100644 --- a/docs/changelog.txt +++ b/docs/changelog.txt @@ -33,6 +33,9 @@ changelog.txt uses a syntax similar to RST, with a few special sequences: # Future +## Documentation +- `fortplan`: fortplan has been replaced by `quickfort`. add deprecation warnings to command output and documentation. + # 0.47.05-beta1 ## Fixes diff --git a/plugins/fortplan.cpp b/plugins/fortplan.cpp index 3eca32c50..969c67d20 100644 --- a/plugins/fortplan.cpp +++ b/plugins/fortplan.cpp @@ -1,3 +1,8 @@ +/* + * Fortplan is deprecated. All functionality has moved to the DFHack quickfort + * script. Fortplan will be removed in a future DFHack release. + */ + #include #include @@ -194,8 +199,10 @@ std::vector> tokenizeFile(std::string filename) { } command_result fortplan(color_ostream &out, vector & params) { - auto & con = out; + con.print("Fortplan is deprecated. Please use DFHack's quickfort command" + " instead. Fortplan will be removed in a future DFHack release.\n"); + std::vector> layout(128, std::vector(128)); if (params.size()) { coord32_t cursor; From 3e6294198b6e8f3be3de2f5168636e0b395ae5a3 Mon Sep 17 00:00:00 2001 From: myk002 Date: Thu, 18 Feb 2021 23:23:50 -0800 Subject: [PATCH 2/3] update wording of fortplan deprecation notice --- plugins/fortplan.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/plugins/fortplan.cpp b/plugins/fortplan.cpp index 969c67d20..4d51f2c99 100644 --- a/plugins/fortplan.cpp +++ b/plugins/fortplan.cpp @@ -200,8 +200,10 @@ std::vector> tokenizeFile(std::string filename) { command_result fortplan(color_ostream &out, vector & params) { auto & con = out; - con.print("Fortplan is deprecated. Please use DFHack's quickfort command" - " instead. Fortplan will be removed in a future DFHack release.\n"); + con.print("Fortplan is deprecated. Please move your blueprints to the" + " 'blueprints' folder (under your DF installation directory) and use" + " DFHack's quickfort command instead:\n quickfort run example.csv\n" + " Fortplan will be removed in a future DFHack release.\n" std::vector> layout(128, std::vector(128)); if (params.size()) { From de9375574a80f137934d2c6c2592207aa90690bc Mon Sep 17 00:00:00 2001 From: myk002 Date: Thu, 18 Feb 2021 23:25:21 -0800 Subject: [PATCH 3/3] fix syntax error --- plugins/fortplan.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/fortplan.cpp b/plugins/fortplan.cpp index 4d51f2c99..b346a49f3 100644 --- a/plugins/fortplan.cpp +++ b/plugins/fortplan.cpp @@ -203,7 +203,7 @@ command_result fortplan(color_ostream &out, vector & params) { con.print("Fortplan is deprecated. Please move your blueprints to the" " 'blueprints' folder (under your DF installation directory) and use" " DFHack's quickfort command instead:\n quickfort run example.csv\n" - " Fortplan will be removed in a future DFHack release.\n" + " Fortplan will be removed in a future DFHack release.\n"); std::vector> layout(128, std::vector(128)); if (params.size()) {