Additional types which need Destroy to return qdel hints (and other Destroy fixes)

This commit is contained in:
Leshana
2017-12-30 16:02:27 -05:00
parent 3c2dac2e01
commit 064f2fe9ca
9 changed files with 13 additions and 15 deletions

View File

@@ -22,8 +22,7 @@
welder.setWelding(1) welder.setWelding(1)
/obj/item/weapon/spell/flame_tongue/Destroy() /obj/item/weapon/spell/flame_tongue/Destroy()
qdel(welder) qdel_null(welder)
welder = null
return ..() return ..()
/obj/item/weapon/weldingtool/spell /obj/item/weapon/weldingtool/spell

View File

@@ -62,8 +62,8 @@
illusion.emote(what_to_emote) illusion.emote(what_to_emote)
/obj/item/weapon/spell/illusion/Destroy() /obj/item/weapon/spell/illusion/Destroy()
if(illusion) qdel_null(illusion)
qdel(illusion) copied = null
return ..() return ..()
// Makes a tiny overlay of the thing the player has copied, so they can easily tell what they currently have. // Makes a tiny overlay of the thing the player has copied, so they can easily tell what they currently have.

View File

@@ -37,7 +37,7 @@
for(var/atom/movable/AM in contents) //Eject everything out. for(var/atom/movable/AM in contents) //Eject everything out.
AM.forceMove(get_turf(src)) AM.forceMove(get_turf(src))
processing_objects -= src processing_objects -= src
..() return ..()
/obj/effect/phase_shift/process() /obj/effect/phase_shift/process()
for(var/mob/living/L in contents) for(var/mob/living/L in contents)

View File

@@ -25,7 +25,7 @@
/obj/item/weapon/spell/radiance/Destroy() /obj/item/weapon/spell/radiance/Destroy()
processing_objects -= src processing_objects -= src
log_and_message_admins("has stopped maintaining [src].") log_and_message_admins("has stopped maintaining [src].")
..() return ..()
/obj/item/weapon/spell/radiance/process() /obj/item/weapon/spell/radiance/process()
var/turf/T = get_turf(src) var/turf/T = get_turf(src)

View File

@@ -12,7 +12,7 @@
sparks.attach(loc) sparks.attach(loc)
/obj/item/weapon/antag_spawner/Destroy() /obj/item/weapon/antag_spawner/Destroy()
qdel(sparks) qdel_null(sparks)
return ..() return ..()
/obj/item/weapon/antag_spawner/proc/spawn_antag(client/C, turf/T) /obj/item/weapon/antag_spawner/proc/spawn_antag(client/C, turf/T)

View File

@@ -52,6 +52,7 @@
/obj/item/weapon/implant/Destroy() /obj/item/weapon/implant/Destroy()
if(part) if(part)
part.implants.Remove(src) part.implants.Remove(src)
part = null
return ..() return ..()
/obj/item/weapon/implant/attackby(obj/item/I, mob/user) /obj/item/weapon/implant/attackby(obj/item/I, mob/user)

View File

@@ -53,11 +53,9 @@
processing_objects |= src processing_objects |= src
/obj/item/device/electronic_assembly/Destroy() /obj/item/device/electronic_assembly/Destroy()
battery = null battery = null // It will be qdel'd by ..() if still in our contents
processing_objects -= src processing_objects -= src
for(var/atom/movable/AM in contents) return ..()
qdel(AM)
..()
/obj/item/device/electronic_assembly/process() /obj/item/device/electronic_assembly/process()
handle_idle_power() handle_idle_power()

View File

@@ -25,8 +25,8 @@
power_draw_per_use = 50 // The targeting mechanism uses this. The actual gun uses its own cell for firing if it's an energy weapon. power_draw_per_use = 50 // The targeting mechanism uses this. The actual gun uses its own cell for firing if it's an energy weapon.
/obj/item/integrated_circuit/manipulation/weapon_firing/Destroy() /obj/item/integrated_circuit/manipulation/weapon_firing/Destroy()
qdel(installed_gun) installed_gun = null // It will be qdel'd by ..() if still in our contents
..() return ..()
/obj/item/integrated_circuit/manipulation/weapon_firing/attackby(var/obj/O, var/mob/user) /obj/item/integrated_circuit/manipulation/weapon_firing/attackby(var/obj/O, var/mob/user)
if(istype(O, /obj/item/weapon/gun)) if(istype(O, /obj/item/weapon/gun))

View File

@@ -247,5 +247,5 @@
/obj/effect/suspension_field/Destroy() /obj/effect/suspension_field/Destroy()
for(var/atom/movable/I in src) for(var/atom/movable/I in src)
I.loc = src.loc I.dropInto(loc)
..() return ..()