Bleeding edgy refresh (#303)
* not code stuff * other things * global vars, defines, helpers * onclick hud stuff, orphans, world.dm * controllers and datums * game folder * everything not client/mobs in modules * client folder * stage 1 mob stuff * simple animal things * silicons * carbon things * ayylmaos and monkeys * hyoomahn * icons n shit * sprite fixes * compile fixes * some fixes I cherrypicked. * qdel fixes * forgot brain refractors
This commit is contained in:
@@ -1,10 +1,10 @@
|
||||
var/datum/subsystem/atoms/SSatoms
|
||||
var/datum/controller/subsystem/atoms/SSatoms
|
||||
|
||||
#define INITIALIZATION_INSSATOMS 0 //New should not call Initialize
|
||||
#define INITIALIZATION_INNEW_MAPLOAD 1 //New should call Initialize(TRUE)
|
||||
#define INITIALIZATION_INNEW_REGULAR 2 //New should call Initialize(FALSE)
|
||||
|
||||
/datum/subsystem/atoms
|
||||
/datum/controller/subsystem/atoms
|
||||
name = "Atoms"
|
||||
init_order = 11
|
||||
flags = SS_NO_FIRE
|
||||
@@ -12,17 +12,17 @@ var/datum/subsystem/atoms/SSatoms
|
||||
var/initialized = INITIALIZATION_INSSATOMS
|
||||
var/old_initialized
|
||||
|
||||
/datum/subsystem/atoms/New()
|
||||
/datum/controller/subsystem/atoms/New()
|
||||
NEW_SS_GLOBAL(SSatoms)
|
||||
|
||||
/datum/subsystem/atoms/Initialize(timeofday)
|
||||
/datum/controller/subsystem/atoms/Initialize(timeofday)
|
||||
fire_overlay.appearance_flags = RESET_COLOR
|
||||
setupGenetics() //to set the mutations' place in structural enzymes, so monkey.initialize() knows where to put the monkey mutation.
|
||||
initialized = INITIALIZATION_INNEW_MAPLOAD
|
||||
InitializeAtoms()
|
||||
return ..()
|
||||
|
||||
/datum/subsystem/atoms/proc/InitializeAtoms(list/atoms = null)
|
||||
/datum/controller/subsystem/atoms/proc/InitializeAtoms(list/atoms = null)
|
||||
if(initialized == INITIALIZATION_INSSATOMS)
|
||||
return
|
||||
|
||||
@@ -30,10 +30,17 @@ var/datum/subsystem/atoms/SSatoms
|
||||
|
||||
initialized = INITIALIZATION_INNEW_MAPLOAD
|
||||
|
||||
var/static/list/NewQdelList = list()
|
||||
|
||||
if(atoms)
|
||||
for(var/I in atoms)
|
||||
var/atom/A = I
|
||||
if(!A.initialized) //this check is to make sure we don't call it twice on an object that was created in a previous Initialize call
|
||||
if(QDELETED(A))
|
||||
if(!(NewQdelList[A.type]))
|
||||
stack_trace("Found new qdeletion in type [A.type]!")
|
||||
NewQdelList[A.type] = TRUE
|
||||
continue
|
||||
var/start_tick = world.time
|
||||
if(A.Initialize(TRUE))
|
||||
LAZYADD(late_loaders, A)
|
||||
@@ -47,6 +54,11 @@ var/datum/subsystem/atoms/SSatoms
|
||||
#endif
|
||||
for(var/atom/A in world)
|
||||
if(!A.initialized) //this check is to make sure we don't call it twice on an object that was created in a previous Initialize call
|
||||
if(QDELETED(A))
|
||||
if(!(NewQdelList[A.type]))
|
||||
stack_trace("Found new qdeletion in type [A.type]!")
|
||||
NewQdelList[A.type] = TRUE
|
||||
continue
|
||||
var/start_tick = world.time
|
||||
if(A.Initialize(TRUE))
|
||||
LAZYADD(late_loaders, A)
|
||||
@@ -71,20 +83,20 @@ var/datum/subsystem/atoms/SSatoms
|
||||
CHECK_TICK
|
||||
testing("Late-initialized [late_loaders.len] atoms")
|
||||
|
||||
/datum/subsystem/atoms/proc/map_loader_begin()
|
||||
/datum/controller/subsystem/atoms/proc/map_loader_begin()
|
||||
old_initialized = initialized
|
||||
initialized = INITIALIZATION_INSSATOMS
|
||||
|
||||
/datum/subsystem/atoms/proc/map_loader_stop()
|
||||
/datum/controller/subsystem/atoms/proc/map_loader_stop()
|
||||
initialized = old_initialized
|
||||
|
||||
/datum/subsystem/atoms/Recover()
|
||||
/datum/controller/subsystem/atoms/Recover()
|
||||
initialized = SSatoms.initialized
|
||||
if(initialized == INITIALIZATION_INNEW_MAPLOAD)
|
||||
InitializeAtoms()
|
||||
old_initialized = SSatoms.old_initialized
|
||||
|
||||
/datum/subsystem/atoms/proc/setupGenetics()
|
||||
/datum/controller/subsystem/atoms/proc/setupGenetics()
|
||||
var/list/avnums = new /list(DNA_STRUC_ENZYMES_BLOCKS)
|
||||
for(var/i=1, i<=DNA_STRUC_ENZYMES_BLOCKS, i++)
|
||||
avnums[i] = i
|
||||
|
||||
Reference in New Issue
Block a user