mirror of
https://github.com/Aurorastation/Aurora.3.git
synced 2025-12-21 15:42:35 +00:00
25 lines
572 B
Plaintext
25 lines
572 B
Plaintext
var/list/datum/list_of_ais = list()
|
|
|
|
/datum/controller/process/ai/setup()
|
|
name = "ai"
|
|
schedule_interval = 2 SECONDS
|
|
start_delay = 17
|
|
|
|
/datum/controller/process/ai/doWork()
|
|
for(last_object in list_of_ais)
|
|
var/datum/ai/AI = last_object
|
|
if(isnull(AI.gcDestroyed) && istype(AI))
|
|
try
|
|
if(AI.process() == PROCESS_KILL)
|
|
list_of_ais -= AI
|
|
catch(var/exception/e)
|
|
catchException(e, AI)
|
|
SCHECK
|
|
else
|
|
catchBadType(AI)
|
|
list_of_ais -= AI
|
|
|
|
/datum/controller/process/ai/statProcess()
|
|
..()
|
|
stat(null, "[list_of_ais.len] AI\s")
|