## About The Pull Request
Consider this a continuation of
https://github.com/tgstation/tgstation/pull/80202

~~It seems I missed a few.~~
Edit: Modified per request to handle this more broadly. If a pawn gets
`qdel`'d, the ai controller should be set to off and get removed from
the list of active controllers, and all their actions should be
canceled.
Also adds some qdeleted checks to `finish_action()`, which can still run
after the pawn gets qdeleted as part of the `CancelActions()` chain.
## Why It's Good For The Game
Less spurious CI failures.
## Changelog
Nothing player facing really.
## About The Pull Request
<details><summary>A bunch of the numerous CI issues </summary>


</details>
You can view the full list of them here
https://github.com/Skyrat-SS13/Skyrat-tg/actions/runs/7148986054/job/19470671408.
What seems to be happening is, the `ai_controller` `fire()`s, and at
some point the the `pawn` var has become null from qdeletion. Many of
the `SelectBehaviors()` procs make use of that var, and then try to
access it without any safeties whatsoever.
I believe it is mainly happening because of long `do_after()`s and other
procs that sleep.
This PR just adds those safeties. I probably didn't get them all, but
this should fix the ones I have seen in CI. There may be a better
solution to cover all future cases of this but I will wait on feedback
to proceed. See below comments:
---
I don't know if you would rather this to always be checked at the
controller level instead (or in `able_to_plan()` perhaps?) but I could
do that if it's wanted. I wasn't sure if there were certain things that
depended on `SelectBehaviors()` running for cleanup so I opted against
that.
On that note, shouldn't we just be qdeleting the `ai_controller` when
the pawn gets qdeleted? Is that not already happening? And if not, is
there a reason for it? That would probably be the best way to handle
it...
## Why It's Good For The Game
I would like to stop seeing so many random CI failures, wouldn't you?
## Changelog
🆑
fix: fixes some AI runtimes that were caused by the pawn becoming null
/🆑
## About The Pull Request
Replaces weakref usage in AI blackboards with deleting signals
All blackboard var setting must go through setters rather than directly
## Why It's Good For The Game
This both makes it a ton easier to develop AI for, and also makes it
harder for hard deletes to sneak in, as has been seen with recent 515
prs showing hard deletes in AI blackboards
(To quantify "making it easier to develop AI", I found multiple bugs in
existing AI code due to the usage of weakrefs.)
I'm looking for `@Jacquerel` `@tralezab` 's opinions on the matter, also
maybe `@LemonInTheDark` if they're interested
## Changelog
🆑 Melbert
refactor: Mob ai refactored once again
/🆑
This tracks the seconds per tick of a subsystem, however note that it is
not completely accurate, as subsystems can be delayed, however it's
useful to have this number as a multiplier or ratio, so that if in
future someone changes the subsystem wait time code correctly adjusts
how fast it applies effects
regexes used
git grep --files-with-matches --name-only 'DT_PROB' | xargs -l sed -i
's/DT_PROB/SPT_PROB/g'
git grep --files-with-matches --name-only 'delta_time' | xargs -l sed -i
's/delta_time/seconds_per_tick/g'
Monkeys will now drop out of combat mode in the following situations
- They have no enemies
- They have enemies but the monkey can not target them because they are far away
- They have enemies but they are dead/disabled
Splitting up monkey ai into subtrees allows me to make a punpun ai after this pr is merged, makes stopping planning matter for the AI subtrees, and more generic subtrees that can be used by most ais
It also gets rid of bad practices like setting blackboards in the ai controller.