REVERT of nanoui/chemistry becoming subsystems (temp)

This commit is contained in:
Heroman
2019-04-05 13:30:32 +10:00
parent c701f8c1c7
commit b11015107c
129 changed files with 389 additions and 350 deletions

View File

@@ -0,0 +1,33 @@
var/datum/controller/process/chemistry/chemistryProcess
/datum/controller/process/chemistry
var/list/active_holders
var/list/chemical_reactions
var/list/chemical_reagents
/datum/controller/process/chemistry/setup()
name = "chemistry"
schedule_interval = 20 // every 2 seconds
chemistryProcess = src
active_holders = list()
chemical_reactions = chemical_reactions_list
chemical_reagents = chemical_reagents_list
/datum/controller/process/chemistry/statProcess()
..()
stat(null, "[active_holders.len] reagent holder\s")
/datum/controller/process/chemistry/doWork()
for(last_object in active_holders)
var/datum/reagents/holder = last_object
if(!holder.process_reactions())
active_holders -= holder
SCHECK
/datum/controller/process/chemistry/proc/mark_for_update(var/datum/reagents/holder)
if(holder in active_holders)
return
//Process once, right away. If we still need to continue then add to the active_holders list and continue later
if(holder.process_reactions())
active_holders += holder

View File

@@ -0,0 +1,19 @@
/datum/controller/process/nanoui/setup()
name = "nanoui"
schedule_interval = 20 // every 2 seconds
/datum/controller/process/nanoui/statProcess()
..()
stat(null, "[GLOB.nanomanager.processing_uis.len] UIs")
/datum/controller/process/nanoui/doWork()
for(last_object in GLOB.nanomanager.processing_uis)
var/datum/nanoui/NUI = last_object
if(istype(NUI) && !QDELETED(NUI))
try
NUI.process()
catch(var/exception/e)
catchException(e, NUI)
else
catchBadType(NUI)
GLOB.nanomanager.processing_uis -= NUI