diff --git a/code/__DEFINES/dcs/signals.dm b/code/__DEFINES/dcs/signals.dm index fe26af36488..9dd3aa37260 100644 --- a/code/__DEFINES/dcs/signals.dm +++ b/code/__DEFINES/dcs/signals.dm @@ -88,3 +88,11 @@ #define COMSIG_INPUT_KEY_DROP "drop_key_pressed" /*******Component Specific Signals*******/ + +/** + * Raised against objects in a turf when that turf is attacked by a mob. + * Arg 1 is the object being checked. + * Arg 2 is the mob attacking the turf. + * Arg 3 is the turf. + */ +#define COMSIG_HANDLE_HAND_INTERCEPTION "handle_hand_interception" diff --git a/code/__DEFINES/qdel.dm b/code/__DEFINES/qdel.dm index 3af7532401e..b0cbb3e2597 100644 --- a/code/__DEFINES/qdel.dm +++ b/code/__DEFINES/qdel.dm @@ -73,9 +73,9 @@ // This is a bit hacky, we do it to avoid people relying on a return value for the macro // If you need that you should use QDEL_IN_STOPPABLE instead #define QDEL_IN(item, time) ; \ - addtimer(CALLBACK(GLOBAL_PROC, GLOBAL_PROC_REF(qdel), (time) > GC_FILTER_QUEUE ? WEAKREF(item) : item), time); -#define QDEL_IN_STOPPABLE(item, time) addtimer(CALLBACK(GLOBAL_PROC, GLOBAL_PROC_REF(qdel), (time) > GC_FILTER_QUEUE ? WEAKREF(item) : item), time, TIMER_STOPPABLE) -#define QDEL_IN_CLIENT_TIME(item, time) addtimer(CALLBACK(GLOBAL_PROC, GLOBAL_PROC_REF(qdel), item), time, TIMER_STOPPABLE | TIMER_CLIENT_TIME) + addtimer(CALLBACK(GLOBAL_PROC, GLOBAL_PROC_REF(qdel), (time) > GC_FILTER_QUEUE ? WEAKREF(item) : item), time, TIMER_DELETE_ME); +#define QDEL_IN_STOPPABLE(item, time) addtimer(CALLBACK(GLOBAL_PROC, GLOBAL_PROC_REF(qdel), (time) > GC_FILTER_QUEUE ? WEAKREF(item) : item), time, TIMER_STOPPABLE | TIMER_DELETE_ME) +#define QDEL_IN_CLIENT_TIME(item, time) addtimer(CALLBACK(GLOBAL_PROC, GLOBAL_PROC_REF(qdel), item), time, TIMER_STOPPABLE | TIMER_CLIENT_TIME | TIMER_DELETE_ME) //Bay uses the check before deleting something, to ensure it's not null, TG does not, and since I don't want to go hunt down 3 billion runtimes, we keep bay's version diff --git a/code/_onclick/hud/radial.dm b/code/_onclick/hud/radial.dm index ac60f6cd18d..bd59f45e1d6 100644 --- a/code/_onclick/hud/radial.dm +++ b/code/_onclick/hud/radial.dm @@ -283,12 +283,13 @@ GLOBAL_LIST_EMPTY(radial_menus) hide() close_button.parent = null menu_holder.vis_contents = null - elements -= src for(var/atom/movable/screen/radial/slice/possibly_our_child in elements) if(possibly_our_child.parent == src) possibly_our_child.parent = null + elements.Cut() + QDEL_NULL(menu_holder) QDEL_NULL(close_button) QDEL_NULL(custom_check_callback) diff --git a/code/controllers/subsystems/zcopy.dm b/code/controllers/subsystems/zcopy.dm index 11cc4d57328..4a17eb3cecf 100644 --- a/code/controllers/subsystems/zcopy.dm +++ b/code/controllers/subsystems/zcopy.dm @@ -273,6 +273,9 @@ SUBSYSTEM_DEF(zcopy) // Don't queue deleted stuff, stuff that's not visible, blacklisted stuff, or stuff that's centered on another tile but intersects ours. continue + if (QDELETED(object.bound_overlay)) + object.bound_overlay = null + if (!object.bound_overlay) // Generate a new overlay if the atom doesn't already have one. object.bound_overlay = new(T) object.bound_overlay.associated_atom = object diff --git a/code/datums/components/turf_click/turf_hand.dm b/code/datums/components/turf_click/turf_hand.dm index 82e112f0f3c..4b178a6e453 100644 --- a/code/datums/components/turf_click/turf_hand.dm +++ b/code/datums/components/turf_click/turf_hand.dm @@ -1,19 +1,34 @@ -/* - This component is used on airlocks and cult runes. - When a mob [attack_hand]s a turf, it will look for objects in itself containing this component. - If such is found, it will call attack_hand on that atom - - When multiple of these components are in the tile, the one with the highest priority wins it. -*/ +/** + * This component is used on airlocks and cult runes. + * When a mob [attack_hand]s a turf, it will look for objects in itself containing this component. + * If such is found, it will call attack_hand on that atom + */ +#define TURF_HAND_COMPONENT /datum/component/turf_hand /datum/component/turf_hand - var/priority = 1 - var/atom/our_owner -/datum/component/turf_hand/Initialize(var/priority = 1) - ..() - if(isatom(parent)) - our_owner = parent - src.priority = priority +/datum/component/turf_hand/Initialize() + . = ..() + if (!parent) + return -/datum/component/turf_hand/proc/OnHandInterception(var/mob/user) - return our_owner.attack_hand(user) + RegisterSignal(parent, COMSIG_HANDLE_HAND_INTERCEPTION, PROC_REF(OnHandInterception), override = TRUE) + +/datum/component/turf_hand/Destroy() + if (parent) + UnregisterSignal(parent, COMSIG_HANDLE_HAND_INTERCEPTION) + + return ..() + +/datum/component/turf_hand/proc/OnHandInterception(var/atom/origin, var/mob/attacker, var/turf/turf) + // SIGNAL_HANDLER + // For the record you shouldn't comment out SIGNAL_HANDLER on signals for your code. + // But StrongDMM doesn't care that I'm calling a proc on ASYNC. + if (!isatom(parent)) + qdel(src) // Invalid parent. Make the component kill itself. + return + + if (!attacker) + return + + var/atom/owner = parent + INVOKE_ASYNC(owner, TYPE_PROC_REF(/atom, attack_hand), attacker) diff --git a/code/game/atoms_movable.dm b/code/game/atoms_movable.dm index 28c5b70a2f8..8332eef368b 100644 --- a/code/game/atoms_movable.dm +++ b/code/game/atoms_movable.dm @@ -100,7 +100,7 @@ /atom/movable/Destroy(force) if(orbiting) - stop_orbit() + orbiting.end_orbit(src) QDEL_NULL(emissive_overlay) diff --git a/code/game/machinery/atmoalter/portable_atmospherics.dm b/code/game/machinery/atmoalter/portable_atmospherics.dm index e78ae420981..8613fa95736 100644 --- a/code/game/machinery/atmoalter/portable_atmospherics.dm +++ b/code/game/machinery/atmoalter/portable_atmospherics.dm @@ -154,6 +154,10 @@ var/last_power_draw = 0 var/obj/item/cell/cell +/obj/machinery/portable_atmospherics/powered/Destroy() + QDEL_NULL(cell) + return ..() + /obj/machinery/portable_atmospherics/powered/powered() if(use_power) //using area power return ..() diff --git a/code/game/machinery/doors/door.dm b/code/game/machinery/doors/door.dm index 86fdd0dddc6..c1dafd52822 100644 --- a/code/game/machinery/doors/door.dm +++ b/code/game/machinery/doors/door.dm @@ -99,7 +99,7 @@ update_nearby_tiles(need_rebuild=1) if(turf_hand_priority) - AddComponent(/datum/component/turf_hand, turf_hand_priority) + AddComponent(TURF_HAND_COMPONENT) /obj/machinery/door/Move(new_loc, new_dir) . = ..() diff --git a/code/game/machinery/floodlight.dm b/code/game/machinery/floodlight.dm index d30535a9705..3c04132f6c2 100644 --- a/code/game/machinery/floodlight.dm +++ b/code/game/machinery/floodlight.dm @@ -29,6 +29,10 @@ . = ..() cell = new /obj/item/cell(src) +/obj/machinery/floodlight/Destroy() + QDEL_NULL(cell) + return ..() + /obj/machinery/floodlight/update_icon() ClearOverlays() icon_state = "flood[open ? "o" : ""][open && cell ? "b" : ""]0[on]" diff --git a/code/game/machinery/spaceheater.dm b/code/game/machinery/spaceheater.dm index ecc1064beea..41985bec25e 100644 --- a/code/game/machinery/spaceheater.dm +++ b/code/game/machinery/spaceheater.dm @@ -34,6 +34,11 @@ env = loc.return_air() update_icon() +/obj/machinery/space_heater/Destroy() + env = null + QDEL_NULL(cell) + return ..() + /obj/machinery/space_heater/update_icon() ClearOverlays() if(!on) diff --git a/code/game/objects/effects/chem/water.dm b/code/game/objects/effects/chem/water.dm index 98473a47998..e342623a49b 100644 --- a/code/game/objects/effects/chem/water.dm +++ b/code/game/objects/effects/chem/water.dm @@ -5,30 +5,40 @@ mouse_opacity = MOUSE_OPACITY_TRANSPARENT pass_flags = PASSTABLE | PASSGRILLE -/obj/effect/effect/water/New(loc) - ..() +/obj/effect/effect/water/Initialize() + . = ..() QDEL_IN(src, 15 SECONDS) // In case whatever made it forgets to delete it +/obj/effect/effect/water/Destroy() + reagents = null + return ..() + /obj/effect/effect/water/proc/set_color() // Call it after you move reagents to it - icon += reagents.get_color() + if(!reagents) + return + var/reagent_color = reagents.get_color() + if(reagent_color) + icon += reagent_color /obj/effect/effect/water/proc/set_up(var/turf/target, var/step_count = 5, var/delay = 5, var/lifespan = 10) - if(!target) + if(!target || QDELETED(src)) return for(var/i = 1 to step_count) - if(!loc) + if(QDELETED(src) || !loc) return step_towards(src, target) var/turf/T = get_turf(src) if(T && reagents) - if(!wet_things(T)) break - if(T == get_turf(target)) break sleep(delay) - if(length(reagents)) + + if(QDELETED(src)) + return + + if(reagents && reagents.total_volume) var/mob/M = locate() in get_turf(src) if(M) reagents.trans_to(M, reagents.total_volume * 0.75) @@ -45,10 +55,9 @@ /obj/effect/effect/water/proc/wet_things(var/turf/T) SHOULD_NOT_SLEEP(TRUE) - if (!reagents || reagents.total_volume <= 0) + if (QDELETED(src) || !reagents || reagents.total_volume <= 0) return FALSE - reagents.touch_turf(T) var/list/mobshere = list() for(var/atom/atom_in_turf as anything in T) diff --git a/code/game/objects/items/devices/radio_jammer.dm b/code/game/objects/items/devices/radio_jammer.dm index 37558776c2d..01da5181ae9 100644 --- a/code/game/objects/items/devices/radio_jammer.dm +++ b/code/game/objects/items/devices/radio_jammer.dm @@ -126,9 +126,10 @@ GLOBAL_LIST_INIT_TYPED(active_radio_jammers, /obj/item/radiojammer, list()) /obj/item/radiojammer/improvised/Destroy() STOP_PROCESSING(SSprocessing, src) + QDEL_NULL(cell) + QDEL_NULL(assembly_holder) return ..() - /obj/item/radiojammer/improvised/process() var/current = world.time // current tick var/delta = (current - last_updated) / 10.0 // delta in seconds diff --git a/code/game/objects/items/weapons/grenades/flashbang.dm b/code/game/objects/items/weapons/grenades/flashbang.dm index c4396d62131..c33d7865951 100644 --- a/code/game/objects/items/weapons/grenades/flashbang.dm +++ b/code/game/objects/items/weapons/grenades/flashbang.dm @@ -52,9 +52,6 @@ icon = 'icons/obj/grenade.dmi' icon_state = "clusterbang" -/obj/item/grenade/flashbang/clusterbang/Destroy() - . = ..() - GC_TEMPORARY_HARDDEL /obj/item/grenade/flashbang/clusterbang/prime() var/numspawned = rand(4,8) @@ -117,6 +114,3 @@ addtimer(CALLBACK(src, PROC_REF(prime)), dettime) ..() -/obj/item/grenade/flashbang/cluster/Destroy() - . = ..() - GC_TEMPORARY_HARDDEL diff --git a/code/game/objects/items/weapons/grenades/grenade.dm b/code/game/objects/items/weapons/grenades/grenade.dm index 3e663020f76..3aaa17d614b 100644 --- a/code/game/objects/items/weapons/grenades/grenade.dm +++ b/code/game/objects/items/weapons/grenades/grenade.dm @@ -19,6 +19,12 @@ var/fake = FALSE var/activation_sound = 'sound/weapons/armbomb.ogg' +/obj/item/grenade/Destroy() + // Stop all animations to prevent a hard delete. + animate(src) + walk(src, 0) + return ..() + /obj/item/grenade/feedback_hints(mob/user, distance, is_adjacent) . += ..() if(distance <= 0) diff --git a/code/game/objects/structures.dm b/code/game/objects/structures.dm index a2a2257ee2e..b2e2fa6bf18 100644 --- a/code/game/objects/structures.dm +++ b/code/game/objects/structures.dm @@ -37,7 +37,7 @@ QUEUE_SMOOTH_NEIGHBORS(src) climbers = null - + material = null return ..() /obj/structure/attack_hand(mob/living/user) diff --git a/code/game/objects/structures/curtains.dm b/code/game/objects/structures/curtains.dm index da8479faf2b..b7227d3a23e 100644 --- a/code/game/objects/structures/curtains.dm +++ b/code/game/objects/structures/curtains.dm @@ -13,7 +13,7 @@ /obj/structure/curtain/Initialize() . = ..() material = SSmaterials.get_material_by_name(curtain_material) - AddComponent(/datum/component/turf_hand) + AddComponent(TURF_HAND_COMPONENT) /obj/structure/curtain/open icon_state = "open" diff --git a/code/game/turfs/turf.dm b/code/game/turfs/turf.dm index d0be60f5f19..3c48b4128a1 100644 --- a/code/game/turfs/turf.dm +++ b/code/game/turfs/turf.dm @@ -248,9 +248,10 @@ else step(user.pulling, get_dir(user.pulling.loc, src)) - . = handle_hand_interception(user) - if (!.) - return TRUE + // Check if objects in the turf want to slap the attacker back. + for (var/atom/target_atom in src) + SEND_SIGNAL(target_atom, COMSIG_HANDLE_HAND_INTERCEPTION, user, src) + return TRUE /// Call to move a turf from its current area to a new one @@ -291,16 +292,6 @@ /turf/proc/on_change_area(area/old_area, area/new_area) transfer_area_lighting(old_area, new_area) -/turf/proc/handle_hand_interception(var/mob/user) - var/datum/component/turf_hand/THE - for (var/atom/A in src) - var/datum/component/turf_hand/TH = A.GetComponent(/datum/component/turf_hand) - if (istype(TH) && TH.priority > THE?.priority) //Only overwrite if the new one is higher. For matching values, its first come first served - THE = TH - - if (THE) - return THE.OnHandInterception(user) - // /turf/Enter(atom/movable/mover as mob|obj, atom/forget as mob|obj|turf|area) // if(movement_disabled && usr.ckey != movement_disabled_exception) // to_chat(usr, SPAN_WARNING("Movement is admin-disabled.")) //This is to identify lag problems) diff --git a/code/modules/mining/drilling/drill.dm b/code/modules/mining/drilling/drill.dm index fda7d17b0b5..947dc4f368b 100644 --- a/code/modules/mining/drilling/drill.dm +++ b/code/modules/mining/drilling/drill.dm @@ -117,6 +117,8 @@ /obj/machinery/mining/drill/Destroy() QDEL_NULL(attached_satchel) QDEL_NULL(spark_system) + QDEL_NULL(cell) + QDEL_NULL_LIST(stored_ores) return ..() /obj/machinery/mining/drill/proc/update_ore_count() diff --git a/code/modules/mob/living/carbon/human/human.dm b/code/modules/mob/living/carbon/human/human.dm index a73ae61808a..0e51229532a 100644 --- a/code/modules/mob/living/carbon/human/human.dm +++ b/code/modules/mob/living/carbon/human/human.dm @@ -138,6 +138,9 @@ QDEL_NULL(s_store) QDEL_NULL(wear_suit) QDEL_NULL(wear_mask) + QDEL_NULL(back) + QDEL_NULL(l_hand) + QDEL_NULL(r_hand) // Do this last so the mob's stuff doesn't drop on del. QDEL_NULL(w_uniform) diff --git a/code/modules/mob/living/carbon/slime/life.dm b/code/modules/mob/living/carbon/slime/life.dm index 2e24a25ddcc..f1f6ec1fbe7 100644 --- a/code/modules/mob/living/carbon/slime/life.dm +++ b/code/modules/mob/living/carbon/slime/life.dm @@ -314,14 +314,14 @@ set_intent(I_HURT) UnarmedAttack(target) Atkcool = TRUE - addtimer(CALLBACK(src, PROC_REF(disable_attack_cooldown)), 4.5 SECONDS) + addtimer(CALLBACK(src, PROC_REF(disable_attack_cooldown)), 4.5 SECONDS, TIMER_DELETE_ME) AIproc = FALSE return if(target.client && !target.lying && prob(60 + powerlevel * 4)) // Try to take down the target first if(!Atkcool) Atkcool = TRUE - addtimer(CALLBACK(src, PROC_REF(disable_attack_cooldown)), 4.5 SECONDS) + addtimer(CALLBACK(src, PROC_REF(disable_attack_cooldown)), 4.5 SECONDS, TIMER_DELETE_ME) set_intent(I_DISARM) UnarmedAttack(target) diff --git a/code/modules/mob/living/carbon/slime/powers.dm b/code/modules/mob/living/carbon/slime/powers.dm index 819498df54c..1599118626f 100644 --- a/code/modules/mob/living/carbon/slime/powers.dm +++ b/code/modules/mob/living/carbon/slime/powers.dm @@ -130,7 +130,7 @@ name = "[colour] [is_adult ? "adult" : "baby"] slime ([number])" real_name = name set_content(TRUE) - addtimer(CALLBACK(src, PROC_REF(set_content), FALSE), 1200) // You get two minutes of safety + addtimer(CALLBACK(src, PROC_REF(set_content), FALSE), 1200, TIMER_DELETE_ME) // You get two minutes of safety else to_chat(src, SPAN_NOTICE("I am not ready to evolve yet...")) else diff --git a/code/modules/mob/living/carbon/slime/slime.dm b/code/modules/mob/living/carbon/slime/slime.dm index 4e0067d9a48..d55f8b16b2e 100644 --- a/code/modules/mob/living/carbon/slime/slime.dm +++ b/code/modules/mob/living/carbon/slime/slime.dm @@ -94,6 +94,7 @@ for(var/mob/friend in friends) friends -= friend friends.Cut() + speech_buffer.Cut() QDEL_NULL(ingested) return ..() @@ -214,7 +215,7 @@ if(is_adult || prob(5)) INVOKE_ASYNC(src, PROC_REF(UnarmedAttack), AM) Atkcool = TRUE - addtimer(CALLBACK(src, PROC_REF(reset_atkcooldown)), 45) + addtimer(CALLBACK(src, PROC_REF(reset_atkcooldown)), 45, TIMER_DELETE_ME) if(ismob(AM)) var/mob/tmob = AM diff --git a/code/modules/mob/living/simple_animal/hostile/hostile.dm b/code/modules/mob/living/simple_animal/hostile/hostile.dm index f80bfa9ac7e..48ef25f33f2 100644 --- a/code/modules/mob/living/simple_animal/hostile/hostile.dm +++ b/code/modules/mob/living/simple_animal/hostile/hostile.dm @@ -55,12 +55,11 @@ ABSTRACT_TYPE(/mob/living/simple_animal/hostile) /mob/living/simple_animal/hostile/Destroy() friends = null - last_found_target = null + unset_last_found_target() targets = null target_type_validator_map = null return ..() - /mob/living/simple_animal/hostile/proc/setup_target_type_validators() target_type_validator_map[/mob/living] = CALLBACK(src, PROC_REF(validator_living)) target_type_validator_map[/obj/machinery/bot] = CALLBACK(src, PROC_REF(validator_bot)) @@ -279,7 +278,7 @@ ABSTRACT_TYPE(/mob/living/simple_animal/hostile) if(target) face_atom(target) if(!ranged && smart_melee) - addtimer(CALLBACK(src, PROC_REF(PostAttack), target), 1.2 SECONDS) + addtimer(CALLBACK(src, PROC_REF(PostAttack), target), 1.2 SECONDS, TIMER_STOPPABLE|TIMER_DELETE_ME) return target /mob/living/simple_animal/hostile/proc/PostAttack(var/atom/target) @@ -390,9 +389,9 @@ ABSTRACT_TYPE(/mob/living/simple_animal/hostile) if(rapid) var/datum/callback/shoot_cb = CALLBACK(src, PROC_REF(shoot_wrapper), target, loc, src) - addtimer(shoot_cb, 1) - addtimer(shoot_cb, 4) - addtimer(shoot_cb, 6) + addtimer(shoot_cb, 1, TIMER_STOPPABLE|TIMER_DELETE_ME) + addtimer(shoot_cb, 4, TIMER_STOPPABLE|TIMER_DELETE_ME) + addtimer(shoot_cb, 6, TIMER_STOPPABLE|TIMER_DELETE_ME) else shoot_wrapper(target, loc, src) diff --git a/code/modules/mob/living/simple_animal/hostile/space_fauna.dm b/code/modules/mob/living/simple_animal/hostile/space_fauna.dm index e05265e87eb..4abc6db2259 100644 --- a/code/modules/mob/living/simple_animal/hostile/space_fauna.dm +++ b/code/modules/mob/living/simple_animal/hostile/space_fauna.dm @@ -192,6 +192,12 @@ AddOverlays(eye_overlay) set_light(MINIMUM_USEFUL_LIGHT_RANGE, 2, LIGHT_COLOR_TUNGSTEN) +/mob/living/simple_animal/hostile/carp/shark/reaver/eel/Destroy() + ClearOverlays() + QDEL_NULL(eye_overlay) + set_light(0) + return ..() + /mob/living/simple_animal/hostile/carp/shark/reaver/eel/death() . = ..() ClearOverlays() @@ -223,11 +229,13 @@ change_stance(HOSTILE_STANCE_TIRED) stop_automated_movement = 1 wander = 0 - if(!has_exploded) - icon_state = "bloater_bloating" - icon_living = "bloater_bloating" - has_exploded = TRUE - addtimer(CALLBACK(src, PROC_REF(explode)), 5) + if(has_exploded) + return + + icon_state = "bloater_bloating" + icon_living = "bloater_bloating" + has_exploded = TRUE + addtimer(CALLBACK(src, PROC_REF(explode)), 5, TIMER_STOPPABLE|TIMER_DELETE_ME) /mob/living/simple_animal/hostile/carp/bloater/bullet_act(obj/projectile/hitting_projectile, def_zone, piercing_hit) . = ..() diff --git a/code/modules/modular_computers/computers/subtypes/dev_handheld.dm b/code/modules/modular_computers/computers/subtypes/dev_handheld.dm index 165e392d316..db5e5c928fb 100644 --- a/code/modules/modular_computers/computers/subtypes/dev_handheld.dm +++ b/code/modules/modular_computers/computers/subtypes/dev_handheld.dm @@ -24,7 +24,6 @@ /obj/item/modular_computer/handheld/Destroy() . = ..() - GC_TEMPORARY_HARDDEL /obj/item/modular_computer/handheld/proc/set_icon() icon_state_unpowered = icon_state diff --git a/code/modules/modular_computers/computers/subtypes/dev_silicon.dm b/code/modules/modular_computers/computers/subtypes/dev_silicon.dm index 4614797c653..ae9c27326c2 100644 --- a/code/modules/modular_computers/computers/subtypes/dev_silicon.dm +++ b/code/modules/modular_computers/computers/subtypes/dev_silicon.dm @@ -29,7 +29,6 @@ /obj/item/modular_computer/silicon/Destroy() computer_host = null . = ..() - GC_TEMPORARY_HARDDEL /obj/item/modular_computer/silicon/computer_use_power(power_usage) // If we have host like AI, borg or pAI we handle their power diff --git a/code/modules/modular_computers/computers/subtypes/preset_laptop.dm b/code/modules/modular_computers/computers/subtypes/preset_laptop.dm index 7ad8f619c7c..44992286d79 100644 --- a/code/modules/modular_computers/computers/subtypes/preset_laptop.dm +++ b/code/modules/modular_computers/computers/subtypes/preset_laptop.dm @@ -5,7 +5,6 @@ /obj/item/modular_computer/laptop/preset/Destroy() . = ..() - GC_TEMPORARY_HARDDEL /obj/item/modular_computer/laptop/preset/install_default_hardware() ..() diff --git a/code/modules/modular_computers/computers/subtypes/preset_telescreen.dm b/code/modules/modular_computers/computers/subtypes/preset_telescreen.dm index b38049f27e6..9366a204b6a 100644 --- a/code/modules/modular_computers/computers/subtypes/preset_telescreen.dm +++ b/code/modules/modular_computers/computers/subtypes/preset_telescreen.dm @@ -1,6 +1,5 @@ /obj/item/modular_computer/telescreen/preset/Destroy() . = ..() - GC_TEMPORARY_HARDDEL /obj/item/modular_computer/telescreen/preset/install_default_hardware() ..() diff --git a/code/modules/modular_computers/file_system/program.dm b/code/modules/modular_computers/file_system/program.dm index 7cf422963c4..08787f46ac7 100644 --- a/code/modules/modular_computers/file_system/program.dm +++ b/code/modules/modular_computers/file_system/program.dm @@ -110,7 +110,6 @@ ABSTRACT_TYPE(/datum/computer_file/program) computer = null . = ..() - GC_TEMPORARY_HARDDEL /datum/computer_file/program/ui_host() if(computer) diff --git a/code/modules/modular_computers/file_system/programs/_program.dm b/code/modules/modular_computers/file_system/programs/_program.dm index 9caaeee3e4d..72030a2d2d1 100644 --- a/code/modules/modular_computers/file_system/programs/_program.dm +++ b/code/modules/modular_computers/file_system/programs/_program.dm @@ -18,6 +18,10 @@ ..() src.program = program +/datum/nano_module/program/Destroy() + program = null + return ..() + /datum/topic_manager/program var/datum/program @@ -25,6 +29,10 @@ ..() src.program = program +/datum/topic_manager/program/Destroy() + program = null + return ..() + // Calls forwarded to PROGRAM itself should begin with "PRG_" // Calls forwarded to COMPUTER running the program should begin with "PC_" /datum/topic_manager/program/Topic(href, href_list) diff --git a/code/modules/multiz/structures.dm b/code/modules/multiz/structures.dm index 1998734cbd6..652c5ff9596 100644 --- a/code/modules/multiz/structures.dm +++ b/code/modules/multiz/structures.dm @@ -43,7 +43,7 @@ L.update_icon() break - AddComponent(/datum/component/turf_hand) + AddComponent(TURF_HAND_COMPONENT) update_icon() diff --git a/code/modules/multiz/zmimic/mimic_movable.dm b/code/modules/multiz/zmimic/mimic_movable.dm index 7b52e762cb4..f33cbbea644 100644 --- a/code/modules/multiz/zmimic/mimic_movable.dm +++ b/code/modules/multiz/zmimic/mimic_movable.dm @@ -10,7 +10,14 @@ bound_overlay.set_dir(ndir) /atom/movable/update_above() - if (!bound_overlay || !isturf(loc)) + if (!bound_overlay) + return + + if (QDELETED(bound_overlay)) + bound_overlay = null + return + + if (!isturf(loc)) return var/turf/T = loc @@ -82,7 +89,7 @@ plane = OPEN_SPACE_PLANE_END var/atom/movable/associated_atom var/depth - var/queued = 0 + var/queued = FALSE var/destruction_timer var/mimiced_type var/original_z @@ -100,6 +107,8 @@ associated_atom.bound_overlay = null associated_atom = null + queued = FALSE + if (destruction_timer) deltimer(destruction_timer) diff --git a/code/modules/nano/modules/nano_module.dm b/code/modules/nano/modules/nano_module.dm index 00f7bb7d590..9cf703ec89c 100644 --- a/code/modules/nano/modules/nano_module.dm +++ b/code/modules/nano/modules/nano_module.dm @@ -9,6 +9,11 @@ src.host = host src.topic_manager = topic_manager +/datum/nano_module/Destroy() + host = null + topic_manager = null + return ..() + /datum/nano_module/ui_host() return host ? host.ui_host() : src diff --git a/code/modules/organs/internal/species/machine/power_core.dm b/code/modules/organs/internal/species/machine/power_core.dm index 2857f3570ee..7c2bedd8f55 100644 --- a/code/modules/organs/internal/species/machine/power_core.dm +++ b/code/modules/organs/internal/species/machine/power_core.dm @@ -24,6 +24,10 @@ replace_cell(new cell(src)) . = ..() +/obj/item/organ/internal/machine/power_core/Destroy() + QDEL_NULL(cell) + return ..() + /** * Returns current charge in %. */ diff --git a/code/modules/synthesized_instruments/song_editor.dm b/code/modules/synthesized_instruments/song_editor.dm index b0e897ae34e..ee2f4ddc4b4 100644 --- a/code/modules/synthesized_instruments/song_editor.dm +++ b/code/modules/synthesized_instruments/song_editor.dm @@ -11,6 +11,9 @@ src.host = host src.song = song +/datum/nano_module/song_editor/Destroy() + song = null + return ..() /datum/nano_module/song_editor/proc/pages() return Ceil(src.song.lines.len / GLOB.musical_config.song_editor_lines_per_page) diff --git a/code/modules/turbolift/turbolift_console.dm b/code/modules/turbolift/turbolift_console.dm index cb4dc262149..3628b72674c 100644 --- a/code/modules/turbolift/turbolift_console.dm +++ b/code/modules/turbolift/turbolift_console.dm @@ -60,7 +60,7 @@ /obj/structure/lift/button/Initialize(mapload, datum/turbolift/_lift) . = ..() - AddComponent(/datum/component/turf_hand) + AddComponent(TURF_HAND_COMPONENT) /obj/structure/lift/button/Destroy() if(floor && floor.ext_panel == src) @@ -106,7 +106,7 @@ /obj/structure/lift/panel/Initialize(mapload, datum/turbolift/_lift) . = ..() - AddComponent(/datum/component/turf_hand) + AddComponent(TURF_HAND_COMPONENT) /obj/structure/lift/panel/attack_ghost(var/mob/user) return ui_interact(user) diff --git a/html/changelogs/hellfirejag-large-variety-harddels.yml b/html/changelogs/hellfirejag-large-variety-harddels.yml new file mode 100644 index 00000000000..e85ff83b6b2 --- /dev/null +++ b/html/changelogs/hellfirejag-large-variety-harddels.yml @@ -0,0 +1,4 @@ +author: Hellfirejag +delete-after: True +changes: + - bugfix: "Removed a very large variety of hard deletes."