mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2025-12-26 18:21:56 +00:00
* begin the burndown? (y/n)
* okay update requirements?
* change the error name
* there we go
* tweak
* first bit of the burndown
* more
* burndown complete
* return the exit code!
* review
* Revert "first bit of the burndown"
This reverts commit 34155bd991.
* fix
* fixes
* last fix
* remove deprecated avulto stuff
43 lines
1.2 KiB
Plaintext
43 lines
1.2 KiB
Plaintext
//Used to process objects. Fires once every second.
|
|
|
|
SUBSYSTEM_DEF(processing)
|
|
name = "Processing"
|
|
priority = FIRE_PRIORITY_PROCESS
|
|
flags = SS_BACKGROUND|SS_POST_FIRE_TIMING|SS_NO_INIT
|
|
wait = 1 SECONDS
|
|
|
|
var/stat_tag = "P" //Used for logging
|
|
var/list/processing = list()
|
|
var/list/currentrun = list()
|
|
offline_implications = "Objects using the default processor will no longer process. Shuttle call recommended."
|
|
|
|
/datum/controller/subsystem/processing/get_stat_details()
|
|
return "[stat_tag]:[length(processing)]"
|
|
|
|
/datum/controller/subsystem/processing/get_metrics()
|
|
. = ..()
|
|
var/list/cust = list()
|
|
cust["processing"] = length(processing)
|
|
.["custom"] = cust
|
|
|
|
/datum/controller/subsystem/processing/fire(resumed = 0)
|
|
if(!resumed)
|
|
currentrun = processing.Copy()
|
|
//cache for sanic speed (lists are references anyways)
|
|
var/list/current_run = currentrun
|
|
|
|
while(length(current_run))
|
|
var/datum/thing = current_run[length(current_run)]
|
|
current_run.len--
|
|
if(QDELETED(thing))
|
|
processing -= thing
|
|
else if(thing.process(wait) == PROCESS_KILL)
|
|
// fully stop so that a future START_PROCESSING will work
|
|
STOP_PROCESSING(src, thing)
|
|
if(MC_TICK_CHECK)
|
|
return
|
|
|
|
/datum/proc/process()
|
|
set waitfor = 0
|
|
return PROCESS_KILL
|