This commit is contained in:
Fox-McCloud
2016-08-09 14:32:55 -04:00
parent 8cd140e48a
commit 359d33799d
+6 -21
View File
@@ -1,13 +1,7 @@
var/datum/controller/process/fast_process/fast_processes
/datum/controller/process/fast_process
var/list/currentrun = list()
/datum/controller/process/fast_process/setup()
name = "fast processing"
schedule_interval = 2 //every 0.2 seconds
start_delay = 9
fast_processes = src
log_startup_progress("Fast Processing starting up.")
/datum/controller/process/fast_process/statProcess()
@@ -15,18 +9,9 @@ var/datum/controller/process/fast_process/fast_processes
stat(null, "[fast_processing.len] fast machines")
/datum/controller/process/fast_process/doWork()
src.currentrun = fast_processing.Copy()
//cache for sanic speed (lists are references anyways)
var/list/currentrun = src.currentrun
while(currentrun.len)
var/obj/thing = currentrun[1]
currentrun.Cut(1, 2)
if(thing)
try
thing.process()
catch(var/exception/e)
catchException(e, thing)
else
catchBadType(thing)
fast_processing -= thing
for(last_object in fast_processing)
var/obj/O = last_object
try
O.process()
catch(var/exception/e)
catchException(e, O)