Revert "12/21 modernizations from TG live"
This commit is contained in:
@@ -1,10 +0,0 @@
|
||||
//Fires five times every second.
|
||||
|
||||
var/datum/subsystem/processing/fastprocess/SSfastprocess
|
||||
/datum/subsystem/processing/fastprocess
|
||||
name = "Fast Processing"
|
||||
wait = 2
|
||||
stat_tag = "FP"
|
||||
|
||||
/datum/subsystem/processing/fastprocess/New()
|
||||
NEW_SS_GLOBAL(SSfastprocess)
|
||||
@@ -1,68 +0,0 @@
|
||||
var/datum/subsystem/objects/SSobj
|
||||
|
||||
/datum/var/isprocessing = 0
|
||||
/datum/proc/process()
|
||||
set waitfor = 0
|
||||
STOP_PROCESSING(SSobj, src)
|
||||
return 0
|
||||
|
||||
/datum/subsystem/objects
|
||||
name = "Objects"
|
||||
init_order = 12
|
||||
priority = 40
|
||||
|
||||
var/list/atom_spawners = list()
|
||||
var/list/processing = list()
|
||||
var/list/currentrun = list()
|
||||
|
||||
/datum/subsystem/objects/New()
|
||||
NEW_SS_GLOBAL(SSobj)
|
||||
|
||||
/datum/subsystem/objects/Initialize(timeofdayl)
|
||||
trigger_atom_spawners()
|
||||
setupGenetics() //to set the mutations' place in structural enzymes, so monkey.initialize() knows where to put the monkey mutation.
|
||||
for(var/thing in world)
|
||||
var/atom/A = thing
|
||||
A.initialize()
|
||||
CHECK_TICK
|
||||
. = ..()
|
||||
|
||||
/datum/subsystem/objects/proc/trigger_atom_spawners(zlevel, ignore_z=FALSE)
|
||||
for(var/V in atom_spawners)
|
||||
var/atom/A = V
|
||||
if (!ignore_z && (zlevel && A.z != zlevel))
|
||||
continue
|
||||
A.spawn_atom_to_world()
|
||||
|
||||
/datum/subsystem/objects/stat_entry()
|
||||
..("P:[processing.len]")
|
||||
|
||||
|
||||
/datum/subsystem/objects/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/subsystem/objects/proc/setup_template_objects(list/objects)
|
||||
trigger_atom_spawners(0, ignore_z=TRUE)
|
||||
for(var/A in objects)
|
||||
var/atom/B = A
|
||||
B.initialize()
|
||||
|
||||
/datum/subsystem/objects/Recover()
|
||||
if (istype(SSobj.atom_spawners))
|
||||
atom_spawners = SSobj.atom_spawners
|
||||
if (istype(SSobj.processing))
|
||||
processing = SSobj.processing
|
||||
@@ -1,34 +0,0 @@
|
||||
//Used to process objects. Fires once every second.
|
||||
|
||||
var/datum/subsystem/processing/SSprocessing
|
||||
/datum/subsystem/processing
|
||||
name = "Processing"
|
||||
priority = 25
|
||||
flags = SS_BACKGROUND|SS_POST_FIRE_TIMING|SS_NO_INIT
|
||||
wait = 10
|
||||
|
||||
var/stat_tag = "P" //Used for logging
|
||||
var/list/processing = list()
|
||||
var/list/currentrun = list()
|
||||
|
||||
/datum/subsystem/processing/New()
|
||||
NEW_SS_GLOBAL(SSprocessing)
|
||||
|
||||
/datum/subsystem/processing/stat_entry()
|
||||
..("[stat_tag]:[processing.len]")
|
||||
|
||||
/datum/subsystem/processing/fire(resumed = 0)
|
||||
if (!resumed)
|
||||
currentrun = processing.Copy()
|
||||
//cache for sanic speed (lists are references anyways)
|
||||
var/list/current_run = currentrun
|
||||
|
||||
while(current_run.len)
|
||||
var/datum/thing = current_run[current_run.len]
|
||||
current_run.len--
|
||||
if(thing)
|
||||
thing.process(wait)
|
||||
else
|
||||
processing -= thing
|
||||
if (MC_TICK_CHECK)
|
||||
return
|
||||
Reference in New Issue
Block a user