* Reworks targeting behavior to fall back onto proximity monitors. Refactors ai cooldowns a bit (#82640)
## About The Pull Request
Nother bit ripped out of #79498
[Implements a get_cooldown() proc to get around dumb manual overrides
and empower me to optimize the findtarget
logic](7047d294dd)
[Adds modify_cooldown, uses it to optimize find_potential_targets
further](4ebc8cedce)
No sense running the behavior if we're just waiting on its output, so
let's run it once a minute just in case, then push an update instantly
if we find something
[Optimizes connect_range and
promxity_monitors](bcf7d7c5b3)
We know what turfs exist before and after a move
We can use this information to prevent trying to update turfs we don't
care about.
This is important because post these changes mobs with fields will be
moving a lot more, so it's gotta be cheap
[Implements a special kind of field to handle ai
targeting](80b63b3445)
If we run targeting and don't like, find anything, we should setup a
field that listens for things coming near us and then handle those
things as we find them.
This incurs a slight startup cost but saves so much time on the churn of
constant costs
Note:
We should also work to figure out a way to avoid waking ais if none is
near them/they aren't doing anything interesting
We don't need to do that immediately this acts as somewhat of a stopgap
(and would be good regardless) but it is worth keeping in mind)
## IMPORTANT
I am unsure whether this is worth it anymore since #82539 was merged. As
I say it was done as a stopgap because ais didn't know how to idle.
If not I'll rip er out and we'll keep the other
refactoring/optimizations.
## Why It's Good For The Game
Cleaner basic ai code, maybe? faster basic ai code, for sure faster
proximity monitors (significantly)
* ai controllers use cell trackers to know when to idle (#82691)
## About The Pull Request
this makes ai controllers use cell trackers and signals to determine
when to idle
## Why It's Good For The Game
might be better than looping over all clients for every controller
## Changelog
🆑
code: The way mobs idle has been refactored, please report any issues
with non-reactive mobs
/🆑
* makes slimes not idle (#82742)
## About The Pull Request
slimes should still be able to do their everyday routine without needing
to be watched over
## Why It's Good For The Game
makes xenobiologist's lives easier
## Changelog
🆑
qol: slimes will stay active without needing any one to watch over
/🆑
---------
Co-authored-by: LemonInTheDark <58055496+LemonInTheDark@users.noreply.github.com>
Co-authored-by: Ben10Omintrix <138636438+Ben10Omintrix@users.noreply.github.com>
Replaces lava and chasm's "safeties" and ignoring turf slowdown on catwalks with traits and a new element. (#76376)
This adds a new element for movables that grants turfs they're in
traits, changes lava and the chasm component to check for traits
instead, ditto for turf slowdown. It also implements another trait that
prevents wet floor from slipping people, as well as some other changes
(feel free to opine on them really):
- Tables and conveyor belts now stop turf slowdown, much like catwalks,
as I imagine people walking on them are not really touching the floor.
(I'd include protection against lava too... until they melt, but that'd
mean finding a way to have these objects burn in the first place, and
lava code is still stupid despite a years old refactor I did)
- Tables also stop slippery turfs from slipping (bananas, soaps etc.
still apply). I wish there were a way to make some objects slippery by
coating them in water vapor or splashing water/lube, but that's outside
the scope of this PR.
- Fixed an edge case in which a mob standing on a lava turf would be
left permanently visually on fire if the lava is changed to another kind
of turf.
- Removed unused code from stone tiles.
I'm going to include these traits in that global list for admin-added
traits... tomorrow perhaps. 💤
Replacing some hard-coded mechanics with easier to use traits and an
element, which I also need for the submerge element PR.
🆑
refactor: Replaced hardcoded "safeties" for lava, chasms and ignoring
turf slowdowns on catwalks with traits.
balance: much like catwalks, tables and conveyors also disable turf
slowdowns.
balance: slippery turfs won't slip you when walking on a table.
fix: Fixed an edge case in which a mob standing on a lava turf would be
left visually but permanently on fire if the lava is changed to another
kind of turf.
/🆑
Co-authored-by: Ghom <42542238+Ghommie@users.noreply.github.com>
* Proximity monitors now work on stuff that was created inside it (#67136)
* proximity monitors now work on stuff that was created inside it
Co-authored-by: Fikou <23585223+Fikou@users.noreply.github.com>