mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-10 18:22:39 +00:00
GC cleanup (#8211)
This commit is contained in:
@@ -99,3 +99,10 @@ SUBSYSTEM_DEF(mobs)
|
||||
/datum/controller/subsystem/mobs/critfail()
|
||||
..()
|
||||
log_recent()
|
||||
|
||||
//CHOMPEdit Begin
|
||||
//Mobs need to immediately removed from the SS list on Destroy
|
||||
/mob/Destroy()
|
||||
. = ..()
|
||||
SSmobs.currentrun -= src
|
||||
//CHOMPEdit End
|
||||
|
||||
@@ -141,7 +141,8 @@ SUBSYSTEM_DEF(plants)
|
||||
return
|
||||
|
||||
/datum/controller/subsystem/plants/proc/add_plant(var/obj/effect/plant/plant)
|
||||
processing |= plant
|
||||
if(!QDELETED(plant)) //CHOMPEdit GC
|
||||
processing |= plant //CHOMPEdit GC
|
||||
|
||||
/datum/controller/subsystem/plants/proc/remove_plant(var/obj/effect/plant/plant)
|
||||
processing -= plant
|
||||
|
||||
@@ -146,3 +146,10 @@ SUBSYSTEM_DEF(radiation)
|
||||
return
|
||||
var/turf/epicentre = locate(round(world.maxx / 2), round(world.maxy / 2), source.z)
|
||||
flat_radiate(epicentre, power, world.maxx, respect_maint)
|
||||
|
||||
//CHOMPEdit Begin
|
||||
//Putting this here so it can be promptly nuked if I ever redo the radiation subsystem
|
||||
/mob/living/Destroy()
|
||||
. = ..()
|
||||
SSradiation.listeners -= src
|
||||
//CHOMPEdit End
|
||||
|
||||
@@ -45,6 +45,7 @@
|
||||
render_target = ref(src)
|
||||
em_block = new(src, render_target)
|
||||
add_overlay(list(em_block), TRUE)
|
||||
RegisterSignal(em_block, COMSIG_PARENT_QDELETING, PROC_REF(emblocker_gc)) //CHOMPEdit deal with emblocker deleting. see atoms_movable_ch.dm
|
||||
if(opacity)
|
||||
AddElement(/datum/element/light_blocking)
|
||||
if(icon_scale_x != DEFAULT_ICON_SCALE_X || icon_scale_y != DEFAULT_ICON_SCALE_Y || icon_rotation != DEFAULT_ICON_ROTATION)
|
||||
|
||||
@@ -63,3 +63,9 @@
|
||||
|
||||
/atom/movable/proc/show_message(msg, type, alt, alt_type)//Message, type of message (1 or 2), alternative message, alt message type (1 or 2)
|
||||
return
|
||||
|
||||
/atom/movable/proc/emblocker_gc(var/datum/source)
|
||||
UnregisterSignal(source, COMSIG_PARENT_QDELETING)
|
||||
cut_overlay(source)
|
||||
if(em_block == source)
|
||||
em_block = null
|
||||
|
||||
@@ -469,7 +469,7 @@
|
||||
impacted_mobs.Cut()
|
||||
impacted_mobs = null
|
||||
|
||||
qdel(trajectory)
|
||||
QDEL_NULL(trajectory) //CHOMPEdit
|
||||
cleanup_beam_segments()
|
||||
|
||||
if(my_case)
|
||||
|
||||
@@ -115,6 +115,11 @@
|
||||
dark_tile.unlinked()
|
||||
return ..()
|
||||
|
||||
/obj/effect/dark/Destroy()
|
||||
. = ..()
|
||||
if(linked_node)
|
||||
linked_node.children_effects -= src
|
||||
|
||||
/obj/effect/dark/process()
|
||||
set background = 1
|
||||
var/turf/U = get_turf(src)
|
||||
|
||||
Reference in New Issue
Block a user