Make ei nath not destroy brains

Also small tweaks to make spells GC if you use the spellremove() proc.
This commit is contained in:
MrPerson
2014-03-26 08:38:26 -07:00
parent c7471d0795
commit 1fa3dbde0c
4 changed files with 10 additions and 6 deletions
+1 -1
View File
@@ -135,7 +135,7 @@ var/list/spells = typesof(/obj/effect/proc_holder/spell) //needed for the badmin
return
/obj/effect/proc_holder/spell/proc/start_recharge()
while(charge_counter < charge_max)
while(charge_counter < charge_max && !isnull(gc_destroyed))
sleep(1)
charge_counter++
+5 -3
View File
@@ -27,10 +27,12 @@
target.gib()
if("gib_brain")
if(ishuman(target) || ismonkey(target))
var/obj/item/organ/brain/B = target.getorgan(/obj/item/organ/brain)
var/mob/living/carbon/C_target = target
var/obj/item/organ/brain/B = C_target.getorgan(/obj/item/organ/brain)
if(B)
B.loc = get_turf(target)
B.transfer_identity(target)
B.loc = get_turf(C_target)
B.transfer_identity(C_target)
C_target.internal_organs -= B
target.gib()
if("disintegrate")
target.dust()
+3
View File
@@ -263,8 +263,11 @@
//To batch-remove wizard spells. Linked to mind.dm.
/mob/proc/spellremove(var/mob/M as mob)
if(!mind)
return
for(var/obj/effect/proc_holder/spell/spell_to_remove in src.mind.spell_list)
qdel(spell_to_remove)
mind.spell_list -= spell_to_remove
/*Checks if the wizard can cast spells.
Made a proc so this is not repeated 14 (or more) times.*/
+1 -2
View File
@@ -8,8 +8,7 @@
qdel(AM)
client.screen = list()
del(hud_used)
for(var/magic in mob_spell_list)
del(magic)
spellremove(src)
for(var/infection in viruses)
del(infection)
ghostize()