lay down tiles in order when using buildingplan

improves on implementation in 22ac163d5. we don't need to set the anchor
at all when using buildingplan.
develop
myk002 2021-09-08 07:02:55 -07:00 committed by Myk
parent 8c0fccb406
commit 97fab76bba
1 changed files with 15 additions and 10 deletions

@ -997,17 +997,22 @@ struct jobutils_hook : public df::viewscreen_dwarfmodest
}
// if using buildingplan, we don't need an anchor
if (!use_buildingplan && in_future_placement_mode)
if (!use_buildingplan)
{
ok_to_continue = find_anchor_in_spiral(valid_building_sites[0].pos);
}
else if (ok_to_continue)
{
// First valid site is guaranteed to be anchored, either on a tile or against a valid orthogonal tile
// Use it as an anchor point to generate materials list
anchor = valid_building_sites.front();
valid_building_sites.pop_front();
valid_building_sites.push_back(anchor);
if (in_future_placement_mode)
{
ok_to_continue =
find_anchor_in_spiral(valid_building_sites[0].pos);
}
else if (ok_to_continue)
{
// First valid site is guaranteed to be anchored, either on
// a tile or against a valid orthogonal tile
// Use it as an anchor point to generate materials list
anchor = valid_building_sites.front();
valid_building_sites.pop_front();
valid_building_sites.push_back(anchor);
}
}
if (!ok_to_continue)