[MIRROR] bunch of misc fixes (#10084)

Co-authored-by: Kashargul <144968721+Kashargul@users.noreply.github.com>
This commit is contained in:
CHOMPStation2StaffMirrorBot
2025-02-07 07:23:35 -07:00
committed by GitHub
parent 08485074a9
commit 07017b04a7
17 changed files with 29 additions and 48 deletions

View File

@@ -71,28 +71,28 @@
return 1 return 1
/obj/machinery/atmospherics/pipe/return_air() /obj/machinery/atmospherics/pipe/return_air()
if(!parent) if(!QDELETED(src) || !parent)
parent = new /datum/pipeline() parent = new /datum/pipeline()
parent.build_pipeline(src) parent.build_pipeline(src)
return parent.air return parent.air
/obj/machinery/atmospherics/pipe/build_network() /obj/machinery/atmospherics/pipe/build_network()
if(!parent) if(!QDELETED(src) || !parent)
parent = new /datum/pipeline() parent = new /datum/pipeline()
parent.build_pipeline(src) parent.build_pipeline(src)
return parent.return_network() return parent.return_network()
/obj/machinery/atmospherics/pipe/network_expand(datum/pipe_network/new_network, obj/machinery/atmospherics/pipe/reference) /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 = new /datum/pipeline()
parent.build_pipeline(src) parent.build_pipeline(src)
return parent.network_expand(new_network, reference) return parent.network_expand(new_network, reference)
/obj/machinery/atmospherics/pipe/return_network(obj/machinery/atmospherics/reference) /obj/machinery/atmospherics/pipe/return_network(obj/machinery/atmospherics/reference)
if(!parent) if(!QDELETED(src) || !parent)
parent = new /datum/pipeline() parent = new /datum/pipeline()
parent.build_pipeline(src) parent.build_pipeline(src)

View File

@@ -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)

View File

@@ -40,19 +40,17 @@
///Used for doing dry runs of the reference finder, to test for feature completeness ///Used for doing dry runs of the reference finder, to test for feature completeness
//#define REFERENCE_TRACKING_DEBUG //#define REFERENCE_TRACKING_DEBUG
#ifdef FIND_REF_NO_CHECK_TICK
/world
loop_checks = FALSE
#endif
///Run a lookup on things hard deleting by default. ///Run a lookup on things hard deleting by default.
//#define GC_FAILURE_HARD_LOOKUP //#define GC_FAILURE_HARD_LOOKUP
#ifdef GC_FAILURE_HARD_LOOKUP #ifdef GC_FAILURE_HARD_LOOKUP
#define FIND_REF_NO_CHECK_TICK #define FIND_REF_NO_CHECK_TICK
#endif //ifdef GC_FAILURE_HARD_LOOKUP #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 #endif //ifdef REFERENCE_TRACKING
// Standard flags to use for browser-options // Standard flags to use for browser-options

View File

@@ -222,7 +222,6 @@
//CHOMPEdit - entire proc changed basically to use recursive listening //CHOMPEdit - entire proc changed basically to use recursive listening
/proc/get_mobs_in_radio_ranges(var/list/obj/item/radio/radios) /proc/get_mobs_in_radio_ranges(var/list/obj/item/radio/radios)
//set background = 1 //CHOMPEdit
. = list() . = list()
// Returns a list of mobs who can hear any of the radios given in @radios // 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) for(var/obj/item/radio/R as anything in radios)

View File

@@ -105,7 +105,7 @@ SUBSYSTEM_DEF(machines)
while(current_run.len) while(current_run.len)
var/datum/pipe_network/PN = current_run[current_run.len] var/datum/pipe_network/PN = current_run[current_run.len]
current_run.len-- current_run.len--
if(!PN || QDELETED(PN)) //CHOMPEdit if(!PN || QDELETED(PN))
networks.Remove(PN) networks.Remove(PN)
DISABLE_BITFIELD(PN?.datum_flags, DF_ISPROCESSING) DISABLE_BITFIELD(PN?.datum_flags, DF_ISPROCESSING)
else else
@@ -122,7 +122,7 @@ SUBSYSTEM_DEF(machines)
while(current_run.len) while(current_run.len)
var/obj/machinery/M = current_run[current_run.len] var/obj/machinery/M = current_run[current_run.len]
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) processing_machines.Remove(M)
DISABLE_BITFIELD(M?.datum_flags, DF_ISPROCESSING) DISABLE_BITFIELD(M?.datum_flags, DF_ISPROCESSING)
if(MC_TICK_CHECK) if(MC_TICK_CHECK)

View File

@@ -139,8 +139,8 @@ SUBSYSTEM_DEF(plants)
return return
/datum/controller/subsystem/plants/proc/add_plant(var/obj/effect/plant/plant) /datum/controller/subsystem/plants/proc/add_plant(var/obj/effect/plant/plant)
if(!QDELETED(plant)) //CHOMPEdit GC if(!QDELETED(plant))
processing |= plant //CHOMPEdit GC processing |= plant
/datum/controller/subsystem/plants/proc/remove_plant(var/obj/effect/plant/plant) /datum/controller/subsystem/plants/proc/remove_plant(var/obj/effect/plant/plant)
processing -= plant processing -= plant

View File

@@ -1,3 +1,4 @@
// Drop in replacement for reference tracking
#ifdef REFERENCE_TRACKING #ifdef REFERENCE_TRACKING
#define REFSEARCH_RECURSE_LIMIT 64 #define REFSEARCH_RECURSE_LIMIT 64

View File

@@ -45,7 +45,7 @@
render_target = ref(src) render_target = ref(src)
em_block = new(src, render_target) em_block = new(src, render_target)
add_overlay(list(em_block), TRUE) 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) if(opacity)
AddElement(/datum/element/light_blocking) 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) 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) AddComponent(/datum/component/overlay_lighting, is_directional = TRUE, starts_on = light_on)
/atom/movable/Destroy() /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) for(var/atom/movable/AM in contents)
qdel(AM) qdel(AM)
@@ -644,3 +648,9 @@
/atom/movable/proc/get_cell() /atom/movable/proc/get_cell()
return return
/atom/movable/proc/emblocker_gc(var/datum/source)
UnregisterSignal(source, COMSIG_PARENT_QDELETING)
cut_overlay(source)
if(em_block == source)
em_block = null

View File

@@ -9,10 +9,6 @@
set_listening(listening_recursive) set_listening(listening_recursive)
/atom/movable/Destroy() /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) 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) /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 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) /atom/movable/proc/abstract_move(atom/new_loc)
var/atom/old_loc = loc var/atom/old_loc = loc
var/direction = get_dir(old_loc, new_loc) var/direction = get_dir(old_loc, new_loc)

View File

@@ -14,7 +14,7 @@
var/max_mob_buckle_size = MOB_LARGE var/max_mob_buckle_size = MOB_LARGE
/obj/structure/bed/chair/wheelchair/Initialize(var/newloc, var/new_material, var/new_padding_material) /obj/structure/bed/chair/wheelchair/Initialize(var/newloc, var/new_material, var/new_padding_material)
..() . = ..()
update_icon() update_icon()
/obj/structure/bed/chair/wheelchair/motor /obj/structure/bed/chair/wheelchair/motor

View File

@@ -171,7 +171,7 @@
/datum/ai_holder/proc/walk_to_target() /datum/ai_holder/proc/walk_to_target()
ai_log("walk_to_target() : Entering.", AI_LOG_DEBUG) ai_log("walk_to_target() : Entering.", AI_LOG_DEBUG)
// Make sure we can still chase/attack them. // 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) ai_log("walk_to_target() : Lost target.", AI_LOG_INFO)
lose_target() lose_target()
return return

View File

@@ -212,7 +212,6 @@
density = FALSE density = FALSE
/obj/effect/plant/proc/calc_dir() /obj/effect/plant/proc/calc_dir()
//set background = 1 //CHOMPEdit
var/turf/T = get_turf(src) var/turf/T = get_turf(src)
if(!istype(T)) return if(!istype(T)) return

View File

@@ -2,7 +2,6 @@
/mob/living/carbon/alien/Life() /mob/living/carbon/alien/Life()
set invisibility = 0 set invisibility = 0
//set background = 1 //CHOMPEdit
if (transforming) return if (transforming) return
if(!loc) return if(!loc) return

View File

@@ -1,6 +1,5 @@
/mob/living/silicon/robot/Life() /mob/living/silicon/robot/Life()
set invisibility = 0 set invisibility = 0
//set background = 1 CHOMPEdit
if (transforming) if (transforming)
return return

View File

@@ -44,8 +44,6 @@
if(my_mob.client) if(my_mob.client)
my_mob.client.images -= entopic_images my_mob.client.images -= entopic_images
//CHOMPEdit begin
/mob/Destroy() /mob/Destroy()
. = ..() . = ..()
entopic_users -= src entopic_users -= src
//CHOMPEdit end

View File

@@ -128,7 +128,7 @@
var/style = pick(styles) var/style = pick(styles)
icon_state = style icon_state = style
item_state = style item_state = style
..() . = ..()
/obj/item/cracker/shrinking /obj/item/cracker/shrinking
name = "shrinking bluespace cracker" name = "shrinking bluespace cracker"

View File

@@ -345,7 +345,6 @@
#include "code\ATMOSPHERICS\pipes\manifold.dm" #include "code\ATMOSPHERICS\pipes\manifold.dm"
#include "code\ATMOSPHERICS\pipes\manifold4w.dm" #include "code\ATMOSPHERICS\pipes\manifold4w.dm"
#include "code\ATMOSPHERICS\pipes\pipe_base.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\pipe_base_vr.dm"
#include "code\ATMOSPHERICS\pipes\simple.dm" #include "code\ATMOSPHERICS\pipes\simple.dm"
#include "code\ATMOSPHERICS\pipes\tank.dm" #include "code\ATMOSPHERICS\pipes\tank.dm"
@@ -475,9 +474,9 @@
#include "code\datums\organs.dm" #include "code\datums\organs.dm"
#include "code\datums\position_point_vector.dm" #include "code\datums\position_point_vector.dm"
#include "code\datums\progressbar.dm" #include "code\datums\progressbar.dm"
#include "code\datums\reference_tracking_ch.dm"
#include "code\datums\riding.dm" #include "code\datums\riding.dm"
#include "code\datums\signals.dm" #include "code\datums\signals.dm"
#include "code\datums\reference_tracking_new.dm"
#include "code\datums\soul_link.dm" #include "code\datums\soul_link.dm"
#include "code\datums\sun.dm" #include "code\datums\sun.dm"
#include "code\datums\verb_callbacks.dm" #include "code\datums\verb_callbacks.dm"