Converts Most Destroys to use QDEL_NULL

This commit is contained in:
Fox-McCloud
2017-04-04 23:08:41 -04:00
parent ba8b1dae55
commit 5631d36ff8
121 changed files with 217 additions and 468 deletions
+1 -2
View File
@@ -29,8 +29,7 @@
Remove(owner)
if(target)
target = null
qdel(button)
button = null
QDEL_NULL(button)
return ..()
/datum/action/proc/Grant(mob/M)
+7 -8
View File
@@ -100,7 +100,7 @@ var/list/spells = typesof(/obj/effect/proc_holder/spell) //needed for the badmin
var/action_icon = 'icons/mob/actions.dmi'
var/action_icon_state = "spell_default"
var/action_background_icon_state = "bg_spell"
var/sound = null //The sound the spell makes when it is cast
/obj/effect/proc_holder/spell/proc/cast_check(skipcharge = 0, mob/living/user = usr) //checks if the spell can be cast based on its settings; skipcharge is used when an additional cast_check is called inside the spell
@@ -184,8 +184,8 @@ var/list/spells = typesof(/obj/effect/proc_holder/spell) //needed for the badmin
user.visible_message(invocation, invocation_emote_self) //same style as in mob/living/emote.dm
/obj/effect/proc_holder/spell/proc/playMagSound()
playsound(get_turf(usr), sound,50,1)
playsound(get_turf(usr), sound,50,1)
/obj/effect/proc_holder/spell/New()
..()
action = new(src)
@@ -194,8 +194,7 @@ var/list/spells = typesof(/obj/effect/proc_holder/spell) //needed for the badmin
charge_counter = charge_max
/obj/effect/proc_holder/spell/Destroy()
qdel(action)
action = null
QDEL_NULL(action)
return ..()
/obj/effect/proc_holder/spell/Click()
@@ -223,10 +222,10 @@ var/list/spells = typesof(/obj/effect/proc_holder/spell) //needed for the badmin
spawn(0)
if(charge_type == "recharge" && recharge)
start_recharge()
if(sound)
playMagSound()
playMagSound()
if(prob(critfailchance))
critfail(targets)
else