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
-31
View File
@@ -1,31 +0,0 @@
/datum
var/weakref
/datum/Destroy()
weakref = null // Clear this reference to ensure it's kept for as brief duration as possible.
. = ..()
//obtain a weak reference to a datum
/proc/weakref(datum/D)
if(D.gcDestroyed)
return
if(!D.weakref)
D.weakref = new /datum/weakref(D)
return D.weakref
/datum/weakref
var/ref
/datum/weakref/New(datum/D)
ref = "\ref[D]"
/datum/weakref/Destroy()
// A weakref datum should not be manually destroyed as it is a shared resource,
// rather it should be automatically collected by the BYOND GC when all references are gone.
return 0
/datum/weakref/proc/resolve()
var/datum/D = locate(ref)
if(D && D.weakref == src)
return D
return null