diff --git a/code/game/machinery/PDApainter.dm b/code/game/machinery/PDApainter.dm index 9388942d549..24b233a4b41 100644 --- a/code/game/machinery/PDApainter.dm +++ b/code/game/machinery/PDApainter.dm @@ -39,6 +39,11 @@ src.colorlist += D +/obj/machinery/pdapainter/Destroy() + if(storedpda) + qdel(storedpda) + storedpda = null + return ..() /obj/machinery/pdapainter/attackby(var/obj/item/O as obj, var/mob/user as mob, params) if(istype(O, /obj/item/device/pda)) diff --git a/code/game/machinery/floodlight.dm b/code/game/machinery/floodlight.dm index 53977708650..cee7706d256 100644 --- a/code/game/machinery/floodlight.dm +++ b/code/game/machinery/floodlight.dm @@ -19,6 +19,12 @@ src.cell = new(src) ..() +/obj/machinery/floodlight/Destroy() + if(cell) + qdel(cell) + cell = null + return ..() + /obj/machinery/floodlight/proc/updateicon() icon_state = "flood[open ? "o" : ""][open && cell ? "b" : ""]0[on]" @@ -31,7 +37,7 @@ set_light(0) src.visible_message("[src] shuts down due to lack of power!") return - + /obj/machinery/floodlight/attack_ai(mob/user as mob) return diff --git a/code/game/machinery/spaceheater.dm b/code/game/machinery/spaceheater.dm index ce5ca3ce85d..68c4ab10a34 100644 --- a/code/game/machinery/spaceheater.dm +++ b/code/game/machinery/spaceheater.dm @@ -19,6 +19,12 @@ update_icon() return +/obj/machinery/space_heater/Destroy() + if(cell) + qdel(cell) + cell = null + return ..() + /obj/machinery/space_heater/update_icon() overlays.Cut() icon_state = "sheater[on]" diff --git a/code/game/objects/items/control_wand.dm b/code/game/objects/items/control_wand.dm index 178f56912c1..4c2c5420d1a 100644 --- a/code/game/objects/items/control_wand.dm +++ b/code/game/objects/items/control_wand.dm @@ -18,6 +18,12 @@ ID = new /obj/item/weapon/card/id ID.access = get_region_accesses(region_access) +/obj/item/weapon/door_remote/Destroy() + if(ID) + qdel(ID) + ID = null + return ..() + /obj/item/weapon/door_remote/attack_self(mob/user) switch(mode) if(WAND_OPEN) diff --git a/code/game/objects/items/devices/laserpointer.dm b/code/game/objects/items/devices/laserpointer.dm index 0996fdd6de5..18aff184931 100644 --- a/code/game/objects/items/devices/laserpointer.dm +++ b/code/game/objects/items/devices/laserpointer.dm @@ -11,7 +11,6 @@ w_class = 2 //Increased to 2, because diodes are w_class 2. Conservation of matter. origin_tech = "combat=1" origin_tech = "magnets=2" - var/turf/pointer_loc var/energy = 5 var/max_energy = 5 var/effectchance = 33 @@ -35,6 +34,12 @@ if(!pointer_icon_state) pointer_icon_state = pick("red_laser","green_laser","blue_laser","purple_laser") +/obj/item/device/laser_pointer/Destroy() + if(diode) + qdel(diode) + diode = null + return ..() + /obj/item/device/laser_pointer/upgraded/New() ..() diode = new /obj/item/weapon/stock_parts/micro_laser/ultra diff --git a/code/game/objects/items/devices/paicard.dm b/code/game/objects/items/devices/paicard.dm index 893ce504319..f6f39504390 100644 --- a/code/game/objects/items/devices/paicard.dm +++ b/code/game/objects/items/devices/paicard.dm @@ -24,9 +24,13 @@ overlays += "pai-off" /obj/item/device/paicard/Destroy() - //Will stop people throwing friend pAIs into the singularity so they can respawn - if(!isnull(pai)) - pai.death(0) + if(pai) + pai.ghostize() + qdel(pai) + pai = null + if(radio) + qdel(radio) + radio = null return ..() /obj/item/device/paicard/attack_self(mob/user) diff --git a/code/game/objects/items/devices/taperecorder.dm b/code/game/objects/items/devices/taperecorder.dm index 97a999fb161..111c83a24b2 100644 --- a/code/game/objects/items/devices/taperecorder.dm +++ b/code/game/objects/items/devices/taperecorder.dm @@ -20,6 +20,12 @@ mytape = new /obj/item/device/tape/random(src) update_icon() +/obj/item/device/taperecorder/Destroy() + if(mytape) + qdel(mytape) + mytape = null + return ..() + /obj/item/device/taperecorder/examine(mob/user) if(..(user, 1)) to_chat(user, "The wire panel is [open_panel ? "opened" : "closed"].") diff --git a/code/game/objects/items/devices/transfer_valve.dm b/code/game/objects/items/devices/transfer_valve.dm index 8e8e00a0343..9cd39c7a7d9 100644 --- a/code/game/objects/items/devices/transfer_valve.dm +++ b/code/game/objects/items/devices/transfer_valve.dm @@ -11,6 +11,18 @@ var/toggle = 1 origin_tech = "materials=1;engineering=1" +/obj/item/device/transfer_valve/Destroy() + if(tank_one) + qdel(tank_one) + tank_one = null + if(tank_two) + qdel(tank_two) + tank_two = null + if(attached_device) + qdel(attached_device) + attached_device = null + return ..() + /obj/item/device/transfer_valve/proc/process_activation(var/obj/item/device/D) /obj/item/device/transfer_valve/IsAssemblyHolder() diff --git a/code/game/objects/items/latexballoon.dm b/code/game/objects/items/latexballoon.dm index 575680f28ac..855c97d9b12 100644 --- a/code/game/objects/items/latexballoon.dm +++ b/code/game/objects/items/latexballoon.dm @@ -11,6 +11,12 @@ var/state var/datum/gas_mixture/air_contents = null +/obj/item/latexballon/Destroy() + if(air_contents) + qdel(air_contents) + air_contents = null + return ..() + /obj/item/latexballon/proc/blow(obj/item/weapon/tank/tank, mob/user) if(icon_state == "latexballon_bursted") return diff --git a/code/game/objects/items/weapons/pneumaticCannon.dm b/code/game/objects/items/weapons/pneumaticCannon.dm index d7c33164543..3e8dbb6239d 100644 --- a/code/game/objects/items/weapons/pneumaticCannon.dm +++ b/code/game/objects/items/weapons/pneumaticCannon.dm @@ -16,6 +16,14 @@ var/list/loadedItems = list() //The items loaded into the cannon that will be fired out var/pressureSetting = 1 //How powerful the cannon is - higher pressure = more gas but more powerful throws +/obj/item/weapon/pneumatic_cannon/Destroy() + if(tank) + qdel(tank) + tank = null + for(var/obj/item/I in loadedItems) + qdel(I) + loadedItems.Cut() + return ..() /obj/item/weapon/pneumatic_cannon/examine(mob/user) ..() diff --git a/code/game/objects/items/weapons/stunbaton.dm b/code/game/objects/items/weapons/stunbaton.dm index c0935f5d316..3e7b63857cb 100644 --- a/code/game/objects/items/weapons/stunbaton.dm +++ b/code/game/objects/items/weapons/stunbaton.dm @@ -23,6 +23,12 @@ update_icon() return +/obj/item/weapon/melee/baton/Destroy() + if(bcell) + qdel(bcell) + bcell = null + return ..() + /obj/item/weapon/melee/baton/CheckParts(list/parts_list) ..() bcell = locate(/obj/item/weapon/stock_parts/cell) in contents diff --git a/code/game/objects/items/weapons/tanks/tanks.dm b/code/game/objects/items/weapons/tanks/tanks.dm index 9415e49d3cd..4ec1b1587c8 100644 --- a/code/game/objects/items/weapons/tanks/tanks.dm +++ b/code/game/objects/items/weapons/tanks/tanks.dm @@ -35,6 +35,7 @@ /obj/item/weapon/tank/Destroy() if(air_contents) qdel(air_contents) + air_contents = null processing_objects.Remove(src)