Updates the atom_pool, now datum_pool, to handle any datum object.

Makes the garbage collector similarly robust. Continues the whole Destroy/qdel porting.
This commit is contained in:
PsiOmega
2015-04-17 20:32:28 +02:00
parent a3fb012332
commit 1ae0ad6d92
579 changed files with 6034 additions and 6004 deletions

View File

@@ -12,7 +12,7 @@
icon = null
invisibility = 101
for(var/t in organs)
del(t)
qdel(t)
var/atom/movable/overlay/animation = new /atom/movable/overlay( loc )
animation.icon_state = "blank"
animation.icon = 'icons/mob/mob.dmi'
@@ -37,7 +37,7 @@
dna.SetSEValueRange(MONKEYBLOCK,0xDAC, 0xFFF)
src << "<B>You are now [species.name]. </B>"
del(animation)
qdel(animation)
return src
@@ -49,7 +49,7 @@
if (monkeyizing)
return
for(var/t in organs)
del(t)
qdel(t)
return ..(move)
@@ -106,8 +106,7 @@
O.add_ai_verbs()
O.rename_self("ai",1)
spawn(0)
del(src)
qdel(src)
return O
//human -> robot
@@ -122,7 +121,7 @@
icon = null
invisibility = 101
for(var/t in organs)
del(t)
qdel(t)
var/mob/living/silicon/robot/O = new /mob/living/silicon/robot( loc )
@@ -159,8 +158,7 @@
callHook("borgify", list(O))
O.Namepick()
spawn(0)//To prevent the proc from returning null.
del(src)
qdel(src)
return O
//human -> alien
@@ -175,7 +173,7 @@
icon = null
invisibility = 101
for(var/t in organs)
del(t)
qdel(t)
var/alien_caste = pick("Hunter","Sentinel","Drone")
var/mob/living/carbon/human/new_xeno = create_new_xenomorph(alien_caste,loc)
@@ -184,8 +182,7 @@
new_xeno.key = key
new_xeno << "<B>You are now an alien.</B>"
spawn(0)//To prevent the proc from returning null.
del(src)
qdel(src)
return
/mob/living/carbon/human/proc/slimeize(adult as num, reproduce as num)
@@ -199,7 +196,7 @@
icon = null
invisibility = 101
for(var/t in organs)
del(t)
qdel(t)
var/mob/living/carbon/slime/new_slime
if(reproduce)
@@ -219,8 +216,7 @@
new_slime.key = key
new_slime << "<B>You are now a slime. Skreee!</B>"
spawn(0)//To prevent the proc from returning null.
del(src)
qdel(src)
return
/mob/living/carbon/human/proc/corgize()
@@ -234,15 +230,14 @@
icon = null
invisibility = 101
for(var/t in organs) //this really should not be necessary
del(t)
qdel(t)
var/mob/living/simple_animal/corgi/new_corgi = new /mob/living/simple_animal/corgi (loc)
new_corgi.a_intent = I_HURT
new_corgi.key = key
new_corgi << "<B>You are now a Corgi. Yap Yap!</B>"
spawn(0)//To prevent the proc from returning null.
del(src)
qdel(src)
return
/mob/living/carbon/human/Animalize()
@@ -266,7 +261,7 @@
invisibility = 101
for(var/t in organs)
del(t)
qdel(t)
var/mob/new_mob = new mobpath(src.loc)
@@ -276,7 +271,7 @@
new_mob << "You suddenly feel more... animalistic."
spawn()
del(src)
qdel(src)
return
/mob/proc/Animalize()
@@ -294,7 +289,7 @@
new_mob.a_intent = I_HURT
new_mob << "You feel more... animalistic"
del(src)
qdel(src)
/* Certain mob types have problems and should not be allowed to be controlled by players.
*