-
Notifications
You must be signed in to change notification settings - Fork 198
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
Fix sleeping army controllers in Adventure Mode not responding to intruders #1177
Conversation
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.
could you also remove docs/adv-fix-sleepers.rst and add a tombstone to docs/about/Removed.rst (see DFHack/dfhack#4714 for an example)
fix/sleepers.lua
Outdated
local num_fixed = 0 | ||
|
||
-- Loop through all the active units currently loaded | ||
for k, unit in pairs(df.global.world.units.active) do |
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.
is a camp a site? does that mean that the fix is only relevant in sites? can we trigger this script to run when a site is loaded? that is, can we make this script enableable and watch for state change events, automatically running when the SC_MAP_LOADED event fires and there is an active site (and we're in adventure mode)?
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.
There are camps that are created for travelling armies as well (for example, a unit stopped in the middle of nowhere to create a cloth block tent and is sleeping)
Yes, good idea! We can make this trigger either A) instantly react to adventurer, B) react to adventurer who isn't sneaking and present in close vicinity to the target, or C) React to receiving Pain (not bloodloss/painless attacks tho, so you can still rob someone by wrestling their items off)
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 think we should keep this manual for now until we decide on when the "fix" should apply, let's study the general sleeping behavior in adv mode and how people react to being attacked when asleep.
Co-authored-by: Myk <[email protected]>
…dfhack-scripts into fix-adv-sleepers
Very old script cleaned up for version 51