Various fixes upport from chomp (#15794)

* up-port

* more upstream commonality
This commit is contained in:
Raeschen
2024-03-02 13:11:39 +01:00
committed by GitHub
parent 1940e1c62f
commit a3e33e4370
12 changed files with 79 additions and 58 deletions
+9
View File
@@ -56,6 +56,7 @@
#ifdef REFERENCE_TRACKING
var/tmp/running_find_references
var/tmp/last_find_references = 0
var/tmp/find_references_on_destroy = FALSE //set this to true on an item to have it find refs after
#ifdef REFERENCE_TRACKING_DEBUG
///Stores info about where refs are found, used for sanity checks and testing
var/list/found_refs
@@ -113,6 +114,14 @@
tag = null
SStgui.close_uis(src)
#ifdef REFERENCE_TRACKING
if(find_references_on_destroy)
return QDEL_HINT_FINDREFERENCE
if(SSgarbage.find_reference_on_fail_global_toggle)
return QDEL_HINT_IFFAIL_FINDREFERENCE
#endif
return QDEL_HINT_QUEUE
/**
+6 -2
View File
@@ -1,6 +1,6 @@
#ifdef REFERENCE_TRACKING
/datum/proc/find_references(skip_alert)
/datum/proc/find_references(skip_alert = TRUE)
running_find_references = type
if(usr?.client)
if(usr.client.running_find_references)
@@ -28,7 +28,11 @@
//Time to search the whole game for our ref
DoSearchVar(GLOB, "GLOB") //globals
log_reftracker("Finished searching globals")
log_reftracker("Finished searching GLOB")
for(var/thing in global.vars)
DoSearchVar(thing, "Global variable -> [nameof(thing)]", search_time = starting_time)
log_reftracker("Finished searching global.vars")
for(var/datum/thing in world) //atoms (don't beleive its lies)
DoSearchVar(thing, "World -> [thing.type]", search_time = starting_time)