fixes ai controllers hard deletes (#82861)

## About The Pull Request

![image](https://github.com/tgstation/tgstation/assets/138636438/47010ad2-64ef-40dd-94d3-b928e4216d1b)
i noticed almost all ai controllers were being hard deleted, its because
the controller itself was being addedto the behavior_cooldowns list
rather than the behavior itself

## Why It's Good For The Game
fixes hard deletes

## Changelog
🆑
/🆑
This commit is contained in:
Ben10Omintrix
2024-04-24 21:19:17 -07:00
committed by GitHub
parent b60223b8a5
commit f31b2794b5
@@ -146,7 +146,7 @@ GLOBAL_LIST_INIT(target_interested_atoms, typecacheof(list(/mob, /obj/machinery/
var/datum/proximity_monitor/field = controller.blackboard[BB_FIND_TARGETS_FIELD(type)]
qdel(field) // autoclears so it's fine
controller.CancelActions() // On retarget cancel any further queued actions so that they will setup again with new target
controller.modify_cooldown(controller, get_cooldown(controller))
controller.modify_cooldown(src, get_cooldown(controller))
/// Returns the desired final target from the filtered list of targets
/datum/ai_behavior/find_potential_targets/proc/pick_final_target(datum/ai_controller/controller, list/filtered_targets)