diff --git a/code/ATMOSPHERICS/pipes/pipe_base.dm b/code/ATMOSPHERICS/pipes/pipe_base.dm index 9857753909..e384751cc2 100644 --- a/code/ATMOSPHERICS/pipes/pipe_base.dm +++ b/code/ATMOSPHERICS/pipes/pipe_base.dm @@ -71,28 +71,28 @@ return 1 /obj/machinery/atmospherics/pipe/return_air() - if(!parent) + if(!QDELETED(src) || !parent) parent = new /datum/pipeline() parent.build_pipeline(src) return parent.air /obj/machinery/atmospherics/pipe/build_network() - if(!parent) + if(!QDELETED(src) || !parent) parent = new /datum/pipeline() parent.build_pipeline(src) return parent.return_network() /obj/machinery/atmospherics/pipe/network_expand(datum/pipe_network/new_network, obj/machinery/atmospherics/pipe/reference) - if(!parent) + if(!QDELETED(src) || !parent) parent = new /datum/pipeline() parent.build_pipeline(src) return parent.network_expand(new_network, reference) /obj/machinery/atmospherics/pipe/return_network(obj/machinery/atmospherics/reference) - if(!parent) + if(!QDELETED(src) || !parent) parent = new /datum/pipeline() parent.build_pipeline(src) diff --git a/code/ATMOSPHERICS/pipes/pipe_base_ch.dm b/code/ATMOSPHERICS/pipes/pipe_base_ch.dm deleted file mode 100644 index 44b1bcf139..0000000000 --- a/code/ATMOSPHERICS/pipes/pipe_base_ch.dm +++ /dev/null @@ -1,11 +0,0 @@ -/obj/machinery/atmospherics/pipe/return_air() - if(!QDELETED(src)) return ..() - -/obj/machinery/atmospherics/pipe/build_network() - if(!QDELETED(src)) return ..() - -/obj/machinery/atmospherics/pipe/network_expand(datum/pipe_network/new_network, obj/machinery/atmospherics/pipe/reference) - if(!QDELETED(src)) return ..(new_network,reference) - -/obj/machinery/atmospherics/pipe/return_network(obj/machinery/atmospherics/reference) - if(!QDELETED(src)) return ..(reference) diff --git a/code/__defines/_compile_options.dm b/code/__defines/_compile_options.dm index 37fca65861..f2fdac3f96 100644 --- a/code/__defines/_compile_options.dm +++ b/code/__defines/_compile_options.dm @@ -40,19 +40,17 @@ ///Used for doing dry runs of the reference finder, to test for feature completeness //#define REFERENCE_TRACKING_DEBUG +#ifdef FIND_REF_NO_CHECK_TICK +/world + loop_checks = FALSE +#endif + ///Run a lookup on things hard deleting by default. //#define GC_FAILURE_HARD_LOOKUP #ifdef GC_FAILURE_HARD_LOOKUP #define FIND_REF_NO_CHECK_TICK #endif //ifdef GC_FAILURE_HARD_LOOKUP -//CHOMPEdit begin -#ifdef FIND_REF_NO_CHECK_TICK -/world - loop_checks = FALSE -#endif -//CHOMPEdit end - #endif //ifdef REFERENCE_TRACKING // Standard flags to use for browser-options diff --git a/code/_helpers/game.dm b/code/_helpers/game.dm index 8068f3cec3..a24004ebe4 100644 --- a/code/_helpers/game.dm +++ b/code/_helpers/game.dm @@ -222,7 +222,6 @@ //CHOMPEdit - entire proc changed basically to use recursive listening /proc/get_mobs_in_radio_ranges(var/list/obj/item/radio/radios) - //set background = 1 //CHOMPEdit . = list() // Returns a list of mobs who can hear any of the radios given in @radios for(var/obj/item/radio/R as anything in radios) diff --git a/code/controllers/subsystems/machines.dm b/code/controllers/subsystems/machines.dm index c9371c9b71..5fc3e67f94 100644 --- a/code/controllers/subsystems/machines.dm +++ b/code/controllers/subsystems/machines.dm @@ -105,7 +105,7 @@ SUBSYSTEM_DEF(machines) while(current_run.len) var/datum/pipe_network/PN = current_run[current_run.len] current_run.len-- - if(!PN || QDELETED(PN)) //CHOMPEdit + if(!PN || QDELETED(PN)) networks.Remove(PN) DISABLE_BITFIELD(PN?.datum_flags, DF_ISPROCESSING) else @@ -122,7 +122,7 @@ SUBSYSTEM_DEF(machines) while(current_run.len) var/obj/machinery/M = current_run[current_run.len] current_run.len-- - if(!istype(M) || QDELETED(M) || (M.process(wait) == PROCESS_KILL)) //CHOMPEdit + if(!istype(M) || QDELETED(M) || (M.process(wait) == PROCESS_KILL)) processing_machines.Remove(M) DISABLE_BITFIELD(M?.datum_flags, DF_ISPROCESSING) if(MC_TICK_CHECK) diff --git a/code/controllers/subsystems/plants.dm b/code/controllers/subsystems/plants.dm index f4e0e3985c..dbcc40e8f9 100644 --- a/code/controllers/subsystems/plants.dm +++ b/code/controllers/subsystems/plants.dm @@ -139,8 +139,8 @@ SUBSYSTEM_DEF(plants) return /datum/controller/subsystem/plants/proc/add_plant(var/obj/effect/plant/plant) - if(!QDELETED(plant)) //CHOMPEdit GC - processing |= plant //CHOMPEdit GC + if(!QDELETED(plant)) + processing |= plant /datum/controller/subsystem/plants/proc/remove_plant(var/obj/effect/plant/plant) processing -= plant diff --git a/code/datums/reference_tracking_ch.dm b/code/datums/reference_tracking_new.dm similarity index 99% rename from code/datums/reference_tracking_ch.dm rename to code/datums/reference_tracking_new.dm index a3cd94a611..56200a7d4e 100644 --- a/code/datums/reference_tracking_ch.dm +++ b/code/datums/reference_tracking_new.dm @@ -1,3 +1,4 @@ +// Drop in replacement for reference tracking #ifdef REFERENCE_TRACKING #define REFSEARCH_RECURSE_LIMIT 64 diff --git a/code/game/atoms_movable.dm b/code/game/atoms_movable.dm index 4b395e1516..e151d86386 100644 --- a/code/game/atoms_movable.dm +++ b/code/game/atoms_movable.dm @@ -45,7 +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 + RegisterSignal(em_block, COMSIG_PARENT_QDELETING, PROC_REF(emblocker_gc)) 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) @@ -59,6 +59,10 @@ AddComponent(/datum/component/overlay_lighting, is_directional = TRUE, starts_on = light_on) /atom/movable/Destroy() + if(em_block) + cut_overlay(em_block) + UnregisterSignal(em_block, COMSIG_PARENT_QDELETING) + QDEL_NULL(em_block) . = ..() for(var/atom/movable/AM in contents) qdel(AM) @@ -644,3 +648,9 @@ /atom/movable/proc/get_cell() return + +/atom/movable/proc/emblocker_gc(var/datum/source) + UnregisterSignal(source, COMSIG_PARENT_QDELETING) + cut_overlay(source) + if(em_block == source) + em_block = null diff --git a/code/game/atoms_movable_ch.dm b/code/game/atoms_movable_ch.dm index 89940d10b0..a02ea21d0b 100644 --- a/code/game/atoms_movable_ch.dm +++ b/code/game/atoms_movable_ch.dm @@ -9,10 +9,6 @@ set_listening(listening_recursive) /atom/movable/Destroy() - if(em_block) - cut_overlay(em_block) - UnregisterSignal(em_block, COMSIG_PARENT_QDELETING) - QDEL_NULL(em_block) . = ..() set_listening(NON_LISTENING_ATOM) @@ -65,12 +61,6 @@ /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 - /atom/movable/proc/abstract_move(atom/new_loc) var/atom/old_loc = loc var/direction = get_dir(old_loc, new_loc) diff --git a/code/game/objects/structures/stool_bed_chair_nest/wheelchair.dm b/code/game/objects/structures/stool_bed_chair_nest/wheelchair.dm index 8d56aa70d4..4b1703de78 100644 --- a/code/game/objects/structures/stool_bed_chair_nest/wheelchair.dm +++ b/code/game/objects/structures/stool_bed_chair_nest/wheelchair.dm @@ -14,7 +14,7 @@ var/max_mob_buckle_size = MOB_LARGE /obj/structure/bed/chair/wheelchair/Initialize(var/newloc, var/new_material, var/new_padding_material) - ..() + . = ..() update_icon() /obj/structure/bed/chair/wheelchair/motor diff --git a/code/modules/ai/ai_holder_combat.dm b/code/modules/ai/ai_holder_combat.dm index 9bef7cdada..ef0eeb302a 100644 --- a/code/modules/ai/ai_holder_combat.dm +++ b/code/modules/ai/ai_holder_combat.dm @@ -171,7 +171,7 @@ /datum/ai_holder/proc/walk_to_target() ai_log("walk_to_target() : Entering.", AI_LOG_DEBUG) // Make sure we can still chase/attack them. - if(!target || !can_attack(target)) + if(QDELETED(target) || !can_attack(target)) ai_log("walk_to_target() : Lost target.", AI_LOG_INFO) lose_target() return diff --git a/code/modules/hydroponics/spreading/spreading.dm b/code/modules/hydroponics/spreading/spreading.dm index 6188822494..25647561fd 100644 --- a/code/modules/hydroponics/spreading/spreading.dm +++ b/code/modules/hydroponics/spreading/spreading.dm @@ -212,7 +212,6 @@ density = FALSE /obj/effect/plant/proc/calc_dir() - //set background = 1 //CHOMPEdit var/turf/T = get_turf(src) if(!istype(T)) return diff --git a/code/modules/mob/living/carbon/alien/life.dm b/code/modules/mob/living/carbon/alien/life.dm index 399eb16b32..cea33bfc65 100644 --- a/code/modules/mob/living/carbon/alien/life.dm +++ b/code/modules/mob/living/carbon/alien/life.dm @@ -2,7 +2,6 @@ /mob/living/carbon/alien/Life() set invisibility = 0 - //set background = 1 //CHOMPEdit if (transforming) return if(!loc) return diff --git a/code/modules/mob/living/silicon/robot/life.dm b/code/modules/mob/living/silicon/robot/life.dm index f45cb44abc..79f008fbdc 100644 --- a/code/modules/mob/living/silicon/robot/life.dm +++ b/code/modules/mob/living/silicon/robot/life.dm @@ -1,6 +1,5 @@ /mob/living/silicon/robot/Life() set invisibility = 0 - //set background = 1 CHOMPEdit if (transforming) return diff --git a/code/modules/mob/mob_planes_vr.dm b/code/modules/mob/mob_planes_vr.dm index 6e4377d8a9..fd3e024080 100644 --- a/code/modules/mob/mob_planes_vr.dm +++ b/code/modules/mob/mob_planes_vr.dm @@ -44,8 +44,6 @@ if(my_mob.client) my_mob.client.images -= entopic_images -//CHOMPEdit begin /mob/Destroy() . = ..() entopic_users -= src -//CHOMPEdit end diff --git a/code/modules/vore/resizing/crackers.dm b/code/modules/vore/resizing/crackers.dm index 6ce47ec6c3..5d02bdc4dc 100644 --- a/code/modules/vore/resizing/crackers.dm +++ b/code/modules/vore/resizing/crackers.dm @@ -128,7 +128,7 @@ var/style = pick(styles) icon_state = style item_state = style - ..() + . = ..() /obj/item/cracker/shrinking name = "shrinking bluespace cracker" diff --git a/vorestation.dme b/vorestation.dme index d6976b82d6..0bcd80e33e 100644 --- a/vorestation.dme +++ b/vorestation.dme @@ -345,7 +345,6 @@ #include "code\ATMOSPHERICS\pipes\manifold.dm" #include "code\ATMOSPHERICS\pipes\manifold4w.dm" #include "code\ATMOSPHERICS\pipes\pipe_base.dm" -#include "code\ATMOSPHERICS\pipes\pipe_base_ch.dm" #include "code\ATMOSPHERICS\pipes\pipe_base_vr.dm" #include "code\ATMOSPHERICS\pipes\simple.dm" #include "code\ATMOSPHERICS\pipes\tank.dm" @@ -475,9 +474,9 @@ #include "code\datums\organs.dm" #include "code\datums\position_point_vector.dm" #include "code\datums\progressbar.dm" -#include "code\datums\reference_tracking_ch.dm" #include "code\datums\riding.dm" #include "code\datums\signals.dm" +#include "code\datums\reference_tracking_new.dm" #include "code\datums\soul_link.dm" #include "code\datums\sun.dm" #include "code\datums\verb_callbacks.dm"