From 70b48dfa6f363206e64fc6afed7228fdef2fe0ec Mon Sep 17 00:00:00 2001 From: Myk Taylor Date: Sun, 10 Sep 2023 21:14:59 -0700 Subject: [PATCH] let vanilla blinking take over when possible --- plugins/pathable.cpp | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/plugins/pathable.cpp b/plugins/pathable.cpp index 57f5a5853..12852a894 100644 --- a/plugins/pathable.cpp +++ b/plugins/pathable.cpp @@ -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)); } }