diff --git a/code/__HELPERS/unsorted.dm b/code/__HELPERS/unsorted.dm index fabc9de4dee..690b945cc63 100644 --- a/code/__HELPERS/unsorted.dm +++ b/code/__HELPERS/unsorted.dm @@ -1482,10 +1482,13 @@ var/mob/dview/dview_mob = new /mob/dview/New() //For whatever reason, if this isn't called, then BYOND will throw a type mismatch runtime when attempting to add this to the mobs list. -Fox -/proc/IsValidSrc(datum/D) - if(istype(D)) +/proc/IsValidSrc(A) + if(istype(A, /datum)) + var/datum/D = A return !QDELETED(D) - return 0 + if(istype(A, /client)) + return TRUE + return FALSE //Get the dir to the RIGHT of dir if they were on a clock diff --git a/code/controllers/subsystem/garbage.dm b/code/controllers/subsystem/garbage.dm index 17883b4c40b..18a7ea8549d 100644 --- a/code/controllers/subsystem/garbage.dm +++ b/code/controllers/subsystem/garbage.dm @@ -86,7 +86,7 @@ SUBSYSTEM_DEF(garbage) var/queue = GC_QUEUE_PREQUEUE while(state == SS_RUNNING) - switch (queue) + switch(queue) if(GC_QUEUE_PREQUEUE) HandlePreQueue() queue = GC_QUEUE_PREQUEUE+1 @@ -113,7 +113,7 @@ SUBSYSTEM_DEF(garbage) for(var/ref in tobequeued) count++ Queue(ref, GC_QUEUE_PREQUEUE+1) - if (MC_TICK_CHECK) + if(MC_TICK_CHECK) break if(count) tobequeued.Cut(1,count+1) @@ -407,7 +407,7 @@ SUBSYSTEM_DEF(garbage) var/list/L = D.vars for(var/varname in L) - if (varname == "vars") + if(varname == "vars") continue var/variable = L[varname] @@ -420,13 +420,13 @@ SUBSYSTEM_DEF(garbage) else if(islist(X)) var/normal = IS_NORMAL_LIST(X) for(var/I in X) - if (I == src) + if(I == src) testing("Found [src.type] \ref[src] in list [Xname].") - else if (I && !isnum(I) && normal && X[I] == src) + else if(I && !isnum(I) && normal && X[I] == src) testing("Found [src.type] \ref[src] in list [Xname]\[[I]\]") - else if (islist(I)) + else if(islist(I)) DoSearchVar(I, "[Xname] -> list", recursive_limit-1) #ifndef FIND_REF_NO_CHECK_TICK