other things I missed

This commit is contained in:
Poojawa
2017-02-08 00:49:31 -06:00
parent d0f50d5488
commit 3f8df133d8
15 changed files with 364 additions and 130 deletions
-1
View File
@@ -3,7 +3,6 @@ var/list/admins = list() //all clients whom are admins
var/list/deadmins = list() //all clients who have used the de-admin verb.
var/list/directory = list() //all ckeys with associated client
var/list/stealthminID = list() //reference list with IDs that store ckeys, for stealthmins
var/global/list/current_watchlist = list() //stores players that are currently online and in the watchlist
//Since it didn't really belong in any other category, I'm putting this here
//This is for procs to replace all the goddamn 'in world's that are chilling around the code
+32 -19
View File
@@ -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)
+1 -1
View File
@@ -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
+1 -1
View File
@@ -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
+1
View File
@@ -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()
-7
View File
@@ -130,13 +130,6 @@
dat += "[ckey] - [D.rank.name]<br>"
usr << browse(dat, "window=showadmins;size=600x500")
if("show_current_watchlist")
var/dat = "<B>Watchlist: </B><HR>"
if(current_watchlist)
for(var/ckey in current_watchlist)
dat += "[ckey] - [current_watchlist[ckey]]"
usr << browse(dat, "window=showcurrentwatchlist;size=600x500")
if("tdomereset")
if(!check_rights(R_ADMIN))
return
+2 -1
View File
@@ -79,6 +79,7 @@
if(src.handle_spam_prevention(msg,MUTE_ADMINHELP))
return
var/ref_mob = "\ref[mob]"
var/ref_client = "\ref[src]"
for(var/datum/adminticket/T in admintickets)
if(T.permckey == src.ckey && T.resolved == "No")
if(alert(usr,"You already have an adminhelp open, would you like to bump it?", "Bump Adminhelp", "Yes", "No") == "Yes")
@@ -86,7 +87,7 @@
if(T.admin == "N/A")
usr << "<b>Due to the fact your Adminhelp had no assigned admin, admins have been pinged.</b>"
message_admins("[src.ckey] has bumped their adminhelp #[T.ID], still no assigned admin!")
msg = "<span class='adminnotice'><b><font color=red>HELP: </font><A HREF='?priv_msg=[ckey];ahelp_reply=1'>[key_name(src)]</A> [ADMIN_QUE(mob)] [ADMIN_PP(mob)] [ADMIN_VV(mob)] [ADMIN_SM(mob)] [ADMIN_FLW(mob)] [ADMIN_TP(mob)] (<A HREF='?_src_=holder;rejectadminhelp=[ref_client]'>REJT</A>) (<A HREF='?_src_=holder;icissue=[ref_client]'>IC</A>) (<A HREF='?_src_=holder;resolve=[ref_client]'>R</a>):</b> [msg]</span>"
msg = "<span class='adminnotice'><b><font color=red>HELP: </font><A HREF='?priv_msg=[ckey];ahelp_reply=1'>[key_name(src)]</A> [ADMIN_QUE(mob)] [ADMIN_PP(mob)] [ADMIN_VV(mob)] [ADMIN_SM(mob)] [ADMIN_FLW(mob)] [ADMIN_TP(mob)] (<A HREF='?_src_=holder;rejectadminhelp=[ref_client]'>REJT</A>) (<A HREF='?_src_=holder;icissue=[ref_client]'>IC</A>) (<A HREF='?_src_=holder;resolve=[T.ID]'>R</a>):</b> [msg]</span>"
for(var/client/X in admins)
if(X.prefs.toggles & SOUND_ADMINHELP)
X << 'sound/effects/adminhelp.ogg'