From 20276be50f70e3ba02bbcd16dbd6816839d6b4a5 Mon Sep 17 00:00:00 2001 From: Myk Taylor Date: Sun, 1 Nov 2020 16:05:56 -0800 Subject: [PATCH 01/35] check in unaltered version of alt_getopt --- library/lua/3rdparty/alt_getopt.lua | 171 ++++++++++++++++++++++++++++ 1 file changed, 171 insertions(+) create mode 100644 library/lua/3rdparty/alt_getopt.lua diff --git a/library/lua/3rdparty/alt_getopt.lua b/library/lua/3rdparty/alt_getopt.lua new file mode 100644 index 000000000..87ed20c8f --- /dev/null +++ b/library/lua/3rdparty/alt_getopt.lua @@ -0,0 +1,171 @@ +-- Copyright (c) 2009 Aleksey Cheusov +-- +-- Permission is hereby granted, free of charge, to any person obtaining +-- a copy of this software and associated documentation files (the +-- "Software"), to deal in the Software without restriction, including +-- without limitation the rights to use, copy, modify, merge, publish, +-- distribute, sublicense, and/or sell copies of the Software, and to +-- permit persons to whom the Software is furnished to do so, subject to +-- the following conditions: +-- +-- The above copyright notice and this permission notice shall be +-- included in all copies or substantial portions of the Software. +-- +-- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +-- EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +-- MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +-- NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE +-- LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +-- OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION +-- WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +-- based on https://github.com/LuaDist/alt-getopt/blob/master/alt_getopt.lua +-- MIT licence +-- modified to support non-options and to not call os.exit() +-- intended to be used via utils.processArgs2() + +local _ENV = mkmodule('alt_getopt') + +local function convert_short2long (opts) + local i = 1 + local len = #opts + local ret = {} + + for short_opt, accept_arg in opts:gmatch("(%w)(:?)") do + ret[short_opt]=#accept_arg + end + + return ret +end + +local function exit_with_error (msg, exit_status) + io.stderr:write (msg) + os.exit (exit_status) +end + +local function err_unknown_opt (opt) + exit_with_error ("Unknown option `-" .. + (#opt > 1 and "-" or "") .. opt .. "'\n", 1) +end + +local function canonize (options, opt) + if not options [opt] then + err_unknown_opt (opt) + end + + while type (options [opt]) == "string" do + opt = options [opt] + + if not options [opt] then + err_unknown_opt (opt) + end + end + + return opt +end + +function get_ordered_opts (arg, sh_opts, long_opts) + local i = 1 + local count = 1 + local opts = {} + local optarg = {} + + local options = convert_short2long (sh_opts) + for k,v in pairs (long_opts) do + options [k] = v + end + + while i <= #arg do + local a = arg [i] + + if a == "--" then + i = i + 1 + break + + elseif a == "-" then + break + + elseif a:sub (1, 2) == "--" then + local pos = a:find ("=", 1, true) + + if pos then + local opt = a:sub (3, pos-1) + + opt = canonize (options, opt) + + if options [opt] == 0 then + exit_with_error ("Bad usage of option `" .. a .. "'\n", 1) + end + + optarg [count] = a:sub (pos+1) + opts [count] = opt + else + local opt = a:sub (3) + + opt = canonize (options, opt) + + if options [opt] == 0 then + opts [count] = opt + else + if i == #arg then + exit_with_error ("Missed value for option `" .. a .. "'\n", 1) + end + + optarg [count] = arg [i+1] + opts [count] = opt + i = i + 1 + end + end + count = count + 1 + + elseif a:sub (1, 1) == "-" then + local j + for j=2,a:len () do + local opt = canonize (options, a:sub (j, j)) + + if options [opt] == 0 then + opts [count] = opt + count = count + 1 + elseif a:len () == j then + if i == #arg then + exit_with_error ("Missed value for option `-" .. opt .. "'\n", 1) + end + + optarg [count] = arg [i+1] + opts [count] = opt + i = i + 1 + count = count + 1 + break + else + optarg [count] = a:sub (j+1) + opts [count] = opt + count = count + 1 + break + end + end + else + break + end + + i = i + 1 + end + + return opts,i,optarg +end + +function get_opts (arg, sh_opts, long_opts) + local ret = {} + + local opts,optind,optarg = get_ordered_opts (arg, sh_opts, long_opts) + for i,v in ipairs (opts) do + if optarg [i] then + ret [v] = optarg [i] + else + ret [v] = 1 + end + end + + return ret,optind +end + +return _ENV From 3b45878d41480a9fcabfb3b58782d86e8c52bc43 Mon Sep 17 00:00:00 2001 From: Myk Taylor Date: Tue, 3 Nov 2020 16:19:40 -0800 Subject: [PATCH 02/35] allow non-options in commandlines and return them also call qerror() on error, not os.exit --- library/lua/3rdparty/alt_getopt.lua | 254 ++++++++++++++-------------- 1 file changed, 126 insertions(+), 128 deletions(-) diff --git a/library/lua/3rdparty/alt_getopt.lua b/library/lua/3rdparty/alt_getopt.lua index 87ed20c8f..a356552aa 100644 --- a/library/lua/3rdparty/alt_getopt.lua +++ b/library/lua/3rdparty/alt_getopt.lua @@ -21,151 +21,149 @@ -- based on https://github.com/LuaDist/alt-getopt/blob/master/alt_getopt.lua -- MIT licence --- modified to support non-options and to not call os.exit() --- intended to be used via utils.processArgs2() +-- modified to support aggregation of non-options and to call qerror instead of +-- os.exit() on error. can be used directly or via the utils.processArgs2() +-- wrapper. + +-- sh_opts should be in standard getopt format: a string of letters that +-- represent options, each followed by a colon if that option takes an argument. +-- e.g.: 'ak:hv' has three flags (options with no arguments): 'a', 'h', and 'v' +-- and one option that takes an argument: 'k'. +-- +-- Options passed to the module to parse can be in any of the following formats: +-- -kVALUE, -k VALUE, --key=VALUE, --key VALUE +-- -abcd is equivalent to -a -b -c -d if none of them accept arguments. +-- -abckVALUE and -abck VALUE are also acceptable (where k is the only option +-- in the string that takes a value). -local _ENV = mkmodule('alt_getopt') +local _ENV = mkmodule('3rdparty.alt_getopt') -local function convert_short2long (opts) - local i = 1 - local len = #opts - local ret = {} +local function get_opt_map(opts) + local i = 1 + local len = #opts + local options = {} - for short_opt, accept_arg in opts:gmatch("(%w)(:?)") do - ret[short_opt]=#accept_arg - end + for short_opt, accept_arg in opts:gmatch('(%w)(:?)') do + options[short_opt] = #accept_arg + end - return ret + return options end -local function exit_with_error (msg, exit_status) - io.stderr:write (msg) - os.exit (exit_status) +local function err_unknown_opt(opt) + qerror(string.format('Unknown option "-%s%s"', #opt > 1 and '-' or '', opt)) end -local function err_unknown_opt (opt) - exit_with_error ("Unknown option `-" .. - (#opt > 1 and "-" or "") .. opt .. "'\n", 1) -end +-- resolve aliases into their canonical forms +local function canonicalize(options, opt) + if not options[opt] then + err_unknown_opt(opt) + end -local function canonize (options, opt) - if not options [opt] then - err_unknown_opt (opt) - end + while type(options[opt]) == 'string' do + opt = options[opt] - while type (options [opt]) == "string" do - opt = options [opt] + if not options[opt] then + err_unknown_opt(opt) + end + end - if not options [opt] then - err_unknown_opt (opt) - end - end + if type(options[opt]) ~= 'number' then + qerror(string.format( + 'Option "%s" resolves to non-number for has_arg flag', opt)) + end - return opt + return opt end -function get_ordered_opts (arg, sh_opts, long_opts) - local i = 1 - local count = 1 - local opts = {} - local optarg = {} - - local options = convert_short2long (sh_opts) - for k,v in pairs (long_opts) do - options [k] = v - end - - while i <= #arg do - local a = arg [i] - - if a == "--" then - i = i + 1 - break - - elseif a == "-" then - break - - elseif a:sub (1, 2) == "--" then - local pos = a:find ("=", 1, true) - - if pos then - local opt = a:sub (3, pos-1) - - opt = canonize (options, opt) - - if options [opt] == 0 then - exit_with_error ("Bad usage of option `" .. a .. "'\n", 1) - end - - optarg [count] = a:sub (pos+1) - opts [count] = opt - else - local opt = a:sub (3) - - opt = canonize (options, opt) - - if options [opt] == 0 then - opts [count] = opt - else - if i == #arg then - exit_with_error ("Missed value for option `" .. a .. "'\n", 1) - end - - optarg [count] = arg [i+1] - opts [count] = opt - i = i + 1 - end - end - count = count + 1 - - elseif a:sub (1, 1) == "-" then - local j - for j=2,a:len () do - local opt = canonize (options, a:sub (j, j)) - - if options [opt] == 0 then - opts [count] = opt - count = count + 1 - elseif a:len () == j then - if i == #arg then - exit_with_error ("Missed value for option `-" .. opt .. "'\n", 1) - end - - optarg [count] = arg [i+1] - opts [count] = opt - i = i + 1 - count = count + 1 - break - else - optarg [count] = a:sub (j+1) - opts [count] = opt - count = count + 1 - break - end - end - else - break - end - - i = i + 1 - end - - return opts,i,optarg +local function has_arg(options, opt) + return options[canonicalize(options, opt)] == 1 end -function get_opts (arg, sh_opts, long_opts) - local ret = {} - - local opts,optind,optarg = get_ordered_opts (arg, sh_opts, long_opts) - for i,v in ipairs (opts) do - if optarg [i] then - ret [v] = optarg [i] - else - ret [v] = 1 - end - end +-- returns vectors for opts, optargs, and nonoptions +function get_ordered_opts(args, sh_opts, long_opts) + local optind, count, opts, optargs, nonoptions = 1, 1, {}, {}, {} + + local options = get_opt_map(sh_opts) + for k,v in pairs(long_opts) do + options[k] = v + end + + while optind <= #args do + local a = args[optind] + if a == '--' then + optind = optind + 1 + elseif a:sub(1, 2) == '--' then + local pos = a:find('=', 1, true) + if pos then + local opt = a:sub(3, pos-1) + if not has_arg(options, opt) then + qerror(string.format('Bad usage of option "%s"', a)) + end + opts[count] = opt + optargs[count] = a:sub(pos+1) + else + local opt = a:sub(3) + opts[count] = opt + if has_arg(options, opt) then + if i == #args then + qerror(string.format( + 'Missing value for option "%s"', a)) + end + optargs[count] = args[optind+1] + optind = optind + 1 + end + end + count = count + 1 + elseif a:sub(1, 1) == '-' then + local j + for j=2,#a do + local opt = canonicalize(options, a:sub(j, j)) + if not has_arg(options, opt) then + opts[count] = opt + count = count + 1 + elseif j == #a then + if optind == #args then + qerror(string.format( + 'Missing value for option "-%s"', opt)) + end + opts[count] = opt + optargs[count] = args[optind+1] + optind = optind + 1 + count = count + 1 + else + opts[count] = opt + optargs[count] = a:sub(j+1) + count = count + 1 + break + end + end + else + table.insert(nonoptions, args[optind]) + end + optind = optind + 1 + end + for i=optind,#args do + table.insert(nonoptions, args[i]) + end + return opts, optargs, nonoptions +end - return ret,optind +-- returns a map of options to their optargs (or 1 if the option doesn't take an +-- argument), and a vector for nonoptions +function get_opts(args, sh_opts, long_opts) + local ret = {} + + local opts,optargs,nonoptions = get_ordered_opts(args, sh_opts, long_opts) + for i,v in ipairs(opts) do + if optarg[i] then + ret[v] = optarg[i] + else + ret[v] = 1 + end + end + + return ret, nonoptions end return _ENV From 175776812e32e93ec9c85efb5576e4b10663aadf Mon Sep 17 00:00:00 2001 From: Myk Taylor Date: Tue, 3 Nov 2020 16:19:50 -0800 Subject: [PATCH 03/35] implement a nice API wrapper for getopt --- library/lua/utils.lua | 49 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 49 insertions(+) diff --git a/library/lua/utils.lua b/library/lua/utils.lua index 43dcdcd60..ee2cadd29 100644 --- a/library/lua/utils.lua +++ b/library/lua/utils.lua @@ -613,6 +613,55 @@ function processArgs(args, validArgs) return result end +-- processes commandline options according to optionActions and returns all +-- argument strings that are not options. +-- +-- optionActions is a vector with elements in the following format: +-- {shortOptionName, longOptionAlias, hasArg=boolean, handler=fn} +-- shortOptionName and handler are required. If the option takes an argument, +-- it will be passed to the handler function. +-- longOptionAlias is optional. +-- hasArgument defaults to false. +-- +-- example usage: +-- +-- local filename = nil +-- local open_readonly = false +-- local nonoptions = processArgs2(args, { +-- {'r', handler=function() open_readonly = true end}, +-- {'f', 'filename', hasArg=true, +-- handler=function(optarg) filename = optarg end} +-- }) +-- +-- when args is {'first', '-f', 'fname', 'second'} +-- then filename will be fname and nonoptions will contain {'first', 'second'} +function processArgs2(args, optionActions) + local sh_opts, long_opts = '', {} + local handlers = {} + for _,optionAction in ipairs(optionActions) do + local sh_opt,long_opt = optionAction[1], optionAction[2] + if not sh_opt or type(sh_opt) ~= 'string' or #sh_opt ~= 1 then + qerror('optionAction missing option letter at index 1') + end + if not optionAction.handler then + qerror(string.format('handler missing for option "%s"', sh_opt)) + end + sh_opts = sh_opts .. sh_opt + if optionAction.hasArg then sh_opts = sh_opts .. ':' end + handlers[sh_opt] = optionAction.handler + if long_opt then + long_opts[long_opt] = sh_opt + handlers[long_opt] = optionAction.handler + end + end + local getopt = require('3rdparty.alt_getopt').get_ordered_opts + local opts, optargs, nonoptions = getopt(args, sh_opts, long_opts) + for i,v in ipairs(opts) do + handlers[v](optargs[i]) + end + return nonoptions +end + function fillTable(table1,table2) for k,v in pairs(table2) do table1[k] = v From 4e1c70bc06d93913c70b6ca46de22220546a240d Mon Sep 17 00:00:00 2001 From: myk002 Date: Sun, 10 Jan 2021 17:10:44 -0800 Subject: [PATCH 04/35] update changelog --- docs/changelog.txt | 3 +++ 1 file changed, 3 insertions(+) diff --git a/docs/changelog.txt b/docs/changelog.txt index fdc7c13e7..0dc119742 100644 --- a/docs/changelog.txt +++ b/docs/changelog.txt @@ -36,6 +36,9 @@ changelog.txt uses a syntax similar to RST, with a few special sequences: ## Fixes - `embark-assistant`: fixed order of factors when calculating min temperature +## API +- ``processArgs2()`` added to utils.lua, providing a callback interface for parameter parsing and getopt-like flexibility for parameter ordering and combination (see docs in ``library/lua/utils.lua`` and ``library/lua/3rdparty/alt_getopt.lua`` for details). + # 0.47.04-r4 ## Fixes From 339d5ce26bf6604a602a41dccb34f247b54992fe Mon Sep 17 00:00:00 2001 From: Myk Taylor Date: Tue, 3 Nov 2020 19:09:58 -0800 Subject: [PATCH 05/35] set buildingplan global settings from prompt allow buildingplan settings to be set from the DFHack# prompt. For example, if a player knows they'll always want to build with blocks, they could add the following two lines to onMapLoad.init: buildingplan set boulders false buildingplan set logs false --- plugins/buildingplan.cpp | 65 +++++++++++++++++++++++++++++++++++----- 1 file changed, 57 insertions(+), 8 deletions(-) diff --git a/plugins/buildingplan.cpp b/plugins/buildingplan.cpp index 8d17d5dbc..b6bef39bf 100644 --- a/plugins/buildingplan.cpp +++ b/plugins/buildingplan.cpp @@ -911,26 +911,75 @@ IMPLEMENT_VMETHOD_INTERPOSE(buildingplan_query_hook, render); IMPLEMENT_VMETHOD_INTERPOSE(buildingplan_place_hook, render); IMPLEMENT_VMETHOD_INTERPOSE(buildingplan_room_hook, render); +DFHACK_PLUGIN_IS_ENABLED(is_enabled); + +static void setSetting(std::string name, bool value); + +static bool isTrue(std::string val) +{ + return val == "on" || val == "true" || val == "y" || val == "yes"; +} + static command_result buildingplan_cmd(color_ostream &out, vector & parameters) { - if (!parameters.empty()) + if (parameters.empty()) + return CR_OK; + + std::string cmd = toLower(parameters[0]); + + if (cmd.size() >= 1 && cmd[0] == 'v') + { + out << "buildingplan version: " << PLUGIN_VERSION << endl; + } + else if (parameters.size() >= 2 && cmd == "debug") { - if (parameters.size() == 1 && toLower(parameters[0])[0] == 'v') + show_debugging = isTrue(toLower(parameters[1])); + out << "buildingplan debugging: " << + ((show_debugging) ? "enabled" : "disabled") << endl; + } + else if (cmd == "set") + { + if (!is_enabled) { - out << "Building Plan" << endl << "Version: " << PLUGIN_VERSION << endl; + out << "ERROR: buildingplan must be enabled before you can read or " + << "set buildingplan global settings." << endl; + return CR_FAILURE; } - else if (parameters.size() == 2 && toLower(parameters[0]) == "debug") + + if (!DFHack::Core::getInstance().isMapLoaded()) + { + out << "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." + << endl; + return CR_FAILURE; + } + + if (parameters.size() == 1) + { + // display current settings + out << "active settings:" << endl; + for (auto & setting : planner.getGlobalSettings()) + { + out << " " << setting.first << " = " + << (setting.second ? "true" : "false") << endl; + } + + out << " quickfort_mode = " + << (quickfort_mode ? "true" : "false") << endl; + } + else if (parameters.size() == 3) { - show_debugging = (toLower(parameters[1]) == "on"); - out << "Debugging " << ((show_debugging) ? "enabled" : "disabled") << endl; + // set a setting + std::string setting = toLower(parameters[1]); + bool val = isTrue(toLower(parameters[2])); + setSetting(setting, val); } } return CR_OK; } -DFHACK_PLUGIN_IS_ENABLED(is_enabled); - DFhackCExport command_result plugin_enable(color_ostream &out, bool enable) { if (!gps) From 96b117d369b599c93014dd710b24a0b77a197b1f Mon Sep 17 00:00:00 2001 From: myk002 Date: Mon, 11 Jan 2021 14:37:57 -0800 Subject: [PATCH 06/35] update plugin docs and changelog --- docs/Plugins.rst | 46 +++++++++++++++++++++++++++++++++++++++++----- docs/changelog.txt | 3 +++ 2 files changed, 44 insertions(+), 5 deletions(-) diff --git a/docs/Plugins.rst b/docs/Plugins.rst index f8fcd569d..8adf91c05 100644 --- a/docs/Plugins.rst +++ b/docs/Plugins.rst @@ -723,11 +723,11 @@ While placing a building, you can set filters for what materials you want the bu out of, what quality you want the component items to be, and whether you want the items to be decorated. -If a building type takes more than one item to construct, use -:kbd:`Ctrl`:kbd:`Left` and :kbd:`Ctrl`:kbd:`Right` to select the item that you -want to set filters for. Any filters that you set will be used for all buildings -of the selected type from that point onward (until you set a new filter or clear -the current one). +If a building type takes more than one item to construct, use :kbd:`Ctrl`:kbd:`Left` and +:kbd:`Ctrl`:kbd:`Right` to select the item that you want to set filters for. Any filters that +you set will be used for all buildings of the selected type placed from that point onward +(until you set a new filter or clear the current one). Buildings placed before the filters +were changed will keep the filter values that were set when the building was placed. For example, you can be sure that all your constructed walls are the same color by setting a filter to accept only certain types of stone. @@ -745,6 +745,42 @@ 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. +Global settings +--------------- + +The buildingplan plugin has several global settings that can be set from the UI (:kbd:`G` +from any building placement screen, for example: :kbd:`b`:kbd:`a`:kbd:`G`). These settings +can also be set from the ``DFHack#`` prompt once a map is loaded (or from your +``onMapLoad.init`` file) with the syntax:: + + buildingplan set + +The available settings are: + ++----------------+---------+---------------------------------------+ +| Setting | Default | Description | ++================+=========+=======================================+ +| blocks | true | Allow blocks, boulders, logs, or bars | ++----------------+---------+ to be matched for generic "building | +| boulders | true | material" items | ++----------------+---------+ | +| logs | true | | ++----------------+---------+ | +| bars | false | | ++----------------+---------+---------------------------------------+ +| quickfort_mode | false | Enable compatibility mode for the | +| | | legacy Python Quickfort (not required | +| | | for DFHack quickfort) | ++----------------+---------+---------------------------------------+ + +For example, to ensure you only use blocks when a "building material" item is required, you +could add this to your ``onMapLoad.init`` file:: + + on-new-fortress buildingplan set boulders false; buildingplan set logs false + +You only need to set the settings for new fortresses since your current filter settings +are saved with your game. + .. _confirm: confirm diff --git a/docs/changelog.txt b/docs/changelog.txt index fdc7c13e7..1c5f45525 100644 --- a/docs/changelog.txt +++ b/docs/changelog.txt @@ -36,6 +36,9 @@ changelog.txt uses a syntax similar to RST, with a few special sequences: ## Fixes - `embark-assistant`: fixed order of factors when calculating min temperature +## Misc Improvements +- `buildingplan`: set global settings from the ``DFHack#`` prompt: e.g. ``buildingplan set boulders false`` + # 0.47.04-r4 ## Fixes From fc270677fd885556e34e23cfb46193bf088501aa Mon Sep 17 00:00:00 2001 From: Myk Taylor Date: Thu, 5 Nov 2020 14:07:18 -0800 Subject: [PATCH 07/35] add checklist for all required dreamfort commands --- data/blueprints/library/dreamfort.csv | 48 +++++++++++++++++++++++++-- 1 file changed, 46 insertions(+), 2 deletions(-) diff --git a/data/blueprints/library/dreamfort.csv b/data/blueprints/library/dreamfort.csv index 1c0222477..75a10364d 100644 --- a/data/blueprints/library/dreamfort.csv +++ b/data/blueprints/library/dreamfort.csv @@ -11,7 +11,7 @@ It can be difficult applying a set of blueprints that you did not write yourself - The suites level has fancy rooms for your nobles. - The apartments level(s) has small but well-furnished bedrooms for your other dwarves. "" -"Run each level's ""help"" blueprint (e.g. /surface_help) for more details." +"Run each level's ""help"" blueprint (e.g. /surface_help) for more details, or run /checklist for a list of all commands you need to run, in order." "" "Dreamfort has a central staircase-based design. For all Dreamfort levels, place the cursor on the center staircase tile when you apply the blueprints. The first surface blueprint will designate a column of staircases that you can use as a guide." "" @@ -25,6 +25,50 @@ It can be difficult applying a set of blueprints that you did not write yourself You are welcome to copy those spreadsheets and make your own modifications! "#dreamfort.csv is generated with the following command: for fname in dreamfort*.xlsx; do xlsx2csv -a -p '' $fname; done | sed 's/,*$//'" +#notes label(checklist) +Here is the recommended order for Dreamfort commands. +"" +-- Find a good starting spot on the surface -- +quickfort run library/dreamfort.csv -n /surface4 +quickfort undo library/dreamfort.csv -n /surface4 +"" +"-- Surface, industry, and farming --" +quickfort run library/dreamfort.csv -n /surface1 +quickfort run library/dreamfort.csv -n /industry1 +quickfort run library/dreamfort.csv -n /surface2 +quickfort orders library/dreamfort.csv -n /industry2 +quickfort orders library/dreamfort.csv -n /farming2 +quickfort orders library/dreamfort.csv -n /surface4 +quickfort orders library/dreamfort.csv -n /surface5 +quickfort orders library/dreamfort.csv -n /surface6 +quickfort run library/dreamfort.csv -n /surface3 +quickfort run library/dreamfort.csv -n /industry2 +quickfort run library/dreamfort.csv -n /farming1 +quickfort run library/dreamfort.csv -n /surface4 +quickfort run library/dreamfort.csv -n /farming2 +quickfort run library/dreamfort.csv -n /farming3 +orders import automation +quickfort run library/dreamfort.csv -n /surface5 +quickfort run library/dreamfort.csv -n /surface6 +"" +-- Everything else -- +quickfort orders library/dreamfort.csv -n /services2 +quickfort orders library/dreamfort.csv -n /guildhall2 +quickfort orders library/dreamfort.csv -n /suites2 +quickfort run library/dreamfort.csv -n /services1 +quickfort run library/dreamfort.csv -n /services2 +quickfort run library/dreamfort.csv -n /services3 +quickfort run library/dreamfort.csv -n /guildhall1 +quickfort run library/dreamfort.csv -n /guildhall2 +quickfort run library/dreamfort.csv -n /suites1 +quickfort run library/dreamfort.csv -n /suites2 +quickfort run library/dreamfort.csv -n /apartments1_stack +"" +-- Repeat for each apartments level -- +quickfort orders library/dreamfort.csv -n /apartments2 +quickfort run library/dreamfort.csv -n /apartments2 +quickfort run library/dreamfort.csv -n /apartments3 +burial -pets #notes label(surface_help) "Sets up a large, protected entrance to your fort in a flat area on the surface." "" @@ -1220,7 +1264,7 @@ Industry Walkthrough: "" "4) If you want to automatically melt goblinite and other low-quality weapons and armor, mark the south-east stockpiles for auto-melt." "" -"5) Run ""orders import automation"" to use the provided automation.json to take care of your fort's basic needs." +"5) Run ""orders import automation"" to use the provided automation.json to take care of your fort's basic needs, such as food, booze, military supplies, and raw material processing." "#dig label(industry1) start(18; 18; staircase center) message(This would be a good time to queue manager orders for /industry2. Once the area is dug out, continue with /industry2.)" From d43ccf118aca87574ed950b8ead66719553c3d31 Mon Sep 17 00:00:00 2001 From: myk002 Date: Fri, 13 Nov 2020 15:59:11 -0800 Subject: [PATCH 08/35] give names to stockpiles levers bridges and zones and ensure diggers don't dig deeper than they need to using dig priorities --- data/blueprints/library/dreamfort.csv | 292 +++++++++++++++++++------- 1 file changed, 215 insertions(+), 77 deletions(-) diff --git a/data/blueprints/library/dreamfort.csv b/data/blueprints/library/dreamfort.csv index 75a10364d..dd218e0be 100644 --- a/data/blueprints/library/dreamfort.csv +++ b/data/blueprints/library/dreamfort.csv @@ -26,7 +26,7 @@ You are welcome to copy those spreadsheets and make your own modifications! "#dreamfort.csv is generated with the following command: for fname in dreamfort*.xlsx; do xlsx2csv -a -p '' $fname; done | sed 's/,*$//'" #notes label(checklist) -Here is the recommended order for Dreamfort commands. +Here is the recommended order for Dreamfort commands. See walkthroughs for details. "" -- Find a good starting spot on the surface -- quickfort run library/dreamfort.csv -n /surface4 @@ -108,6 +108,7 @@ Once the area is clear of trees, continue with /surface2.) clear trees and set u stair_guide/surface_stair_guide clear_small/surface_clear_small zones/surface_zones +name_zones/surface_name_zones "" "#meta label(surface2) start(staircase center) message(This would be a good time to queue manager orders for /surface4, /surface5, and /surface6. If you want a consistent color for your walls, remember to set the rock material in the buildingplan UI and in the manager orders for blocks. Once the whole area is clear of trees, continue with /surface3.) set up starting workshops/stockpiles and clear a larger area" @@ -133,6 +134,7 @@ query_buildings/surface_query_buildings build_scaffolding/surface_scaffolding #< build_roof/surface_roof +build_roof2/surface_roof2 #dig label(surface_stair_guide) hidden() use the meta blueprints for normal application j #> @@ -140,29 +142,29 @@ i #> i #> -i +i7 #> -i +i7 #> -i +i7 #> -i +i7 #> -i +i7 #> -i +i7 #> -i +i7 #> -i +i7 #> -i +i7 #> -i +i7 #> -i +i7 #> -i +i7 #dig label(surface_clear_small) start(23; 25) hidden() use the meta blueprints for normal application @@ -188,7 +190,7 @@ i ,,,,,,`,t,t,t,t,t,t,t,t,t,t,t,t,t,t,t,t,t,t,t,t,t,t,t,t,t,t,t,t,t,t,t,` ,,,,,,`,t,t,t,t,t,t,t,t,t,t,t,t,t,t,t,t,t,t,t,t,t,t,t,t,t,t,t,t,t,t,t,` ,,,,,,`,t,t,t,t,t,t,t,t,t,t,t,t,t,t,t,t,t,t,t,t,t,t,t,t,t,t,t,t,t,t,t,` -,,,,,,`,t,t,t,t,t,t,t,t,t,t,t,t,t,t,t,j,t,t,t,t,t,t,t,t,t,t,t,t,t,t,t,` +,,,,,,`,t,t,t,t,t,t,t,t,t,t,t,t,t,t,t,,t,t,t,t,t,t,t,t,t,t,t,t,t,t,t,` ,,,,,,`,t,t,t,t,t,t,t,t,t,t,t,t,t,t,t,t,t,t,t,t,t,t,t,t,t,t,t,t,t,t,t,` ,,,,,,`,t,t,t,t,t,t,t,t,t,t,t,t,t,t,t,t,t,t,t,t,t,t,t,t,t,t,t,t,t,t,t,` ,,,,,,`,`,`,`,`,`,`,`,`,`,,`,`,`,`,,`,,`,`,`,`,,`,`,`,`,`,`,`,`,`,` @@ -262,7 +264,57 @@ i -#build label(surface_build_start) start(23; 25) hidden() use the meta blueprints for normal application +#query label(surface_name_zones) start(23; 25) hidden() use the meta blueprints for normal application + + +,,,,,,`,`,`,`,`,`,`,`,`,`,`,`,`,`,`,`,`,`,`,`,`,`,`,`,`,`,`,`,`,`,`,`,` +,,,,,,`,"{namezone name=""main pasture""}",,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,` +,,,,,,`,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,` +,,,,,,`,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,` +,,,,,,`,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,` +,,,,,,`,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,` +,,,,,,`,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,` +,,,,,,`,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,` +,,,,,,`,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,` +,,,,,,`,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,` +,,,,,,`,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,` +,,,,,,`,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,` +,,,,,,`,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,` +,,,,,,`,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,` +,,,,,,`,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,` +,,,,,,`,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,` +,,,,,,`,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,` +,,,,,,`,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,` +,,,,,,`,"{namezone name=""nestbox1""}","{namezone name=""nestbox2""}","{namezone name=""nestbox3""}","{namezone name=""nestbox4""}","{namezone name=""nestbox5""}","{namezone name=""nestbox6""}","{namezone name=""nestbox7""}","{namezone name=""nestbox8""}","{namezone name=""nestbox9""}","{namezone name=""nestbox10""}","{namezone name=""nestbox11""}","{namezone name=""nestbox12""}",,,,,,,,"{namezone name=""nestbox13""}","{namezone name=""nestbox14""}","{namezone name=""nestbox15""}","{namezone name=""nestbox16""}","{namezone name=""nestbox17""}","{namezone name=""nestbox18""}","{namezone name=""nestbox19""}","{namezone name=""nestbox20""}","{namezone name=""nestbox21""}","{namezone name=""nestbox22""}","{namezone name=""nestbox23""}","{namezone name=""nestbox24""}",` +,,,,,,`,`,`,`,`,`,`,`,`,`,`,`,`,`,`,,`,,`,`,`,`,`,`,`,`,`,`,`,`,`,`,` +,,,,,,`,,,,,,,,,,,,,`,"{namezone name=""guard dogs""}",,,,,`,"{namezone name=""taming area""}",,,,,,,,,,,,` +,,,,,,`,,,,,,,,,,,,,,,`,`,`,,,,,,,,,,,,,,,` +,,,,,,`,,,,,,,,,,,,,`,,`,`,`,,`,,,,,,,,,,,,,` +,,,,,,`,,,,,,,,,,,,,,,`,`,`,,,,,,,,,,,,,,,` +,,,,,,`,,,,,,,,,,,,,`,,,,,,`,,,,,,,,,,,,,` +,,,,,,`,`,`,`,`,`,`,`,`,`,,`,`,`,`,,`,,`,`,`,`,,`,`,`,`,`,`,`,`,`,` +,,,,,,`,`,`,`,`,`,`,`,`,`,,`,`,,,,,,,,`,`,,`,`,`,`,`,`,`,`,`,` +,,,,,,`,,,,,,,,,,,,`,,,,,,,,`,,,,,,,,,,,,` +,,,,,,`,,,,,,,,,,,,`,,,,,,,,`,,,,,,,,,,,,` +,,,,,,`,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,` +,,,,,,`,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,` +,,,,,,`,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,` +,,,,,,`,,,,,,,,,,,,`,,,,,,,,`,,,,,,,,,,,,` +,,,,,,`,,,,,,,,,,,,`,,,,,,,,`,,,,,,,,,,,,` +,,,,,,`,`,`,`,`,`,`,`,`,`,`,`,`,,,,,,,,`,`,`,`,`,`,`,`,`,`,`,`,` +,,,,,,`,`,`,`,`,`,`,`,`,`,`,`,`,,,,,,,,`,`,`,`,`,`,`,`,`,`,`,`,` +,,,,,,,,,,,,,,,,,`,`,,,,,,,,`,` +,,,,,,,,,,,,,,,,,`,`,,,,,,,,`,` +,,,,,,,,,,,,,,,,,`,`,,,,,,,,`,` +,,,,,,`,`,`,`,`,`,`,`,`,`,`,`,`,,,,,,,,`,`,`,`,`,`,`,`,`,`,`,`,` +,,,,,,,,,,,,,,,,,,`,,,,,,,,` +,,,,,,,,,,,,,,,,,,`,`,`,`,`,`,`,`,` +,,,,,,,,,,,,,,,,,,,`,`,`,`,`,`,` +,,,,,,,,,,,,,,,,,,,`,`,`,`,`,`,` + + + +#build label(surface_build_start) start(23; 25) hidden() message(use autofarm to manage farm crop selection) use the meta blueprints for normal application ,,,,,,`,`,`,`,`,`,`,`,`,`,`,`,`,`,`,`,`,`,`,`,`,`,`,`,`,`,`,`,`,`,`,`,` @@ -375,6 +427,7 @@ i ,,,,,,`,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,` ,,,,,,`,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,` ,,,,,,`,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,` +,,,,,,`,,,,"{givename name=""starting food""}",,,,"{givename name=""starting wood""}",,,,"{givename name=""starting booze""}",,,,,"{givename name=""starting stone""}",,,,"{givename name=""starting misc""}",,,,"{givename name=""starting textile""}",,,,,,,` ,,,,,,`,,,,forbidbooze,,,,,,,,booze,,,,,otherstone,,,,,,,,,,,,,,,` ,,,,,,`,,,,nocontainers,,,,,,,,,,,,,,,,,,,,,,,,,,,,` ,,,,,,`,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,` @@ -383,11 +436,10 @@ i ,,,,,,`,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,` ,,,,,,`,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,` ,,,,,,`,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,` -,,,,,,`,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,` ,,,,,,`,`,`,`,`,`,`,`,`,`,`,`,`,`,`,,`,,`,`,`,`,`,`,`,`,`,`,`,`,`,`,` -,,,,,,`,,,,,,,,,,,,,`,,,,,,`,forbidcages,,,,,,,,,,,,` -,,,,,,`,,,,,,,,,,,,,,,`,`,`,,,forbidtraps,,,,,,,,,,,,` -,,,,,,`,,,,,,,,,,,,,`,,`,`,`,,`,,,,,,,,,,,,,` +,,,,,,`,,,,,,,,,,,,,`,,,,,,`,"{givename name=""prison/training area""}",,,,,,,,,,,,` +,,,,,,`,,,,,,,,,,,,,,,`,`,`,,,forbidcages,,,,,,,,,,,,` +,,,,,,`,,,,,,,,,,,,,`,,`,`,`,,`,forbidtraps,,,,,,,,,,,,` ,,,,,,`,,,,,,,,,,,,,,,`,`,`,,,,,,,,,,,,,,,` ,,,,,,`,,,,,,,,,,,,,`,,,,,,`,,,,,,,,,,,,,` ,,,,,,`,`,`,`,`,`,`,`,`,`,,`,`,`,`,,`,,`,`,`,`,,`,`,`,`,`,`,`,`,`,` @@ -712,7 +764,7 @@ p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p, -#build label(surface_buildings) start(23; 25) hidden() message(Remember to connect the levers to the gates once they are built.) use the meta blueprints for normal application +"#build label(surface_buildings) start(23; 25) hidden() message(Remember to connect the levers to the gates once they are built. Also, you can deconstruct the temporary trade depot in the pasture now.) use the meta blueprints for normal application" ,,,,,,`,`,`,`,`,`,`,`,`,`,`,`,`,`,`,`,`,`,`,`,`,`,`,`,`,`,`,`,`,`,`,`,` @@ -785,29 +837,29 @@ p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p, ,,,,,,`,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,` ,,,,,,`,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,` ,,,,,,`,`,`,`,`,`,`,`,`,`,`,`,`,`,`,,`,,`,`,`,`,`,`,`,`,`,`,`,`,`,`,` -,,,,,,`,,,,,,,,,,,,,`,,,,,,`,,,,,,,,,,,,,` +,,,,,,`,,,,,,,,,,,,,`,"{givename name=""trade depo gate""}",,"{givename name=""inner main gate""}",,"{givename name=""barracks gate""}",`,,,,,,,,,,,,,` ,,,,,,`,,,,,,,,,,,,,,,`,`,`,,,,,,,,,,,,,,,` ,,,,,,`,,,,,,,,,,,,,`,,`,`,`,,`,,,,,,,,,,,,,` ,,,,,,`,,,,,,,,,,,,,,,`,`,`,,,,,,,,,,,,,,,` -,,,,,,`,,,,,,,,,,,,,`,,,,,,`,,,,,,,,,,,,,` +,,,,,,`,,,,,,,,,,,,,`,"{givename name=""left outer gate""}","{givename name=""left inner gate""}","{givename name=""outer main gate""}","{givename name=""right inner gate""}","{givename name=""right outer gate""}",`,,,,,,,,,,,,,` ,,,,,,`,`,`,`,`,`,`,`,`,`,,`,`,`,`,,`,,`,`,`,`,,`,`,`,`,`,`,`,`,`,` ,,,,,,`,`,`,`,`,`,`,`,`,`,,`,`,,,,,,,,`,`,,`,`,`,`,`,`,`,`,`,` +,,,,,,`,,,,,,,,,,,,`,,,,"{givename name=""inner main gate""}",,,,`,,,,,,,,,,,,` ,,,,,,`,,,,,,,,,,,,`,,,,,,,,`,,,,,,,,,,,,` -,,,,,,`,,,,,,,,,,,,`,,,,,,,,`,,,,,,,,,,,,` -,,,,,,`,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,` ,,,,,,`,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,` +,,,,,,`,,,,,,,,,,,,"{givename name=""trade depo gate""}",,,,,,,,"{givename name=""barracks gate""}",,,,,,,,,,,,` ,,,,,,`,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,` ,,,,,,`,,,,,,,,,,,,`,,,,,,,,`,,,,,,,,,,,,` ,,,,,,`,,,,,,,,,,,,`,,,,,,,,`,,,,,,,,,,,,` ,,,,,,`,`,`,`,`,`,`,`,`,`,`,`,`,,,,,,,,`,`,`,`,`,`,`,`,`,`,`,`,` ,,,,,,`,`,`,`,`,`,`,`,`,`,`,`,`,,,,,,,,`,`,`,`,`,`,`,`,`,`,`,`,` - +,,,,,,"{givename name=""left outer gate""}",,,,,,,,,,,,"{givename name=""left inner gate""}",,,,,,,,"{givename name=""right inner gate""}",,,,,,,,,,,,"{givename name=""right outer gate""}" ,,,,,,`,`,`,`,`,`,`,`,`,`,`,`,`,,,,,,,,`,`,`,`,`,`,`,`,`,`,`,`,` ,,,,,,,,,,,,,,,,,,`,,,,,,,,` ,,,,,,,,,,,,,,,,,,`,,,,,,,,` - +,,,,,,,,,,,,,,,,,,,,,,"{givename name=""outer main gate""}" @@ -865,6 +917,56 @@ p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p, #build label(surface_roof) start(23; 25) hidden() use the meta blueprints for normal application +,,,,,,`,`,`,`,`,`,`,`,`,`,`,`,`,`,`,`,`,`,`,`,`,`,`,`,`,`,`,`,`,`,`,`,` +,,,,,,`,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,` +,,,,,,`,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,` +,,,,,,`,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,` +,,,,,,`,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,` +,,,,,,`,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,` +,,,,,,`,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,` +,,,,,,`,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,` +,,,,,,`,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,` +,,,,,,`,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,` +,,,,,,`,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,` +,,,,,,`,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,` +,,,,,,`,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,` +,,,,,,`,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,` +,,,,,,`,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,` +,,,,,,`,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,` +,,,,,,`,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,` +,,,,,,`,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,` +,,,,,,`,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,` +,,,,,,`,`,`,`,`,`,`,`,`,`,`,`,`,`,`,,`,,`,`,`,`,`,`,`,`,`,`,`,`,`,`,` +,,,,,,`,,,,,,,,,,,,,`,,,,,,`,,,,,,,,,,,,,` +,,,,,,`,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,` +,,,,,,`,,,,,,,,,,,,,`,,,,,,`,,,,,,,,,,,,,` +,,,,,,`,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,` +,,,,,,`,,,,,,,,,,,,,`,,,,,,`,,,,,,,,,,,,,` +,,,,,,`,`,`,`,`,`,`,`,`,`,Cf,`,`,`,`,Cf,`,Cf,`,`,`,`,Cf,`,`,`,`,`,`,`,`,`,` +,,,,,,`,`,`,`,`,`,`,`,`,`,Cf,`,`,Cf,Cf,Cf,Cf,Cf,Cf,Cf,`,`,Cf,`,`,`,`,`,`,`,`,`,` +,,,,,,`,Cf,Cf,Cf,Cf,Cf,Cf,Cf,Cf,Cf,Cf,Cf,`,Cf,Cf,Cf,Cf,Cf,Cf,Cf,`,Cf,Cf,Cf,Cf,Cf,Cf,Cf,Cf,Cf,Cf,Cf,` +,,,,,,`,Cf,Cf,Cf,Cf,Cf,Cf,Cf,Cf,Cf,Cf,Cf,`,Cf,Cf,Cf,Cf,Cf,Cf,Cf,`,Cf,Cf,Cf,Cf,Cf,Cf,Cf,Cf,Cf,Cf,Cf,` +,,,,,,`,Cf,Cf,Cf,Cf,Cf,Cf,Cf,Cf,Cf,Cf,Cf,Cf,Cf,Cf,Cf,Cf,Cf,Cf,Cf,Cf,Cf,Cf,Cf,Cf,Cf,Cf,Cf,Cf,Cf,Cf,Cf,` +,,,,,,`,Cf,Cf,Cf,Cf,Cf,Cf,Cf,Cf,Cf,Cf,Cf,Cf,Cf,Cf,Cf,Cf,Cf,Cf,Cf,Cf,Cf,Cf,Cf,Cf,Cf,Cf,Cf,Cf,Cf,Cf,Cf,` +,,,,,,`,Cf,Cf,Cf,Cf,Cf,Cf,Cf,Cf,Cf,Cf,Cf,Cf,Cf,Cf,Cf,Cf,Cf,Cf,Cf,Cf,Cf,Cf,Cf,Cf,Cf,Cf,Cf,Cf,Cf,Cf,Cf,` +,,,,,,`,Cf,Cf,Cf,Cf,Cf,Cf,Cf,Cf,Cf,Cf,Cf,`,Cf,Cf,Cf,Cf,Cf,Cf,Cf,`,Cf,Cf,Cf,Cf,Cf,Cf,Cf,Cf,Cf,Cf,Cf,` +,,,,,,`,Cf,Cf,Cf,Cf,Cf,Cf,Cf,Cf,Cf,Cf,Cf,`,Cf,Cf,Cf,Cf,Cf,Cf,Cf,`,Cf,Cf,Cf,Cf,Cf,Cf,Cf,Cf,Cf,Cf,Cf,` +,,,,,,`,`,`,`,`,`,`,`,`,`,`,`,`,Cf,Cf,Cf,Cf,Cf,Cf,Cf,`,`,`,`,`,`,`,`,`,`,`,`,` +,,,,,,`,`,`,`,`,`,`,`,`,`,`,`,`,Cf,Cf,Cf,Cf,Cf,Cf,Cf,`,`,`,`,`,`,`,`,`,`,`,`,` +,,,,,,,Cf,Cf,Cf,Cf,Cf,Cf,Cf,Cf,Cf,Cf,Cf,Cf,Cf,Cf,Cf,Cf,Cf,Cf,Cf,Cf,Cf,Cf,Cf,Cf,Cf,Cf,Cf,Cf,Cf,Cf,Cf +,,,,,,,Cf,Cf,Cf,Cf,Cf,Cf,Cf,Cf,Cf,Cf,Cf,Cf,Cf,Cf,Cf,Cf,Cf,Cf,Cf,Cf,Cf,Cf,Cf,Cf,Cf,Cf,Cf,Cf,Cf,Cf,Cf +,,,,,,,Cf,Cf,Cf,Cf,Cf,Cf,Cf,Cf,Cf,Cf,Cf,Cf,Cf,Cf,Cf,Cf,Cf,Cf,Cf,Cf,Cf,Cf,Cf,Cf,Cf,Cf,Cf,Cf,Cf,Cf,Cf +,,,,,,`,`,`,`,`,`,`,`,`,`,`,`,`,Cf,Cf,Cf,Cf,Cf,Cf,Cf,`,`,`,`,`,`,`,`,`,`,`,`,` +,,,,,,,,,,,,,,,,,Cd,`,Cf,Cf,Cf,Cf,Cf,Cf,Cf,` +,,,,,,,,,,,,,,,,,,`,Cf,Cf,Cf,Cf,Cf,Cf,Cf,` + + + + + +#build label(surface_roof2) start(23; 25) hidden() use the meta blueprints for normal application +# this is split up into two blueprints to guarantee that buildingplan matches items to the lower tiles first + ,,,,,,`,`,`,`,`,`,`,`,`,`,`,`,`,`,`,`,`,`,`,`,`,`,`,`,`,`,`,`,`,`,`,`,` ,,,,,,`,Cf,Cf,Cf,Cf,Cf,Cf,Cf,Cf,Cf,Cf,Cf,Cf,Cf,Cf,Cf,Cf,Cf,Cf,Cf,Cf,Cf,Cf,Cf,Cf,Cf,Cf,Cf,Cf,Cf,Cf,Cf,` ,,,,,,`,Cf,Cf,Cf,Cf,Cf,Cf,Cf,Cf,Cf,Cf,Cf,Cf,Cf,Cf,Cf,Cf,Cf,Cf,Cf,Cf,Cf,Cf,Cf,Cf,Cf,Cf,Cf,Cf,Cf,Cf,Cf,` @@ -890,23 +992,23 @@ p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p, ,,,,,,`,Cf,Cf,Cf,Cf,Cf,Cf,Cf,Cf,Cf,Cf,Cf,Cf,`,Cf,Cf,Cf,Cf,Cf,`,Cf,Cf,Cf,Cf,Cf,Cf,Cf,Cf,Cf,Cf,Cf,Cf,` ,,,,,,`,Cf,Cf,Cf,Cf,Cf,Cf,Cf,Cf,Cf,Cf,Cf,Cf,Cf,Cf,Cf,Cf,Cf,Cf,Cf,Cf,Cf,Cf,Cf,Cf,Cf,Cf,Cf,Cf,Cf,Cf,Cf,` ,,,,,,`,Cf,Cf,Cf,Cf,Cf,Cf,Cf,Cf,Cf,Cf,Cf,Cf,`,Cf,Cf,Cf,Cf,Cf,`,Cf,Cf,Cf,Cf,Cf,Cf,Cf,Cf,Cf,Cf,Cf,Cf,` -,,,,,,`,`,`,`,`,`,`,`,`,`,Cf,`,`,`,`,Cf,`,Cf,`,`,`,`,Cf,`,`,`,`,`,`,`,`,`,` -,,,,,,`,`,`,`,`,`,`,`,`,`,Cf,`,`,Cf,Cf,Cf,Cf,Cf,Cf,Cf,`,`,Cf,`,`,`,`,`,`,`,`,`,` -,,,,,,`,Cf,Cf,Cf,Cf,Cf,Cf,Cf,Cf,Cf,Cf,Cf,`,Cf,Cf,Cf,Cf,Cf,Cf,Cf,`,Cf,Cf,Cf,Cf,Cf,Cf,Cf,Cf,Cf,Cf,Cf,` -,,,,,,`,Cf,Cf,Cf,Cf,Cf,Cf,Cf,Cf,Cf,Cf,Cf,`,Cf,Cf,Cf,Cf,Cf,Cf,Cf,`,Cf,Cf,Cf,Cf,Cf,Cf,Cf,Cf,Cf,Cf,Cf,` -,,,,,,`,Cf,Cf,Cf,Cf,Cf,Cf,Cf,Cf,Cf,Cf,Cf,Cf,Cf,Cf,Cf,Cf,Cf,Cf,Cf,Cf,Cf,Cf,Cf,Cf,Cf,Cf,Cf,Cf,Cf,Cf,Cf,` -,,,,,,`,Cf,Cf,Cf,Cf,Cf,Cf,Cf,Cf,Cf,Cf,Cf,Cf,Cf,Cf,Cf,Cf,Cf,Cf,Cf,Cf,Cf,Cf,Cf,Cf,Cf,Cf,Cf,Cf,Cf,Cf,Cf,` -,,,,,,`,Cf,Cf,Cf,Cf,Cf,Cf,Cf,Cf,Cf,Cf,Cf,Cf,Cf,Cf,Cf,Cf,Cf,Cf,Cf,Cf,Cf,Cf,Cf,Cf,Cf,Cf,Cf,Cf,Cf,Cf,Cf,` -,,,,,,`,Cf,Cf,Cf,Cf,Cf,Cf,Cf,Cf,Cf,Cf,Cf,`,Cf,Cf,Cf,Cf,Cf,Cf,Cf,`,Cf,Cf,Cf,Cf,Cf,Cf,Cf,Cf,Cf,Cf,Cf,` -,,,,,,`,Cf,Cf,Cf,Cf,Cf,Cf,Cf,Cf,Cf,Cf,Cf,`,Cf,Cf,Cf,Cf,Cf,Cf,Cf,`,Cf,Cf,Cf,Cf,Cf,Cf,Cf,Cf,Cf,Cf,Cf,` -,,,,,,`,`,`,`,`,`,`,`,`,`,`,`,`,Cf,Cf,Cf,Cf,Cf,Cf,Cf,`,`,`,`,`,`,`,`,`,`,`,`,` -,,,,,,`,`,`,`,`,`,`,`,`,`,`,`,`,Cf,Cf,Cf,Cf,Cf,Cf,Cf,`,`,`,`,`,`,`,`,`,`,`,`,` -,,,,,,,Cf,Cf,Cf,Cf,Cf,Cf,Cf,Cf,Cf,Cf,Cf,Cf,Cf,Cf,Cf,Cf,Cf,Cf,Cf,Cf,Cf,Cf,Cf,Cf,Cf,Cf,Cf,Cf,Cf,Cf,Cf -,,,,,,,Cf,Cf,Cf,Cf,Cf,Cf,Cf,Cf,Cf,Cf,Cf,Cf,Cf,Cf,Cf,Cf,Cf,Cf,Cf,Cf,Cf,Cf,Cf,Cf,Cf,Cf,Cf,Cf,Cf,Cf,Cf -,,,,,,,Cf,Cf,Cf,Cf,Cf,Cf,Cf,Cf,Cf,Cf,Cf,Cf,Cf,Cf,Cf,Cf,Cf,Cf,Cf,Cf,Cf,Cf,Cf,Cf,Cf,Cf,Cf,Cf,Cf,Cf,Cf -,,,,,,`,`,`,`,`,`,`,`,`,`,`,`,`,Cf,Cf,Cf,Cf,Cf,Cf,Cf,`,`,`,`,`,`,`,`,`,`,`,`,` -,,,,,,,,,,,,,,,,,Cd,`,Cf,Cf,Cf,Cf,Cf,Cf,Cf,` -,,,,,,,,,,,,,,,,,,`,Cf,Cf,Cf,Cf,Cf,Cf,Cf,` +,,,,,,`,`,`,`,`,`,`,`,`,`,,`,`,`,`,,`,,`,`,`,`,,`,`,`,`,`,`,`,`,`,` +,,,,,,`,`,`,`,`,`,`,`,`,`,,`,`,,,,,,,,`,`,,`,`,`,`,`,`,`,`,`,` +,,,,,,`,,,,,,,,,,,,`,,,,,,,,`,,,,,,,,,,,,` +,,,,,,`,,,,,,,,,,,,`,,,,,,,,`,,,,,,,,,,,,` +,,,,,,`,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,` +,,,,,,`,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,` +,,,,,,`,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,` +,,,,,,`,,,,,,,,,,,,`,,,,,,,,`,,,,,,,,,,,,` +,,,,,,`,,,,,,,,,,,,`,,,,,,,,`,,,,,,,,,,,,` +,,,,,,`,`,`,`,`,`,`,`,`,`,`,`,`,,,,,,,,`,`,`,`,`,`,`,`,`,`,`,`,` +,,,,,,`,`,`,`,`,`,`,`,`,`,`,`,`,,,,,,,,`,`,`,`,`,`,`,`,`,`,`,`,` + + + +,,,,,,`,`,`,`,`,`,`,`,`,`,`,`,`,,,,,,,,`,`,`,`,`,`,`,`,`,`,`,`,` +,,,,,,,,,,,,,,,,,~,`,,,,,,,,` +,,,,,,,,,,,,,,,,,,`,,,,,,,,` @@ -1132,13 +1234,13 @@ query_stockpiles/farming_query_stockpiles - if the industry level is already built, configure the jugs, pots, and bags stockpiles to take from the ""Goods"" quantum stockpile on the industry level) use the meta blueprints for normal application" -,,,,,,,,,`,`,`,`,`,`,`,`,`,`,`,,`,,`,,forbidplants,`,`,`,`,`,`,`,`,`,`,`,`,` +,,,,,,,,,`,`,`,`,`,`,`,`,"{givename name=""seeds feeder""}",`,`,,`,,`,,forbidplants,`,`,`,`,`,`,`,`,`,`,`,`,` ,,,,,,,,,`,`,`,`,`,`,`,`,`,`,`,`,`,`,`,,forbidtallow,`,`,`,`,`,`,`,`,`,`,`,`,` ,,,,,,,,,`,`,`,`,`,`,`,`,`,`,`,,`,`,`,`,forbiddye,`,`,`,`,`,`,`,`,`,`,`,`,` -,,,,,,,,,seeds,linksonly,`,`,`,`,`,`,seeds,give2left,nocontainers,`,`,`,`,,forbidunpreparedfish,`,`,`,`,`,`,`,`,`,`,`,`,` -,,,,,,,,,potash,nocontainers,`,`,`,`,`,`,`,`,`,,`,`,`,,forbidmiscliquid,`,`,`,`,`,`,`,`,`,`,`,`,` +,,,,,,,,,seeds,linksonly,"{givename name=""seeds""}",`,`,`,`,`,seeds,give2left,nocontainers,`,`,`,`,,forbidunpreparedfish,`,`,`,`,`,`,`,`,`,`,`,`,` +,,,,,,,,,potash,nocontainers,"{givename name=""potash""}",`,`,`,`,`,`,`,`,,`,`,`,,forbidmiscliquid,`,`,`,`,`,`,`,`,`,`,`,`,` ,,,,,,,,,,,`,,,`,,,`,,,,`,`,`,`,forbidpreparedfood,`,`,`,`,`,`,`,`,`,`,`,`,` -,,,,,,plants,`,`,`,`,`,`,`,`,`,`,`,`,`,,`,`,`,,`,`,`,`,`,`,`,`,`,`,`,`,`,` +,,,,,,plants,"{givename name=""plants""}",`,`,`,`,`,`,`,`,`,`,`,`,,`,`,`,,"{givename name=""cookable food""}",`,`,`,`,`,`,`,`,`,`,`,`,` ,,,,,,`,`,`,`,`,`,`,`,`,`,`,`,`,`,,`,`,`,,`,`,`,`,`,`,`,`,`,`,`,`,`,` ,,,,,,`,`,`,`,`,`,`,`,`,`,`,`,`,`,`,`,`,`,`,`,`,`,`,`,`,`,`,`,`,`,`,`,` ,,,,,,`,`,`,`,`,`,`,`,`,`,`,`,`,`,,`,`,`,,`,`,`,`,`,`,`,`,`,`,`,`,`,` @@ -1149,28 +1251,28 @@ query_stockpiles/farming_query_stockpiles ,,,,,,`,`,`,`,`,`,`,`,`,`,`,`,`,`,`,`,`,`,`,`,`,`,`,`,`,`,`,`,`,`,`,`,` ,,,,,,`,`,`,`,`,`,`,`,`,`,`,`,`,`,,`,`,`,,`,`,`,`,`,`,`,`,`,`,`,`,`,` ,,,,,,,,,`,,,,`,,,,`,,,,`,`,`,,,`,,,,` -,,,,,,,,bags,nocontainers,`,`,`,`,`,pots,`,`,`,`,,`,`,`,,`,`,`,,`,`,` -,,,,,,,,`,`,`,`,`,`,`,`,`,`,`,`,`,`,`,`,`,`,`,`,`,`,`,` -,,,,,,,,jugs,nocontainers,`,`,`,`,`,`,`,`,`,`,,`,,`,,`,`,`,,`,`,` +,,,,,,,,bags,nocontainers,"{givename name=""bags""}",`,`,`,`,pots,`,`,`,`,,`,`,`,,`,`,`,,`,`,` +,,,,,,,,`,`,`,`,`,`,`,"{givename name=""pots""}",`,`,`,`,`,`,`,`,`,`,`,`,`,`,`,` +,,,,,,,,jugs,nocontainers,"{givename name=""jugs""}",`,`,`,`,`,`,`,`,`,,`,,`,,`,`,`,,`,`,` ,,,,,,,,,`,,,,`,,,,`,,,,`,`,`,,,`,,,,` ,,,,,,,,`,`,`,`,`,`,`,`,`,`,`,`,`,`,`,`,`,`,`,`,`,`,`,`,`,`,` ,,,,,,,,,`,`,`,`,`,`,`,`,`,`,,`,`,`,`,`,,`,`,`,`,`,`,`,` ,,,,,,,,`,`,`,`,`,`,`,`,`,`,`,`,`,`,`,`,`,`,`,`,`,`,`,`,`,`,` ,,,,,,,,,,,,,,,,,,,,,`,`,`,,,,,`,,,,,` -,,,,,,,,,`,`,`,,preparedfood,`,`,`,`,`,`,,`,,`,,rawhides,`,`,`,`,,unpreparedfish,`,`,` -,,,,,,,,,`,`,`,,`,`,`,`,`,`,`,,`,`,`,`,`,`,`,`,`,`,nocontainers,`,`,` -,,,,,,,,,`,`,`,`,`,`,`,`,`,`,`,`,`,`,`,,`,`,`,`,`,,`,`,`,` +,,,,,,,,,`,`,`,,preparedfood,"{givename name=""prepared food""}",`,`,`,`,`,,`,,`,,rawhides,`,`,`,`,,unpreparedfish,`,`,` +,,,,,,,,,`,`,`,,`,`,`,`,`,`,`,,`,`,`,`,"{givename name=""rawhides""}",`,`,`,`,`,nocontainers,`,`,` +,,,,,,,,,`,`,`,`,`,`,`,`,`,`,`,`,`,`,`,,`,`,`,`,`,,"{givename name=""unprepared fish""}",`,`,` ,,,,,,,,,`,`,`,,`,`,`,`,`,`,`,,`,`,`,,,,,`,,,,,` -,,,,,,,,,`,`,`,,`,`,`,`,`,`,`,,`,`,`,,give2up,`,`,`,`,`,`,`,`,`,`,`,`,` +,,,,,,,,,`,`,`,,`,`,`,`,`,`,`,,`,`,`,,give2up,"{givename name=""refuse and corpses""}",`,`,`,`,`,`,`,`,`,`,`,` ,,,,,,,,,`,`,`,`,`,`,`,`,`,`,`,`,`,`,`,`,`,`,`,`,`,`,`,`,`,`,`,`,`,` -,,,,,,,,,`,`,`,,booze,`,`,`,`,`,`,,`,`,`,,forbidcraftrefuse,`,`,`,`,`,`,`,`,`,`,`,`,` +,,,,,,,,,`,`,`,,booze,"{givename name=""booze""}",`,`,`,`,`,,`,`,`,,forbidcraftrefuse,`,`,`,`,`,`,`,`,`,`,`,`,` ,,,,,,,,,`,`,`,,`,`,`,`,`,`,`,,`,,`,,`,`,`,`,`,`,`,`,`,`,`,`,`,` ,,,,,,,,,,,,,,,,,,,,,,,,,`,`,`,`,`,`,`,`,`,`,`,`,`,` ,,,,,,,,,,,,,,,,,,,,,bodyparts,linksonly,`,,`,`,`,`,`,`,`,`,`,`,`,`,`,` -,,,,,,,,,,,,,,,,,,,,,`,`,`,`,give2left,`,`,`,`,`,`,`,`,`,`,`,`,` +,,,,,,,,,,,,,,,,,,,,,"{givename name=""trash dumper feeder""}",`,`,`,give2left,`,`,`,`,`,`,`,`,`,`,`,`,` ,,,,,,,,,,,,,,,,,,,,,`,`,`,,`,`,`,`,`,`,`,`,`,`,`,`,`,` ,,,,,,,,,,,,,,,,,,,,,,"{quantumstopfromnorth name=""Trash Dumper""}",,,`,`,`,`,`,`,`,`,`,`,`,`,`,` -,,,,,,,,,,,,,,,,,,,,,,quantum,,,`,`,`,`,`,`,`,`,`,`,`,`,`,` +,,,,,,,,,,,,,,,,,,,,,,"{quantum name=""trash quantum""}",,,`,`,`,`,`,`,`,`,`,`,`,`,`,` #query label(farming3) start(23; 25 staircase center) message(Check to ensure the office got assigned to your manager.) configure rooms @@ -1350,7 +1452,7 @@ query/industry_query ,,,,`,`,`,`,`,`,`,`,`,`,`,`,`,`,`,`,`,`,`,`,`,`,`,`,`,`,` ,,,,`,`,`,`,`,`,`,`,`,`,`,`,`,`,`,`,`,`,`,`,`,`,`,`,`,`,` ,,,,`,`,`,`,`,`,`,`,`,`,`,`,`,`,`,`,`,`,`,`,`,`,`,`,`,`,` -,,,,`,`,`,`,`,`,`,`,`,`,`,`,`,e,`,`,`,`,`,`,`,`,`,`,`,`,` +,,,,`,`,`,`,`,`,`,`,`,`,`,`,`,c,`,`,`,`,`,`,`,`,`,`,`,`,` ,,,,`,`,`,`,`,`,`,`,`,`,`,`,`,`,`,`,`,`,`,`,`,`,`,`,`,`,` ,,,,`,`,`,`,`,`,`,`,`,`,`,`,se(3x3),,,`,`,`,`,`,`,`,`,`,`,`,` ,,f,`,`,`,`,`,`,`,`,`,`,`,`,`,~,~,~,`,`,`,`,`,`,`,`,`,`,`,`,`,b(1x6) @@ -1359,7 +1461,7 @@ query/industry_query ,,f,`,`,`,`,`,`,`,`,`,`,`,,,`,,`,,,`,`,`,`,`,`,`,`,`,`,`,` ,,f,`,`,`,`,`,`,`,`,`,`,`,,`,`,`,`,`,,`,`,`,`,`,`,`,`,`,`,`,` ,,f,`,`,`,`,`,`,`,afngwS(3x3),,,`,`,`,,,,`,`,`,sbpdz(3x3),,,`,`,`,`,`,`,`,` -,,f,`,`,`,`,`,f,`,~,~,~,`,,`,,`,,`,,`,~,~,~,`,b,`,`,`,`,`,` +,,f,`,`,`,`,`,c,`,~,~,~,`,,`,,`,,`,,`,~,~,~,`,c,`,`,`,`,`,` ,,f,`,`,`,`,`,`,`,~,~,~,`,`,`,,,,`,`,`,~,~,~,`,`,`,`,`,`,`,b(1x6) ,,f,`,`,`,`,`,`,`,`,`,`,`,,`,`,`,`,`,,`,`,`,`,`,`,`,`,`,`,`,` ,,f,`,`,`,`,`,`,`,`,`,`,`,,,`,,`,,,`,`,`,`,`,`,`,`,`,`,`,` @@ -1384,33 +1486,33 @@ query/industry_query - now that your industry is set up, run ""orders import automation"" to automate your fort's basic needs (download automation.json from https://drive.google.com/file/d/17WcN5mK-rnADOm2B_JFpPnByYgkYjxhb/view?usp=sharing and put it in your dfhack-config/orders/ directory)" -,,,,,,,,,,,roughgems,nocontainers,`,`,`,`,t{Down 6}&,`,`,`,`,`,` +,,,,,,,,,,,roughgems,nocontainers,"{givename name=""rough gems for moods""}",`,`,`,t{Down 6}&,`,`,`,`,`,` ,,,,,,,,,,,`,`,`,`,`,`,`,`,`,`,`,`,` ,,,,`,`,`,`,`,`,`,`,`,`,`,`,`,`,`,`,`,`,`,`,`,`,`,`,`,`,` ,,,,`,`,`,`,`,`,`,`,`,`,`,`,`,`,`,`,`,`,`,`,`,`,`,`,`,`,` ,,,,`,`,`,`,`,`,`,`,`,`,`,`,`,`,`,`,`,`,`,`,`,`,`,`,`,`,` ,,,,`,`,`,`,`,`,`,`,`,`,`,`,`,`,`,`,`,`,`,`,`,`,`,`,`,`,` -,,,,`,`,`,`,`,`,`,`,`,`,`,`,`,{quantum}g{Up}{Left 5}&,`,`,`,`,`,`,`,`,`,`,`,`,` -,,,,`,`,`,`,`,`,`,`,`,`,`,`,`,"{quantumstopfromsouth name=""Stoneworker quantum""}",`,`,`,`,`,`,`,`,`,`,`,`,` -,,,,`,`,`,`,`,`,`,`,`,`,`,`,otherstone,,,`,`,`,`,`,`,`,`,`,`,`,` +,,,,`,`,`,`,`,`,`,`,`,`,`,`,`,"{quantum name=""stoneworker quantum""}g{Up}{Left 5}&",`,`,`,`,`,`,`,`,`,`,`,`,` +,,,,`,`,`,`,`,`,`,`,`,`,`,`,`,"{quantumstopfromsouth name=""Stoneworker quantum""}{givename name=""stoneworker dumper""}",`,`,`,`,`,`,`,`,`,`,`,`,` +,,,,`,`,`,`,`,`,`,`,`,`,`,`,otherstone,,"{givename name=""stoneworker feeder""}",`,`,`,`,`,`,`,`,`,`,`,` ,,miscliquid,`,`,`,`,`,`,`,`,`,`,`,`,`,~,nocontainers,~,`,`,`,`,`,`,`,`,`,`,`,`,`,steelbars -,,nocontainers,`,`,`,`,`,`,`,`,`,`,`,`,`,~,~,~,`,`,`,`,`,`,`,`,`,`,`,`,`,` -,,`,`,`,`,`,`,`,`,`,`,`,`,`,`,`,`,`,`,`,`,`,`,`,`,`,`,`,`,`,`,` +,,nocontainers,`,`,`,`,`,`,`,`,`,`,`,`,`,~,~,~,`,`,`,`,`,`,`,`,`,`,`,`,`,"{givename name=""steel""}" +,,"{givename name=""non-quantum liquids""}",`,`,`,`,`,`,`,`,`,`,`,`,`,`,`,`,`,`,`,`,`,`,`,`,`,`,`,`,`,` ,,`,`,`,`,`,`,`,`,`,`,`,`,,,`,,`,,,`,`,`,`,`,`,`,`,`,`,`,` ,,`,`,`,`,`,`,`,`,`,`,`,`,,`,`,`,`,`,,`,`,`,`,`,`,`,`,`,`,`,` ,,`,`,`,`,`,`,`,`,{cages}{permittraps},,,`,`,`,,,,`,`,`,forbidotherstone,,,`,`,`,`,`,`,`,t{Left 6}{Down}& -,,`,`,`,`,`,`,{quantum}g{Up 10}{Right 4}&,"{quantumstopfromeast name=""Goods/Wood quantum""}",~,nocontainers,~,`,,`,,`,,`,,`,~,nocontainers,~,"{quantumstopfromwest name=""Metalworker quantum""}",quantum,`,`,`,`,`,` +,,`,`,`,`,`,`,"{quantum name=""goods/wood quantum""}g{Up 10}{Right 4}&","{quantumstopfromeast name=""Goods/Wood quantum""}{givename name=""goods/wood dumper""}",~,nocontainers,"{givename name=""goods/wood feeder""}",`,,`,,`,,`,,`,"{givename name=""metalworker feeder""}",nocontainers,~,"{quantumstopfromwest name=""Metalworker quantum""}{givename name=""metalworker dumper""}","{quantum name=""metalworker quantum""}",`,`,`,`,`,` ,,`,`,`,`,`,`,`,`,{tallow}{permitdye},,,`,`,`,,,,`,`,`,forbidpotash,,,`,`,`,`,`,`,`,t{Left 6}{Up}& ,,`,`,`,`,`,`,`,`,`,`,`,`,,`,`,`,`,`,,`,`,`,`,`,`,`,`,`,`,`,` ,,`,`,`,`,`,`,`,`,`,`,`,`,,,`,,`,,,`,`,`,`,`,`,`,`,`,`,`,` ,,`,`,`,`,`,`,`,`,`,`,`,`,`,`,`,`,`,`,`,`,`,`,`,`,`,`,`,`,`,`,` -,,`,`,`,`,`,`,`,`,`,`,`,`,`,`,craftrefuse,,,`,`,`,`,`,`,`,`,`,`,`,`,`,` +,,`,`,`,`,`,`,`,`,`,`,`,`,`,`,craftrefuse,,"{givename name=""cloth/bones feeder""}",`,`,`,`,`,`,`,`,`,`,`,`,`,"{givename name=""coal""}" ,,`,`,`,`,`,`,`,`,`,`,`,`,`,`,~,nocontainers,~,`,`,`,`,`,`,`,`,`,`,`,`,`,coal -,,,,`,`,`,`,`,`,`,`,`,`,`,`,~,~,~,`,`,`,`,`,nocontainers,`,t{Up 7}&,~,~,~,~ -,,,,`,`,`,`,`,`,`,`,`,`,`,`,`,"{quantumstopfromnorth name=""Clothier/Bones quantum""}",`,`,`,`,`,`,{ironweapons}{permitsteelweapons}{forbidmasterworkweapons}{forbidartifactweapons} -,,,,`,`,`,`,`,`,`,`,`,`,`,`,`,quantum,`,`,`,`,`,`,{ironarmor}{permitsteelarmor},forbidmasterworkarmor,forbidartifactarmor,~,~,~,~ +,,,,`,`,`,`,`,`,`,`,`,`,`,`,~,~,~,`,`,`,`,`,nocontainers,"{givename name=""meltable iron/steel""}",t{Up 7}&,~,~,~,~ +,,,,`,`,`,`,`,`,`,`,`,`,`,`,`,"{quantumstopfromnorth name=""Clothier/Bones quantum""}{givename name=""cloth/bones dumper""}",`,`,`,`,`,`,{ironweapons}{permitsteelweapons}{forbidmasterworkweapons}{forbidartifactweapons} +,,,,`,`,`,`,`,`,`,`,`,`,`,`,`,"{quantum name=""cloth/bones quantum""}",`,`,`,`,`,`,{ironarmor}{permitsteelarmor},forbidmasterworkarmor,forbidartifactarmor,~,~,~,~ ,,,,`,`,`,`,`,`,`,`,`,`,`,`,`,`,`,`,`,`,`,`,`,`,`,`,`,`,` -,,,,`,`,`,`,`,`,`,`,`,`,`,`,`,`,`,`,`,`,`,`,nocontainers,give2up,t{Up 11}&,~,~,~,~ +,,,,`,`,`,`,`,`,`,`,`,`,`,`,`,`,`,`,`,`,`,`,nocontainers,give2up,t{Up 11}&,"{givename name=""meltables""}",~,~,~ ,,,,`,`,`,`,`,`,`,`,`,`,`,`,`,`,`,`,`,`,`,`,{metalweapons}{forbidmasterworkweapons}{forbidartifactweapons} ,,,,`,`,`,`,`,`,`,`,`,`,`,`,`,`,`,`,`,`,`,`,metalarmor,forbidmasterworkarmor,forbidartifactarmor,~,~,~,~ ,,,,,,,,,,,`,`,`,`,`,`,`,`,`,`,`,`,` @@ -1560,6 +1662,7 @@ Services Walkthough: build/services_build place/services_place zone/services_zone +name_zones/services_name_zones query_stockpiles/services_query_stockpiles #build label(services_build) start(23; 22) hidden() use the meta blueprints for normal application @@ -1690,6 +1793,40 @@ query_stockpiles/services_query_stockpiles ,,`,`,`,`,`,`,,`,`,`,`,`,` +#query label(services_name_zones) start(23; 22) hidden() use the meta blueprints for normal application + + +,,`,`,`,,,`,`,`,,,`,`,` +,,`,`,`,,,`,`,`,,,`,`,` +,,`,`,`,,,`,`,`,,,`,`,` +,,,`,,,,,`,,,,,` +,,`,`,`,`,`,`,`,`,`,`,`,`,` +,,`,`,`,`,`,`,`,`,`,`,`,`,` +,,`,`,`,`,`,`,`,`,`,`,`,`,` +,,`,`,`,`,`,`,`,`,`,`,`,`,` +,,`,`,`,`,`,`,`,`,`,`,`,`,` +,,`,`,`,`,`,`,`,`,`,`,`,`,` +,,`,`,`,`,`,`,`,`,`,`,`,`,` +,,`,`,`,`,`,`,`,`,`,`,`,`,` +,,`,`,`,`,`,`,`,`,`,`,`,`,` +,,`,`,`,`,`,`,`,`,`,`,`,`,`,,,,`,`,`,`,`,`,`,`,` +,,`,`,`,`,`,`,`,`,`,`,`,`,`,,,,`,`,`,`,`,`,`,`,`,,,,"{namezone name=""hospital""}",`,`,`,`,`,`,`,` +,,`,`,`,`,`,`,`,`,`,`,`,`,`,,,,`,`,`,`,`,`,`,`,`,,,,`,`,`,`,`,`,`,`,` +,,`,`,`,`,`,`,`,`,`,`,`,`,`,,,,,,,,`,,,,,,,,`,`,`,`,`,`,`,`,` +,,`,`,`,`,`,`,`,`,`,`,`,`,`,,`,`,`,,`,`,`,`,`,,`,`,`,,`,`,`,`,`,`,`,`,` +,,`,`,`,`,`,`,`,`,`,`,`,`,`,`,`,"{namezone name=""bath1""}",`,`,`,`,`,`,`,`,`,"{namezone name=""bath2""}",`,`,`,`,`,`,`,`,`,`,` +,,`,`,`,`,`,`,`,`,`,`,`,`,`,,`,~,`,,`,`,`,`,`,,`,~,`,,`,`,`,`,`,`,`,`,` +,,`,`,`,`,`,`,`,`,`,`,`,`,`,`,`,~,`,`,`,`,`,`,`,`,`,~,`,`,`,`,`,`,`,`,`,`,` +,,`,`,`,`,`,`,`,`,`,`,`,`,`,,`,`,`,,`,`,`,`,`,,`,`,`,,`,`,`,`,`,`,`,`,` +,,`,`,`,`,`,`,`,`,`,`,`,`,`,,,,,,,,"{namezone name=""garbage dump""}",,,,,,,,`,`,`,`,`,`,`,`,` +,,,,,,`,`,,`,`,,,,,,,,,,,,,,,,,,,,`,`,`,`,`,`,`,`,` +,,`,`,`,`,`,`,,`,`,`,`,`,`,,,,,,,,,,,,,,,,`,`,`,`,`,`,`,`,` +,,`,`,`,`,`,`,,`,`,`,`,`,` +,,`,`,`,`,`,`,,`,`,`,`,`,` +,,`,`,`,`,`,`,,`,`,`,`,`,` +,,`,`,`,`,`,`,,`,`,`,`,`,` + + "#query label(services_query_stockpiles) start(23; 22) hidden() message(remember to configure the soap stockpiles to take from the ""Metalworker"" quantum stockpile on the industry level (where all bars are stored)) use the meta blueprints for normal application" @@ -1707,17 +1844,17 @@ query_stockpiles/services_query_stockpiles ,,`,`,`,`,`,`,`,`,`,`,`,`,` ,,`,`,`,`,`,`,`,`,`,`,`,`,` ,,`,`,`,`,`,`,`,`,`,`,`,`,`,,,,`,`,`,`,`,`,`,`,` -,,`,`,`,`,`,`,`,`,`,`,`,`,`,,,,`,`,booze,`,`,booze,`,`,booze,,,,`,`,`,`,`,`,`,`,` -,,`,`,`,`,`,`,`,`,`,`,`,`,`,,,,preparedfood,t{Down 10}{Left 12}&,t{Down 10}{Left 10}&,preparedfood,t{Down 10}{Left 20}&,t{Down 10}{Left 10}&,preparedfood,t{Down 10}{Left 20}&,t{Down 10}{Left 12}&,,,,`,`,`,`,`,`,`,`,` +,,`,`,`,`,`,`,`,`,`,`,`,`,`,,,,`,`,"{booze}{givename name=""booze""}",`,`,"{booze}{givename name=""booze""}",`,`,"{booze}{givename name=""booze""}",,,,`,`,`,`,`,`,`,`,` +,,`,`,`,`,`,`,`,`,`,`,`,`,`,,,,"{preparedfood}{givename name=""prepared food""}",t{Down 10}{Left 12}&,t{Down 10}{Left 10}&,"{preparedfood}{givename name=""prepared food""}",t{Down 10}{Left 20}&,t{Down 10}{Left 10}&,"{preparedfood}{givename name=""prepared food""}",t{Down 10}{Left 20}&,t{Down 10}{Left 12}&,,,,`,`,`,`,`,`,`,`,` ,,`,`,`,`,`,`,`,`,`,`,`,`,`,,,,,,,,`,,,,,,,,`,`,`,`,`,`,`,`,` ,,`,`,`,`,`,`,`,`,`,`,`,`,`,,soap,`,`,,`,`,`,`,`,,soap,`,`,,`,`,`,`,`,`,`,`,` ,,`,`,`,`,`,`,`,`,`,`,`,`,`,`,nocontainers,`,`,`,`,`,`,`,`,`,nocontainers,`,`,`,`,`,`,`,`,`,`,`,` -,,`,`,`,`,`,`,`,`,`,`,`,`,`,,`,`,`,,`,`,`,`,`,,`,`,`,,`,`,`,`,`,`,`,`,` +,,`,`,`,`,`,`,`,`,`,`,`,`,`,,"{givename name=""soap1""}",`,`,,`,`,`,`,`,,"{givename name=""soap2""}",`,`,,`,`,`,`,`,`,`,`,` ,,`,`,`,`,`,`,`,`,`,`,`,`,`,`,`,`,`,`,`,`,`,`,`,`,`,`,`,`,`,`,`,`,`,`,`,`,` ,,`,`,`,`,`,`,`,`,`,`,`,`,`,,`,`,`,,`,`,`,`,`,,`,`,`,,`,`,`,`,`,`,`,`,` ,,`,`,`,`,`,`,`,`,`,`,`,`,`,,,,,,,,`,,,,,,,,`,`,`,`,`,`,`,`,` ,,,,,,`,`,,`,`,,,,,,,,,,,,,,,,,,,,`,`,`,`,`,`,`,`,` -,,preparedfood,`,`,`,`,`,,booze,`,`,`,`,`,,,,,,,,,,,,,,,,`,`,`,`,`,`,`,`,` +,,preparedfood,"{givename name=""prepared food""}",`,`,`,`,,booze,"{givename name=""booze""}",`,`,`,`,,,,,,,,,,,,,,,,`,`,`,`,`,`,`,`,` ,,`,`,`,`,`,`,,`,`,`,`,`,` ,,`,`,`,`,`,`,,`,`,`,`,`,` ,,`,`,`,`,`,`,,`,`,`,`,`,` @@ -1741,8 +1878,8 @@ query_stockpiles/services_query_stockpiles ,,`,`,`,`,`,`,`,`,`,`,`,`,` ,,`,`,`,`,`,`,`,`,`,`,`,`,` ,,`,`,`,`,`,`,`,`,`,`,`,`,`,,,,`,`,`,`,`,`,`,`,` -,,`,`,`,`,`,`,`,`,`,`,`,`,`,,,,`,r--&j,`,`,r--&j,`,`,r--&j,`,,,,`,`,`,`,`,`,`,`,` -,,`,`,`,`,r{+ 11}&h,`,`,`,`,`,`,`,`,,,,`,`,`,`,`,`,`,`,`,,,,`,`,`,`,`,`,`,`,` +,,`,`,`,`,`,`,`,`,`,`,`,`,`,,,,`,"r--&j{givename name=""jail1""}",`,`,"r--&j{givename name=""jail2""}",`,`,"r--&j{givename name=""jail3""}",`,,,,`,`,`,`,`,`,`,`,` +,,`,`,`,`,"r{+ 11}&h{givename name=""grand hall""}",`,`,`,`,`,`,`,`,,,,`,`,`,`,`,`,`,`,`,,,,`,`,`,`,`,`,`,`,` ,,`,`,`,`,`,`,`,`,`,`,`,`,`,,,,,,,,`,,,,,,,,`,`,`,`,`,`,`,`,` ,,`,`,`,`,`,`,`,`,`,`,`,`,`,,`,`,`,,`,`,`,`,`,,`,`,`,,`,`,`,`,`,`,`,`,` ,,`,`,`,`,`,`,`,`,`,`,`,`,`,`,`,`,`,`,`,`,`,`,`,`,`,`,`,`,`,`,`,`,`,`,`,`,` @@ -1876,6 +2013,7 @@ Suites for nobles and apartments for the teeming masses Features: - Well-appointed suites to satisfy most nobles - Apartments with beds and storage to keep dwarves happy +- Apartments also serve as burial chambers since dwarves like looking at urns - Meta blueprint included for designating 6 levels of apartments for a full 200+ dwarves "" Suites Walkthrough: From 39059f2b121e719bd72688f18f3599aba94a9d6b Mon Sep 17 00:00:00 2001 From: myk002 Date: Mon, 11 Jan 2021 15:14:24 -0800 Subject: [PATCH 09/35] update changelog --- docs/changelog.txt | 3 +++ 1 file changed, 3 insertions(+) diff --git a/docs/changelog.txt b/docs/changelog.txt index fdc7c13e7..2de052da9 100644 --- a/docs/changelog.txt +++ b/docs/changelog.txt @@ -36,6 +36,9 @@ changelog.txt uses a syntax similar to RST, with a few special sequences: ## Fixes - `embark-assistant`: fixed order of factors when calculating min temperature +## Misc Improvements +- `quickfort`: Dreamfort blueprint set improvements: add a streamlined checklist for all required dreamfort commands and give names to stockpiles levers, bridges, and zones + # 0.47.04-r4 ## Fixes From b5b7319a23ecbddbec57e40804587e09eab9e898 Mon Sep 17 00:00:00 2001 From: myk002 Date: Mon, 11 Jan 2021 15:58:16 -0800 Subject: [PATCH 10/35] add documentation for #ignore blueprints --- docs/guides/quickfort-user-guide.rst | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/docs/guides/quickfort-user-guide.rst b/docs/guides/quickfort-user-guide.rst index 0deedc192..9819c8088 100644 --- a/docs/guides/quickfort-user-guide.rst +++ b/docs/guides/quickfort-user-guide.rst @@ -842,6 +842,8 @@ Blueprint mode Description meta Link sequences of blueprints together notes Display long messages, such as help text or blueprint walkthroughs +ignore Hide a section from quickfort, useful for scratch space or + personal notes ============== =========== .. _quickfort-meta: @@ -1000,6 +1002,14 @@ The quotes around the ``#meta`` modeline allow newlines in a single cell's text. Each line of the ``#notes`` "blueprint", however, is in a separate cell, allowing for much easier viewing and editing. +Ignore blueprints +````````````````` + +If you don't want some data to be visible to quickfort at all, use an +``#ignore`` blueprint. All lines until the next modeline in the file or sheet +will be completely ignored. This can be useful for personal notes, scratch +space, or temporarily "commented out" blueprints. + Buildingplan integration ------------------------ From 4300c185d733d8085e161923976810147d2df93f Mon Sep 17 00:00:00 2001 From: Myk Date: Tue, 12 Jan 2021 22:46:18 -0800 Subject: [PATCH 11/35] Update docs/changelog.txt Co-authored-by: Alan --- docs/changelog.txt | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/docs/changelog.txt b/docs/changelog.txt index 0dc119742..65413f9f1 100644 --- a/docs/changelog.txt +++ b/docs/changelog.txt @@ -36,7 +36,7 @@ changelog.txt uses a syntax similar to RST, with a few special sequences: ## Fixes - `embark-assistant`: fixed order of factors when calculating min temperature -## API +## Lua - ``processArgs2()`` added to utils.lua, providing a callback interface for parameter parsing and getopt-like flexibility for parameter ordering and combination (see docs in ``library/lua/utils.lua`` and ``library/lua/3rdparty/alt_getopt.lua`` for details). # 0.47.04-r4 @@ -1171,4 +1171,3 @@ changelog.txt uses a syntax similar to RST, with a few special sequences: - The ``ui_menu_width`` global is now a 2-byte array; the second item is the former ``ui_area_map_width`` global, which is now removed - The former ``announcements`` global is now a field in ``d_init`` - ``world`` fields formerly beginning with ``job_`` are now fields of ``world.jobs``, e.g. ``world.job_list`` is now ``world.jobs.list`` - From 39d274b00e7474033c2e6f644ca18486f1009364 Mon Sep 17 00:00:00 2001 From: myk002 Date: Tue, 12 Jan 2021 23:42:53 -0800 Subject: [PATCH 12/35] address review comments --- LICENSE.rst | 2 ++ library/lua/utils.lua | 20 +++++++++++++------- 2 files changed, 15 insertions(+), 7 deletions(-) diff --git a/LICENSE.rst b/LICENSE.rst index f1e07d111..48bcfbe95 100644 --- a/LICENSE.rst +++ b/LICENSE.rst @@ -34,6 +34,7 @@ tinythread_ Zlib \(c\) 2010, Marcus Geelnard tinyxml_ Zlib \(c\) 2000-2006, Lee Thomason UTF-8-decoder_ MIT \(c\) 2008-2010, Bjoern Hoehrmann xlsxio_ MIT \(c\) 2016-2020, Brecht Sanders +alt-getopt_ MIT \(c\) 2009 Aleksey Cheusov =============== ============= ================================================= .. _DFHack: https://github.com/DFHack/dfhack @@ -52,6 +53,7 @@ xlsxio_ MIT \(c\) 2016-2020, Brecht Sanders .. _tinyxml: http://www.sourceforge.net/projects/tinyxml .. _UTF-8-decoder: http://bjoern.hoehrmann.de/utf-8/decoder/dfa .. _xlsxio: https://github.com/brechtsanders/xlsxio +.. _alt-getopt: https://github.com/LuaDist/alt-getopt .. _CC-BY-SA: http://creativecommons.org/licenses/by/3.0/deed.en_US diff --git a/library/lua/utils.lua b/library/lua/utils.lua index ee2cadd29..c652e54d4 100644 --- a/library/lua/utils.lua +++ b/library/lua/utils.lua @@ -1,6 +1,7 @@ local _ENV = mkmodule('utils') local df = df +local getopt = require('3rdparty.alt_getopt') -- Comparator function function compare(a,b) @@ -614,7 +615,10 @@ function processArgs(args, validArgs) end -- processes commandline options according to optionActions and returns all --- argument strings that are not options. +-- argument strings that are not options. Options and non-option strings can +-- appear in any order, and single-letter options that do not take arguments +-- can be combined into a single option string (e.g. '-abc' is the same as +-- '-a -b -c' if options 'a' and 'b' do not take arguments. -- -- optionActions is a vector with elements in the following format: -- {shortOptionName, longOptionAlias, hasArg=boolean, handler=fn} @@ -627,15 +631,17 @@ end -- -- local filename = nil -- local open_readonly = false --- local nonoptions = processArgs2(args, { +-- local nonoptions = processArgsGetopt(args, { -- {'r', handler=function() open_readonly = true end}, -- {'f', 'filename', hasArg=true, -- handler=function(optarg) filename = optarg end} -- }) -- --- when args is {'first', '-f', 'fname', 'second'} --- then filename will be fname and nonoptions will contain {'first', 'second'} -function processArgs2(args, optionActions) +-- when args is {'first', '-f', 'fname', 'second'} or, equivalently, +-- {'first', '--filename', 'fname', 'second'} (note the double dash in front of +-- the long option alias), then filename will be fname and nonoptions will +-- contain {'first', 'second'}. +function processArgsGetopt(args, optionActions) local sh_opts, long_opts = '', {} local handlers = {} for _,optionAction in ipairs(optionActions) do @@ -654,8 +660,8 @@ function processArgs2(args, optionActions) handlers[long_opt] = optionAction.handler end end - local getopt = require('3rdparty.alt_getopt').get_ordered_opts - local opts, optargs, nonoptions = getopt(args, sh_opts, long_opts) + local opts, optargs, nonoptions = + getopt.get_ordered_opts(args, sh_opts, long_opts) for i,v in ipairs(opts) do handlers[v](optargs[i]) end From c300cae2f9ba931e217f21cbc6b45d5b4a6dc5c2 Mon Sep 17 00:00:00 2001 From: bseiller Date: Mon, 18 Jan 2021 19:38:57 +0100 Subject: [PATCH 13/35] removing 2 dead stores to speed up survey::survey_mid_level_tile - survey.cpp: removing layer_bottom and layer_top, which are never read, but slow down survey_mid_level_tile significantly because entries are added quite often into the tree map structure - survey.h: removing now obsolete include for map --- plugins/embark-assistant/survey.cpp | 3 --- plugins/embark-assistant/survey.h | 1 - 2 files changed, 4 deletions(-) diff --git a/plugins/embark-assistant/survey.cpp b/plugins/embark-assistant/survey.cpp index e0deb5e58..7a7ab334a 100644 --- a/plugins/embark-assistant/survey.cpp +++ b/plugins/embark-assistant/survey.cpp @@ -996,7 +996,6 @@ void embark_assist::survey::survey_mid_level_tile(embark_assist::defs::geo_data base_z = elevation - 1; features = details->features[i][k]; - std::map layer_bottom, layer_top; mlt->at(i).at(k).adamantine_level = -1; mlt->at(i).at(k).magma_level = -1; @@ -1027,8 +1026,6 @@ void embark_assist::survey::survey_mid_level_tile(embark_assist::defs::geo_data feature->min_z != -30000) { auto layer = world_data->underground_regions[feature->layer]; - layer_bottom[layer->layer_depth] = feature->min_z; - layer_top[layer->layer_depth] = feature->max_z; base_z = std::min((int)base_z, (int)feature->min_z); if (layer->type == df::world_underground_region::MagmaSea) { diff --git a/plugins/embark-assistant/survey.h b/plugins/embark-assistant/survey.h index 14cc8a468..fa7fa7628 100644 --- a/plugins/embark-assistant/survey.h +++ b/plugins/embark-assistant/survey.h @@ -1,5 +1,4 @@ #pragma once -#include #include "DataDefs.h" #include "df/coord2d.h" From 85fe05b723d3ae5970c06a07fdcf906ce6ef1e6e Mon Sep 17 00:00:00 2001 From: bseiller Date: Mon, 18 Jan 2021 22:08:46 +0100 Subject: [PATCH 14/35] early return from embark_update during an active search to improve performance - embark-assistant.cpp: checking if a search is active, if so return early --- plugins/embark-assistant/embark-assistant.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/plugins/embark-assistant/embark-assistant.cpp b/plugins/embark-assistant/embark-assistant.cpp index db73b81f2..626d96023 100644 --- a/plugins/embark-assistant/embark-assistant.cpp +++ b/plugins/embark-assistant/embark-assistant.cpp @@ -57,6 +57,12 @@ namespace embark_assist { //=============================================================================== void embark_update() { + // not updating the embark overlay during an active find/match/survey phase + // which leads to better performance + if (state != nullptr && state->match_iterator.active) { + return; + } + auto screen = Gui::getViewscreenByType(0); embark_assist::defs::mid_level_tiles mlt; embark_assist::survey::initiate(&mlt); From cc687673367d7b9ea913e73deaf6deaa9d9fa478 Mon Sep 17 00:00:00 2001 From: bseiller Date: Mon, 18 Jan 2021 23:23:50 +0100 Subject: [PATCH 15/35] created struct mid_level_tile_incursion_base that only contains attributes that are relevant for incursion processing - def.h: make attributes/fields of mid_level_tile_incursion_base available in mid_level_tile by inheriting from mid_level_tile_incursion_base which also allows treating mid_level_tile as a mid_level_tile_incursion_base --- plugins/embark-assistant/defs.h | 21 +++++++++++++-------- 1 file changed, 13 insertions(+), 8 deletions(-) diff --git a/plugins/embark-assistant/defs.h b/plugins/embark-assistant/defs.h index 0f34b288a..99db1f7a7 100644 --- a/plugins/embark-assistant/defs.h +++ b/plugins/embark-assistant/defs.h @@ -68,24 +68,29 @@ namespace embark_assist { Woodland, Heavily_Forested }; - - struct mid_level_tile { + + // only contains those attributes that are being handled during incursion processing + struct mid_level_tile_incursion_base { uint8_t aquifer = Clear_Aquifer_Bits; bool clay = false; bool sand = false; + int8_t soil_depth; + int16_t elevation; + int8_t biome_offset; + tree_levels trees; + uint8_t savagery_level; // 0 - 2 + uint8_t evilness_level; // 0 - 2 + }; + + // contains all attributes (some by inheritance), used for regular survey/matching + struct mid_level_tile : public mid_level_tile_incursion_base { bool flux = false; bool coal = false; - int8_t soil_depth; int8_t offset; - int16_t elevation; river_sizes river_size = river_sizes::None; int16_t river_elevation = 100; int8_t adamantine_level; // -1 = none, 0 .. 3 = cavern 1 .. magma sea. Currently not used beyond present/absent. int8_t magma_level; // -1 = none, 0 .. 3 = cavern 3 .. surface/volcano - int8_t biome_offset; - tree_levels trees; - uint8_t savagery_level; // 0 - 2 - uint8_t evilness_level; // 0 - 2 std::vector metals; std::vector economics; std::vector minerals; From bdfd50cc6551645dff6339161b14f83591ffda2f Mon Sep 17 00:00:00 2001 From: bseiller Date: Mon, 18 Jan 2021 23:50:14 +0100 Subject: [PATCH 16/35] using mid_level_tile_incursion_base instead of mid_level_tile for incursion processing - matcher.cpp, survey.cpp: adapting signatures to use new struct that only contains incursion specific attributes --- plugins/embark-assistant/matcher.cpp | 4 ++-- plugins/embark-assistant/survey.cpp | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/plugins/embark-assistant/matcher.cpp b/plugins/embark-assistant/matcher.cpp index 2b5e4728b..36a43d9b3 100644 --- a/plugins/embark-assistant/matcher.cpp +++ b/plugins/embark-assistant/matcher.cpp @@ -68,7 +68,7 @@ namespace embark_assist { void process_embark_incursion(matcher_info *result, embark_assist::defs::world_tile_data *survey_results, - embark_assist::defs::mid_level_tile *mlt, // Note this is a single tile, as opposed to most usages of this variable name. + embark_assist::defs::mid_level_tile_incursion_base *mlt, // Note this is a single tile, as opposed to most usages of this variable name. embark_assist::defs::finders *finder, int16_t elevation, uint16_t x, @@ -2699,7 +2699,7 @@ namespace embark_assist { void merge_incursion_into_world_tile(embark_assist::defs::region_tile_datum* current, embark_assist::defs::region_tile_datum* target_tile, - embark_assist::defs::mid_level_tile* target_mlt) { + embark_assist::defs::mid_level_tile_incursion_base* target_mlt) { df::world_data* world_data = world->world_data; current->aquifer |= target_mlt->aquifer; diff --git a/plugins/embark-assistant/survey.cpp b/plugins/embark-assistant/survey.cpp index e0deb5e58..300750a29 100644 --- a/plugins/embark-assistant/survey.cpp +++ b/plugins/embark-assistant/survey.cpp @@ -455,7 +455,7 @@ namespace embark_assist { void process_embark_incursion(embark_assist::defs::site_infos *site_info, embark_assist::defs::world_tile_data *survey_results, - embark_assist::defs::mid_level_tile *mlt, // Note this is a single tile, as opposed to most usages of this variable name. + embark_assist::defs::mid_level_tile_incursion_base *mlt, // Note this is a single tile, as opposed to most usages of this variable name. int16_t elevation, uint16_t x, uint16_t y) { From e99c8faa24b948fb56365a868d2791568c6c644c Mon Sep 17 00:00:00 2001 From: bseiller Date: Tue, 19 Jan 2021 00:01:54 +0100 Subject: [PATCH 17/35] switching to mid_level_tile_incursion_base to store incursion data of world tile edges - defs.h: using mid_level_tile_incursion_base in region_tile_datum to store incursion data of world tile edges - survey.cpp: commented out "not used" blocks of assignment in survey_mid_level_tile that no longer make sense now --- plugins/embark-assistant/defs.h | 8 +-- plugins/embark-assistant/survey.cpp | 80 ++++++++++++++--------------- 2 files changed, 44 insertions(+), 44 deletions(-) diff --git a/plugins/embark-assistant/defs.h b/plugins/embark-assistant/defs.h index 99db1f7a7..a67660545 100644 --- a/plugins/embark-assistant/defs.h +++ b/plugins/embark-assistant/defs.h @@ -146,10 +146,10 @@ namespace embark_assist { std::vector minerals; std::vector neighbors; // entity_raw indices uint8_t necro_neighbors; - mid_level_tile north_row[16]; - mid_level_tile south_row[16]; - mid_level_tile west_column[16]; - mid_level_tile east_column[16]; + mid_level_tile_incursion_base north_row[16]; + mid_level_tile_incursion_base south_row[16]; + mid_level_tile_incursion_base west_column[16]; + mid_level_tile_incursion_base east_column[16]; uint8_t north_corner_selection[16]; // 0 - 3. For some reason DF stores everything needed for incursion uint8_t west_corner_selection[16]; // detection in 17:th row/colum data in the region details except // this info, so we have to go to neighboring world tiles to fetch it. diff --git a/plugins/embark-assistant/survey.cpp b/plugins/embark-assistant/survey.cpp index 300750a29..fac5af267 100644 --- a/plugins/embark-assistant/survey.cpp +++ b/plugins/embark-assistant/survey.cpp @@ -1381,50 +1381,50 @@ void embark_assist::survey::survey_mid_level_tile(embark_assist::defs::geo_data tile->west_column[i].sand = mlt->at(0).at(i).sand; tile->east_column[i].sand = mlt->at(15).at(i).sand; - tile->north_row[i].flux = mlt->at(i).at(0).flux; // Not used - tile->south_row[i].flux = mlt->at(i).at(15).flux; - tile->west_column[i].flux = mlt->at(0).at(i).flux; - tile->east_column[i].flux = mlt->at(15).at(i).flux; + // tile->north_row[i].flux = mlt->at(i).at(0).flux; // Not used + // tile->south_row[i].flux = mlt->at(i).at(15).flux; + // tile->west_column[i].flux = mlt->at(0).at(i).flux; + // tile->east_column[i].flux = mlt->at(15).at(i).flux; - tile->north_row[i].coal = mlt->at(i).at(0).coal; // Not used - tile->south_row[i].coal = mlt->at(i).at(15).coal; - tile->west_column[i].coal = mlt->at(0).at(i).coal; - tile->east_column[i].coal = mlt->at(15).at(i).coal; + // tile->north_row[i].coal = mlt->at(i).at(0).coal; // Not used + // tile->south_row[i].coal = mlt->at(i).at(15).coal; + // tile->west_column[i].coal = mlt->at(0).at(i).coal; + // tile->east_column[i].coal = mlt->at(15).at(i).coal; tile->north_row[i].soil_depth = mlt->at(i).at(0).soil_depth; tile->south_row[i].soil_depth = mlt->at(i).at(15).soil_depth; tile->west_column[i].soil_depth = mlt->at(0).at(i).soil_depth; tile->east_column[i].soil_depth = mlt->at(15).at(i).soil_depth; - tile->north_row[i].offset = mlt->at(i).at(0).offset; // Not used - tile->south_row[i].offset = mlt->at(i).at(15).offset; - tile->west_column[i].offset = mlt->at(0).at(i).offset; - tile->east_column[i].offset = mlt->at(15).at(i).offset; + // tile->north_row[i].offset = mlt->at(i).at(0).offset; // Not used + // tile->south_row[i].offset = mlt->at(i).at(15).offset; + // tile->west_column[i].offset = mlt->at(0).at(i).offset; + // tile->east_column[i].offset = mlt->at(15).at(i).offset; tile->north_row[i].elevation = mlt->at(i).at(0).elevation; tile->south_row[i].elevation = mlt->at(i).at(15).elevation; tile->west_column[i].elevation = mlt->at(0).at(i).elevation; tile->east_column[i].elevation = mlt->at(15).at(i).elevation; - tile->north_row[i].river_size = mlt->at(i).at(0).river_size; // Not used - tile->south_row[i].river_size = mlt->at(i).at(15).river_size; - tile->west_column[i].river_size = mlt->at(0).at(i).river_size; - tile->east_column[i].river_size = mlt->at(15).at(i).river_size; + // tile->north_row[i].river_size = mlt->at(i).at(0).river_size; // Not used + // tile->south_row[i].river_size = mlt->at(i).at(15).river_size; + // tile->west_column[i].river_size = mlt->at(0).at(i).river_size; + // tile->east_column[i].river_size = mlt->at(15).at(i).river_size; - tile->north_row[i].river_elevation = mlt->at(i).at(0).river_elevation; // Not used - tile->south_row[i].river_elevation = mlt->at(i).at(15).river_elevation; - tile->west_column[i].river_elevation = mlt->at(0).at(i).river_elevation; - tile->east_column[i].river_elevation = mlt->at(15).at(i).river_elevation; + // tile->north_row[i].river_elevation = mlt->at(i).at(0).river_elevation; // Not used + // tile->south_row[i].river_elevation = mlt->at(i).at(15).river_elevation; + // tile->west_column[i].river_elevation = mlt->at(0).at(i).river_elevation; + // tile->east_column[i].river_elevation = mlt->at(15).at(i).river_elevation; - tile->north_row[i].adamantine_level = mlt->at(i).at(0).adamantine_level; // Not used - tile->south_row[i].adamantine_level = mlt->at(i).at(15).adamantine_level; - tile->west_column[i].adamantine_level = mlt->at(0).at(i).adamantine_level; - tile->east_column[i].adamantine_level = mlt->at(15).at(i).adamantine_level; + // tile->north_row[i].adamantine_level = mlt->at(i).at(0).adamantine_level; // Not used + // tile->south_row[i].adamantine_level = mlt->at(i).at(15).adamantine_level; + // tile->west_column[i].adamantine_level = mlt->at(0).at(i).adamantine_level; + // tile->east_column[i].adamantine_level = mlt->at(15).at(i).adamantine_level; - tile->north_row[i].magma_level = mlt->at(i).at(0).magma_level; // Not used - tile->south_row[i].magma_level = mlt->at(i).at(15).magma_level; - tile->west_column[i].magma_level = mlt->at(0).at(i).magma_level; - tile->east_column[i].magma_level = mlt->at(15).at(i).magma_level; + // tile->north_row[i].magma_level = mlt->at(i).at(0).magma_level; // Not used + // tile->south_row[i].magma_level = mlt->at(i).at(15).magma_level; + // tile->west_column[i].magma_level = mlt->at(0).at(i).magma_level; + // tile->east_column[i].magma_level = mlt->at(15).at(i).magma_level; tile->north_row[i].biome_offset = mlt->at(i).at(0).biome_offset; tile->south_row[i].biome_offset = mlt->at(i).at(15).biome_offset; @@ -1446,20 +1446,20 @@ void embark_assist::survey::survey_mid_level_tile(embark_assist::defs::geo_data tile->west_column[i].evilness_level = mlt->at(0).at(i).evilness_level; tile->east_column[i].evilness_level = mlt->at(15).at(i).evilness_level; - tile->north_row[i].metals.resize(0); // Not used - tile->south_row[i].metals.resize(0); - tile->west_column[i].metals.resize(0); - tile->east_column[i].metals.resize(0); + // tile->north_row[i].metals.resize(0); // Not used + // tile->south_row[i].metals.resize(0); + // tile->west_column[i].metals.resize(0); + // tile->east_column[i].metals.resize(0); - tile->north_row[i].economics.resize(0); // Not used - tile->south_row[i].economics.resize(0); - tile->west_column[i].economics.resize(0); - tile->east_column[i].economics.resize(0); + // tile->north_row[i].economics.resize(0); // Not used + // tile->south_row[i].economics.resize(0); + // tile->west_column[i].economics.resize(0); + // tile->east_column[i].economics.resize(0); - tile->north_row[i].minerals.resize(0); // Not used - tile->south_row[i].minerals.resize(0); - tile->west_column[i].minerals.resize(0); - tile->east_column[i].minerals.resize(0); + // tile->north_row[i].minerals.resize(0); // Not used + // tile->south_row[i].minerals.resize(0); + // tile->west_column[i].minerals.resize(0); + // tile->east_column[i].minerals.resize(0); tile->north_corner_selection[i] = world_data->region_details[0]->edges.biome_corner[i][0]; tile->west_corner_selection[i] = world_data->region_details[0]->edges.biome_corner[0][i]; From cb496c3f59c8f78b40b89eaaa4ff590585806eca Mon Sep 17 00:00:00 2001 From: bseiller Date: Tue, 19 Jan 2021 00:07:28 +0100 Subject: [PATCH 18/35] fixing indention/whitespaces - defs.h: replacing tab with space/blank for indents --- plugins/embark-assistant/defs.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/plugins/embark-assistant/defs.h b/plugins/embark-assistant/defs.h index a67660545..9634d7c48 100644 --- a/plugins/embark-assistant/defs.h +++ b/plugins/embark-assistant/defs.h @@ -68,9 +68,9 @@ namespace embark_assist { Woodland, Heavily_Forested }; - - // only contains those attributes that are being handled during incursion processing - struct mid_level_tile_incursion_base { + + // only contains those attributes that are being handled during incursion processing + struct mid_level_tile_incursion_base { uint8_t aquifer = Clear_Aquifer_Bits; bool clay = false; bool sand = false; @@ -82,7 +82,7 @@ namespace embark_assist { uint8_t evilness_level; // 0 - 2 }; - // contains all attributes (some by inheritance), used for regular survey/matching + // contains all attributes (some by inheritance), used for regular survey/matching struct mid_level_tile : public mid_level_tile_incursion_base { bool flux = false; bool coal = false; From 9b9373be4fee372e90ddb5ca0188154c5fe18c8c Mon Sep 17 00:00:00 2001 From: bseiller Date: Tue, 19 Jan 2021 12:06:36 +0100 Subject: [PATCH 19/35] removing commented out assigments --- plugins/embark-assistant/survey.cpp | 50 ----------------------------- 1 file changed, 50 deletions(-) diff --git a/plugins/embark-assistant/survey.cpp b/plugins/embark-assistant/survey.cpp index fac5af267..3691976f2 100644 --- a/plugins/embark-assistant/survey.cpp +++ b/plugins/embark-assistant/survey.cpp @@ -1381,51 +1381,16 @@ void embark_assist::survey::survey_mid_level_tile(embark_assist::defs::geo_data tile->west_column[i].sand = mlt->at(0).at(i).sand; tile->east_column[i].sand = mlt->at(15).at(i).sand; - // tile->north_row[i].flux = mlt->at(i).at(0).flux; // Not used - // tile->south_row[i].flux = mlt->at(i).at(15).flux; - // tile->west_column[i].flux = mlt->at(0).at(i).flux; - // tile->east_column[i].flux = mlt->at(15).at(i).flux; - - // tile->north_row[i].coal = mlt->at(i).at(0).coal; // Not used - // tile->south_row[i].coal = mlt->at(i).at(15).coal; - // tile->west_column[i].coal = mlt->at(0).at(i).coal; - // tile->east_column[i].coal = mlt->at(15).at(i).coal; - tile->north_row[i].soil_depth = mlt->at(i).at(0).soil_depth; tile->south_row[i].soil_depth = mlt->at(i).at(15).soil_depth; tile->west_column[i].soil_depth = mlt->at(0).at(i).soil_depth; tile->east_column[i].soil_depth = mlt->at(15).at(i).soil_depth; - // tile->north_row[i].offset = mlt->at(i).at(0).offset; // Not used - // tile->south_row[i].offset = mlt->at(i).at(15).offset; - // tile->west_column[i].offset = mlt->at(0).at(i).offset; - // tile->east_column[i].offset = mlt->at(15).at(i).offset; - tile->north_row[i].elevation = mlt->at(i).at(0).elevation; tile->south_row[i].elevation = mlt->at(i).at(15).elevation; tile->west_column[i].elevation = mlt->at(0).at(i).elevation; tile->east_column[i].elevation = mlt->at(15).at(i).elevation; - // tile->north_row[i].river_size = mlt->at(i).at(0).river_size; // Not used - // tile->south_row[i].river_size = mlt->at(i).at(15).river_size; - // tile->west_column[i].river_size = mlt->at(0).at(i).river_size; - // tile->east_column[i].river_size = mlt->at(15).at(i).river_size; - - // tile->north_row[i].river_elevation = mlt->at(i).at(0).river_elevation; // Not used - // tile->south_row[i].river_elevation = mlt->at(i).at(15).river_elevation; - // tile->west_column[i].river_elevation = mlt->at(0).at(i).river_elevation; - // tile->east_column[i].river_elevation = mlt->at(15).at(i).river_elevation; - - // tile->north_row[i].adamantine_level = mlt->at(i).at(0).adamantine_level; // Not used - // tile->south_row[i].adamantine_level = mlt->at(i).at(15).adamantine_level; - // tile->west_column[i].adamantine_level = mlt->at(0).at(i).adamantine_level; - // tile->east_column[i].adamantine_level = mlt->at(15).at(i).adamantine_level; - - // tile->north_row[i].magma_level = mlt->at(i).at(0).magma_level; // Not used - // tile->south_row[i].magma_level = mlt->at(i).at(15).magma_level; - // tile->west_column[i].magma_level = mlt->at(0).at(i).magma_level; - // tile->east_column[i].magma_level = mlt->at(15).at(i).magma_level; - tile->north_row[i].biome_offset = mlt->at(i).at(0).biome_offset; tile->south_row[i].biome_offset = mlt->at(i).at(15).biome_offset; tile->west_column[i].biome_offset = mlt->at(0).at(i).biome_offset; @@ -1446,21 +1411,6 @@ void embark_assist::survey::survey_mid_level_tile(embark_assist::defs::geo_data tile->west_column[i].evilness_level = mlt->at(0).at(i).evilness_level; tile->east_column[i].evilness_level = mlt->at(15).at(i).evilness_level; - // tile->north_row[i].metals.resize(0); // Not used - // tile->south_row[i].metals.resize(0); - // tile->west_column[i].metals.resize(0); - // tile->east_column[i].metals.resize(0); - - // tile->north_row[i].economics.resize(0); // Not used - // tile->south_row[i].economics.resize(0); - // tile->west_column[i].economics.resize(0); - // tile->east_column[i].economics.resize(0); - - // tile->north_row[i].minerals.resize(0); // Not used - // tile->south_row[i].minerals.resize(0); - // tile->west_column[i].minerals.resize(0); - // tile->east_column[i].minerals.resize(0); - tile->north_corner_selection[i] = world_data->region_details[0]->edges.biome_corner[i][0]; tile->west_corner_selection[i] = world_data->region_details[0]->edges.biome_corner[0][i]; tile->north_row_biome_x[i] = world_data->region_details[0]->edges.biome_x[i][0]; From 438811e108a1c28b63a4206128e8f38373e54ee5 Mon Sep 17 00:00:00 2001 From: bseiller Date: Tue, 19 Jan 2021 16:37:59 +0100 Subject: [PATCH 20/35] handling special case of the cursor having been positioned in the lower right corner before the search - matcher.cpp: manually moving the cursor to the neighbouring world tile so it can be moved back and embark_update is being called when all (incursion) data has been collected Co-Authored-By: PatrikLundell <22739822+PatrikLundell@users.noreply.github.com> --- plugins/embark-assistant/matcher.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/plugins/embark-assistant/matcher.cpp b/plugins/embark-assistant/matcher.cpp index 2b5e4728b..6fdbd04ba 100644 --- a/plugins/embark-assistant/matcher.cpp +++ b/plugins/embark-assistant/matcher.cpp @@ -3065,6 +3065,12 @@ uint16_t embark_assist::matcher::find(embark_assist::defs::match_iterators *iter iterator->active = !(iterator->i > world->worldgen.worldgen_parms.dim_y / 16); if (!iterator->active) { + // if the cursor was positioned in the lower right corner before the search it has to be moved to a neighbouring tile manually + // to force another call to embark_update when all (incursion) data is finally collected to make sure this specific world tile is properly reevaluated + // see the embark_update() in embark-assistant + if (iterator->x == world->worldgen.worldgen_parms.dim_x - 1 && iterator->y == world->worldgen.worldgen_parms.dim_y - 1) { + embark_assist::matcher::move_cursor(iterator->x - 1, iterator->y); + } embark_assist::matcher::move_cursor(iterator->x, iterator->y); if (!survey_results->at(0).at(0).survey_completed) { // Every world tile has gone through preliminary survey, so add possible incursion resources to each tile. From 6a1b70ae766285af30f055b409f0ef249b013f2f Mon Sep 17 00:00:00 2001 From: bseiller Date: Tue, 19 Jan 2021 17:43:32 +0100 Subject: [PATCH 21/35] making lint happy by removing trailing whitespace --- plugins/embark-assistant/matcher.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/embark-assistant/matcher.cpp b/plugins/embark-assistant/matcher.cpp index 6fdbd04ba..19e416f1e 100644 --- a/plugins/embark-assistant/matcher.cpp +++ b/plugins/embark-assistant/matcher.cpp @@ -3065,7 +3065,7 @@ uint16_t embark_assist::matcher::find(embark_assist::defs::match_iterators *iter iterator->active = !(iterator->i > world->worldgen.worldgen_parms.dim_y / 16); if (!iterator->active) { - // if the cursor was positioned in the lower right corner before the search it has to be moved to a neighbouring tile manually + // if the cursor was positioned in the lower right corner before the search it has to be moved to a neighbouring tile manually // to force another call to embark_update when all (incursion) data is finally collected to make sure this specific world tile is properly reevaluated // see the embark_update() in embark-assistant if (iterator->x == world->worldgen.worldgen_parms.dim_x - 1 && iterator->y == world->worldgen.worldgen_parms.dim_y - 1) { From 4a7546c03a40a73953b9e1348a85f3bccefcb9e3 Mon Sep 17 00:00:00 2001 From: lethosor Date: Thu, 21 Jan 2021 00:16:44 -0500 Subject: [PATCH 22/35] Update scripts --- scripts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts b/scripts index 9d11d91e1..ebe6f5d59 160000 --- a/scripts +++ b/scripts @@ -1 +1 @@ -Subproject commit 9d11d91e1991bedc3108f97c0b79389c88206594 +Subproject commit ebe6f5d599bfafb614a791b637413e976c8870a5 From ed3c48e64b6cffdeefd91331dcf1e2ec48b69c5e Mon Sep 17 00:00:00 2001 From: lethosor Date: Thu, 21 Jan 2021 23:55:01 -0500 Subject: [PATCH 23/35] Update changelog and authors (#1755) --- docs/Authors.rst | 1 + docs/changelog.txt | 1 + 2 files changed, 2 insertions(+) diff --git a/docs/Authors.rst b/docs/Authors.rst index 83ce58ef0..b9edfa3d5 100644 --- a/docs/Authors.rst +++ b/docs/Authors.rst @@ -24,6 +24,7 @@ Bearskie Bearskie belal jimhester Ben Lubar BenLubar Ben Rosser TC01 +Benjamin Seiller bseiller RedDwarfStepper billw2012 billw2012 BrickViking brickviking brndd brndd burneddi diff --git a/docs/changelog.txt b/docs/changelog.txt index fdc7c13e7..a11cee938 100644 --- a/docs/changelog.txt +++ b/docs/changelog.txt @@ -35,6 +35,7 @@ changelog.txt uses a syntax similar to RST, with a few special sequences: ## Fixes - `embark-assistant`: fixed order of factors when calculating min temperature +- `embark-assistant`: improved performance of surveying # 0.47.04-r4 From ad39bb3c3348c432f7edc7c2de5cd023a9d0c452 Mon Sep 17 00:00:00 2001 From: myk002 Date: Fri, 22 Jan 2021 12:48:36 -0800 Subject: [PATCH 24/35] address review comments --- docs/guides/quickfort-user-guide.rst | 8 ++-- plugins/buildingplan.cpp | 58 +++++++++++++++++----------- 2 files changed, 40 insertions(+), 26 deletions(-) diff --git a/docs/guides/quickfort-user-guide.rst b/docs/guides/quickfort-user-guide.rst index 0deedc192..66dc980aa 100644 --- a/docs/guides/quickfort-user-guide.rst +++ b/docs/guides/quickfort-user-guide.rst @@ -1010,9 +1010,11 @@ 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; -quickfort will use buildingplan to manage everything designated in a ``#build`` -blueprint regardless of the buildingplan UI settings. +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 +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 diff --git a/plugins/buildingplan.cpp b/plugins/buildingplan.cpp index b6bef39bf..14c3a1918 100644 --- a/plugins/buildingplan.cpp +++ b/plugins/buildingplan.cpp @@ -17,7 +17,7 @@ #include "buildingplan-lib.h" DFHACK_PLUGIN("buildingplan"); -#define PLUGIN_VERSION 2.0 +#define PLUGIN_VERSION "2.0" REQUIRE_GLOBAL(ui); REQUIRE_GLOBAL(ui_build_selector); REQUIRE_GLOBAL(world); // used in buildingplan library @@ -913,11 +913,13 @@ IMPLEMENT_VMETHOD_INTERPOSE(buildingplan_room_hook, render); DFHACK_PLUGIN_IS_ENABLED(is_enabled); -static void setSetting(std::string name, bool value); +static bool setSetting(std::string name, bool value); static bool isTrue(std::string val) { - return val == "on" || val == "true" || val == "y" || val == "yes"; + val = toLower(val); + return val == "on" || val == "true" || val == "y" || val == "yes" + || val == "1"; } static command_result buildingplan_cmd(color_ostream &out, vector & parameters) @@ -929,51 +931,61 @@ static command_result buildingplan_cmd(color_ostream &out, vector & par if (cmd.size() >= 1 && cmd[0] == 'v') { - out << "buildingplan version: " << PLUGIN_VERSION << endl; + out.print("buildingplan version: %s\n", PLUGIN_VERSION); } else if (parameters.size() >= 2 && cmd == "debug") { - show_debugging = isTrue(toLower(parameters[1])); - out << "buildingplan debugging: " << - ((show_debugging) ? "enabled" : "disabled") << endl; + show_debugging = isTrue(parameters[1]); + out.print("buildingplan debugging: %s\n", + show_debugging ? "enabled" : "disabled"); } else if (cmd == "set") { if (!is_enabled) { - out << "ERROR: buildingplan must be enabled before you can read or " - << "set buildingplan global settings." << endl; + out.printerr( + "ERROR: buildingplan must be enabled before you can" + " read or set buildingplan global settings."); return CR_FAILURE; } if (!DFHack::Core::getInstance().isMapLoaded()) { - out << "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." - << endl; + 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."); return CR_FAILURE; } if (parameters.size() == 1) { // display current settings - out << "active settings:" << endl; + out.print("active settings:\n"); + for (auto & setting : planner.getGlobalSettings()) { - out << " " << setting.first << " = " - << (setting.second ? "true" : "false") << endl; + out.print(" %s = %s\n", setting.first.c_str(), + setting.second ? "true" : "false"); } - out << " quickfort_mode = " - << (quickfort_mode ? "true" : "false") << endl; + out.print(" quickfort_mode = %s\n", + quickfort_mode ? "true" : "false"); } else if (parameters.size() == 3) { // set a setting std::string setting = toLower(parameters[1]); - bool val = isTrue(toLower(parameters[2])); - setSetting(setting, val); + bool val = isTrue(parameters[2]); + if (!setSetting(setting, val)) + { + out.printerr("ERROR: invalid parameter: '%s'\n", + parameters[1].c_str()); + } + } + else + { + out.printerr("ERROR: invalid syntax"); } } @@ -1089,14 +1101,14 @@ static void scheduleCycle() { cycle_requested = true; } -static void setSetting(std::string name, bool value) { +static bool setSetting(std::string name, bool value) { if (name == "quickfort_mode") { debug("setting quickfort_mode %d -> %d", quickfort_mode, value); quickfort_mode = value; - return; + return true; } - planner.setGlobalSetting(name, value); + return planner.setGlobalSetting(name, value); } DFHACK_PLUGIN_LUA_FUNCTIONS { From d01e61c6583262fc01fcc47efdffc4547526a396 Mon Sep 17 00:00:00 2001 From: lethosor Date: Fri, 22 Jan 2021 21:05:20 -0500 Subject: [PATCH 25/35] 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"); } } From 03719f58df35526c8440bc13f427c2bc4bfd7b7e Mon Sep 17 00:00:00 2001 From: myk002 Date: Sun, 24 Jan 2021 08:52:34 -0800 Subject: [PATCH 26/35] avoid infinite parentage when linking rooms --- docs/changelog.txt | 1 + library/modules/Buildings.cpp | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/docs/changelog.txt b/docs/changelog.txt index 758a54fb5..735c0716e 100644 --- a/docs/changelog.txt +++ b/docs/changelog.txt @@ -36,6 +36,7 @@ changelog.txt uses a syntax similar to RST, with a few special sequences: ## Fixes - `embark-assistant`: fixed order of factors when calculating min temperature - `embark-assistant`: improved performance of surveying +- `quickfort`: creating zones no longer causes eventual crashes ## Misc Improvements - `buildingplan`: set global settings from the ``DFHack#`` prompt: e.g. ``buildingplan set boulders false`` diff --git a/library/modules/Buildings.cpp b/library/modules/Buildings.cpp index 5a0cd37dc..bd8dcb9de 100644 --- a/library/modules/Buildings.cpp +++ b/library/modules/Buildings.cpp @@ -885,7 +885,7 @@ static void linkRooms(df::building *bld) continue; df::building_extents_type *pext = getExtentTile(room->room, df::coord2d(bld->x1, bld->y1)); - if (!pext || !*pext) + if (!pext || !*pext || room == bld) continue; changed = true; From 32a0363f3185f49af12f06a6cae6301d38475813 Mon Sep 17 00:00:00 2001 From: myk002 Date: Sun, 24 Jan 2021 08:57:56 -0800 Subject: [PATCH 27/35] move identity check up a bit to avoid useless work --- library/modules/Buildings.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/library/modules/Buildings.cpp b/library/modules/Buildings.cpp index bd8dcb9de..3dab347d5 100644 --- a/library/modules/Buildings.cpp +++ b/library/modules/Buildings.cpp @@ -881,11 +881,11 @@ static void linkRooms(df::building *bld) for (size_t i = 0; i < vec.size(); i++) { auto room = vec[i]; - if (!room->is_room || room->z != bld->z) + if (!room->is_room || room->z != bld->z || room == bld) continue; df::building_extents_type *pext = getExtentTile(room->room, df::coord2d(bld->x1, bld->y1)); - if (!pext || !*pext || room == bld) + if (!pext || !*pext) continue; changed = true; From d0fc448a39aaf6a03d8e9252c31d3b61c2141e87 Mon Sep 17 00:00:00 2001 From: Myk Taylor Date: Wed, 4 Nov 2020 08:52:19 -0800 Subject: [PATCH 28/35] add 'enable all' option for buildingplan This kind of functionality is much more important now than it used to be since there are so many supported building types. Also modified the 'Planning Mode' status on the building placement screen to reflect whether we're in quickfort mode, enable all mode, or whether just the building type is enabled. this setting is not persisted (just like quickfort_mode is not persisted), but it can be set from onMapLoad.init --- plugins/buildingplan.cpp | 26 ++++++++++++++++++++++---- plugins/lua/buildingplan.lua | 9 +++++++++ 2 files changed, 31 insertions(+), 4 deletions(-) diff --git a/plugins/buildingplan.cpp b/plugins/buildingplan.cpp index e68f9ca4b..afdfa80d0 100644 --- a/plugins/buildingplan.cpp +++ b/plugins/buildingplan.cpp @@ -27,6 +27,7 @@ REQUIRE_GLOBAL(world); // used in buildingplan library bool show_help = false; bool quickfort_mode = false; +bool all_enabled = false; bool in_dummy_screen = false; std::unordered_map planmode_enabled; @@ -284,7 +285,7 @@ void ViewscreenChooseMaterial::render() //START Viewscreen Hook static bool is_planmode_enabled(BuildingTypeKey key) { - return planmode_enabled[key] || quickfort_mode; + return planmode_enabled[key] || quickfort_mode || all_enabled; } static std::string get_item_label(const BuildingTypeKey &key, int item_idx) @@ -387,6 +388,7 @@ static void show_global_settings_dialog() lua_newtable(L); int ctable = lua_gettop(L); Lua::SetField(L, quickfort_mode, ctable, "quickfort_mode"); + Lua::SetField(L, all_enabled, ctable, "all_enabled"); for (auto & setting : planner.getGlobalSettings()) { @@ -629,7 +631,8 @@ struct buildingplan_place_hook : public df::viewscreen_dwarfmodest show_help = true; } - if (input->count(interface_key::CUSTOM_SHIFT_P)) + if (!quickfort_mode && !all_enabled + && input->count(interface_key::CUSTOM_SHIFT_P)) { planmode_enabled[key] = !planmode_enabled[key]; if (!is_planmode_enabled(key)) @@ -765,8 +768,16 @@ struct buildingplan_place_hook : public df::viewscreen_dwarfmodest OutputString(COLOR_WHITE, x, y, "Use Shift-Keys here", true, left_margin); } - OutputToggleString(x, y, "Planning Mode", interface_key::CUSTOM_SHIFT_P, - planmode_enabled[key], true, left_margin, COLOR_WHITE, COLOR_LIGHTRED); + OutputHotkeyString(x, y, "Planning Mode", interface_key::CUSTOM_SHIFT_P); + OutputString(COLOR_WHITE, x, y, ": "); + if (quickfort_mode) + OutputString(COLOR_YELLOW, x, y, "Quickfort", true, left_margin); + else if (all_enabled) + OutputString(COLOR_YELLOW, x, y, "All", true, left_margin); + else if (planmode_enabled[key]) + OutputString(COLOR_GREEN, x, y, "On", true, left_margin); + else + OutputString(COLOR_GREY, x, y, "Off", true, left_margin); OutputHotkeyString(x, y, "Global Settings", interface_key::CUSTOM_SHIFT_G, true, left_margin, COLOR_WHITE, COLOR_LIGHTRED); @@ -963,6 +974,7 @@ static command_result buildingplan_cmd(color_ostream &out, vector & par // display current settings out.print("active settings:\n"); + out.print(" all_enabled = %s\n", all_enabled ? "true" : "false"); for (auto & setting : planner.getGlobalSettings()) { out.print(" %s = %s\n", setting.first.c_str(), @@ -1108,6 +1120,12 @@ static bool setSetting(std::string name, bool value) { quickfort_mode = value; return true; } + if (name == "all_enabled") + { + debug("setting all_enabled %d -> %d", all_enabled, value); + all_enabled = value; + return; + } return planner.setGlobalSetting(name, value); } diff --git a/plugins/lua/buildingplan.lua b/plugins/lua/buildingplan.lua index f640969b8..c0e69168a 100644 --- a/plugins/lua/buildingplan.lua +++ b/plugins/lua/buildingplan.lua @@ -229,7 +229,16 @@ end setting is not needed for DFHack quickfort. --]] function GlobalSettings:init() + self.subviews.label:setText{ + self:make_setting_label_token('Enable all', 'CUSTOM_E', 'all_enabled', 12), + self:make_setting_value_token('all_enabled'), '\n', + ' Enables buildingplan for all building types. Use this to avoid having\n', + ' to manually enable buildingplan for each building type that you want\n', + ' to plan. Note that DFHack quickfort will use buildingplan to manage\n', + ' buildings regardless of whether buildingplan is "enabled" for the\n', + ' building type.\n', + '\n', 'Allowed types for generic, fire-safe, and magma-safe building material:\n', self:make_setting_label_token('Blocks', 'CUSTOM_B', 'blocks', 10), self:make_setting_value_token('blocks'), '\n', From 96dfea70c398384db412c61f26c236488733fd7c Mon Sep 17 00:00:00 2001 From: myk002 Date: Sun, 24 Jan 2021 09:12:49 -0800 Subject: [PATCH 29/35] update changelog --- docs/changelog.txt | 2 ++ 1 file changed, 2 insertions(+) diff --git a/docs/changelog.txt b/docs/changelog.txt index 758a54fb5..b65be46c4 100644 --- a/docs/changelog.txt +++ b/docs/changelog.txt @@ -39,6 +39,8 @@ changelog.txt uses a syntax similar to RST, with a few special sequences: ## Misc Improvements - `buildingplan`: set global settings from the ``DFHack#`` prompt: e.g. ``buildingplan set boulders false`` +- `buildingplan`: add 'enable all' option for buildingplan (so you don't have to enable all building types individually). this setting is not persisted (just like quickfort_mode is not persisted), but it can be set from onMapLoad.init +- `buildingplan`: modified ``Planning Mode`` status in the UI to show whether we're in quickfort mode, enable all mode, or whether just the building type is enabled. # 0.47.04-r4 From 10634b8ae5e7b1f5fdc77252ae24d360f185e9ff Mon Sep 17 00:00:00 2001 From: myk002 Date: Sun, 24 Jan 2021 09:19:01 -0800 Subject: [PATCH 30/35] fix merge error --- plugins/buildingplan.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/buildingplan.cpp b/plugins/buildingplan.cpp index afdfa80d0..6e18219f4 100644 --- a/plugins/buildingplan.cpp +++ b/plugins/buildingplan.cpp @@ -1124,7 +1124,7 @@ static bool setSetting(std::string name, bool value) { { debug("setting all_enabled %d -> %d", all_enabled, value); all_enabled = value; - return; + return true; } return planner.setGlobalSetting(name, value); } From 07c9cab969810b94f9e96e4e6e271e22f073c003 Mon Sep 17 00:00:00 2001 From: lethosor Date: Tue, 26 Jan 2021 00:45:30 -0500 Subject: [PATCH 31/35] Add comma --- docs/changelog.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/changelog.txt b/docs/changelog.txt index 83c238c10..21065a9d4 100644 --- a/docs/changelog.txt +++ b/docs/changelog.txt @@ -41,7 +41,7 @@ changelog.txt uses a syntax similar to RST, with a few special sequences: - `buildingplan`: set global settings from the ``DFHack#`` prompt: e.g. ``buildingplan set boulders false`` ## Misc Improvements -- `quickfort`: Dreamfort blueprint set improvements: add a streamlined checklist for all required dreamfort commands and give names to stockpiles levers, bridges, and zones +- `quickfort`: Dreamfort blueprint set improvements: add a streamlined checklist for all required dreamfort commands and give names to stockpiles, levers, bridges, and zones # 0.47.04-r4 From de6f9183fd0ea2706f7dffbb3c0c2bac029c0a44 Mon Sep 17 00:00:00 2001 From: lethosor Date: Fri, 29 Jan 2021 00:02:42 -0500 Subject: [PATCH 32/35] Fix changelog, replace a couple qerror calls with error Ref #1746 --- docs/changelog.txt | 2 +- library/lua/utils.lua | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/changelog.txt b/docs/changelog.txt index 771be6ac3..64c57495d 100644 --- a/docs/changelog.txt +++ b/docs/changelog.txt @@ -45,7 +45,7 @@ changelog.txt uses a syntax similar to RST, with a few special sequences: - `quickfort`: Dreamfort blueprint set improvements: add a streamlined checklist for all required dreamfort commands and give names to stockpiles, levers, bridges, and zones ## Lua -- ``processArgs2()`` added to utils.lua, providing a callback interface for parameter parsing and getopt-like flexibility for parameter ordering and combination (see docs in ``library/lua/utils.lua`` and ``library/lua/3rdparty/alt_getopt.lua`` for details). +- ``processArgsGetopt()`` added to utils.lua, providing a callback interface for parameter parsing and getopt-like flexibility for parameter ordering and combination (see docs in ``library/lua/utils.lua`` and ``library/lua/3rdparty/alt_getopt.lua`` for details). # 0.47.04-r4 diff --git a/library/lua/utils.lua b/library/lua/utils.lua index c652e54d4..c85560265 100644 --- a/library/lua/utils.lua +++ b/library/lua/utils.lua @@ -647,10 +647,10 @@ function processArgsGetopt(args, optionActions) for _,optionAction in ipairs(optionActions) do local sh_opt,long_opt = optionAction[1], optionAction[2] if not sh_opt or type(sh_opt) ~= 'string' or #sh_opt ~= 1 then - qerror('optionAction missing option letter at index 1') + error('optionAction missing option letter at index 1') end if not optionAction.handler then - qerror(string.format('handler missing for option "%s"', sh_opt)) + error(string.format('handler missing for option "%s"', sh_opt)) end sh_opts = sh_opts .. sh_opt if optionAction.hasArg then sh_opts = sh_opts .. ':' end From 810d2858bba3a4df30a0053634254a6bd9759575 Mon Sep 17 00:00:00 2001 From: lethosor Date: Fri, 29 Jan 2021 00:02:57 -0500 Subject: [PATCH 33/35] Update scripts dfhack/scripts#238 --- scripts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts b/scripts index ebe6f5d59..dd4253ec7 160000 --- a/scripts +++ b/scripts @@ -1 +1 @@ -Subproject commit ebe6f5d599bfafb614a791b637413e976c8870a5 +Subproject commit dd4253ec70d5a333304df2d338a8e8b9d6c047a3 From 7f62c12a83e4ba09c0a1bd50f9ef02d7a26aed6e Mon Sep 17 00:00:00 2001 From: myk002 Date: Thu, 28 Jan 2021 21:50:43 -0800 Subject: [PATCH 34/35] document all_enabled setting --- docs/Plugins.rst | 37 ++++++++++++++++++++----------------- 1 file changed, 20 insertions(+), 17 deletions(-) diff --git a/docs/Plugins.rst b/docs/Plugins.rst index 544a40844..54bb5213e 100644 --- a/docs/Plugins.rst +++ b/docs/Plugins.rst @@ -765,29 +765,32 @@ and displayed with:: The available settings are: -+----------------+---------+---------------------------------------+ -| Setting | Default | Description | -+================+=========+=======================================+ -| blocks | true | Allow blocks, boulders, logs, or bars | -+----------------+---------+ to be matched for generic "building | -| boulders | true | material" items | -+----------------+---------+ | -| logs | true | | -+----------------+---------+ | -| bars | false | | -+----------------+---------+---------------------------------------+ -| quickfort_mode | false | Enable compatibility mode for the | -| | | legacy Python Quickfort (not required | -| | | for DFHack quickfort) | -+----------------+---------+---------------------------------------+ ++----------------+---------+-----------+---------------------------------------+ +| Setting | Default | Persisted | Description | ++================+=========+===========+=======================================+ +| all_enabled | false | no | Enable planning mode for all building | +| | | | types. | ++----------------+---------+-----------+---------------------------------------+ +| blocks | true | yes | Allow blocks, boulders, logs, or bars | ++----------------+---------+ | to be matched for generic "building | +| boulders | true | | material" items | ++----------------+---------+ | | +| logs | true | | | ++----------------+---------+ | | +| bars | false | | | ++----------------+---------+-----------+---------------------------------------+ +| quickfort_mode | false | no | Enable compatibility mode for the | +| | | | legacy Python Quickfort (not required | +| | | | for DFHack quickfort) | ++----------------+---------+-----------+---------------------------------------+ For example, to ensure you only use blocks when a "building material" item is required, you could add this to your ``onMapLoad.init`` file:: on-new-fortress buildingplan set boulders false; buildingplan set logs false -You only need to set the settings for new fortresses since your current filter settings -are saved with your game. +Persisted settings (i.e. ``blocks``, ``boulders``, ``logs``, and ``bars``) are saved with +your game, so you only need to set them to the values you want once. .. _confirm: From c5ab6e6ed495b59ffc27318251364c60cf30a16f Mon Sep 17 00:00:00 2001 From: lethosor Date: Fri, 29 Jan 2021 01:00:37 -0500 Subject: [PATCH 35/35] Update scripts dfhack/scripts#246 --- scripts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts b/scripts index dd4253ec7..e20fa9f5c 160000 --- a/scripts +++ b/scripts @@ -1 +1 @@ -Subproject commit dd4253ec70d5a333304df2d338a8e8b9d6c047a3 +Subproject commit e20fa9f5ca7707377477b3d9c032ec1f3a2e6414