From e60edf9345cf359b854cafad975c4ffdbf84f08a Mon Sep 17 00:00:00 2001 From: Fox-McCloud Date: Tue, 13 Oct 2015 20:23:26 -0400 Subject: [PATCH] Garbage Collect Everything --- code/ATMOSPHERICS/datum_pipeline.dm | 3 +-- code/datums/gas_mixture.dm | 4 ---- code/datums/material_container.dm | 3 +-- code/datums/wires/wires.dm | 3 +-- code/game/atoms_movable.dm | 3 +-- code/game/objects/structures/musician.dm | 9 ++++----- code/modules/garbage_collection/garbage_collector.dm | 3 +-- code/modules/power/powernet.dm | 3 +-- code/modules/reagents/Chemistry-Holder.dm | 5 ++--- code/modules/reagents/oldchem/reagents/_reagent_base.dm | 5 ++--- 10 files changed, 14 insertions(+), 27 deletions(-) diff --git a/code/ATMOSPHERICS/datum_pipeline.dm b/code/ATMOSPHERICS/datum_pipeline.dm index 30908f68900..cef0a02d3f6 100644 --- a/code/ATMOSPHERICS/datum_pipeline.dm +++ b/code/ATMOSPHERICS/datum_pipeline.dm @@ -22,8 +22,7 @@ var/global/list/datum/pipeline/pipe_networks = list() P.parent = null for(var/obj/machinery/atmospherics/A in other_atmosmch) A.nullifyPipenet(src) - ..() - return QDEL_HINT_QUEUE + return ..() /datum/pipeline/proc/process()//This use to be called called from the pipe networks if(update) diff --git a/code/datums/gas_mixture.dm b/code/datums/gas_mixture.dm index 36f32221f0e..ae2ffe184d9 100644 --- a/code/datums/gas_mixture.dm +++ b/code/datums/gas_mixture.dm @@ -53,10 +53,6 @@ What are the archived variables for? var/tmp/fuel_burnt = 0 -/datum/gas_mixture/Destroy() - ..() - return QDEL_HINT_QUEUE - //PV=nRT - related procedures /datum/gas_mixture/proc/heat_capacity() var/heat_capacity = HEAT_CAPACITY_CALCULATION(oxygen,carbon_dioxide,nitrogen,toxins) diff --git a/code/datums/material_container.dm b/code/datums/material_container.dm index 5de0b6e1644..8f84812e49e 100644 --- a/code/datums/material_container.dm +++ b/code/datums/material_container.dm @@ -41,8 +41,7 @@ /datum/material_container/Destroy() owner = null - ..() - return QDEL_HINT_QUEUE + return ..() //For inserting an amount of material /datum/material_container/proc/insert_amount(amt, material_type = null) diff --git a/code/datums/wires/wires.dm b/code/datums/wires/wires.dm index 4d0ec45eecb..2055c2790b7 100644 --- a/code/datums/wires/wires.dm +++ b/code/datums/wires/wires.dm @@ -48,8 +48,7 @@ var/list/wireColours = list("red", "blue", "green", "black", "orange", "brown", /datum/wires/Destroy() holder = null - ..() - return QDEL_HINT_QUEUE + return ..() /datum/wires/proc/GenerateWires() var/list/colours_to_pick = wireColours.Copy() // Get a copy, not a reference. diff --git a/code/game/atoms_movable.dm b/code/game/atoms_movable.dm index 0ed44c6aa10..d88ce84ae37 100644 --- a/code/game/atoms_movable.dm +++ b/code/game/atoms_movable.dm @@ -33,8 +33,7 @@ if (pulledby.pulling == src) pulledby.pulling = null pulledby = null - ..() - return QDEL_HINT_QUEUE + return ..() /atom/movable/proc/initialize() return diff --git a/code/game/objects/structures/musician.dm b/code/game/objects/structures/musician.dm index a1c6b4659bf..b173ece5b0b 100644 --- a/code/game/objects/structures/musician.dm +++ b/code/game/objects/structures/musician.dm @@ -22,8 +22,7 @@ /datum/song/Destroy() instrumentObj = null - ..() - return QDEL_HINT_QUEUE + return ..() // note is a number from 1-7 for A-G // acc is either "b", "n", or "#" @@ -69,7 +68,7 @@ /datum/song/proc/shouldStopPlaying(mob/user) if(instrumentObj) - //if(!user.canUseTopic(instrumentObj)) + //if(!user.canUseTopic(instrumentObj)) //return 1 return !instrumentObj.anchored // add special cases to stop in subclasses else @@ -281,7 +280,7 @@ /datum/song/proc/sanitize_tempo(new_tempo) new_tempo = abs(new_tempo) - return max(round(new_tempo, world.tick_lag), world.tick_lag) + return max(round(new_tempo, world.tick_lag), world.tick_lag) // subclass for handheld instruments, like violin /datum/song/handheld @@ -324,7 +323,7 @@ qdel(song) song = null return ..() - + /obj/structure/piano/initialize() song.tempo = song.sanitize_tempo(song.tempo) // tick_lag isn't set when the map is loaded ..() diff --git a/code/modules/garbage_collection/garbage_collector.dm b/code/modules/garbage_collection/garbage_collector.dm index 4810eadfb7b..f6675365f8d 100644 --- a/code/modules/garbage_collection/garbage_collector.dm +++ b/code/modules/garbage_collection/garbage_collector.dm @@ -160,7 +160,7 @@ var/global/datum/controller/process/garbage_collector/garbageCollector */ /datum/proc/Destroy() tag = null - return QDEL_HINT_HARDDEL_NOW // By default, assume that queueing any given datum is unsafe + return QDEL_HINT_QUEUE // Garbage Collect everything. // If something gets deleted directly, make sure its Destroy proc is still called /datum/Del() @@ -181,4 +181,3 @@ var/global/datum/controller/process/garbage_collector/garbageCollector /proc/gcwarning(msg) log_to_dd("## GC WARNING: [msg]") - \ No newline at end of file diff --git a/code/modules/power/powernet.dm b/code/modules/power/powernet.dm index 29d8af7a12f..d40281eae65 100644 --- a/code/modules/power/powernet.dm +++ b/code/modules/power/powernet.dm @@ -29,8 +29,7 @@ M.powernet = null powernets -= src - ..() - return QDEL_HINT_QUEUE + return ..() //Returns the amount of excess power (before refunding to SMESs) from last tick. //This is for machines that might adjust their power consumption using this data. diff --git a/code/modules/reagents/Chemistry-Holder.dm b/code/modules/reagents/Chemistry-Holder.dm index 333dfc97114..f98c01072f6 100644 --- a/code/modules/reagents/Chemistry-Holder.dm +++ b/code/modules/reagents/Chemistry-Holder.dm @@ -602,12 +602,11 @@ atom/proc/create_reagents(var/max_vol) reagents.my_atom = src /datum/reagents/Destroy() - ..() + . = ..() processing_objects.Remove(src) for(var/datum/reagent/R in reagent_list) qdel(R) reagent_list.Cut() reagent_list = null if(my_atom && my_atom.reagents == src) - my_atom.reagents = null - return QDEL_HINT_QUEUE \ No newline at end of file + my_atom.reagents = null \ No newline at end of file diff --git a/code/modules/reagents/oldchem/reagents/_reagent_base.dm b/code/modules/reagents/oldchem/reagents/_reagent_base.dm index d2ca7ff569e..0dcf2e98c30 100644 --- a/code/modules/reagents/oldchem/reagents/_reagent_base.dm +++ b/code/modules/reagents/oldchem/reagents/_reagent_base.dm @@ -76,6 +76,5 @@ return /datum/reagent/Destroy() - ..() - holder = null - return QDEL_HINT_QUEUE \ No newline at end of file + . = ..() + holder = null \ No newline at end of file