Fix PROCESS_KILL for SSobj and generally (#39322)

* Make SSobj a processing subsystem

* Fix PROCESS_KILL preventing starting processing again

* Sometimes, I dream about cheese
This commit is contained in:
Tad Hardesty
2018-07-25 07:42:26 -07:00
committed by Emmett Gaines
parent 3278244613
commit c7ba22d2bf
2 changed files with 7 additions and 29 deletions
+2 -26
View File
@@ -1,29 +1,5 @@
SUBSYSTEM_DEF(obj)
PROCESSING_SUBSYSTEM_DEF(obj)
name = "Objects"
priority = FIRE_PRIORITY_OBJ
flags = SS_NO_INIT
var/list/processing = list()
var/list/currentrun = list()
/datum/controller/subsystem/obj/stat_entry()
..("P:[processing.len]")
/datum/controller/subsystem/obj/fire(resumed = 0)
if (!resumed)
src.currentrun = processing.Copy()
//cache for sanic speed (lists are references anyways)
var/list/currentrun = src.currentrun
while(currentrun.len)
var/datum/thing = currentrun[currentrun.len]
currentrun.len--
if(thing)
thing.process(wait)
else
SSobj.processing -= thing
if (MC_TICK_CHECK)
return
/datum/controller/subsystem/obj/Recover()
processing = SSobj.processing
wait = 20