add deprecation warnings to fortplan

develop
myk002 2021-02-13 11:07:14 -08:00
parent 92a01e656f
commit 09f0607db2
No known key found for this signature in database
GPG Key ID: 8A39CA0FA0C16E78
3 changed files with 17 additions and 3 deletions

@ -52,7 +52,7 @@ Options (If only region and name are given, export all):
:place: Export stockpile commands to "<name>-place.csv" :place: Export stockpile commands to "<name>-place.csv"
:query: Export query commands to "<name>-query.csv" :query: Export query commands to "<name>-query.csv"
Goes very well with `fortplan`, for re-importing. Goes very well with `quickfort`, for re-importing.
.. _remotefortressreader: .. _remotefortressreader:
@ -2355,8 +2355,12 @@ fortplan
======== ========
Usage: ``fortplan [filename]`` 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 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:: The first line of the file must contain the following::

@ -33,6 +33,9 @@ changelog.txt uses a syntax similar to RST, with a few special sequences:
# Future # Future
## Documentation
- `fortplan`: fortplan has been replaced by `quickfort`. add deprecation warnings to command output and documentation.
# 0.47.05-beta1 # 0.47.05-beta1
## Fixes ## Fixes

@ -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 <fstream> #include <fstream>
#include <vector> #include <vector>
@ -194,8 +199,10 @@ std::vector<std::vector<std::string>> tokenizeFile(std::string filename) {
} }
command_result fortplan(color_ostream &out, vector<string> & params) { command_result fortplan(color_ostream &out, vector<string> & params) {
auto & con = out; 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<std::vector<std::string>> layout(128, std::vector<std::string>(128)); std::vector<std::vector<std::string>> layout(128, std::vector<std::string>(128));
if (params.size()) { if (params.size()) {
coord32_t cursor; coord32_t cursor;