Revert "Merge branch 'master' of https://github.com/PolarisSS13/Polaris into NanoGrade"

This reverts commit 6bb5409349, reversing
changes made to f6a83d5ee0.
This commit is contained in:
SinTwo
2016-08-15 12:58:00 -04:00
parent 6bb5409349
commit eabefc538a
325 changed files with 3375 additions and 41824 deletions

View File

@@ -66,9 +66,6 @@ world/loop_checks = 0
testing("GC: [refID] old enough to test: GCd_at_time: [GCd_at_time] time_to_kill: [time_to_kill] current: [world.time]")
#endif
if(A && A.gcDestroyed == GCd_at_time) // So if something else coincidently gets the same ref, it's not deleted by mistake
#ifdef GC_FINDREF
LocateReferences(A)
#endif
// Something's still referring to the qdel'd object. Kill it.
testing("GC: -- \ref[A] | [A.type] was unable to be GC'd and was deleted --")
logging["[A.type]"]++
@@ -91,47 +88,29 @@ world/loop_checks = 0
#undef GC_COLLECTIONS_PER_TICK
#ifdef GC_FINDREF
/datum/controller/process/garbage_collector/proc/LocateReferences(var/atom/A)
testing("GC: Attempting to locate references to [A] | [A.type]. This is a potentially long-running operation.")
if(istype(A))
if(A.loc != null)
testing("GC: [A] | [A.type] is located in [A.loc] instead of null")
if(A.contents.len)
testing("GC: [A] | [A.type] has contents: [jointext(A.contents)]")
var/ref_count = 0
for(var/atom/atom)
ref_count += LookForRefs(atom, A)
for(var/datum/datum) // This is strictly /datum, not subtypes.
ref_count += LookForRefs(datum, A)
for(var/client/client)
ref_count += LookForRefs(client, A)
var/message = "GC: References found to [A] | [A.type]: [ref_count]."
if(!ref_count)
message += " Has likely been supplied as an 'in list' argment to a proc."
testing(message)
/datum/controller/process/garbage_collector/proc/LookForRefs(var/datum/D, var/datum/A)
/datum/controller/process/garbage_collector/proc/LookForRefs(var/datum/D, var/list/targ)
. = 0
for(var/V in D.vars)
if(V == "contents")
continue
if(!islist(D.vars[V]))
if(D.vars[V] == A)
if(istype(D.vars[V], /atom))
var/atom/A = D.vars[V]
if(A in targ)
testing("GC: [A] | [A.type] referenced by [D] | [D.type], var [V]")
. += 1
else
. += LookForListRefs(D.vars[V], A, D, V)
else if(islist(D.vars[V]))
. += LookForListRefs(D.vars[V], targ, D, V)
/datum/controller/process/garbage_collector/proc/LookForListRefs(var/list/L, var/datum/A, var/datum/D, var/V)
/datum/controller/process/garbage_collector/proc/LookForListRefs(var/list/L, var/list/targ, var/datum/D, var/V)
. = 0
for(var/F in L)
if(!islist(F))
if(F == A || L[F] == A)
if(istype(F, /atom))
var/atom/A = F
if(A in targ)
testing("GC: [A] | [A.type] referenced by [D] | [D.type], list [V]")
. += 1
else
. += LookForListRefs(F, A, D, "[F] in list [V]")
if(islist(F))
. += LookForListRefs(F, targ, D, "[F] in list [V]")
#endif
/datum/controller/process/garbage_collector/proc/AddTrash(datum/A)

View File

@@ -1,28 +0,0 @@
var/global/datum/controller/process/tgui/tgui_process
/datum/controller/process/tgui
var/list/tg_open_uis = list() // A list of open UIs, grouped by src_object and ui_key.
var/list/processing_uis = list() // A list of processing UIs, ungrouped.
var/basehtml // The HTML base used for all UIs.
/datum/controller/process/tgui/setup()
name = "tgui"
schedule_interval = 10 // every 2 seconds
start_delay = 23
basehtml = file2text('tgui/tgui.html') // Read the HTML from disk.
tgui_process = src
/datum/controller/process/tgui/doWork()
for(var/gui in processing_uis)
var/datum/tgui/ui = gui
if(ui && ui.user && ui.src_object)
ui.process()
SCHECK
continue
processing_uis.Remove(ui)
SCHECK
/datum/controller/process/tgui/statProcess()
..()
stat(null, "[tgui_process.processing_uis.len] UI\s")