only run dig-now over the test area

develop
myk002 2021-09-10 15:01:07 -07:00 committed by Myk
parent 44a93fcb28
commit 8c8365abec
1 changed files with 7 additions and 1 deletions

@ -158,6 +158,7 @@ local function get_test_area(area, spec)
area.width, area.height, area.depth =
spec.width, spec.height, spec.depth
area.pos = {x=1, y=1, z=z_start}
area.endpos = {x=area.width, y=area.height, z=z_start-area.depth+1}
return true
end
::continue::
@ -223,6 +224,10 @@ local function reset_area(area, spec)
dfhack.run_command('tiletypes-here', '--quiet', get_cursor_arg(pos))
end
local function format_pos(pos)
return ('%s,%s,%s'):format(pos.x, pos.y, pos.z)
end
function test.end_to_end()
-- read in test plan
local sets = get_blueprint_sets()
@ -249,7 +254,8 @@ function test.end_to_end()
end
-- run dig-now to dig out designated tiles
dfhack.run_command('dig-now', '--clean')
dfhack.run_command('dig-now', format_pos(area.pos),
format_pos(area.endpos), '--clean')
-- quickfort run remaining blueprints
for _,mode_name in pairs(mode_names) do