Converts AI controller processing subsystems to use currentrun (#94905)

## About The Pull Request

this makes it so `SSai_controllers` and its subtypes use a `currentrun`
loop, instead of directly looping thru
`GLOB.ai_controllers_by_status[planning_status]`

## Why It's Good For The Game

most other processing subsystems do this, why shouldn't we?
it should ensure all ai controllers get to process, even if the server's
under load.

## Changelog

no player-facing changes, prolly
This commit is contained in:
Lucy
2026-01-18 19:35:30 -08:00
committed by GitHub
parent 6041c1e0cc
commit beebdd2c52
2 changed files with 17 additions and 1 deletions
+8
View File
@@ -84,6 +84,10 @@ multiple modular subtrees with behaviors
UnpossessPawn(FALSE)
if(ai_status)
GLOB.ai_controllers_by_status[ai_status] -= src
for(var/datum/controller/subsystem/ai_controllers/controller_subsystem in Master.subsystems)
if(controller_subsystem.planning_status == ai_status)
controller_subsystem.currentrun -= src
break
our_cells = null
set_movement_target(type, null)
if(ai_movement.moving_controllers[src])
@@ -431,6 +435,10 @@ multiple modular subtrees with behaviors
//remove old status, if we've got one
if(ai_status)
GLOB.ai_controllers_by_status[ai_status] -= src
for(var/datum/controller/subsystem/ai_controllers/controller_subsystem in Master.subsystems)
if(controller_subsystem.planning_status == ai_status)
controller_subsystem.currentrun -= src
break
remove_from_unplanned_controllers()
stop_previous_processing()
ai_status = new_ai_status