diff --git a/code/_onclick/hud/action/action_screen_objects.dm b/code/_onclick/hud/action/action_screen_objects.dm index 503274f86f..97d4f1d9d4 100644 --- a/code/_onclick/hud/action/action_screen_objects.dm +++ b/code/_onclick/hud/action/action_screen_objects.dm @@ -349,6 +349,7 @@ GLOBAL_LIST_INIT(palette_removed_matrix, list(1.4,0,0,0, 0.7,0.4,0,0, 0.4,0,0.6, set_expanded(!expanded) /obj/screen/button_palette/proc/clicked_while_open(datum/source, atom/target, atom/location, control, params, mob/user) + SIGNAL_HANDLER if(istype(target, /obj/screen/movable/action_button) || istype(target, /obj/screen/palette_scroll) || target == src) // If you're clicking on an action button, or us, you can live return set_expanded(FALSE) diff --git a/code/datums/components/crafting/crafting.dm b/code/datums/components/crafting/crafting.dm index 7a1f5cb5b0..72d6cb8eb2 100644 --- a/code/datums/components/crafting/crafting.dm +++ b/code/datums/components/crafting/crafting.dm @@ -3,7 +3,7 @@ RegisterSignal(parent, COMSIG_MOB_CLIENT_LOGIN, PROC_REF(create_mob_button)) /datum/component/personal_crafting/proc/create_mob_button(mob/user, client/CL) - // SIGNAL_HANDLER + SIGNAL_HANDLER var/datum/hud/H = user.hud_used var/obj/screen/craft/C = new() @@ -366,7 +366,7 @@ return parts /datum/component/personal_crafting/proc/component_ui_interact(source, location, control, params, user) - // SIGNAL_HANDLER + SIGNAL_HANDLER if(user == parent) INVOKE_ASYNC(src, PROC_REF(tgui_interact), user) diff --git a/code/datums/components/orbiter.dm b/code/datums/components/orbiter.dm index 5b80b16e26..6a3a8e91ea 100644 --- a/code/datums/components/orbiter.dm +++ b/code/datums/components/orbiter.dm @@ -101,6 +101,7 @@ // This proc can receive signals by either the thing being directly orbited or anything holding it /datum/component/orbiter/proc/move_react(atom/orbited, atom/oldloc, direction) + SIGNAL_HANDLER set waitfor = FALSE // Transfer calls this directly and it doesnt care if the ghosts arent done moving var/atom/movable/master = parent @@ -140,6 +141,7 @@ /datum/component/orbiter/proc/orbiter_move_react(atom/movable/orbiter, atom/oldloc, direction) + SIGNAL_HANDLER if(orbiter.loc == get_turf(parent)) return end_orbit(orbiter) diff --git a/code/datums/components/recursive_move.dm b/code/datums/components/recursive_move.dm index e4cd7537d1..c3cd13bb62 100644 --- a/code/datums/components/recursive_move.dm +++ b/code/datums/components/recursive_move.dm @@ -18,6 +18,7 @@ setup_parents() /datum/component/recursive_move/proc/setup_parents() + SIGNAL_HANDLER if(length(parents)) // safety check just incase this was called without clearing reset_parents() var/atom/movable/cur_parent = holder?.loc // first loc could be null @@ -85,11 +86,13 @@ //Some things will move their contents on qdel so we should prepare ourselves to be moved. //If this qdel does destroy our holder, on_holder_qdel will handle preperations for GC /datum/component/recursive_move/proc/on_qdel() + SIGNAL_HANDLER reset_parents() noparents = TRUE RegisterSignal(holder, COMSIG_ATOM_ENTERING, PROC_REF(setup_parents)) /datum/component/recursive_move/proc/on_holder_qdel() + SIGNAL_HANDLER UnregisterSignal(holder, COMSIG_PARENT_QDELETING) reset_parents() holder = null @@ -111,6 +114,7 @@ desc = "spams world log with debugging information" /obj/item/bananapeel/testing/proc/shmove(var/atom/source, var/atom/old_loc, var/atom/new_loc) + SIGNAL_HANDLER world.log << "the [source] moved from [old_loc]([old_loc.x],[old_loc.y],[old_loc.z]) to [new_loc]([new_loc.x],[new_loc.y],[new_loc.z])" /obj/item/bananapeel/testing/Initialize(mapload) diff --git a/code/datums/components/resize_guard.dm b/code/datums/components/resize_guard.dm index ca8adfab43..aa14787380 100644 --- a/code/datums/components/resize_guard.dm +++ b/code/datums/components/resize_guard.dm @@ -12,6 +12,7 @@ UnregisterSignal(parent, COMSIG_ATOM_ENTERING) /datum/component/resize_guard/proc/check_resize() + SIGNAL_HANDLER var/area/A = get_area(parent) if(A?.flag_check(AREA_ALLOW_LARGE_SIZE)) return diff --git a/code/datums/elements/conflict_checking.dm b/code/datums/elements/conflict_checking.dm index f05a0b1706..72c3213e51 100644 --- a/code/datums/elements/conflict_checking.dm +++ b/code/datums/elements/conflict_checking.dm @@ -21,6 +21,7 @@ RegisterSignal(target, COMSIG_CONFLICT_ELEMENT_CHECK, PROC_REF(check)) /datum/element/conflict_checking/proc/check(datum/source, id_to_check) + SIGNAL_HANDLER if(id == id_to_check) return ELEMENT_CONFLICT_FOUND diff --git a/code/datums/observation/helpers.dm b/code/datums/observation/helpers.dm index bc1091c668..abb59a8766 100644 --- a/code/datums/observation/helpers.dm +++ b/code/datums/observation/helpers.dm @@ -11,6 +11,7 @@ set_dir(new_dir) /datum/proc/qdel_self() + SIGNAL_HANDLER qdel(src) /* diff --git a/code/game/atoms_movable.dm b/code/game/atoms_movable.dm index f24ab333ed..ae9d44ea83 100644 --- a/code/game/atoms_movable.dm +++ b/code/game/atoms_movable.dm @@ -663,6 +663,7 @@ return /atom/movable/proc/emblocker_gc(var/datum/source) + SIGNAL_HANDLER UnregisterSignal(source, COMSIG_PARENT_QDELETING) cut_overlay(source) if(em_block == source) diff --git a/code/game/machinery/doors/multi_tile.dm b/code/game/machinery/doors/multi_tile.dm index 4f5adbb677..6c78e6ca56 100644 --- a/code/game/machinery/doors/multi_tile.dm +++ b/code/game/machinery/doors/multi_tile.dm @@ -27,6 +27,7 @@ return ..() /obj/machinery/door/airlock/multi_tile/proc/SetBounds() + SIGNAL_HANDLER if(dir in list(EAST, WEST)) bound_width = width * world.icon_size bound_height = world.icon_size diff --git a/code/game/machinery/machinery_power.dm b/code/game/machinery/machinery_power.dm index c09267b2e4..2b4a6d68f4 100644 --- a/code/game/machinery/machinery_power.dm +++ b/code/game/machinery/machinery_power.dm @@ -119,6 +119,7 @@ */ /obj/machinery/proc/update_power_on_move(atom/movable/mover, atom/old_loc, atom/new_loc) + SIGNAL_HANDLER var/area/old_area = get_area(old_loc) var/area/new_area = get_area(new_loc) if(old_area != new_area) diff --git a/code/game/objects/items.dm b/code/game/objects/items.dm index abb5f36cf3..723f541742 100644 --- a/code/game/objects/items.dm +++ b/code/game/objects/items.dm @@ -790,7 +790,7 @@ modules/mob/living/carbon/human/life.dm if you die, you will be zoomed out. /obj/item/var/ignore_visor_zoom_restriction = FALSE /obj/item/proc/zoom(var/mob/living/M, var/tileoffset = 14,var/viewsize = 9) //tileoffset is client view offset in the direction the user is facing. viewsize is how far out this thing zooms. 7 is normal view - + SIGNAL_HANDLER if(isliving(usr)) //Always prefer usr if set M = usr diff --git a/code/game/objects/items/antag_spawners.dm b/code/game/objects/items/antag_spawners.dm index 74902ba50d..781a57b0eb 100644 --- a/code/game/objects/items/antag_spawners.dm +++ b/code/game/objects/items/antag_spawners.dm @@ -34,6 +34,7 @@ Q.query() /obj/item/antag_spawner/proc/get_winner() + SIGNAL_HANDLER if(Q && Q.candidates.len) var/mob/observer/dead/D = Q.candidates[1] spawn_antag(D.client, get_turf(src)) diff --git a/code/game/objects/items/devices/communicator/UI_tgui.dm b/code/game/objects/items/devices/communicator/UI_tgui.dm index e6230bfd96..3b1019dc1a 100644 --- a/code/game/objects/items/devices/communicator/UI_tgui.dm +++ b/code/game/objects/items/devices/communicator/UI_tgui.dm @@ -43,6 +43,7 @@ // Parameters: None // Description: This refreshes the camera location /obj/item/communicator/proc/update_active_camera_screen() + SIGNAL_HANDLER if(!video_source?.can_use()) show_static() return diff --git a/code/game/objects/items/devices/gps.dm b/code/game/objects/items/devices/gps.dm index 76010e8daf..7cbfde8c7d 100644 --- a/code/game/objects/items/devices/gps.dm +++ b/code/game/objects/items/devices/gps.dm @@ -113,6 +113,7 @@ GLOBAL_LIST_EMPTY(GPS_list) return (target.z in reachable_z_levels) /obj/item/gps/proc/update_compass(var/update_compass_icon) + SIGNAL_HANDLER compass.hide_waypoints(FALSE) var/turf/my_turf = get_turf(src) for(var/thing in tracking_devices) diff --git a/code/game/objects/items/weapons/capture_crystal.dm b/code/game/objects/items/weapons/capture_crystal.dm index 0b0da723fc..8bb6c01f3f 100644 --- a/code/game/objects/items/weapons/capture_crystal.dm +++ b/code/game/objects/items/weapons/capture_crystal.dm @@ -336,6 +336,7 @@ //The clean up procs! /obj/item/capture_crystal/proc/mob_was_deleted() + SIGNAL_HANDLER UnregisterSignal(bound_mob, COMSIG_PARENT_QDELETING) UnregisterSignal(owner, COMSIG_PARENT_QDELETING) bound_mob.capture_caught = FALSE @@ -346,6 +347,7 @@ update_icon() /obj/item/capture_crystal/proc/owner_was_deleted() + SIGNAL_HANDLER UnregisterSignal(owner, COMSIG_PARENT_QDELETING) owner = null active = FALSE diff --git a/code/game/objects/items/weapons/id cards/cards.dm b/code/game/objects/items/weapons/id cards/cards.dm index a3f7a125b3..50347e55f6 100644 --- a/code/game/objects/items/weapons/id cards/cards.dm +++ b/code/game/objects/items/weapons/id cards/cards.dm @@ -283,6 +283,7 @@ RegisterSignal(src, COMSIG_OBSERVER_MOVED, PROC_REF(check_loc)) /obj/item/card/id/cargo/miner/borg/proc/check_loc(atom/movable/mover, atom/old_loc, atom/new_loc) + SIGNAL_HANDLER if(old_loc == R || old_loc == R.module) last_robot_loc = old_loc if(!istype(loc, /obj/machinery) && loc != R && loc != R.module) diff --git a/code/game/objects/items/weapons/id cards/id_stacks.dm b/code/game/objects/items/weapons/id cards/id_stacks.dm index 20548d5f85..bed9be0dec 100644 --- a/code/game/objects/items/weapons/id cards/id_stacks.dm +++ b/code/game/objects/items/weapons/id cards/id_stacks.dm @@ -304,6 +304,7 @@ RegisterSignal(src, COMSIG_OBSERVER_MOVED, PROC_REF(check_loc)) /obj/item/card/id/exploration/borg/proc/check_loc(atom/movable/mover, atom/old_loc, atom/new_loc) + SIGNAL_HANDLER if(old_loc == R || old_loc == R.module) last_robot_loc = old_loc if(!istype(loc, /obj/machinery) && loc != R && loc != R.module) diff --git a/code/game/objects/structures/ghost_pods/ghost_pods.dm b/code/game/objects/structures/ghost_pods/ghost_pods.dm index 3ac4fd7f74..97bd9089d0 100644 --- a/code/game/objects/structures/ghost_pods/ghost_pods.dm +++ b/code/game/objects/structures/ghost_pods/ghost_pods.dm @@ -30,6 +30,7 @@ Q.query() /obj/structure/ghost_pod/proc/get_winner() + SIGNAL_HANDLER busy = FALSE var/deletion_candidate = FALSE if(Q && Q.candidates.len) //Q should NEVER get deleted but...whatever, sanity. diff --git a/code/modules/ai/ai_holder.dm b/code/modules/ai/ai_holder.dm index b8c11f9824..8907a415dd 100644 --- a/code/modules/ai/ai_holder.dm +++ b/code/modules/ai/ai_holder.dm @@ -237,6 +237,7 @@ STOP_AIFASTPROCESSING(src) /datum/ai_holder/proc/holder_stat_change(var/mob, old_stat, new_stat) + SIGNAL_HANDLER if(old_stat >= DEAD && new_stat <= DEAD) //Revived manage_processing(AI_PROCESSING) else if(old_stat <= DEAD && new_stat >= DEAD) //Killed diff --git a/code/modules/ai/ai_holder_targeting.dm b/code/modules/ai/ai_holder_targeting.dm index 64b01ca6d1..5ea93764b7 100644 --- a/code/modules/ai/ai_holder_targeting.dm +++ b/code/modules/ai/ai_holder_targeting.dm @@ -221,6 +221,7 @@ // 'Hard' loss of target. Clean things up and return to idle. /datum/ai_holder/proc/remove_target() + SIGNAL_HANDLER ai_log("remove_target() : Entering.", AI_LOG_TRACE) if(target) UnregisterSignal(target, COMSIG_PARENT_QDELETING, PROC_REF(remove_target)) diff --git a/code/modules/blob2/blobs/core.dm b/code/modules/blob2/blobs/core.dm index d5f928bff3..3981883108 100644 --- a/code/modules/blob2/blobs/core.dm +++ b/code/modules/blob2/blobs/core.dm @@ -189,6 +189,7 @@ var/list/blob_cores = list() controller = null //Controller has been set. Let's null it now. /obj/structure/blob/core/proc/get_winner() + SIGNAL_HANDLER if(Q && Q.candidates.len) //Q should NEVER get deleted but...whatever, sanity. var/mob/observer/dead/D = Q.candidates[1] var/client/C diff --git a/code/modules/events/carp_migration.dm b/code/modules/events/carp_migration.dm index 835ff706e6..70652334a5 100644 --- a/code/modules/events/carp_migration.dm +++ b/code/modules/events/carp_migration.dm @@ -88,6 +88,7 @@ // If carp is bomphed, remove it from the list. /datum/event/carp_migration/proc/on_carp_destruction(var/mob/M) + SIGNAL_HANDLER spawned_carp -= M UnregisterSignal(M, COMSIG_OBSERVER_DESTROYED) diff --git a/code/modules/events/gnat_migration.dm b/code/modules/events/gnat_migration.dm index 535b3d81f6..fb2aadf892 100644 --- a/code/modules/events/gnat_migration.dm +++ b/code/modules/events/gnat_migration.dm @@ -84,6 +84,7 @@ // If gnat is bomphed, remove it from the list. /datum/event/gnat_migration/proc/on_gnat_destruction(var/mob/M) + SIGNAL_HANDLER spawned_gnat -= M UnregisterSignal(M, COMSIG_OBSERVER_DESTROYED) diff --git a/code/modules/events/infestation.dm b/code/modules/events/infestation.dm index 0a6bc25f6c..92e2593873 100644 --- a/code/modules/events/infestation.dm +++ b/code/modules/events/infestation.dm @@ -149,6 +149,7 @@ // If vermin is kill, remove it from the list. /datum/event/infestation/proc/on_vermin_destruction(var/mob/M) + SIGNAL_HANDLER spawned_vermin -= M UnregisterSignal(M, COMSIG_OBSERVER_DESTROYED) */ diff --git a/code/modules/events/jellyfish_migration.dm b/code/modules/events/jellyfish_migration.dm index 1fd08b1364..ff9e574bde 100644 --- a/code/modules/events/jellyfish_migration.dm +++ b/code/modules/events/jellyfish_migration.dm @@ -84,6 +84,7 @@ // If jellyfish is bomphed, remove it from the list. /datum/event/jellyfish_migration/proc/on_jellyfish_destruction(var/mob/M) + SIGNAL_HANDLER spawned_jellyfish -= M UnregisterSignal(M, COMSIG_OBSERVER_DESTROYED) diff --git a/code/modules/events/ray_migration.dm b/code/modules/events/ray_migration.dm index 8603205d52..2bbc6c480d 100644 --- a/code/modules/events/ray_migration.dm +++ b/code/modules/events/ray_migration.dm @@ -84,6 +84,7 @@ // If ray is bomphed, remove it from the list. /datum/event/ray_migration/proc/on_ray_destruction(var/mob/M) + SIGNAL_HANDLER spawned_ray -= M UnregisterSignal(M, COMSIG_OBSERVER_DESTROYED) diff --git a/code/modules/events/shark_migration.dm b/code/modules/events/shark_migration.dm index c36dd28cb2..34965771bd 100644 --- a/code/modules/events/shark_migration.dm +++ b/code/modules/events/shark_migration.dm @@ -84,6 +84,7 @@ // If shark is bomphed, remove it from the list. /datum/event/shark_migration/proc/on_shark_destruction(var/mob/M) + SIGNAL_HANDLER spawned_shark -= M UnregisterSignal(M, COMSIG_OBSERVER_DESTROYED) diff --git a/code/modules/events/spacefish_migration.dm b/code/modules/events/spacefish_migration.dm index 7f36ee4795..429cf9b6d9 100644 --- a/code/modules/events/spacefish_migration.dm +++ b/code/modules/events/spacefish_migration.dm @@ -107,6 +107,7 @@ // If fish is bomphed, remove it from the list. /datum/event/spacefish_migration/proc/on_fish_destruction(var/mob/M) + SIGNAL_HANDLER spawned_fish -= M UnregisterSignal(M, COMSIG_OBSERVER_DESTROYED) diff --git a/code/modules/gamemaster/event2/events/mob_spawning.dm b/code/modules/gamemaster/event2/events/mob_spawning.dm index 828947a07d..faa9656112 100644 --- a/code/modules/gamemaster/event2/events/mob_spawning.dm +++ b/code/modules/gamemaster/event2/events/mob_spawning.dm @@ -93,5 +93,6 @@ // If simple_mob is bomphed, remove it from the list. /datum/event2/event/mob_spawning/proc/on_mob_destruction(mob/M) + SIGNAL_HANDLER spawned_mobs -= M UnregisterSignal(M, COMSIG_OBSERVER_DESTROYED) diff --git a/code/modules/holomap/station_holomap.dm b/code/modules/holomap/station_holomap.dm index 714e2650f3..8de27696f5 100644 --- a/code/modules/holomap/station_holomap.dm +++ b/code/modules/holomap/station_holomap.dm @@ -129,10 +129,12 @@ stopWatching() /obj/machinery/station_map/proc/checkPosition() + SIGNAL_HANDLER if(!watching_mob || (watching_mob.loc != loc) || (dir != watching_mob.dir)) stopWatching() /obj/machinery/station_map/proc/stopWatching() + SIGNAL_HANDLER if(watching_mob) if(watching_mob.client) animate(holomap_datum.station_map, alpha = 0, time = 5, easing = LINEAR_EASING) diff --git a/code/modules/integrated_electronics/subtypes/manipulation.dm b/code/modules/integrated_electronics/subtypes/manipulation.dm index debf957b4e..0ceff2871e 100644 --- a/code/modules/integrated_electronics/subtypes/manipulation.dm +++ b/code/modules/integrated_electronics/subtypes/manipulation.dm @@ -193,6 +193,7 @@ desc += " \An [attached_grenade] is attached to it!" /obj/item/integrated_circuit/manipulation/grenade/proc/detach_grenade() + SIGNAL_HANDLER if(!attached_grenade) return UnregisterSignal(attached_grenade, COMSIG_OBSERVER_DESTROYED) diff --git a/code/modules/integrated_electronics/subtypes/output.dm b/code/modules/integrated_electronics/subtypes/output.dm index 2647271307..1ee8ed2419 100644 --- a/code/modules/integrated_electronics/subtypes/output.dm +++ b/code/modules/integrated_electronics/subtypes/output.dm @@ -545,6 +545,7 @@ update_hologram() /obj/item/integrated_circuit/output/holographic_projector/proc/on_moved() + SIGNAL_HANDLER if(hologram) update_hologram_position() diff --git a/code/modules/mob/living/bot/secbot.dm b/code/modules/mob/living/bot/secbot.dm index 8c0a51540f..6c05bef86c 100644 --- a/code/modules/mob/living/bot/secbot.dm +++ b/code/modules/mob/living/bot/secbot.dm @@ -219,6 +219,7 @@ // Callback invoked if the registered target moves /mob/living/bot/secbot/proc/target_moved(atom/movable/moving_instance, atom/old_loc, atom/new_loc) + SIGNAL_HANDLER if(get_dist(get_turf(src), get_turf(target)) >= 1) awaiting_surrender = INFINITY // Done waiting! UnregisterSignal(moving_instance, COMSIG_OBSERVER_MOVED) diff --git a/code/modules/mob/living/carbon/brain/MMI.dm b/code/modules/mob/living/carbon/brain/MMI.dm index 29775f0f1e..c576a11487 100644 --- a/code/modules/mob/living/carbon/brain/MMI.dm +++ b/code/modules/mob/living/carbon/brain/MMI.dm @@ -255,6 +255,7 @@ Q.query() /obj/item/mmi/digital/proc/get_winner() + SIGNAL_HANDLER if(Q && Q.candidates.len) //Q should NEVER get deleted but...whatever, sanity. var/mob/observer/dead/D = Q.candidates[1] transfer_personality(D) diff --git a/code/modules/mob/living/living.dm b/code/modules/mob/living/living.dm index 637ec0297a..69728b5321 100644 --- a/code/modules/mob/living/living.dm +++ b/code/modules/mob/living/living.dm @@ -1384,6 +1384,7 @@ qdel_null(screen_icon) /datum/component/character_setup/proc/create_mob_button(mob/user) + SIGNAL_HANDLER var/datum/hud/HUD = user.hud_used if(!screen_icon) screen_icon = new() @@ -1399,6 +1400,7 @@ user.client?.screen += screen_icon /datum/component/character_setup/proc/character_setup_click(source, location, control, params, user) + SIGNAL_HANDLER var/mob/owner = user if(owner.client?.prefs) INVOKE_ASYNC(owner.client.prefs, TYPE_PROC_REF(/datum/preferences, ShowChoices), owner) diff --git a/code/modules/mob/living/silicon/robot/dogborg/dog_modules.dm b/code/modules/mob/living/silicon/robot/dogborg/dog_modules.dm index 7fa047adaf..400f90609f 100644 --- a/code/modules/mob/living/silicon/robot/dogborg/dog_modules.dm +++ b/code/modules/mob/living/silicon/robot/dogborg/dog_modules.dm @@ -483,6 +483,7 @@ RegisterSignal(src, COMSIG_OBSERVER_MOVED, PROC_REF(check_loc)) /obj/item/reagent_containers/glass/beaker/large/borg/proc/check_loc(atom/movable/mover, atom/old_loc, atom/new_loc) + SIGNAL_HANDLER if(old_loc == R || old_loc == R.module) last_robot_loc = old_loc if(!istype(loc, /obj/machinery) && loc != R && loc != R.module) diff --git a/code/modules/mob/living/simple_mob/overmap_mob_vr.dm b/code/modules/mob/living/simple_mob/overmap_mob_vr.dm index 3d78bc85c4..3cbccac309 100644 --- a/code/modules/mob/living/simple_mob/overmap_mob_vr.dm +++ b/code/modules/mob/living/simple_mob/overmap_mob_vr.dm @@ -71,6 +71,7 @@ return dat /obj/effect/overmap/visitable/simplemob/proc/on_parent_moved(atom/movable/source, OldLoc, Dir, Forced) + SIGNAL_HANDLER forceMove(parent.loc) set_dir(parent.dir) diff --git a/code/modules/mob/living/simple_mob/subtypes/animal/borer/borer.dm b/code/modules/mob/living/simple_mob/subtypes/animal/borer/borer.dm index f90b8db2ea..4164cf5fe0 100644 --- a/code/modules/mob/living/simple_mob/subtypes/animal/borer/borer.dm +++ b/code/modules/mob/living/simple_mob/subtypes/animal/borer/borer.dm @@ -190,6 +190,7 @@ Q.query() // This will sleep the proc for awhile. /mob/living/simple_mob/animal/borer/proc/get_winner() + SIGNAL_HANDLER if(Q && Q.candidates.len) //Q should NEVER get deleted but...whatever, sanity. var/mob/observer/dead/D = Q.candidates[1] transfer_personality(D) diff --git a/code/modules/mob/living/simple_mob/subtypes/vore/dominated_brain.dm b/code/modules/mob/living/simple_mob/subtypes/vore/dominated_brain.dm index 9a74d3a453..ba5adf978b 100644 --- a/code/modules/mob/living/simple_mob/subtypes/vore/dominated_brain.dm +++ b/code/modules/mob/living/simple_mob/subtypes/vore/dominated_brain.dm @@ -61,11 +61,13 @@ pred_was_deleted() /mob/living/dominated_brain/proc/prey_was_deleted() + SIGNAL_HANDLER if(prey_body) UnregisterSignal(prey_body, COMSIG_PARENT_QDELETING) prey_body = null /mob/living/dominated_brain/proc/pred_was_deleted() + SIGNAL_HANDLER if(pred_body) UnregisterSignal(pred_body, COMSIG_PARENT_QDELETING) pred_body = null diff --git a/code/modules/nifsoft/nif_tgui.dm b/code/modules/nifsoft/nif_tgui.dm index 5916ce105e..6202290d63 100644 --- a/code/modules/nifsoft/nif_tgui.dm +++ b/code/modules/nifsoft/nif_tgui.dm @@ -50,6 +50,7 @@ /datum/component/nif_menu/proc/create_mob_button(mob/user) + SIGNAL_HANDLER var/datum/hud/HUD = user.hud_used if(!screen_icon) screen_icon = new() @@ -63,6 +64,7 @@ add_verb(user, /mob/living/carbon/human/proc/nif_menu) /datum/component/nif_menu/proc/nif_menu_click(source, location, control, params, user) + SIGNAL_HANDLER var/mob/living/carbon/human/H = user if(istype(H) && H.nif) INVOKE_ASYNC(H.nif, PROC_REF(tgui_interact), user) diff --git a/code/modules/nifsoft/software/13_soulcatcher.dm b/code/modules/nifsoft/software/13_soulcatcher.dm index c243f5850b..77b5c2935c 100644 --- a/code/modules/nifsoft/software/13_soulcatcher.dm +++ b/code/modules/nifsoft/software/13_soulcatcher.dm @@ -487,6 +487,7 @@ return 1 /mob/observer/eye/ar_soul/proc/human_moved() + SIGNAL_HANDLER if(!can_see(parent_human,src)) forceMove(get_turf(parent_human)) diff --git a/code/modules/overmap/disperser/disperser_console.dm b/code/modules/overmap/disperser/disperser_console.dm index 81d34c32c1..ae3f38eb42 100644 --- a/code/modules/overmap/disperser/disperser_console.dm +++ b/code/modules/overmap/disperser/disperser_console.dm @@ -66,6 +66,7 @@ return FALSE /obj/machinery/computer/ship/disperser/proc/release_links() + SIGNAL_HANDLER UnregisterSignal(front, COMSIG_OBSERVER_DESTROYED) UnregisterSignal(middle, COMSIG_OBSERVER_DESTROYED) UnregisterSignal(back, COMSIG_OBSERVER_DESTROYED) diff --git a/code/modules/overmap/ships/computers/ship.dm b/code/modules/overmap/ships/computers/ship.dm index e514d04b57..f7a821954e 100644 --- a/code/modules/overmap/ships/computers/ship.dm +++ b/code/modules/overmap/ships/computers/ship.dm @@ -87,6 +87,7 @@ somewhere on that shuttle. Subtypes of these can be then used to perform ship ov LAZYDISTINCTADD(viewers, WEAKREF(user)) /obj/machinery/computer/ship/proc/unlook(var/mob/user, forced) + SIGNAL_HANDLER if(!linked && !forced) //If we have no linked computer, return early. Forcing is for when we do a one-time action that we want to clear the UI. return user.reset_view() diff --git a/code/modules/overmap/ships/landable.dm b/code/modules/overmap/ships/landable.dm index 6c2e3e6e0b..820ef00602 100644 --- a/code/modules/overmap/ships/landable.dm +++ b/code/modules/overmap/ships/landable.dm @@ -147,6 +147,7 @@ RegisterSignal(shuttle, COMSIG_OBSERVER_SHUTTLE_MOVED, PROC_REF(shuttle_left)) /obj/effect/shuttle_landmark/visiting_shuttle/proc/shuttle_left(datum/shuttle/shuttle, obj/effect/shuttle_landmark/old_landmark, obj/effect/shuttle_landmark/new_landmark) + SIGNAL_HANDLER if(old_landmark == src) UnregisterSignal(shuttle, COMSIG_OBSERVER_SHUTTLE_MOVED) LAZYREMOVE(core_landmark.visitors, src) @@ -156,6 +157,7 @@ // /obj/effect/overmap/visitable/ship/landable/proc/pre_shuttle_jump(datum/shuttle/given_shuttle, obj/effect/shuttle_landmark/from, obj/effect/shuttle_landmark/into) + SIGNAL_HANDLER if(given_shuttle != SSshuttles.shuttles[shuttle]) return if(into == landmark) @@ -163,6 +165,7 @@ UnregisterSignal(SSshuttles.shuttles[shuttle], COMSIG_OBSERVER_SHUTTLE_PRE_MOVE) /obj/effect/overmap/visitable/ship/landable/proc/on_shuttle_jump(datum/shuttle/given_shuttle, obj/effect/shuttle_landmark/from, obj/effect/shuttle_landmark/into) + SIGNAL_HANDLER if(given_shuttle != SSshuttles.shuttles[shuttle]) return var/datum/shuttle/autodock/auto = given_shuttle diff --git a/code/modules/paperwork/paper_sticky.dm b/code/modules/paperwork/paper_sticky.dm index b0f5a43efc..122b6fd4d0 100644 --- a/code/modules/paperwork/paper_sticky.dm +++ b/code/modules/paperwork/paper_sticky.dm @@ -101,6 +101,7 @@ RegisterSignal(src, COMSIG_OBSERVER_MOVED, /obj/item/paper/sticky/proc/reset_persistence_tracking) /obj/item/paper/sticky/proc/reset_persistence_tracking() + SIGNAL_HANDLER SSpersistence.forget_value(src, /datum/persistent/paper/sticky) pixel_x = 0 pixel_y = 0 diff --git a/code/modules/shieldgen/directional_shield.dm b/code/modules/shieldgen/directional_shield.dm index d4776d24e5..e902a9addb 100644 --- a/code/modules/shieldgen/directional_shield.dm +++ b/code/modules/shieldgen/directional_shield.dm @@ -115,6 +115,7 @@ return ..() /obj/item/shield_projector/proc/moved_event() + SIGNAL_HANDLER update_shield_positions() /obj/item/shield_projector/proc/create_shield(var/newloc, var/new_dir) @@ -138,6 +139,7 @@ active = FALSE /obj/item/shield_projector/proc/update_shield_positions() + SIGNAL_HANDLER for(var/obj/effect/directional_shield/S in active_shields) S.relocate() diff --git a/code/modules/shuttles/shuttles_web.dm b/code/modules/shuttles/shuttles_web.dm index 465c477275..16f80f5090 100644 --- a/code/modules/shuttles/shuttles_web.dm +++ b/code/modules/shuttles/shuttles_web.dm @@ -417,6 +417,7 @@ // This is called whenever a shuttle is initialized. If its our shuttle, do our thing! /obj/shuttle_connector/proc/setup_routes(var/new_shuttle) + SIGNAL_HANDLER var/datum/shuttle/autodock/web_shuttle/ES = SSshuttles.shuttles[shuttle_name] if(ES != new_shuttle) return // Its not our shuttle! Ignore! diff --git a/code/modules/tgui/modules/appearance_changer.dm b/code/modules/tgui/modules/appearance_changer.dm index 35781ccd3e..b3ecdeab0e 100644 --- a/code/modules/tgui/modules/appearance_changer.dm +++ b/code/modules/tgui/modules/appearance_changer.dm @@ -868,6 +868,7 @@ return data /datum/tgui_module/appearance_changer/proc/update_active_camera_screen() + SIGNAL_HANDLER cam_screen.vis_contents = list(owner) // Copied from the vore version. cam_background.icon_state = "clear" cam_background.fill_rect(1, 1, 1, 1) @@ -1001,6 +1002,7 @@ return ..() /datum/tgui_module/appearance_changer/vore/update_active_camera_screen() + SIGNAL_HANDLER cam_screen.vis_contents = list(owner) cam_background.icon_state = "clear" cam_background.fill_rect(1, 1, 1, 1) diff --git a/code/modules/tgui/modules/camera.dm b/code/modules/tgui/modules/camera.dm index 36dcb4c318..82215ad19f 100644 --- a/code/modules/tgui/modules/camera.dm +++ b/code/modules/tgui/modules/camera.dm @@ -180,6 +180,7 @@ . = TRUE /datum/tgui_module/camera/proc/update_active_camera_screen() + SIGNAL_HANDLER if(!active_camera) show_camera_static() return TRUE diff --git a/code/modules/tgui/modules/ntos-only/uav.dm b/code/modules/tgui/modules/ntos-only/uav.dm index 559cf00e28..d0bfa8f6ff 100644 --- a/code/modules/tgui/modules/ntos-only/uav.dm +++ b/code/modules/tgui/modules/ntos-only/uav.dm @@ -118,6 +118,7 @@ unlook(M) /datum/tgui_module/uav/proc/current_uav_changed_z(old_z, new_z) + SIGNAL_HANDLER signal_strength = get_signal_to(current_uav) if(!signal_strength) clear_current() diff --git a/code/modules/tgui/modules/overmap.dm b/code/modules/tgui/modules/overmap.dm index 3ba0c3bd93..d402b0658f 100644 --- a/code/modules/tgui/modules/overmap.dm +++ b/code/modules/tgui/modules/overmap.dm @@ -85,6 +85,7 @@ LAZYDISTINCTADD(viewers, WEAKREF(user)) /datum/tgui_module/ship/proc/unlook(var/mob/user) + SIGNAL_HANDLER user.reset_view() user.set_viewsize() // reset to default if(map_view_used) diff --git a/code/modules/vore/eating/living_vr.dm b/code/modules/vore/eating/living_vr.dm index 379c108e91..a035c40d56 100644 --- a/code/modules/vore/eating/living_vr.dm +++ b/code/modules/vore/eating/living_vr.dm @@ -1358,6 +1358,7 @@ qdel_null(owner.vorePanel) /datum/component/vore_panel/proc/create_mob_button(mob/user) + SIGNAL_HANDLER var/datum/hud/HUD = user.hud_used if(!screen_icon) screen_icon = new() @@ -1373,6 +1374,7 @@ user.client?.screen += screen_icon /datum/component/vore_panel/proc/vore_panel_click(source, location, control, params, user) + SIGNAL_HANDLER var/mob/living/owner = user if(istype(owner) && owner.vorePanel) INVOKE_ASYNC(owner, TYPE_PROC_REF(/mob/living, insidePanel), owner) diff --git a/code/modules/vore/eating/soulcatcher.dm b/code/modules/vore/eating/soulcatcher.dm index 73264aece5..7251f97100 100644 --- a/code/modules/vore/eating/soulcatcher.dm +++ b/code/modules/vore/eating/soulcatcher.dm @@ -332,6 +332,7 @@ // Handles the vore fx updates for the captured souls /obj/soulgem/proc/soulgem_show_vfx(var/update, var/severity = 0) + SIGNAL_HANDLER if(linked_belly) for(var/mob/living/L in brainmobs) if(flag_check(SOULGEM_SHOW_VORE_SFX)) diff --git a/code/modules/xenoarcheaology/effect_master.dm b/code/modules/xenoarcheaology/effect_master.dm index 24beb616ae..70d8ac7474 100644 --- a/code/modules/xenoarcheaology/effect_master.dm +++ b/code/modules/xenoarcheaology/effect_master.dm @@ -220,6 +220,7 @@ var/list/toxic_reagents = list(TOXIN_PATH) */ /datum/component/artifact_master/proc/on_exact() + SIGNAL_HANDLER var/severity = args[2] var/triggered = FALSE for(var/datum/artifact_effect/my_effect in my_effects) @@ -243,6 +244,7 @@ var/list/toxic_reagents = list(TOXIN_PATH) return /datum/component/artifact_master/proc/on_bullet() + SIGNAL_HANDLER var/obj/item/projectile/P = args[2] var/triggered = TRUE for(var/datum/artifact_effect/my_effect in my_effects) @@ -264,6 +266,7 @@ var/list/toxic_reagents = list(TOXIN_PATH) return /datum/component/artifact_master/proc/on_bump() + SIGNAL_HANDLER var/atom/bumped = args[2] var/warn = FALSE for(var/datum/artifact_effect/my_effect in my_effects) @@ -286,6 +289,7 @@ var/list/toxic_reagents = list(TOXIN_PATH) to_chat(bumped, span_filter_notice(span_bold("You accidentally touch \the [holder] as it hits you."))) /datum/component/artifact_master/proc/on_bumped() + SIGNAL_HANDLER var/atom/movable/M = args[2] var/warn = FALSE for(var/datum/artifact_effect/my_effect in my_effects) @@ -309,6 +313,7 @@ var/list/toxic_reagents = list(TOXIN_PATH) to_chat(M, span_filter_notice(span_bold("You accidentally touch \the [holder]."))) /datum/component/artifact_master/proc/on_attack_hand() + SIGNAL_HANDLER var/mob/living/user = args[2] if(!istype(user)) return @@ -338,6 +343,7 @@ var/list/toxic_reagents = list(TOXIN_PATH) /datum/component/artifact_master/proc/on_attackby() + SIGNAL_HANDLER var/obj/item/W = args[2] for(var/datum/artifact_effect/my_effect in my_effects) @@ -388,6 +394,7 @@ var/list/toxic_reagents = list(TOXIN_PATH) my_effect.ToggleActivate() /datum/component/artifact_master/proc/on_reagent() + SIGNAL_HANDLER //A strange bug here is that, when a reagent is splashed on an artifact, it calls this proc twice. //Why? I have no clue. I only accidentally stumbled upon it during debugging! //I left one of the debug logs commented out so others can confirm this. @@ -410,6 +417,7 @@ var/list/toxic_reagents = list(TOXIN_PATH) my_effect.ToggleActivate() /datum/component/artifact_master/proc/on_moved() + SIGNAL_HANDLER for(var/datum/artifact_effect/my_effect in my_effects) if(my_effect) my_effect.UpdateMove() diff --git a/code/unit_tests/clothing_tests.dm b/code/unit_tests/clothing_tests.dm index f905d9072c..fdecef225b 100644 --- a/code/unit_tests/clothing_tests.dm +++ b/code/unit_tests/clothing_tests.dm @@ -149,6 +149,7 @@ return failed /datum/unit_test/all_clothing_shall_be_valid/get_signal_data(atom/source, list/data = list()) + SIGNAL_HANDLER switch(data[1]) if("set_slot") var/slot_name = data[2] diff --git a/code/unit_tests/reagent_tests.dm b/code/unit_tests/reagent_tests.dm index f5b147da7c..27d617a18e 100644 --- a/code/unit_tests/reagent_tests.dm +++ b/code/unit_tests/reagent_tests.dm @@ -280,6 +280,7 @@ return TRUE /datum/unit_test/chemical_reactions_shall_not_conflict/get_signal_data(atom/source, list/data = list()) + SIGNAL_HANDLER result_reactions.Add(data[1]) // Append the reactions that happened, then use that to check their inhibitors