mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-08-22 19:47:22 +01:00
Converts Most Destroys to use QDEL_NULL
This commit is contained in:
@@ -29,8 +29,7 @@
|
||||
Remove(owner)
|
||||
if(target)
|
||||
target = null
|
||||
qdel(button)
|
||||
button = null
|
||||
QDEL_NULL(button)
|
||||
return ..()
|
||||
|
||||
/datum/action/proc/Grant(mob/M)
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user