mirror of
https://github.com/VOREStation/VOREStation.git
synced 2026-08-22 11:38:12 +01:00
Various fixes upport from chomp (#15794)
* up-port * more upstream commonality
This commit is contained in:
@@ -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
|
||||
|
||||
/**
|
||||
|
||||
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user