mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-08-22 03:27:05 +01:00
Merge pull request #2090 from Markolie/fixesss
Radio examine/matter eater fix, GC testing move
This commit is contained in:
@@ -53,9 +53,9 @@ var/global/nologevent = 0
|
||||
|
||||
body += "<br><br>\[ "
|
||||
body += "<a href='?_src_=vars;Vars=\ref[M]'>VV</a> - "
|
||||
body += "<a href='?src=\ref[src];traitor=\ref[M]'>TP</a> -"
|
||||
body += "<a href='?src=\ref[usr];priv_msg=\ref[M]'>PM</a> -"
|
||||
body += "<a href='?src=\ref[src];subtlemessage=\ref[M]'>SM</a> -"
|
||||
body += "<a href='?src=\ref[src];traitor=\ref[M]'>TP</a> - "
|
||||
body += "<a href='?src=\ref[usr];priv_msg=\ref[M]'>PM</a> - "
|
||||
body += "<a href='?src=\ref[src];subtlemessage=\ref[M]'>SM</a> - "
|
||||
body += "[admin_jump_link(M, src)]\] </b><br>"
|
||||
|
||||
body += "<b>Mob type</b> = [M.type]<br><br>"
|
||||
|
||||
@@ -181,72 +181,4 @@ var/global/datum/controller/process/garbage_collector/garbageCollector
|
||||
|
||||
/proc/gcwarning(msg)
|
||||
log_to_dd("## GC WARNING: [msg]")
|
||||
|
||||
#ifdef TESTING
|
||||
/client/var/running_find_references
|
||||
/datum/var/running_find_references
|
||||
|
||||
/datum/verb/find_references(remove_from_queue = TRUE as num)
|
||||
set category = "Debug"
|
||||
set name = "Find References"
|
||||
set background = 1
|
||||
set src in world
|
||||
|
||||
running_find_references = type
|
||||
if(usr && usr.client)
|
||||
if(usr.client.running_find_references)
|
||||
testing("CANCELLED search for references to a [usr.client.running_find_references].")
|
||||
usr.client.running_find_references = null
|
||||
running_find_references = null
|
||||
return
|
||||
|
||||
if(alert("Running this will create a lot of lag until it finishes. You can cancel it by running it again. Would you like to begin the search?", "Find References", "Yes", "No") == "No")
|
||||
running_find_references = null
|
||||
return
|
||||
// Remove this object from the list of things to be auto-deleted.
|
||||
if(remove_from_queue && garbageCollector && ("\ref[src]" in garbageCollector.queue))
|
||||
garbageCollector.queue -= "\ref[src]"
|
||||
if(usr && usr.client)
|
||||
usr.client.running_find_references = type
|
||||
|
||||
testing("Beginning search for references to a [type].")
|
||||
var/list/things = list()
|
||||
for(var/client/thing)
|
||||
things |= thing
|
||||
for(var/datum/thing)
|
||||
things |= thing
|
||||
testing("Collected list of things in search for references to a [type]. ([things.len] Thing\s)")
|
||||
for(var/datum/thing in things)
|
||||
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.")
|
||||
testing("Completed search for references to a [type].")
|
||||
if(usr && usr.client)
|
||||
usr.client.running_find_references = null
|
||||
running_find_references = null
|
||||
|
||||
/client/verb/purge_all_destroyed_objects()
|
||||
set category = "Debug"
|
||||
if(garbageCollector)
|
||||
while(garbageCollector.queue.len)
|
||||
var/datum/o = locate(garbageCollector.queue[1])
|
||||
if(istype(o) && o.gcDestroyed)
|
||||
del(o)
|
||||
garbageCollector.dels_count++
|
||||
garbageCollector.queue.Cut(1, 2)
|
||||
|
||||
/datum/verb/qdel_then_find_references()
|
||||
set category = "Debug"
|
||||
set name = "qdel() then Find References"
|
||||
set background = 1
|
||||
set src in world
|
||||
|
||||
qdel(src)
|
||||
if(!running_find_references)
|
||||
find_references(remove_from_queue = FALSE)
|
||||
#endif
|
||||
|
||||
@@ -121,3 +121,73 @@ var/global/list/ghdels_profiled = list()
|
||||
dat +="<tr><td>[L[t]]</td><td>[t]</td></tr>"
|
||||
dat += "</table>"
|
||||
return dat
|
||||
|
||||
#ifdef TESTING
|
||||
/client/var/running_find_references
|
||||
/datum/var/running_find_references
|
||||
|
||||
/datum/verb/find_references(remove_from_queue = TRUE as num)
|
||||
set category = "Debug"
|
||||
set name = "Find References"
|
||||
set background = 1
|
||||
set src in world
|
||||
|
||||
running_find_references = type
|
||||
if(usr && usr.client)
|
||||
if(usr.client.running_find_references)
|
||||
testing("CANCELLED search for references to a [usr.client.running_find_references].")
|
||||
usr.client.running_find_references = null
|
||||
running_find_references = null
|
||||
return
|
||||
|
||||
if(alert("Running this will create a lot of lag until it finishes. You can cancel it by running it again. Would you like to begin the search?", "Find References", "Yes", "No") == "No")
|
||||
running_find_references = null
|
||||
return
|
||||
// Remove this object from the list of things to be auto-deleted.
|
||||
if(remove_from_queue && garbageCollector && ("\ref[src]" in garbageCollector.queue))
|
||||
garbageCollector.queue -= "\ref[src]"
|
||||
if(usr && usr.client)
|
||||
usr.client.running_find_references = type
|
||||
|
||||
testing("Beginning search for references to a [type].")
|
||||
var/list/things = list()
|
||||
for(var/client/thing)
|
||||
things |= thing
|
||||
for(var/datum/thing)
|
||||
things |= thing
|
||||
testing("Collected list of things in search for references to a [type]. ([things.len] Thing\s)")
|
||||
for(var/datum/thing in things)
|
||||
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.")
|
||||
testing("Completed search for references to a [type].")
|
||||
if(usr && usr.client)
|
||||
usr.client.running_find_references = null
|
||||
running_find_references = null
|
||||
|
||||
/client/verb/purge_all_destroyed_objects()
|
||||
set category = "Debug"
|
||||
if(garbageCollector)
|
||||
while(garbageCollector.queue.len)
|
||||
var/datum/o = locate(garbageCollector.queue[1])
|
||||
if(istype(o) && o.gcDestroyed)
|
||||
del(o)
|
||||
garbageCollector.dels_count++
|
||||
garbageCollector.queue.Cut(1, 2)
|
||||
|
||||
/datum/verb/qdel_then_find_references()
|
||||
set category = "Debug"
|
||||
set name = "qdel() then Find References"
|
||||
set background = 1
|
||||
set src in world
|
||||
|
||||
qdel(src)
|
||||
if(!running_find_references)
|
||||
find_references(remove_from_queue = FALSE)
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user