For some reason this breaks the mob controller

This commit is contained in:
Crazylemon64
2017-05-07 00:31:01 -07:00
parent 0175575109
commit 68df0319e2
17 changed files with 63 additions and 24 deletions
@@ -398,3 +398,11 @@
if(isnull(caught) || !istype(caught) || !isnull(caught.gcDestroyed))
return // Only bother with types we can identify and that don't belong
catchException("Type [caught.type] does not belong in process' queue")
// This is called to make a controller THE global authority on a global variable - like `air_master`
/datum/controller/process/proc/assertGlobality()
return
// Called to let another instance of the controller have the fun
/datum/controller/process/proc/releaseGlobality()
return
@@ -122,6 +122,7 @@ var/global/datum/controller/processScheduler/processScheduler
process.idle()
idle.Add(process)
process.assertGlobality()
// Set up process
process.setup()
@@ -132,6 +133,8 @@ var/global/datum/controller/processScheduler/processScheduler
processes.Remove(oldProcess)
processes.Add(newProcess)
oldProcess.releaseGlobality()
newProcess.assertGlobality()
newProcess.idle()
idle.Remove(oldProcess)
running.Remove(oldProcess)