mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-31 00:58:26 +01:00
Doafter cleanup, disables stoplag dynamic sleeping in unit tests (#77868)
## About The Pull Request [Makes the do_afters list behave as expected](https://github.com/tgstation/tgstation/commit/b7cd6c520f25bc9570edc1e478123bf69884eb6d) Half the code expected it to be a flat list of things we are acting on, half expected it to be an assoc list of thing -> interaction count Let's make that second dream a reality yeah? [Disables stoplag's lag stoppage for unit tests](https://github.com/tgstation/tgstation/commit/88b2bb371cba4a0b2b042b866cb0d1f00453487c) Because of the unique environment of unit tests (High cpu usage, lots of sleeping) this risks spurious hard deletes from neverending stoplag runs. ## Why It's Good For The Game Less errors/guesswork in testing, better code Potentially addresses #77865
This commit is contained in:
@@ -20,7 +20,7 @@
|
||||
|
||||
/datum/ai_planning_subtree/targeted_mob_ability/overwatch/SelectBehaviors(datum/ai_controller/controller, seconds_per_tick)
|
||||
var/mob/living/living_pawn = controller.pawn
|
||||
if (LAZYLEN(living_pawn.do_afters))
|
||||
if (living_pawn.do_after_count())
|
||||
return // Don't interrupt our other ability
|
||||
var/atom/target = controller.blackboard[target_key]
|
||||
if (QDELETED(target) || HAS_TRAIT(target, TRAIT_OVERWATCH_IMMUNE))
|
||||
|
||||
Reference in New Issue
Block a user