mirror of
https://github.com/SPLURT-Station/S.P.L.U.R.T-Station-13.git
synced 2025-12-10 09:54:52 +00:00
other things I missed
This commit is contained in:
@@ -92,6 +92,10 @@ var/datum/subsystem/garbage_collector/SSgarbage
|
||||
var/datum/A
|
||||
A = locate(refID)
|
||||
if (A && A.gc_destroyed == GCd_at_time) // So if something else coincidently gets the same ref, it's not deleted by mistake
|
||||
#ifdef GC_FAILURE_HARD_LOOKUP
|
||||
A.find_references()
|
||||
#endif
|
||||
|
||||
// Something's still referring to the qdel'd object. Kill it.
|
||||
var/type = A.type
|
||||
testing("GC: -- \ref[A] | [type] was unable to be GC'd and was deleted --")
|
||||
@@ -220,7 +224,8 @@ var/datum/subsystem/garbage_collector/SSgarbage
|
||||
/datum/var/gc_destroyed //Time when this object was destroyed.
|
||||
|
||||
#ifdef TESTING
|
||||
/datum/var/running_find_references
|
||||
/datum/var/running_find_references
|
||||
/datum/var/last_find_references = 0
|
||||
|
||||
/datum/verb/find_refs()
|
||||
set category = "Debug"
|
||||
@@ -254,17 +259,10 @@ var/datum/subsystem/garbage_collector/SSgarbage
|
||||
usr.client.running_find_references = type
|
||||
|
||||
testing("Beginning search for references to a [type].")
|
||||
last_find_references = world.time
|
||||
find_references_in_globals()
|
||||
for(var/datum/thing in world)
|
||||
if(usr && usr.client && !usr.client.running_find_references) return
|
||||
for(var/varname in thing.vars)
|
||||
var/variable = thing.vars[varname]
|
||||
if(variable == src)
|
||||
testing("Found [src.type] \ref[src] in [thing.type]'s [varname] var.")
|
||||
else if(islist(variable))
|
||||
if(src in variable)
|
||||
testing("Found [src.type] \ref[src] in [thing.type]'s [varname] list var.")
|
||||
CHECK_TICK
|
||||
DoSearchVar(thing, "WorldRef: [thing]")
|
||||
testing("Completed search for references to a [type].")
|
||||
if(usr && usr.client)
|
||||
usr.client.running_find_references = null
|
||||
@@ -312,22 +310,38 @@ var/datum/subsystem/garbage_collector/SSgarbage
|
||||
|
||||
usr << browse(dat, "window=qdeletedlog")
|
||||
|
||||
#define SearchVar(X) DoSearchVar(X, #X)
|
||||
#define SearchVar(X) DoSearchVar(X, "Global: " + #X)
|
||||
|
||||
/datum/proc/DoSearchVar(X, Xname)
|
||||
if(islist(X))
|
||||
if(src in X)
|
||||
testing("Found [src.type] \ref[src] in global list [Xname].")
|
||||
else if(istype(X, /datum))
|
||||
if(usr && usr.client && !usr.client.running_find_references) return
|
||||
if(istype(X, /datum))
|
||||
var/datum/D = X
|
||||
if(D.last_find_references == last_find_references)
|
||||
return
|
||||
D.last_find_references = last_find_references
|
||||
for(var/V in D.vars)
|
||||
for(var/varname in D.vars)
|
||||
var/variable = D.vars[varname]
|
||||
if(variable == src)
|
||||
testing("Found [src.type] \ref[src] in [D.type]'s [varname] var. Global: [Xname]")
|
||||
else if(islist(variable) && src in variable)
|
||||
testing("Found [src.type] \ref[src] in [D.type]'s [varname] list var. Global: [Xname]")
|
||||
testing("Found [src.type] \ref[src] in [D.type]'s [varname] var. [Xname]")
|
||||
else if(islist(variable))
|
||||
if(src in variable)
|
||||
testing("Found [src.type] \ref[src] in [D.type]'s [varname] list var. Global: [Xname]")
|
||||
#ifdef GC_FAILURE_HARD_LOOKUP
|
||||
for(var/I in variable)
|
||||
DoSearchVar(I, TRUE)
|
||||
else
|
||||
DoSearchVar(variable, "[Xname]: [varname]")
|
||||
#endif
|
||||
else if(islist(X))
|
||||
if(src in X)
|
||||
testing("Found [src.type] \ref[src] in list [Xname].")
|
||||
#ifdef GC_FAILURE_HARD_LOOKUP
|
||||
for(var/I in X)
|
||||
DoSearchVar(I, Xname + ": list")
|
||||
#else
|
||||
CHECK_TICK
|
||||
#endif
|
||||
|
||||
//if find_references isn't working for some datum
|
||||
//update this list using tools/DMTreeToGlobalsList
|
||||
@@ -553,7 +567,6 @@ var/datum/subsystem/garbage_collector/SSgarbage
|
||||
SearchVar(deadmins)
|
||||
SearchVar(directory)
|
||||
SearchVar(stealthminID)
|
||||
SearchVar(current_watchlist)
|
||||
SearchVar(player_list)
|
||||
SearchVar(mob_list)
|
||||
SearchVar(living_mob_list)
|
||||
|
||||
@@ -2,7 +2,7 @@ var/datum/subsystem/job/SSjob
|
||||
|
||||
/datum/subsystem/job
|
||||
name = "Jobs"
|
||||
init_order = 5
|
||||
init_order = 14
|
||||
flags = SS_NO_FIRE
|
||||
|
||||
var/list/occupations = list() //List of all jobs
|
||||
|
||||
@@ -2,7 +2,7 @@ var/datum/subsystem/mapping/SSmapping
|
||||
|
||||
/datum/subsystem/mapping
|
||||
name = "Mapping"
|
||||
init_order = 100000
|
||||
init_order = 13
|
||||
flags = SS_NO_FIRE
|
||||
display_order = 50
|
||||
|
||||
|
||||
@@ -29,10 +29,14 @@ var/datum/subsystem/objects/SSobj
|
||||
return
|
||||
initialized = INITIALIZATION_INNEW_MAPLOAD
|
||||
if(objects)
|
||||
for(var/thing in objects)
|
||||
var/atom/A = thing
|
||||
A.Initialize(TRUE)
|
||||
CHECK_TICK
|
||||
for(var/I in objects)
|
||||
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
|
||||
var/start_tick = world.time
|
||||
A.Initialize(TRUE)
|
||||
if(start_tick != world.time)
|
||||
WARNING("[A]: [A.type] slept during it's Initialize!")
|
||||
CHECK_TICK
|
||||
else
|
||||
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
|
||||
|
||||
@@ -23,6 +23,7 @@ var/datum/subsystem/shuttle/SSshuttle
|
||||
var/emergencyDockTime = 1800 //time taken for emergency shuttle to leave again once it has docked (in deciseconds)
|
||||
var/emergencyEscapeTime = 1200 //time taken for emergency shuttle to reach a safe distance after leaving station (in deciseconds)
|
||||
var/area/emergencyLastCallLoc
|
||||
var/emergencyCallAmount = 0 //how many times the escape shuttle was called
|
||||
var/emergencyNoEscape
|
||||
var/list/hostileEnvironments = list()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user