diff --git a/code/ATMOSPHERICS/components/unary/vent_scrubber.dm b/code/ATMOSPHERICS/components/unary/vent_scrubber.dm index e5b6d3a8dc1..dd989e0a545 100644 --- a/code/ATMOSPHERICS/components/unary/vent_scrubber.dm +++ b/code/ATMOSPHERICS/components/unary/vent_scrubber.dm @@ -43,6 +43,11 @@ assign_uid() id_tag = num2text(uid) +/obj/machinery/atmospherics/unary/vent_scrubber/Destroy() + unregister_radio(src, frequency) + ..() + + /obj/machinery/atmospherics/unary/vent_scrubber/update_icon(var/safety = 0) if(!check_icon_cache()) return diff --git a/code/controllers/Processes/garbage.dm b/code/controllers/Processes/garbage.dm index 3743e74881a..df89dda5edd 100644 --- a/code/controllers/Processes/garbage.dm +++ b/code/controllers/Processes/garbage.dm @@ -78,7 +78,7 @@ var/list/delayed_garbage = list() destroyed["\ref[A]"] = world.time /datum/controller/process/garbage_collector/getStatName() - return ..()+"([garbage_collector.dels]/[garbage_collector.hard_dels])" + return ..()+"([garbage_collector.destroyed.len]/[garbage_collector.dels]/[garbage_collector.hard_dels])" // Should be treated as a replacement for the 'del' keyword. // Datums passed to this will be given a chance to clean up references to allow the GC to collect them. @@ -120,7 +120,7 @@ var/list/delayed_garbage = list() /icon/finalize_qdel() del(src) -/imagine/finalize_qdel() +/image/finalize_qdel() del(src) /mob/finalize_qdel() diff --git a/code/game/machinery/alarm.dm b/code/game/machinery/alarm.dm index cd78789507e..e5c03932cc4 100644 --- a/code/game/machinery/alarm.dm +++ b/code/game/machinery/alarm.dm @@ -99,8 +99,10 @@ target_temperature = 90 /obj/machinery/alarm/Destroy() - if(radio_controller) - radio_controller.remove_object(src, frequency) + unregister_radio(src, frequency) + if(wires) + qdel(wires) + wires = null ..() /obj/machinery/alarm/New(var/loc, var/dir, var/building = 0) diff --git a/code/game/machinery/doors/airlock.dm b/code/game/machinery/doors/airlock.dm index 35e8ea30445..5b6a9af285e 100644 --- a/code/game/machinery/doors/airlock.dm +++ b/code/game/machinery/doors/airlock.dm @@ -1007,12 +1007,18 @@ About the new airlock wires panel: else wires = new/datum/wires/airlock(src) +/obj/machinery/door/airlock/initialize() if(src.closeOtherId != null) - spawn (5) - for (var/obj/machinery/door/airlock/A in world) - if(A.closeOtherId == src.closeOtherId && A != src) - src.closeOther = A - break + for (var/obj/machinery/door/airlock/A in world) + if(A.closeOtherId == src.closeOtherId && A != src) + src.closeOther = A + break + +/obj/machinery/door/airlock/Destroy() + if(wires) + qdel(wires) + wires = null + ..() // Most doors will never be deconstructed over the course of a round, // so as an optimization defer the creation of electronics until diff --git a/code/game/machinery/portable_turret.dm b/code/game/machinery/portable_turret.dm index 0cc8eded068..b1455df8adc 100644 --- a/code/game/machinery/portable_turret.dm +++ b/code/game/machinery/portable_turret.dm @@ -148,6 +148,7 @@ /obj/machinery/porta_turret/Destroy() //deletes its own cover with it qdel(cover) + cover = null ..() /obj/machinery/porta_turret/proc/isLocked(mob/user) @@ -905,6 +906,10 @@ density = 0 var/obj/machinery/porta_turret/Parent_Turret = null +/obj/machinery/porta_turret_cover/Destroy() + Parent_Turret = null + ..() + /obj/machinery/porta_turret_cover/attack_ai(mob/user) return attack_hand(user) diff --git a/code/modules/power/apc.dm b/code/modules/power/apc.dm index d6c04ec58fe..1cfdeba2f24 100644 --- a/code/modules/power/apc.dm +++ b/code/modules/power/apc.dm @@ -183,8 +183,8 @@ cell.loc = loc cell = null if(terminal) - disconnect_terminal() - + qdel(terminal) + terminal = null ..() /obj/machinery/power/apc/proc/make_terminal() diff --git a/code/modules/power/terminal.dm b/code/modules/power/terminal.dm index 24245f00e40..cec6bd57f60 100644 --- a/code/modules/power/terminal.dm +++ b/code/modules/power/terminal.dm @@ -23,6 +23,7 @@ /obj/machinery/power/terminal/Destroy() if(master) master.disconnect_terminal() + master = null return ..() /obj/machinery/power/terminal/hide(var/i) @@ -36,4 +37,4 @@ // Needed so terminals are not removed from machines list. // Powernet rebuilds need this to work properly. /obj/machinery/power/terminal/process() - return 1 + return 1