use lua to blueprint to avoid console spam

develop
myk002 2021-06-07 05:58:51 -07:00
parent 0e270a3505
commit 232c85d258
No known key found for this signature in database
GPG Key ID: 8A39CA0FA0C16E78
1 changed files with 6 additions and 3 deletions

@ -21,6 +21,8 @@ config = {
mode = 'fortress', mode = 'fortress',
} }
local blueprint = require('plugins.blueprint')
local blueprints_dir = 'blueprints/' local blueprints_dir = 'blueprints/'
local input_dir = 'library/test/ecosystem/in/' local input_dir = 'library/test/ecosystem/in/'
local output_dir = 'library/test/ecosystem/out/' local output_dir = 'library/test/ecosystem/out/'
@ -42,7 +44,8 @@ end
-- internal/quickfort scripts are loaded inside the function here so the test -- internal/quickfort scripts are loaded inside the function here so the test
-- file itself can load when a fortress map is not active. this is required -- file itself can load when a fortress map is not active. this is required
-- because quickfort depends on stockflow, which fails outside of fort mode. -- because quickfort depends on stockflow, which fails to load outside of fort
-- mode.
local function get_blueprint_sets() local function get_blueprint_sets()
-- find test blueprints with `quickfort list` -- find test blueprints with `quickfort list`
local quickfort_list = reqscript('internal/quickfort/list') local quickfort_list = reqscript('internal/quickfort/list')
@ -178,14 +181,14 @@ local function designate_area(pos, spec)
end end
local function run_blueprint(basename, set, pos) local function run_blueprint(basename, set, pos)
local blueprint_args = {'blueprint', tostring(set.spec.width), local blueprint_args = {tostring(set.spec.width),
tostring(set.spec.height), tostring(set.spec.height),
tostring(-set.spec.depth), tostring(-set.spec.depth),
output_dir..basename, get_cursor_arg(pos)} output_dir..basename, get_cursor_arg(pos)}
for _,mode_name in pairs(mode_names) do for _,mode_name in pairs(mode_names) do
if set.modes[mode_name] then table.insert(blueprint_args, mode_name) end if set.modes[mode_name] then table.insert(blueprint_args, mode_name) end
end end
dfhack.run_command(blueprint_args) blueprint.run(table.unpack(blueprint_args))
end end
local function reset_area(area, spec) local function reset_area(area, spec)