Merge pull request #3765 from myk002/myk_pathable_with_jobs

[pathable] let vanilla blinking take over when possible
develop
Myk 2023-09-10 21:24:01 -07:00 committed by GitHub
commit 211fa60d2a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 8 additions and 2 deletions

@ -5,6 +5,7 @@
#include "modules/EventManager.h"
#include "modules/Gui.h"
#include "modules/Job.h"
#include "modules/Maps.h"
#include "modules/Screen.h"
#include "modules/Textures.h"
@ -255,9 +256,13 @@ public:
df::tile_designation td;
df::tile_occupancy to;
bool keep_if_taken = false;
switch (job->job_type) {
case df::job_type::SmoothWall:
case df::job_type::SmoothFloor:
keep_if_taken = true;
// fallthrough
case df::job_type::CarveFortification:
td.bits.smooth = 1;
break;
@ -272,9 +277,10 @@ public:
to.bits.carve_track_east = (job->item_category.whole >> 21) & 1;
break;
default:
break;
continue;
}
designations.emplace(job->pos, designation(job->pos, td, to));
if (keep_if_taken || !Job::getWorker(job))
designations.emplace(job->pos, designation(job->pos, td, to));
}
}