mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-29 08:08:49 +01:00
Make ei nath not destroy brains
Also small tweaks to make spells GC if you use the spellremove() proc.
This commit is contained in:
@@ -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++
|
||||
|
||||
|
||||
@@ -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()
|
||||
|
||||
@@ -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.*/
|
||||
|
||||
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user