mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-08-23 03:57:13 +01:00
Bug fixes, bot proces controller update
This commit is contained in:
@@ -1,11 +1,20 @@
|
||||
/datum/controller/process/bot
|
||||
var/tmp/datum/updateQueue/updateQueueInstance
|
||||
|
||||
/datum/controller/process/bot/setup()
|
||||
name = "bot controller"
|
||||
name = "bot"
|
||||
schedule_interval = 20 // every 2 seconds
|
||||
updateQueueInstance = new
|
||||
|
||||
/datum/controller/process/bot/started()
|
||||
..()
|
||||
if(!updateQueueInstance)
|
||||
if(!aibots)
|
||||
aibots = list()
|
||||
else if(aibots.len)
|
||||
updateQueueInstance = new
|
||||
|
||||
/datum/controller/process/bot/doWork()
|
||||
for(var/obj/machinery/bot/Bot in aibots)
|
||||
if(!Bot.gc_destroyed)
|
||||
spawn(0)
|
||||
Bot.bot_process()
|
||||
continue
|
||||
aibots -= Bot
|
||||
if(updateQueueInstance)
|
||||
updateQueueInstance.init(aibots, "bot_process")
|
||||
updateQueueInstance.Run()
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/datum/controller/process/event/setup()
|
||||
name = "event controller"
|
||||
name = "event"
|
||||
schedule_interval = 20 // every 2 seconds
|
||||
|
||||
/datum/controller/process/event/doWork()
|
||||
|
||||
Reference in New Issue
Block a user