Files
S.P.L.U.R.T-Station-13/code/controllers/subsystem/processing/obj.dm
kevinz000 35b7b93b24 ok this is going to be a pain in the ass ain't it (#2458)
lets hope nothing blows up this time (Flags PR but it works!)
2017-08-22 05:01:38 -07:00

30 lines
670 B
Plaintext

SUBSYSTEM_DEF(obj)
name = "Objects"
priority = 40
flags_1 = 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