Disease Refactor (#29130)

* Vomit Now Contains Viruses

* eh

* typeless memery

* Disease Refactor

* tweaks

* styling

* tweaks

* unecessary comment removal

* whoops

* fix
This commit is contained in:
Fox McCloud
2017-07-15 11:08:40 -04:00
committed by Jordan Brown
parent 8f657c68fd
commit 2cc3e9c41f
57 changed files with 259 additions and 315 deletions

View File

@@ -1,11 +1,8 @@
SUBSYSTEM_DEF(disease)
name = "Disease"
flags = SS_KEEP_TIMING|SS_NO_INIT
runlevels = RUNLEVEL_GAME | RUNLEVEL_POSTGAME
var/list/currentrun = list()
var/list/processing = list()
flags = SS_NO_FIRE
var/list/active_diseases = list() //List of Active disease in all mobs; purely for quick referencing.
var/list/diseases
var/list/archive_diseases = list()
@@ -15,27 +12,5 @@ SUBSYSTEM_DEF(disease)
if(!diseases)
diseases = subtypesof(/datum/disease)
/datum/controller/subsystem/disease/Recover()
currentrun = SSdisease.currentrun
processing = SSdisease.processing
diseases = SSdisease.diseases
archive_diseases = SSdisease.archive_diseases
/datum/controller/subsystem/disease/stat_entry(msg)
..("P:[processing.len]")
/datum/controller/subsystem/disease/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()
else
processing.Remove(thing)
if (MC_TICK_CHECK)
return
..("P:[active_diseases.len]")