mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-07-19 11:05:03 +01:00
Garbage Collect Everything
This commit is contained in:
@@ -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)
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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.
|
||||
|
||||
@@ -33,8 +33,7 @@
|
||||
if (pulledby.pulling == src)
|
||||
pulledby.pulling = null
|
||||
pulledby = null
|
||||
..()
|
||||
return QDEL_HINT_QUEUE
|
||||
return ..()
|
||||
|
||||
/atom/movable/proc/initialize()
|
||||
return
|
||||
|
||||
@@ -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
|
||||
..()
|
||||
|
||||
@@ -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]")
|
||||
|
||||
@@ -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.
|
||||
|
||||
@@ -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
|
||||
my_atom.reagents = null
|
||||
@@ -76,6 +76,5 @@
|
||||
return
|
||||
|
||||
/datum/reagent/Destroy()
|
||||
..()
|
||||
holder = null
|
||||
return QDEL_HINT_QUEUE
|
||||
. = ..()
|
||||
holder = null
|
||||
Reference in New Issue
Block a user