mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-08-23 20:16:55 +01:00
For some reason this breaks the mob controller
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user