-
Notifications
You must be signed in to change notification settings - Fork 199
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Ignore all fruit gatherers when checking stranded #903
Ignore all fruit gatherers when checking stranded #903
Conversation
I think ideally we need to pick up on whatever the DF is using to have these dwarves pathfind out of difficult situations by climbing and check that instead but I have no clue what that is |
the trigger for that is a pathfinding failure, which would require us to invoke the pathfinder, which (a) we cannot do and (b) would cause the very lag we're trying to avoid |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Don't forget the changelog entry!
warn-stranded.lua
Outdated
@@ -334,7 +334,8 @@ local function getStrandedUnits() | |||
or 0 | |||
end | |||
|
|||
if unitIgnored(unit) then | |||
-- Ignore units who are gathering plants to avoid errors with stepladders | |||
if unitIgnored(unit) or (unit.job.current_job and unit.job.current_job.job_type == df.job_type.GatherPlants) then |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I suggest also ignoring mining job types since they can un-strand themselves. There's a handy attr in df.job_types you can check instead of having to itemize all the dig job types
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
df.job_type.attrs[unit.job.current_job.job_type].type == 'Digging'
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Gotcha, I'll get that added tonight
Did some testing on this. It definitely works to ignore citizens gathering fruit. I haven't ran into any issues of false positives so far, but we should still keep an eye on it