From e13fe75590aebc2272d5259b9db8e004ee600fab Mon Sep 17 00:00:00 2001 From: Kylerace Date: Mon, 24 May 2021 12:28:02 -0700 Subject: [PATCH] use SIGNAL_HANDLER REEEEEE (#59242) makes as many procs as i can find use the SIGNAL_HANDLER define which i assumed they all already did --- code/controllers/subsystem/eigenstate.dm | 4 ++++ code/controllers/subsystem/statpanel.dm | 1 + code/datums/ai/_ai_controller.dm | 2 ++ code/datums/ai/hauntium/haunted_controller.dm | 2 ++ code/datums/beam.dm | 3 ++- code/datums/brain_damage/creepy_trauma.dm | 1 + .../container_item/container_item.dm | 1 + .../components/food/ice_cream_holder.dm | 7 +++++- code/datums/components/fullauto.dm | 3 ++- code/datums/components/honkspam.dm | 1 + code/datums/components/infective.dm | 1 + code/datums/components/orbiter.dm | 1 + code/datums/components/pellet_cloud.dm | 1 + code/datums/components/plumbing/_plumbing.dm | 2 ++ code/datums/components/pricetag.dm | 1 + code/datums/components/riding/riding_mob.dm | 1 + code/datums/components/singularity.dm | 1 + code/datums/components/soundplayer.dm | 1 + .../components/storage/concrete/_concrete.dm | 2 ++ code/datums/components/swabbing.dm | 8 ++++++- code/datums/components/twohanded.dm | 1 + code/datums/elements/dryable.dm | 1 + code/datums/elements/light_blocking.dm | 1 + code/datums/elements/obj_regen.dm | 1 + code/datums/elements/skittish.dm | 1 + code/datums/status_effects/neutral.dm | 2 ++ code/datums/wounds/bones.dm | 2 ++ code/game/atoms.dm | 1 + .../gamemodes/dynamic/dynamic_hijacking.dm | 1 + code/game/machinery/accounting.dm | 1 + code/game/objects/items/cards_ids.dm | 1 + code/game/objects/items/chrono_eraser.dm | 4 ++-- code/game/objects/items/control_wand.dm | 2 ++ code/game/objects/items/defib.dm | 2 +- code/game/objects/items/devices/PDA/PDA.dm | 1 + .../objects/items/devices/geiger_counter.dm | 3 ++- code/game/objects/items/devices/megaphone.dm | 1 + .../objects/items/devices/radio/intercom.dm | 1 + code/game/objects/items/flamethrower.dm | 1 + code/game/objects/items/food/misc.dm | 1 + code/game/objects/items/implants/implant.dm | 2 +- .../objects/items/implants/implantuplink.dm | 1 + .../objects/items/robot/robot_upgrades.dm | 1 + code/game/objects/items/storage/bags.dm | 1 + code/game/objects/items/storage/firstaid.dm | 2 ++ code/game/objects/items/tanks/jetpack.dm | 4 +++- code/game/objects/objs.dm | 1 + .../objects/structures/training_machine.dm | 1 + .../abductor/equipment/glands/access.dm | 1 + .../eldritch_cult/eldritch_antag.dm | 1 + .../eldritch_cult/eldritch_effects.dm | 1 + .../eldritch_cult/knowledge/flesh_lore.dm | 1 + .../nukeop/equipment/borgchameleon.dm | 1 + .../antagonists/traitor/syndicate_contract.dm | 22 +++++++++++-------- .../machinery/bluespace_vendor.dm | 1 + .../machinery/components/components_base.dm | 1 + .../machinery/components/fusion/hfr_procs.dm | 1 + code/modules/clothing/head/helmet.dm | 1 + code/modules/clothing/head/jobs.dm | 1 + code/modules/clothing/head/misc.dm | 1 + code/modules/clothing/shoes/_shoes.dm | 1 + code/modules/clothing/spacesuits/hardsuit.dm | 1 + code/modules/clothing/suits/cloaks.dm | 1 + code/modules/clothing/under/accessories.dm | 1 + .../experiment/handlers/experiment_handler.dm | 3 ++- code/modules/explorer_drone/scanner_array.dm | 1 + .../food_and_drinks/drinks/drinks/bottle.dm | 1 + .../kitchen_machinery/griddle.dm | 1 + code/modules/holodeck/computer.dm | 1 + code/modules/hydroponics/plant_genes.dm | 2 ++ code/modules/instruments/items.dm | 3 +++ .../mining/equipment/kinetic_crusher.dm | 2 ++ code/modules/mining/equipment/resonator.dm | 1 + .../mining/lavaland/necropolis_chests.dm | 2 ++ code/modules/mob/living/carbon/carbon.dm | 1 + .../mob/living/carbon/carbon_defense.dm | 1 + code/modules/mob/living/carbon/human/human.dm | 1 + .../carbon/human/species_types/dullahan.dm | 4 ++++ .../carbon/human/species_types/ethereal.dm | 2 ++ .../carbon/human/species_types/golems.dm | 1 + .../carbon/human/species_types/jellypeople.dm | 1 + .../carbon/human/species_types/synths.dm | 1 + code/modules/mob/living/living.dm | 4 ++++ code/modules/mob/living/silicon/ai/ai.dm | 1 + .../modules/mob/living/silicon/robot/robot.dm | 1 + .../mob/living/simple_animal/bot/mulebot.dm | 1 + .../living/simple_animal/eldritch_demons.dm | 1 + .../simple_animal/guardian/types/explosive.dm | 2 ++ .../guardian/types/gravitokinetic.dm | 1 + .../mob/living/simple_animal/hostile/goose.dm | 3 ++- .../hostile/megafauna/demonic_frost_miner.dm | 6 +++-- .../mob/living/simple_animal/hostile/ooze.dm | 1 + .../file_system/programs/sm_monitor.dm | 6 +++-- .../plumbing/plumbers/plumbing_buffer.dm | 1 + code/modules/projectiles/guns/ballistic.dm | 1 + code/modules/projectiles/guns/energy.dm | 1 + .../projectiles/guns/energy/special.dm | 1 + code/modules/projectiles/guns/magic.dm | 1 + .../projectiles/guns/misc/beam_rifle.dm | 3 ++- .../projectiles/guns/misc/blastcannon.dm | 7 +++--- code/modules/projectiles/guns/misc/medbeam.dm | 1 + code/modules/reagents/chemistry/items.dm | 2 +- .../research/anomaly/explosive_compressor.dm | 1 + .../nanites/nanite_programs/sensor.dm | 1 + code/modules/research/stock_parts.dm | 1 + .../crossbreeding/_status_effects.dm | 2 ++ .../research/xenobiology/xenobio_camera.dm | 4 +++- .../ruins/icemoonruin_code/hotsprings.dm | 1 + code/modules/ruins/icemoonruin_code/wrath.dm | 1 + .../ruins/spaceruin_code/hilbertshotel.dm | 2 +- code/modules/surgery/organs/augments_arms.dm | 7 +++++- code/modules/surgery/organs/augments_chest.dm | 2 ++ .../surgery/organs/augments_internal.dm | 1 + code/modules/surgery/organs/eyes.dm | 1 + code/modules/surgery/organs/organ_internal.dm | 1 + code/modules/surgery/organs/stomach.dm | 2 ++ code/modules/surgery/organs/tongue.dm | 1 + code/modules/tgui/external.dm | 1 + code/modules/unit_tests/combat.dm | 3 +++ code/modules/unit_tests/emoting.dm | 1 + code/modules/vehicles/mecha/combat/durand.dm | 3 ++- 121 files changed, 199 insertions(+), 34 deletions(-) diff --git a/code/controllers/subsystem/eigenstate.dm b/code/controllers/subsystem/eigenstate.dm index 0cc59c44d67..b1aab88e38b 100644 --- a/code/controllers/subsystem/eigenstate.dm +++ b/code/controllers/subsystem/eigenstate.dm @@ -64,6 +64,7 @@ SUBSYSTEM_DEF(eigenstates) ///removes an object reference from the master list /datum/controller/subsystem/eigenstates/proc/remove_eigen_entry(atom/entry) + SIGNAL_HANDLER var/id = eigen_id[entry] eigen_targets[id] -= entry eigen_id -= entry @@ -83,6 +84,8 @@ SUBSYSTEM_DEF(eigenstates) ///Finds the object within the master list, then sends the thing to the object's location /datum/controller/subsystem/eigenstates/proc/use_eigenlinked_atom(atom/object_sent_from, atom/movable/thing_to_send) + SIGNAL_HANDLER + var/id = eigen_id[object_sent_from] if(!id) stack_trace("[object_sent_from] attempted to eigenlink to something that didn't have a valid id!") @@ -110,5 +113,6 @@ SUBSYSTEM_DEF(eigenstates) ///Prevents tool use on the item /datum/controller/subsystem/eigenstates/proc/tool_interact(atom/source, mob/user, obj/item/item) + SIGNAL_HANDLER to_chat(user, "The unstable nature of [source] makes it impossible to use [item] on [source.p_them()]!") return COMPONENT_BLOCK_TOOL_ATTACK diff --git a/code/controllers/subsystem/statpanel.dm b/code/controllers/subsystem/statpanel.dm index 77965518383..37860f185f0 100644 --- a/code/controllers/subsystem/statpanel.dm +++ b/code/controllers/subsystem/statpanel.dm @@ -167,6 +167,7 @@ SUBSYSTEM_DEF(statpanels) mc_data_encoded = url_encode(json_encode(mc_data)) /atom/proc/remove_from_cache() + SIGNAL_HANDLER SSstatpanels.cached_images -= REF(src) /// verbs that send information from the browser UI diff --git a/code/datums/ai/_ai_controller.dm b/code/datums/ai/_ai_controller.dm index f68b8c2f79a..75022819a1c 100644 --- a/code/datums/ai/_ai_controller.dm +++ b/code/datums/ai/_ai_controller.dm @@ -188,12 +188,14 @@ have ways of interacting with a specific atom and control it. They posses a blac current_behavior.finish_action(src, FALSE) /datum/ai_controller/proc/on_sentience_gained() + SIGNAL_HANDLER UnregisterSignal(pawn, COMSIG_MOB_LOGIN) if(!continue_processing_when_client) set_ai_status(AI_STATUS_OFF) //Can't do anything while player is connected RegisterSignal(pawn, COMSIG_MOB_LOGOUT, .proc/on_sentience_lost) /datum/ai_controller/proc/on_sentience_lost() + SIGNAL_HANDLER UnregisterSignal(pawn, COMSIG_MOB_LOGOUT) set_ai_status(AI_STATUS_ON) //Can't do anything while player is connected RegisterSignal(pawn, COMSIG_MOB_LOGIN, .proc/on_sentience_gained) diff --git a/code/datums/ai/hauntium/haunted_controller.dm b/code/datums/ai/hauntium/haunted_controller.dm index 515efcdc623..87f4ebfc21d 100644 --- a/code/datums/ai/hauntium/haunted_controller.dm +++ b/code/datums/ai/hauntium/haunted_controller.dm @@ -49,6 +49,7 @@ ///Signal response for when the item is picked up; stops listening for follow up equips, just waits for a drop. /datum/ai_controller/haunted/proc/on_equip(datum/source, mob/equipper, slot) + SIGNAL_HANDLER UnregisterSignal(pawn, COMSIG_ITEM_EQUIPPED) var/list/hauntee_list = blackboard[BB_TO_HAUNT_LIST] hauntee_list[equipper] = hauntee_list[equipper] + HAUNTED_ITEM_AGGRO_ADDITION //You have now become one of the victims of the HAAAAUNTTIIIINNGGG OOOOOO~~~ @@ -57,5 +58,6 @@ ///Flip it so we listen for equip again but not for drop. /datum/ai_controller/haunted/proc/on_dropped(datum/source, mob/user) + SIGNAL_HANDLER RegisterSignal(pawn, COMSIG_ITEM_EQUIPPED, .proc/on_equip) UnregisterSignal(pawn, COMSIG_ITEM_DROPPED) diff --git a/code/datums/beam.dm b/code/datums/beam.dm index 9dd4136123f..6d84bf69467 100644 --- a/code/datums/beam.dm +++ b/code/datums/beam.dm @@ -59,9 +59,10 @@ * direction: in what direction mover moved from. */ /datum/beam/proc/redrawing(atom/movable/mover, atom/oldloc, direction) + SIGNAL_HANDLER if(origin && target && get_dist(origin,target)[user] scoops delicious [dispenser.selected_flavour] ice cream into [source].") dispenser.product_types[dispenser.selected_flavour]-- - dispenser.updateDialog() + INVOKE_ASYNC(dispenser, /obj/machinery/icecream_vat.proc/updateDialog) else to_chat(user, "There is not enough ice cream left!") else diff --git a/code/datums/components/fullauto.dm b/code/datums/components/fullauto.dm index 2d00783e303..533f3b9d091 100644 --- a/code/datums/components/fullauto.dm +++ b/code/datums/components/fullauto.dm @@ -97,6 +97,7 @@ autofire_on(source.client) /datum/component/automatic_fire/proc/on_mouse_down(client/source, atom/_target, turf/location, control, params) + SIGNAL_HANDLER var/list/modifiers = params2list(params) //If they're shift+clicking, for example, let's not have them accidentally shoot. if(LAZYACCESS(modifiers, SHIFT_CLICK)) @@ -136,7 +137,7 @@ target = _target target_loc = get_turf(target) mouse_parameters = params - start_autofiring() + INVOKE_ASYNC(src, .proc/start_autofiring) //Dakka-dakka diff --git a/code/datums/components/honkspam.dm b/code/datums/components/honkspam.dm index 7f2069d18df..5c59708f3cc 100644 --- a/code/datums/components/honkspam.dm +++ b/code/datums/components/honkspam.dm @@ -16,6 +16,7 @@ limiting_spam = FALSE /datum/component/honkspam/proc/interact(mob/user) + SIGNAL_HANDLER if(!limiting_spam) limiting_spam = TRUE var/obj/item/parent_item = parent diff --git a/code/datums/components/infective.dm b/code/datums/components/infective.dm index 3aeb006dc1d..bf386941dc3 100644 --- a/code/datums/components/infective.dm +++ b/code/datums/components/infective.dm @@ -88,6 +88,7 @@ try_infect(target, hit_zone) /datum/component/infective/proc/try_infect_attack(datum/source, mob/living/target, mob/living/user) + SIGNAL_HANDLER if(!iscarbon(target)) //this case will be handled by try_infect_attack_zone try_infect(target) try_infect(user, BODY_ZONE_L_ARM) diff --git a/code/datums/components/orbiter.dm b/code/datums/components/orbiter.dm index 4cc743ed2c2..349ebefc3f8 100644 --- a/code/datums/components/orbiter.dm +++ b/code/datums/components/orbiter.dm @@ -151,6 +151,7 @@ end_orbit(orbiter) /datum/component/orbiter/proc/orbiter_glide_size_update(datum/source, target) + SIGNAL_HANDLER for(var/orbiter in orbiter_list) var/atom/movable/movable_orbiter = orbiter movable_orbiter.glide_size = target diff --git a/code/datums/components/pellet_cloud.dm b/code/datums/components/pellet_cloud.dm index 79e8ca3beea..6595daa22f7 100644 --- a/code/datums/components/pellet_cloud.dm +++ b/code/datums/components/pellet_cloud.dm @@ -260,6 +260,7 @@ ///One of our pellets disappeared due to hitting their max range (or just somehow got qdel'd), remove it from our list and check if we're done (terminated == num_pellets) /datum/component/pellet_cloud/proc/pellet_range(obj/projectile/P) + SIGNAL_HANDLER pellets -= P terminated++ UnregisterSignal(P, list(COMSIG_PARENT_QDELETING, COMSIG_PROJECTILE_RANGE_OUT, COMSIG_PROJECTILE_SELF_ON_HIT)) diff --git a/code/datums/components/plumbing/_plumbing.dm b/code/datums/components/plumbing/_plumbing.dm index 3af63f290f8..243b2fd22d6 100644 --- a/code/datums/components/plumbing/_plumbing.dm +++ b/code/datums/components/plumbing/_plumbing.dm @@ -216,6 +216,7 @@ ///settle wherever we are, and start behaving like a piece of plumbing /datum/component/plumbing/proc/enable(obj/object, datum/component/component) + SIGNAL_HANDLER if(active || (component && component != src)) UnregisterSignal(parent, list(COMSIG_COMPONENT_ADDED)) return @@ -302,6 +303,7 @@ AM.update_appearance() /datum/component/plumbing/proc/change_ducting_layer(obj/caller, obj/O, new_layer = DUCT_LAYER_DEFAULT) + SIGNAL_HANDLER ducting_layer = new_layer if(ismovable(parent)) diff --git a/code/datums/components/pricetag.dm b/code/datums/components/pricetag.dm index 5d56b46b5f8..bd29c3199c0 100644 --- a/code/datums/components/pricetag.dm +++ b/code/datums/components/pricetag.dm @@ -36,4 +36,5 @@ return TRUE /datum/component/pricetag/proc/return_ratio() + SIGNAL_HANDLER return default_profit_ratio diff --git a/code/datums/components/riding/riding_mob.dm b/code/datums/components/riding/riding_mob.dm index 92ec4838bbb..4ae5f3f27b1 100644 --- a/code/datums/components/riding/riding_mob.dm +++ b/code/datums/components/riding/riding_mob.dm @@ -115,6 +115,7 @@ /// If we're a cyborg or animal and we spin, we yeet whoever's on us off us /datum/component/riding/creature/proc/check_emote(mob/living/user, datum/emote/emote) + SIGNAL_HANDLER if((!iscyborg(user) && !isanimal(user)) || !istype(emote, /datum/emote/spin)) return diff --git a/code/datums/components/singularity.dm b/code/datums/components/singularity.dm index 33cc1f526bc..1038998c773 100644 --- a/code/datums/components/singularity.dm +++ b/code/datums/components/singularity.dm @@ -290,6 +290,7 @@ /// Fired when the singularity is fired at with the BSA and deletes it /datum/component/singularity/proc/bluespace_reaction() + SIGNAL_HANDLER if (!bsa_targetable) return diff --git a/code/datums/components/soundplayer.dm b/code/datums/components/soundplayer.dm index 884a154b556..1873d8c8e5f 100644 --- a/code/datums/components/soundplayer.dm +++ b/code/datums/components/soundplayer.dm @@ -30,6 +30,7 @@ If amount_left is equal to -1, the component is infinite and will never delete itself. */ /datum/component/sound_player/proc/play_sound() + SIGNAL_HANDLER playsound(parent, pickweight(sounds), volume, TRUE) switch(amount_left) if(-1) diff --git a/code/datums/components/storage/concrete/_concrete.dm b/code/datums/components/storage/concrete/_concrete.dm index 6ba9928fc98..b78bebba07c 100644 --- a/code/datums/components/storage/concrete/_concrete.dm +++ b/code/datums/components/storage/concrete/_concrete.dm @@ -92,12 +92,14 @@ return FALSE /datum/component/storage/concrete/proc/on_contents_del(datum/source, atom/A) + SIGNAL_HANDLER var/atom/real_location = parent if(A in real_location) usr = null remove_from_storage(A, null) /datum/component/storage/concrete/proc/on_deconstruct(datum/source, disassembled) + SIGNAL_HANDLER if(drop_all_on_deconstruct) do_quick_empty() diff --git a/code/datums/components/swabbing.dm b/code/datums/components/swabbing.dm index 37f94afbcb7..96f7cb745c8 100644 --- a/code/datums/components/swabbing.dm +++ b/code/datums/components/swabbing.dm @@ -42,6 +42,7 @@ This component is used in vat growing to swab for microbiological samples which ///Changes examine based on your sample /datum/component/swabbing/proc/examine(datum/source, mob/user, list/examine_list) + SIGNAL_HANDLER if(LAZYLEN(swabbed_items)) examine_list += "There is a microbiological sample on [parent]!" examine_list += "You can see the following micro-organisms:\n" @@ -53,7 +54,7 @@ This component is used in vat growing to swab for microbiological samples which ///Ran when you attack an object, tries to get a swab of the object. if a swabbable surface is found it will run behavior and hopefully /datum/component/swabbing/proc/try_to_swab(datum/source, atom/target, mob/user, params) - set waitfor = FALSE //This prevents do_after() from making this proc not return it's value. + SIGNAL_HANDLER if(istype(target, /obj/structure/table))//help how do i do this less shitty return NONE //idk bro pls send help @@ -96,6 +97,9 @@ This component is used in vat growing to swab for microbiological samples which return to_chat(user, "You start swabbing [target] for samples!") + INVOKE_ASYNC(src, .proc/async_try_to_swab, target, user) + +/datum/component/swabbing/proc/async_try_to_swab(atom/target, mob/user) if(!do_after(user, 3 SECONDS, target)) // Start swabbing boi return @@ -121,8 +125,10 @@ This component is used in vat growing to swab for microbiological samples which ///Handle any special overlay cases on the item itself /datum/component/swabbing/proc/handle_overlays(datum/source, list/overlays) + SIGNAL_HANDLER update_overlays?.Invoke(overlays, swabbed_items) ///Handle any special icon cases on the item itself /datum/component/swabbing/proc/handle_icon(datum/source) + SIGNAL_HANDLER update_icons?.Invoke(swabbed_items) diff --git a/code/datums/components/twohanded.dm b/code/datums/components/twohanded.dm index b4009da5382..0b7498edd8c 100644 --- a/code/datums/components/twohanded.dm +++ b/code/datums/components/twohanded.dm @@ -254,6 +254,7 @@ * on_attack triggers on attack with the parent item */ /datum/component/two_handed/proc/on_attack(obj/item/source, mob/living/target, mob/living/user) + SIGNAL_HANDLER if(wielded && attacksound) var/obj/item/parent_item = parent playsound(parent_item.loc, attacksound, 50, TRUE) diff --git a/code/datums/elements/dryable.dm b/code/datums/elements/dryable.dm index 53e450072b8..707abde538d 100644 --- a/code/datums/elements/dryable.dm +++ b/code/datums/elements/dryable.dm @@ -21,6 +21,7 @@ REMOVE_TRAIT(target, TRAIT_DRYABLE, ELEMENT_TRAIT) /datum/element/dryable/proc/finish_drying(atom/source) + SIGNAL_HANDLER var/atom/dried_atom = source if(dry_result == dried_atom.type)//if the dried type is the same as our currrent state, don't bother creating a whole new item, just re-color it. var/atom/movable/resulting_atom = dried_atom diff --git a/code/datums/elements/light_blocking.dm b/code/datums/elements/light_blocking.dm index 69b6beffe6a..86aac9f0758 100644 --- a/code/datums/elements/light_blocking.dm +++ b/code/datums/elements/light_blocking.dm @@ -27,6 +27,7 @@ ///Updates old and new turf loc opacities. /datum/element/light_blocking/proc/on_target_move(atom/movable/source, atom/OldLoc, Dir, Forced = FALSE) + SIGNAL_HANDLER if(isturf(OldLoc)) var/turf/old_turf = OldLoc old_turf.remove_opacity_source(source) diff --git a/code/datums/elements/obj_regen.dm b/code/datums/elements/obj_regen.dm index 7f13d4b2002..ee459be5064 100644 --- a/code/datums/elements/obj_regen.dm +++ b/code/datums/elements/obj_regen.dm @@ -35,6 +35,7 @@ /// Handles beginning processing objects. /datum/element/obj_regen/proc/on_take_damage(obj/target, damage_amt) + SIGNAL_HANDLER if(!damage_amt) return if(!length(processing)) diff --git a/code/datums/elements/skittish.dm b/code/datums/elements/skittish.dm index f3706c0e286..25d3e8f71e3 100644 --- a/code/datums/elements/skittish.dm +++ b/code/datums/elements/skittish.dm @@ -17,6 +17,7 @@ . = ..() /datum/element/skittish/proc/Bump(mob/living/scooby, atom/target) + SIGNAL_HANDLER if(scooby.stat != CONSCIOUS || scooby.m_intent != MOVE_INTENT_RUN) return diff --git a/code/datums/status_effects/neutral.dm b/code/datums/status_effects/neutral.dm index d3c8f8b2133..487fc0e187c 100644 --- a/code/datums/status_effects/neutral.dm +++ b/code/datums/status_effects/neutral.dm @@ -305,6 +305,7 @@ /// Something fishy is going on here... /datum/status_effect/high_fiving/proc/dropped_slap(obj/item/source) + SIGNAL_HANDLER slap_item = null //this effect gives the user an alert they can use to surrender quickly @@ -525,6 +526,7 @@ current_cycle++ /datum/status_effect/eigenstasium/proc/remove_clone_from_var() + SIGNAL_HANDLER UnregisterSignal(alt_clone, COMSIG_PARENT_QDELETING) /datum/status_effect/eigenstasium/on_remove() diff --git a/code/datums/wounds/bones.dm b/code/datums/wounds/bones.dm index d10768adc99..7ef875e76e6 100644 --- a/code/datums/wounds/bones.dm +++ b/code/datums/wounds/bones.dm @@ -176,6 +176,7 @@ */ /datum/wound/blunt/proc/update_inefficiencies() + SIGNAL_HANDLER if(limb.body_zone in list(BODY_ZONE_L_LEG, BODY_ZONE_R_LEG)) if(limb.current_gauze) limp_slowdown = initial(limp_slowdown) * limb.current_gauze.splint_factor @@ -222,6 +223,7 @@ /// Getting smushed in an airlock/firelock is a last-ditch attempt to try relocating your limb /datum/wound/blunt/moderate/proc/door_crush() + SIGNAL_HANDLER if(prob(33)) victim.visible_message("[victim]'s dislocated [limb.name] pops back into place!", "Your dislocated [limb.name] pops back into place! Ow!") remove_wound() diff --git a/code/game/atoms.dm b/code/game/atoms.dm index f52d1a2d489..fe67ba53a9b 100644 --- a/code/game/atoms.dm +++ b/code/game/atoms.dm @@ -472,6 +472,7 @@ ///Check if this atoms eye is still alive (probably) /atom/proc/check_eye(mob/user) + SIGNAL_HANDLER return /atom/proc/Bumped(atom/movable/AM) diff --git a/code/game/gamemodes/dynamic/dynamic_hijacking.dm b/code/game/gamemodes/dynamic/dynamic_hijacking.dm index 20c2e1d903e..04892ad1530 100644 --- a/code/game/gamemodes/dynamic/dynamic_hijacking.dm +++ b/code/game/gamemodes/dynamic/dynamic_hijacking.dm @@ -2,6 +2,7 @@ RegisterSignal(SSdcs, COMSIG_GLOB_PRE_RANDOM_EVENT, .proc/on_pre_random_event) /datum/game_mode/dynamic/proc/on_pre_random_event(datum/source, datum/round_event_control/round_event_control) + SIGNAL_HANDLER if (!round_event_control.dynamic_should_hijack) return diff --git a/code/game/machinery/accounting.dm b/code/game/machinery/accounting.dm index 98d2769dc59..304aae0caad 100644 --- a/code/game/machinery/accounting.dm +++ b/code/game/machinery/accounting.dm @@ -49,6 +49,7 @@ ///Used to clean up variables after the card has been removed, unregisters the removal signal, sets inserted ID to null, and updates the icon. /obj/machinery/accounting/proc/remove_card() + SIGNAL_HANDLER UnregisterSignal(inserted_id, COMSIG_PARENT_QDELETING) inserted_id = null update_appearance() diff --git a/code/game/objects/items/cards_ids.dm b/code/game/objects/items/cards_ids.dm index 424b70dfeb0..f9864117ac7 100644 --- a/code/game/objects/items/cards_ids.dm +++ b/code/game/objects/items/cards_ids.dm @@ -782,6 +782,7 @@ update_label() /obj/item/card/id/advanced/proc/on_holding_card_slot_moved(obj/item/computer_hardware/card_slot/source, atom/old_loc, dir, forced) + SIGNAL_HANDLER if(istype(old_loc, /obj/item/modular_computer/tablet)) UnregisterSignal(old_loc, COMSIG_ITEM_EQUIPPED, COMSIG_ITEM_DROPPED) diff --git a/code/game/objects/items/chrono_eraser.dm b/code/game/objects/items/chrono_eraser.dm index 22dc58eeed3..4e8f5feda25 100644 --- a/code/game/objects/items/chrono_eraser.dm +++ b/code/game/objects/items/chrono_eraser.dm @@ -35,11 +35,11 @@ qdel(PA) else PA = new(src) - user.put_in_hands(PA) + INVOKE_ASYNC(user, /mob.proc/put_in_hands, PA) /obj/item/chrono_eraser/item_action_slot_check(slot, mob/user) if(slot == ITEM_SLOT_BACK) - return 1 + return TRUE /obj/item/gun/energy/chrono_gun name = "T.E.D. Projection Apparatus" diff --git a/code/game/objects/items/control_wand.dm b/code/game/objects/items/control_wand.dm index 1e85d9bc600..a5b6a56708e 100644 --- a/code/game/objects/items/control_wand.dm +++ b/code/game/objects/items/control_wand.dm @@ -23,6 +23,7 @@ RegisterSignal(src, COMSIG_COMPONENT_NTNET_ACK, .proc/good_signal) /obj/item/door_remote/proc/bad_signal(datum/source, datum/netdata/data, error_code) + SIGNAL_HANDLER if(QDELETED(data.user)) return // can't send a message to a missing user if(error_code == NETWORK_ERROR_UNAUTHORIZED) @@ -32,6 +33,7 @@ /obj/item/door_remote/proc/good_signal(datum/source, datum/netdata/data, error_code) + SIGNAL_HANDLER if(QDELETED(data.user)) return var/toggled = data.data["data"] diff --git a/code/game/objects/items/defib.dm b/code/game/objects/items/defib.dm index d5b2e8c42a3..d6bbae067be 100644 --- a/code/game/objects/items/defib.dm +++ b/code/game/objects/items/defib.dm @@ -83,7 +83,7 @@ update_power() /obj/item/defibrillator/ui_action_click() - toggle_paddles() + INVOKE_ASYNC(src, .proc/toggle_paddles) //ATTACK HAND IGNORING PARENT RETURN VALUE /obj/item/defibrillator/attack_hand(mob/user, list/modifiers) diff --git a/code/game/objects/items/devices/PDA/PDA.dm b/code/game/objects/items/devices/PDA/PDA.dm index 1085b3e8896..d19342ad748 100644 --- a/code/game/objects/items/devices/PDA/PDA.dm +++ b/code/game/objects/items/devices/PDA/PDA.dm @@ -1262,6 +1262,7 @@ GLOBAL_LIST_EMPTY(PDAs) . += P /obj/item/pda/proc/pda_no_detonate() + SIGNAL_HANDLER return COMPONENT_PDA_NO_DETONATE #undef PDA_SCANNER_NONE diff --git a/code/game/objects/items/devices/geiger_counter.dm b/code/game/objects/items/devices/geiger_counter.dm index 771a0cf479d..522b29dcade 100644 --- a/code/game/objects/items/devices/geiger_counter.dm +++ b/code/game/objects/items/devices/geiger_counter.dm @@ -37,7 +37,7 @@ /obj/item/geiger_counter/Destroy() STOP_PROCESSING(SSobj, src) QDEL_NULL(soundloop) - + return ..() /obj/item/geiger_counter/process(delta_time) @@ -211,6 +211,7 @@ listeningTo = user /obj/item/geiger_counter/cyborg/proc/redirect_rad_act(datum/source, amount) + SIGNAL_HANDLER rad_act(amount) /obj/item/geiger_counter/cyborg/dropped() diff --git a/code/game/objects/items/devices/megaphone.dm b/code/game/objects/items/devices/megaphone.dm index b50d36e03b9..e3488b61d3c 100644 --- a/code/game/objects/items/devices/megaphone.dm +++ b/code/game/objects/items/devices/megaphone.dm @@ -29,6 +29,7 @@ UnregisterSignal(M, COMSIG_MOB_SAY) /obj/item/megaphone/proc/handle_speech(mob/living/carbon/user, list/speech_args) + SIGNAL_HANDLER if (user.get_active_held_item() == src) if(spamcheck > world.time) to_chat(user, "\The [src] needs to recharge!") diff --git a/code/game/objects/items/devices/radio/intercom.dm b/code/game/objects/items/devices/radio/intercom.dm index dc2c5c6afbc..5a7f45fdcca 100644 --- a/code/game/objects/items/devices/radio/intercom.dm +++ b/code/game/objects/items/devices/radio/intercom.dm @@ -120,6 +120,7 @@ * * source - the area that just had a power change. */ /obj/item/radio/intercom/proc/AreaPowerCheck(datum/source) + SIGNAL_HANDLER var/area/current_area = get_area(src) if(!current_area) on = FALSE diff --git a/code/game/objects/items/flamethrower.dm b/code/game/objects/items/flamethrower.dm index 4113549dae3..ad4eccbcf16 100644 --- a/code/game/objects/items/flamethrower.dm +++ b/code/game/objects/items/flamethrower.dm @@ -264,6 +264,7 @@ F.default_ignite(location,release_amount) /obj/item/flamethrower/proc/instant_refill() + SIGNAL_HANDLER if(ptank) var/datum/gas_mixture/tank_mix = ptank.return_air() tank_mix.assert_gas(/datum/gas/plasma) diff --git a/code/game/objects/items/food/misc.dm b/code/game/objects/items/food/misc.dm index 18db24e69a1..db002307a7b 100644 --- a/code/game/objects/items/food/misc.dm +++ b/code/game/objects/items/food/misc.dm @@ -192,6 +192,7 @@ ///Prevents grilling burnt shit from well, burning. /obj/item/food/badrecipe/proc/OnGrill() + SIGNAL_HANDLER return COMPONENT_HANDLED_GRILLING /obj/item/food/carrotfries diff --git a/code/game/objects/items/implants/implant.dm b/code/game/objects/items/implants/implant.dm index 412fe5f8d10..ce7e92bc515 100644 --- a/code/game/objects/items/implants/implant.dm +++ b/code/game/objects/items/implants/implant.dm @@ -18,7 +18,7 @@ SEND_SIGNAL(src, COMSIG_IMPLANT_ACTIVATED) /obj/item/implant/ui_action_click() - activate("action_button") + INVOKE_ASYNC(src, .proc/activate, "action_button") /obj/item/implant/proc/can_be_implanted_in(mob/living/target) if(issilicon(target)) diff --git a/code/game/objects/items/implants/implantuplink.dm b/code/game/objects/items/implants/implantuplink.dm index 6936602576f..118f49ef5a1 100644 --- a/code/game/objects/items/implants/implantuplink.dm +++ b/code/game/objects/items/implants/implantuplink.dm @@ -20,6 +20,7 @@ * the component, so delete itself. */ /obj/item/implant/uplink/proc/_component_removal(datum/source, datum/component/component) + SIGNAL_HANDLER if(istype(component, /datum/component/uplink)) qdel(src) diff --git a/code/game/objects/items/robot/robot_upgrades.dm b/code/game/objects/items/robot/robot_upgrades.dm index e5f511a2217..2894d095724 100644 --- a/code/game/objects/items/robot/robot_upgrades.dm +++ b/code/game/objects/items/robot/robot_upgrades.dm @@ -502,6 +502,7 @@ RegisterSignal(defib_instance, list(COMSIG_PARENT_QDELETING, COMSIG_MOVABLE_MOVED), .proc/on_defib_instance_qdel_or_moved) /obj/item/borg/upgrade/defib/backpack/proc/on_defib_instance_qdel_or_moved(obj/item/defibrillator/D) + SIGNAL_HANDLER defib_instance = null qdel(src) diff --git a/code/game/objects/items/storage/bags.dm b/code/game/objects/items/storage/bags.dm index dcf82f4e2e3..8c4434c0a22 100644 --- a/code/game/objects/items/storage/bags.dm +++ b/code/game/objects/items/storage/bags.dm @@ -144,6 +144,7 @@ listeningTo = null /obj/item/storage/bag/ore/proc/Pickup_ores(mob/living/user) + SIGNAL_HANDLER var/show_message = FALSE var/obj/structure/ore_box/box var/turf/tile = user.loc diff --git a/code/game/objects/items/storage/firstaid.dm b/code/game/objects/items/storage/firstaid.dm index b1e7ef9fe68..d873f15ab18 100644 --- a/code/game/objects/items/storage/firstaid.dm +++ b/code/game/objects/items/storage/firstaid.dm @@ -591,6 +591,7 @@ ///freezes the organ and loops bodyparts like heads /obj/item/storage/organbox/proc/freeze(datum/source, obj/item/I) + SIGNAL_HANDLER if(isorgan(I)) var/obj/item/organ/organ = I organ.organ_flags |= ORGAN_FROZEN @@ -604,6 +605,7 @@ ///unfreezes the organ and loops bodyparts like heads /obj/item/storage/organbox/proc/unfreeze(datum/source, obj/item/I) + SIGNAL_HANDLER if(isorgan(I)) var/obj/item/organ/organ = I organ.organ_flags &= ~ORGAN_FROZEN diff --git a/code/game/objects/items/tanks/jetpack.dm b/code/game/objects/items/tanks/jetpack.dm index 6d13d1e8195..c4ecf3353c5 100644 --- a/code/game/objects/items/tanks/jetpack.dm +++ b/code/game/objects/items/tanks/jetpack.dm @@ -74,10 +74,11 @@ ion_trail.stop() UnregisterSignal(user, COMSIG_MOVABLE_MOVED) UnregisterSignal(user, COMSIG_MOVABLE_PRE_MOVE) - + user.remove_movespeed_modifier(/datum/movespeed_modifier/jetpack/fullspeed) /obj/item/tank/jetpack/proc/move_react(mob/user) + SIGNAL_HANDLER if(!on)//If jet dont work, it dont work return if(!user || !user.client)//Don't allow jet self using @@ -94,6 +95,7 @@ allow_thrust(0.01, user) /obj/item/tank/jetpack/proc/pre_move_react(mob/user) + SIGNAL_HANDLER ion_trail.oldposition = get_turf(src) /obj/item/tank/jetpack/proc/allow_thrust(num, mob/living/user) diff --git a/code/game/objects/objs.dm b/code/game/objects/objs.dm index b68fba6d1cb..e608e2f87d6 100644 --- a/code/game/objects/objs.dm +++ b/code/game/objects/objs.dm @@ -190,6 +190,7 @@ ui_interact(user) /mob/proc/unset_machine() + SIGNAL_HANDLER if(!machine) return UnregisterSignal(machine, COMSIG_PARENT_QDELETING) diff --git a/code/game/objects/structures/training_machine.dm b/code/game/objects/structures/training_machine.dm index 5086ea07cc3..1957de98baf 100644 --- a/code/game/objects/structures/training_machine.dm +++ b/code/game/objects/structures/training_machine.dm @@ -142,6 +142,7 @@ * Cleans up behavior for when the attached item is deleted or removed. */ /obj/structure/training_machine/proc/on_attached_delete() + SIGNAL_HANDLER UnregisterSignal(attached_item, COMSIG_PARENT_QDELETING) vis_contents -= attached_item attached_item = null diff --git a/code/modules/antagonists/abductor/equipment/glands/access.dm b/code/modules/antagonists/abductor/equipment/glands/access.dm index e950a07d065..e11901ae617 100644 --- a/code/modules/antagonists/abductor/equipment/glands/access.dm +++ b/code/modules/antagonists/abductor/equipment/glands/access.dm @@ -12,6 +12,7 @@ RegisterSignal(owner, COMSIG_MOB_ALLOWED, .proc/free_access) /obj/item/organ/heart/gland/access/proc/free_access(datum/source, obj/O) + SIGNAL_HANDLER return TRUE /obj/item/organ/heart/gland/access/Remove(mob/living/carbon/M, special = 0) diff --git a/code/modules/antagonists/eldritch_cult/eldritch_antag.dm b/code/modules/antagonists/eldritch_cult/eldritch_antag.dm index 8b13d4b3a1e..06276098634 100644 --- a/code/modules/antagonists/eldritch_cult/eldritch_antag.dm +++ b/code/modules/antagonists/eldritch_cult/eldritch_antag.dm @@ -97,6 +97,7 @@ ///What happens to the heretic once he dies, used to remove any custom perks /datum/antagonist/heretic/proc/on_death() + SIGNAL_HANDLER for(var/knowledge_index in researched_knowledge) var/datum/eldritch_knowledge/knowledge = researched_knowledge[knowledge_index] diff --git a/code/modules/antagonists/eldritch_cult/eldritch_effects.dm b/code/modules/antagonists/eldritch_cult/eldritch_effects.dm index 00fff8700d3..90b549403a0 100644 --- a/code/modules/antagonists/eldritch_cult/eldritch_effects.dm +++ b/code/modules/antagonists/eldritch_cult/eldritch_effects.dm @@ -133,6 +133,7 @@ * Fixes any bugs that are caused by late Generate() or exchanging clients */ /datum/reality_smash_tracker/proc/ReworkNetwork() + SIGNAL_HANDLER listclearnulls(smashes) for(var/mind in targets) if(isnull(mind)) diff --git a/code/modules/antagonists/eldritch_cult/knowledge/flesh_lore.dm b/code/modules/antagonists/eldritch_cult/knowledge/flesh_lore.dm index 782890c8414..5e7578aefed 100644 --- a/code/modules/antagonists/eldritch_cult/knowledge/flesh_lore.dm +++ b/code/modules/antagonists/eldritch_cult/knowledge/flesh_lore.dm @@ -67,6 +67,7 @@ ghouls += humie /datum/eldritch_knowledge/flesh_ghoul/proc/remove_ghoul(datum/source) + SIGNAL_HANDLER var/mob/living/carbon/human/humie = source ghouls -= humie humie.mind.remove_antag_datum(/datum/antagonist/heretic_monster) diff --git a/code/modules/antagonists/nukeop/equipment/borgchameleon.dm b/code/modules/antagonists/nukeop/equipment/borgchameleon.dm index 670496ff254..3b5b5c1db86 100644 --- a/code/modules/antagonists/nukeop/equipment/borgchameleon.dm +++ b/code/modules/antagonists/nukeop/equipment/borgchameleon.dm @@ -113,6 +113,7 @@ src.user = user /obj/item/borg_chameleon/proc/disrupt(mob/living/silicon/robot/user) + SIGNAL_HANDLER if(active) to_chat(user, "Your chameleon field deactivates.") deactivate(user) diff --git a/code/modules/antagonists/traitor/syndicate_contract.dm b/code/modules/antagonists/traitor/syndicate_contract.dm index 8e381042f5e..084f65e3c83 100644 --- a/code/modules/antagonists/traitor/syndicate_contract.dm +++ b/code/modules/antagonists/traitor/syndicate_contract.dm @@ -71,6 +71,7 @@ new /obj/effect/pod_landingzone(empty_pod_turf, empty_pod) /datum/syndicate_contract/proc/enter_check(datum/source, sent_mob) + SIGNAL_HANDLER if (istype(source, /obj/structure/closet/supplypod/extractionpod)) if (isliving(sent_mob)) var/mob/living/M = sent_mob @@ -120,7 +121,7 @@ target.dna.species.give_important_for_life(target) // After pod is sent we start the victim narrative/heal. - handleVictimExperience(M) + INVOKE_ASYNC(src, .proc/handleVictimExperience, M) // This is slightly delayed because of the sleep calls above to handle the narrative. // We don't want to tell the station instantly. @@ -136,17 +137,20 @@ priority_announce("One of your crew was captured by a rival organisation - we've needed to pay their ransom to bring them back. \ As is policy we've taken a portion of the station's funds to offset the overall cost.", null, null, null, "Nanotrasen Asset Protection") - sleep(30) + INVOKE_ASYNC(src, .proc/finish_enter) - // Pay contractor their portion of ransom - if (status == CONTRACT_STATUS_COMPLETE) - var/obj/item/card/id/C = contract.owner.current?.get_idcard(TRUE) +/datum/syndicate_contract/proc/finish_enter() + sleep(30) - if(C?.registered_account) - C.registered_account.adjust_money(ransom * 0.35) + // Pay contractor their portion of ransom + if (status == CONTRACT_STATUS_COMPLETE) + var/obj/item/card/id/C = contract.owner.current?.get_idcard(TRUE) - C.registered_account.bank_card_talk("We've processed the ransom, agent. Here's your cut - your balance is now \ - [C.registered_account.account_balance] cr.", TRUE) + if(C?.registered_account) + C.registered_account.adjust_money(ransom * 0.35) + + C.registered_account.bank_card_talk("We've processed the ransom, agent. Here's your cut - your balance is now \ + [C.registered_account.account_balance] cr.", TRUE) // They're off to holding - handle the return timer and give some text about what's going on. /datum/syndicate_contract/proc/handleVictimExperience(mob/living/M) diff --git a/code/modules/atmospherics/machinery/bluespace_vendor.dm b/code/modules/atmospherics/machinery/bluespace_vendor.dm index e09bc7c4ce5..615aab4e5b8 100644 --- a/code/modules/atmospherics/machinery/bluespace_vendor.dm +++ b/code/modules/atmospherics/machinery/bluespace_vendor.dm @@ -182,6 +182,7 @@ ///Unregister the connected_machine (either when qdel this or the sender) /obj/machinery/bluespace_vendor/proc/unregister_machine() + SIGNAL_HANDLER UnregisterSignal(connected_machine, COMSIG_PARENT_QDELETING) LAZYREMOVE(connected_machine.vendors, src) connected_machine = null diff --git a/code/modules/atmospherics/machinery/components/components_base.dm b/code/modules/atmospherics/machinery/components/components_base.dm index 121c6668c49..2b0c5c568dc 100644 --- a/code/modules/atmospherics/machinery/components/components_base.dm +++ b/code/modules/atmospherics/machinery/components/components_base.dm @@ -43,6 +43,7 @@ * Called in Initialize(), set the showpipe var to true or false depending on the situation, calls update_icon() */ /obj/machinery/atmospherics/components/proc/hide_pipe(datum/source, covered) + SIGNAL_HANDLER showpipe = !covered update_appearance() diff --git a/code/modules/atmospherics/machinery/components/fusion/hfr_procs.dm b/code/modules/atmospherics/machinery/components/fusion/hfr_procs.dm index 462038ae3aa..16462780efc 100644 --- a/code/modules/atmospherics/machinery/components/fusion/hfr_procs.dm +++ b/code/modules/atmospherics/machinery/components/fusion/hfr_procs.dm @@ -113,6 +113,7 @@ * * only_signals: default FALSE, if true the proc will not call the deactivate() proc */ /obj/machinery/atmospherics/components/unary/hypertorus/core/proc/unregister_signals(only_signals = FALSE) + SIGNAL_HANDLER UnregisterSignal(linked_interface, COMSIG_PARENT_QDELETING) UnregisterSignal(linked_input, COMSIG_PARENT_QDELETING) UnregisterSignal(linked_output, COMSIG_PARENT_QDELETING) diff --git a/code/modules/clothing/head/helmet.dm b/code/modules/clothing/head/helmet.dm index 8a24f1a70bb..7b695f118a4 100644 --- a/code/modules/clothing/head/helmet.dm +++ b/code/modules/clothing/head/helmet.dm @@ -487,6 +487,7 @@ qdel(src)//runs disconnect code /obj/item/clothing/head/helmet/monkey_sentience/proc/make_fall_off() + SIGNAL_HANDLER if(magnification) visible_message("[src] falls off of [magnification]'s head as it changes shape!") magnification.dropItemToGround(src) diff --git a/code/modules/clothing/head/jobs.dm b/code/modules/clothing/head/jobs.dm index 30137da937f..8f330ff0009 100644 --- a/code/modules/clothing/head/jobs.dm +++ b/code/modules/clothing/head/jobs.dm @@ -225,6 +225,7 @@ UnregisterSignal(M, COMSIG_MOB_SAY) /obj/item/clothing/head/warden/drill/proc/handle_speech(datum/source, mob/speech_args) + SIGNAL_HANDLER var/message = speech_args[SPEECH_MESSAGE] if(message[1] != "*") switch (mode) diff --git a/code/modules/clothing/head/misc.dm b/code/modules/clothing/head/misc.dm index 45791a668eb..3f38eb0b2d7 100644 --- a/code/modules/clothing/head/misc.dm +++ b/code/modules/clothing/head/misc.dm @@ -447,6 +447,7 @@ UnregisterSignal(M, COMSIG_MOB_SAY) /obj/item/clothing/head/frenchberet/proc/handle_speech(datum/source, mob/speech_args) + SIGNAL_HANDLER var/message = speech_args[SPEECH_MESSAGE] if(message[1] != "*") message = " [message]" diff --git a/code/modules/clothing/shoes/_shoes.dm b/code/modules/clothing/shoes/_shoes.dm index 380a2a9a11d..8b8d77f0e52 100644 --- a/code/modules/clothing/shoes/_shoes.dm +++ b/code/modules/clothing/shoes/_shoes.dm @@ -202,6 +202,7 @@ ///check_trip runs on each step to see if we fall over as a result of our lace status. Knotted laces are a guaranteed trip, while untied shoes are just a chance to stumble /obj/item/clothing/shoes/proc/check_trip() + SIGNAL_HANDLER var/mob/living/carbon/human/our_guy = loc if(!istype(our_guy)) // are they REALLY /our guy/? return diff --git a/code/modules/clothing/spacesuits/hardsuit.dm b/code/modules/clothing/spacesuits/hardsuit.dm index 429ffe45575..3eacb205c62 100644 --- a/code/modules/clothing/spacesuits/hardsuit.dm +++ b/code/modules/clothing/spacesuits/hardsuit.dm @@ -735,6 +735,7 @@ var/mob/listeningTo /obj/item/clothing/suit/space/hardsuit/ancient/proc/on_mob_move() + SIGNAL_HANDLER var/mob/living/carbon/human/H = loc if(!istype(H) || H.wear_suit != src) return diff --git a/code/modules/clothing/suits/cloaks.dm b/code/modules/clothing/suits/cloaks.dm index 076ebd56b57..4c96f75efc6 100644 --- a/code/modules/clothing/suits/cloaks.dm +++ b/code/modules/clothing/suits/cloaks.dm @@ -148,6 +148,7 @@ UnregisterSignal(user, COMSIG_MOB_STATCHANGE, .proc/resurrect) /obj/item/clothing/suit/hooded/cloak/godslayer/proc/resurrect(mob/living/carbon/user, new_stat) + SIGNAL_HANDLER if(new_stat > CONSCIOUS && new_stat < DEAD && COOLDOWN_FINISHED(src, effect_cooldown)) user.heal_ordered_damage(heal_amount, damage_heal_order) user.visible_message("[user] suddenly revives, as their armor swirls with demonic energy!", "You suddenly feel invigorated!") diff --git a/code/modules/clothing/under/accessories.dm b/code/modules/clothing/under/accessories.dm index 109a76bee5f..ef19e15c7b6 100755 --- a/code/modules/clothing/under/accessories.dm +++ b/code/modules/clothing/under/accessories.dm @@ -420,4 +420,5 @@ ///What happens when we examine the uniform /obj/item/clothing/accessory/allergy_dogtag/proc/on_examine(datum/source, mob/user, list/examine_list) + SIGNAL_HANDLER examine_list += "The dogtag has a listing of allergies : [display]" diff --git a/code/modules/experisci/experiment/handlers/experiment_handler.dm b/code/modules/experisci/experiment/handlers/experiment_handler.dm index 430dff2fa0d..88658e7704a 100644 --- a/code/modules/experisci/experiment/handlers/experiment_handler.dm +++ b/code/modules/experisci/experiment/handlers/experiment_handler.dm @@ -237,7 +237,8 @@ * * user - The user to show the experiment configuration panel to */ /datum/component/experiment_handler/proc/configure_experiment(datum/source, mob/user) - ui_interact(user) + SIGNAL_HANDLER + INVOKE_ASYNC(src, .proc/ui_interact, user) /** * Attempts to show the user the experiment configuration panel diff --git a/code/modules/explorer_drone/scanner_array.dm b/code/modules/explorer_drone/scanner_array.dm index a9d4705758f..03cb4b91d70 100644 --- a/code/modules/explorer_drone/scanner_array.dm +++ b/code/modules/explorer_drone/scanner_array.dm @@ -270,6 +270,7 @@ GLOBAL_LIST_INIT(scan_conditions,init_scan_conditions()) return current_scan /datum/scanner_controller/proc/cleanup_current_scan() + SIGNAL_HANDLER current_scan = null SEND_SIGNAL(src,COMSIG_EXOSCAN_FINISHED,current_scan) diff --git a/code/modules/food_and_drinks/drinks/drinks/bottle.dm b/code/modules/food_and_drinks/drinks/drinks/bottle.dm index 3eb2fbf8d3f..cd7f93c777c 100644 --- a/code/modules/food_and_drinks/drinks/drinks/bottle.dm +++ b/code/modules/food_and_drinks/drinks/drinks/bottle.dm @@ -603,6 +603,7 @@ // TODO: make it so the washer spills reagents if a reagent container is in there, for now, you can wash pruno /obj/item/reagent_containers/food/drinks/bottle/pruno/proc/check_fermentation() + SIGNAL_HANDLER if (!(istype(loc, /obj/machinery) || istype(loc, /obj/structure))) if(fermentation_timer) fermentation_time_remaining = timeleft(fermentation_timer) diff --git a/code/modules/food_and_drinks/kitchen_machinery/griddle.dm b/code/modules/food_and_drinks/kitchen_machinery/griddle.dm index 3d904549117..5d0c0bf8efd 100644 --- a/code/modules/food_and_drinks/kitchen_machinery/griddle.dm +++ b/code/modules/food_and_drinks/kitchen_machinery/griddle.dm @@ -101,6 +101,7 @@ update_grill_audio() /obj/machinery/griddle/proc/ItemRemovedFromGrill(obj/item/I) + SIGNAL_HANDLER I.flags_1 &= ~IS_ONTOP_1 griddled_objects -= I vis_contents -= I diff --git a/code/modules/holodeck/computer.dm b/code/modules/holodeck/computer.dm index d5613de0d93..5eafcf23cc2 100644 --- a/code/modules/holodeck/computer.dm +++ b/code/modules/holodeck/computer.dm @@ -295,6 +295,7 @@ and clear when youre done! if you dont i will use :newspaper2: on you qdel(object) /obj/machinery/computer/holodeck/proc/remove_from_holo_lists(datum/to_remove, _forced) + SIGNAL_HANDLER spawned -= to_remove UnregisterSignal(to_remove, COMSIG_PARENT_PREQDELETED) diff --git a/code/modules/hydroponics/plant_genes.dm b/code/modules/hydroponics/plant_genes.dm index e21f1f3c142..2f80ac355db 100644 --- a/code/modules/hydroponics/plant_genes.dm +++ b/code/modules/hydroponics/plant_genes.dm @@ -649,6 +649,7 @@ * target - the atom being hit on thrown or slipping on our plant */ /datum/plant_gene/trait/stinging/proc/prickles_inject(obj/item/our_plant, atom/target) + SIGNAL_HANDLER if(isliving(target) && our_plant.reagents?.total_volume) var/mob/living/living_target = target var/obj/item/seeds/our_seed = our_plant.get_plant_seed() @@ -810,6 +811,7 @@ * target - the atom that slipped on the plant */ /datum/plant_gene/trait/plant_laughter/proc/laughter(obj/item/our_plant, atom/target) + SIGNAL_HANDLER our_plant.audible_message("[our_plant] lets out burst of laughter.") playsound(our_plant, pick(sounds), 100, FALSE, SHORT_RANGE_SOUND_EXTRARANGE) diff --git a/code/modules/instruments/items.dm b/code/modules/instruments/items.dm index 49f73e9157c..fd5a9e1dd86 100644 --- a/code/modules/instruments/items.dm +++ b/code/modules/instruments/items.dm @@ -96,6 +96,7 @@ * Called by a component signal when our song starts playing. */ /obj/item/instrument/piano_synth/headphones/proc/start_playing() + SIGNAL_HANDLER icon_state = "[initial(icon_state)]_on" update_appearance() @@ -103,6 +104,7 @@ * Called by a component signal when our song stops playing. */ /obj/item/instrument/piano_synth/headphones/proc/stop_playing() + SIGNAL_HANDLER icon_state = "[initial(icon_state)]" update_appearance() @@ -253,6 +255,7 @@ actions_types = list(/datum/action/item_action/instrument) /obj/item/instrument/harmonica/proc/handle_speech(datum/source, list/speech_args) + SIGNAL_HANDLER if(song.playing && ismob(loc)) to_chat(loc, "You stop playing the harmonica to talk...") song.playing = FALSE diff --git a/code/modules/mining/equipment/kinetic_crusher.dm b/code/modules/mining/equipment/kinetic_crusher.dm index cde49333b12..fd324ea1d59 100644 --- a/code/modules/mining/equipment/kinetic_crusher.dm +++ b/code/modules/mining/equipment/kinetic_crusher.dm @@ -47,10 +47,12 @@ /// triggered on wield of two handed item /obj/item/kinetic_crusher/proc/on_wield(obj/item/source, mob/user) + SIGNAL_HANDLER wielded = TRUE /// triggered on unwield of two handed item /obj/item/kinetic_crusher/proc/on_unwield(obj/item/source, mob/user) + SIGNAL_HANDLER wielded = FALSE /obj/item/kinetic_crusher/examine(mob/living/user) diff --git a/code/modules/mining/equipment/resonator.dm b/code/modules/mining/equipment/resonator.dm index bcf0440b40e..ebfa199fc6a 100644 --- a/code/modules/mining/equipment/resonator.dm +++ b/code/modules/mining/equipment/resonator.dm @@ -101,6 +101,7 @@ resonance_damage *= damage_multiplier /obj/effect/temp_visual/resonance/proc/burst() + SIGNAL_HANDLER rupturing = TRUE var/turf/T = get_turf(src) new /obj/effect/temp_visual/resonance_crush(T) diff --git a/code/modules/mining/lavaland/necropolis_chests.dm b/code/modules/mining/lavaland/necropolis_chests.dm index 8c823e848ca..52a9a88cfb9 100644 --- a/code/modules/mining/lavaland/necropolis_chests.dm +++ b/code/modules/mining/lavaland/necropolis_chests.dm @@ -330,6 +330,7 @@ to_chat(orbits.parent, "Your vision returns to normal.") /obj/effect/wisp/proc/update_user_sight(mob/user) + SIGNAL_HANDLER user.sight |= sight_flags if(!isnull(lighting_alpha)) user.lighting_alpha = min(user.lighting_alpha, lighting_alpha) @@ -704,6 +705,7 @@ UnregisterSignal(user, COMSIG_MOVABLE_BUMP) /obj/item/clothing/gloves/gauntlets/proc/rocksmash(mob/living/carbon/human/H, atom/A, proximity) + SIGNAL_HANDLER if(!istype(A, /turf/closed/mineral)) return A.attackby(src, H) diff --git a/code/modules/mob/living/carbon/carbon.dm b/code/modules/mob/living/carbon/carbon.dm index 59516ec7320..9fe77fc00bc 100644 --- a/code/modules/mob/living/carbon/carbon.dm +++ b/code/modules/mob/living/carbon/carbon.dm @@ -1275,4 +1275,5 @@ /mob/living/carbon/proc/attach_rot(mapload) + SIGNAL_HANDLER AddComponent(/datum/component/rot, 6 MINUTES, 10 MINUTES, 1) diff --git a/code/modules/mob/living/carbon/carbon_defense.dm b/code/modules/mob/living/carbon/carbon_defense.dm index adc608ba08f..fecd50388c4 100644 --- a/code/modules/mob/living/carbon/carbon_defense.dm +++ b/code/modules/mob/living/carbon/carbon_defense.dm @@ -712,6 +712,7 @@ /// The limb or the whole damn person we were grasping got deleted or dismembered, so we don't care anymore /obj/item/self_grasp/proc/qdel_void() + SIGNAL_HANDLER qdel(src) /// We've already cleared that the bodypart in question is bleeding in [the place we create this][/mob/living/carbon/proc/grabbedby], so set up the connections diff --git a/code/modules/mob/living/carbon/human/human.dm b/code/modules/mob/living/carbon/human/human.dm index 34ad2c36771..2cd5e136b00 100644 --- a/code/modules/mob/living/carbon/human/human.dm +++ b/code/modules/mob/living/carbon/human/human.dm @@ -598,6 +598,7 @@ * Called on the COMSIG_COMPONENT_CLEAN_FACE_ACT signal */ /mob/living/carbon/human/proc/clean_face(datum/source, clean_types) + SIGNAL_HANDLER if(!is_mouth_covered() && clean_lips()) . = TRUE diff --git a/code/modules/mob/living/carbon/human/species_types/dullahan.dm b/code/modules/mob/living/carbon/human/species_types/dullahan.dm index 9fd974e654c..00d033a2961 100644 --- a/code/modules/mob/living/carbon/human/species_types/dullahan.dm +++ b/code/modules/mob/living/carbon/human/species_types/dullahan.dm @@ -139,20 +139,24 @@ qdel(src) /obj/item/dullahan_relay/proc/examinate_check(atom/source, mob/user) + SIGNAL_HANDLER if(user.client.eye == src) return COMPONENT_ALLOW_EXAMINATE //Adds the owner to the list of hearers in hearers_in_view(), for visible/hearable on top of say messages /obj/item/dullahan_relay/proc/include_owner(datum/source, list/processing_list, list/hearers) + SIGNAL_HANDLER if(!QDELETED(owner)) hearers += owner //Stops dullahans from gibbing when regenerating limbs /obj/item/dullahan_relay/proc/unlist_head(datum/source, noheal = FALSE, list/excluded_zones) + SIGNAL_HANDLER excluded_zones |= BODY_ZONE_HEAD //Retrieving the owner's head for better ahealing. /obj/item/dullahan_relay/proc/retrieve_head(datum/source, full_heal, admin_revive) + SIGNAL_HANDLER if(admin_revive) var/obj/item/bodypart/head/H = loc var/turf/T = get_turf(owner) diff --git a/code/modules/mob/living/carbon/human/species_types/ethereal.dm b/code/modules/mob/living/carbon/human/species_types/ethereal.dm index 14036c6c19a..d3988a55e85 100644 --- a/code/modules/mob/living/carbon/human/species_types/ethereal.dm +++ b/code/modules/mob/living/carbon/human/species_types/ethereal.dm @@ -101,6 +101,7 @@ H.update_body() /datum/species/ethereal/proc/on_emp_act(mob/living/carbon/human/H, severity) + SIGNAL_HANDLER EMPeffect = TRUE spec_updatehealth(H) to_chat(H, "You feel the light of your body leave you.") @@ -111,6 +112,7 @@ addtimer(CALLBACK(src, .proc/stop_emp, H), 20 SECONDS, TIMER_UNIQUE|TIMER_OVERRIDE) //We're out for 20 seconds /datum/species/ethereal/proc/on_emag_act(mob/living/carbon/human/H, mob/user) + SIGNAL_HANDLER if(emageffect) return emageffect = TRUE diff --git a/code/modules/mob/living/carbon/human/species_types/golems.dm b/code/modules/mob/living/carbon/human/species_types/golems.dm index 52f7ba80a3f..7c683c88675 100644 --- a/code/modules/mob/living/carbon/human/species_types/golems.dm +++ b/code/modules/mob/living/carbon/human/species_types/golems.dm @@ -671,6 +671,7 @@ playsound(get_turf(H), 'sound/misc/sadtrombone.ogg', 70, FALSE) /datum/species/golem/bananium/proc/handle_speech(datum/source, list/speech_args) + SIGNAL_HANDLER speech_args[SPEECH_SPANS] |= SPAN_CLOWN /datum/species/golem/runic diff --git a/code/modules/mob/living/carbon/human/species_types/jellypeople.dm b/code/modules/mob/living/carbon/human/species_types/jellypeople.dm index 4f0f2dff82c..4d8e05a41a2 100644 --- a/code/modules/mob/living/carbon/human/species_types/jellypeople.dm +++ b/code/modules/mob/living/carbon/human/species_types/jellypeople.dm @@ -635,6 +635,7 @@ return TRUE /datum/species/jelly/stargazer/proc/unlink_mob(mob/living/M) + SIGNAL_HANDLER var/link_id = linked_mobs.Find(M) if(!(link_id)) return diff --git a/code/modules/mob/living/carbon/human/species_types/synths.dm b/code/modules/mob/living/carbon/human/species_types/synths.dm index 6abfc230dc9..e4c55996192 100644 --- a/code/modules/mob/living/carbon/human/species_types/synths.dm +++ b/code/modules/mob/living/carbon/human/species_types/synths.dm @@ -132,6 +132,7 @@ /datum/species/synth/proc/handle_speech(datum/source, list/speech_args) + SIGNAL_HANDLER if (isliving(source)) // yeah it's gonna be living but just to be clean var/mob/living/L = source if(fake_species && L.health > disguise_fail_health) diff --git a/code/modules/mob/living/living.dm b/code/modules/mob/living/living.dm index 44cf979d26f..835c3fbfeb8 100644 --- a/code/modules/mob/living/living.dm +++ b/code/modules/mob/living/living.dm @@ -1610,6 +1610,7 @@ start_look_up() /mob/living/proc/start_look_up() + SIGNAL_HANDLER var/turf/ceiling = get_step_multiz(src, UP) if(!ceiling) //We are at the highest z-level. to_chat(src, "You can't see through the ceiling above you.") @@ -1631,6 +1632,7 @@ reset_perspective(ceiling) /mob/living/proc/stop_look_up() + SIGNAL_HANDLER reset_perspective() /mob/living/proc/end_look_up() @@ -1655,6 +1657,7 @@ start_look_down() /mob/living/proc/start_look_down() + SIGNAL_HANDLER var/turf/floor = get_turf(src) var/turf/lower_level = get_step_multiz(floor, DOWN) if(!lower_level) //We are at the lowest z-level. @@ -1679,6 +1682,7 @@ reset_perspective(lower_level) /mob/living/proc/stop_look_down() + SIGNAL_HANDLER reset_perspective() /mob/living/proc/end_look_down() diff --git a/code/modules/mob/living/silicon/ai/ai.dm b/code/modules/mob/living/silicon/ai/ai.dm index d6d6589a8ec..12cf5e74981 100644 --- a/code/modules/mob/living/silicon/ai/ai.dm +++ b/code/modules/mob/living/silicon/ai/ai.dm @@ -1004,6 +1004,7 @@ Remove(owner) //If the last shell is blown, destroy it. /mob/living/silicon/ai/proc/disconnect_shell() + SIGNAL_HANDLER if(deployed_shell) //Forcibly call back AI in event of things such as damage, EMP or power loss. to_chat(src, "Your remote connection has been reset!") deployed_shell.undeploy() diff --git a/code/modules/mob/living/silicon/robot/robot.dm b/code/modules/mob/living/silicon/robot/robot.dm index 160a7a23736..6417458c34e 100644 --- a/code/modules/mob/living/silicon/robot/robot.dm +++ b/code/modules/mob/living/silicon/robot/robot.dm @@ -937,6 +937,7 @@ aicamera.stored[i] = TRUE /mob/living/silicon/robot/proc/charge(datum/source, amount, repairs) + SIGNAL_HANDLER if(model) model.respawn_consumable(src, amount * 0.005) if(cell) diff --git a/code/modules/mob/living/simple_animal/bot/mulebot.dm b/code/modules/mob/living/simple_animal/bot/mulebot.dm index 716b0972fc1..d98a2e9ae7a 100644 --- a/code/modules/mob/living/simple_animal/bot/mulebot.dm +++ b/code/modules/mob/living/simple_animal/bot/mulebot.dm @@ -914,6 +914,7 @@ return "Unknown" /mob/living/simple_animal/bot/mulebot/paranormal/proc/ghostmoved() + SIGNAL_HANDLER visible_message("The ghostly figure vanishes...") UnregisterSignal(load, COMSIG_MOVABLE_MOVED) unload(0) diff --git a/code/modules/mob/living/simple_animal/eldritch_demons.dm b/code/modules/mob/living/simple_animal/eldritch_demons.dm index 6e2a8378b52..e9ae63412be 100644 --- a/code/modules/mob/living/simple_animal/eldritch_demons.dm +++ b/code/modules/mob/living/simple_animal/eldritch_demons.dm @@ -202,6 +202,7 @@ ///Updates the next mob in the chain to move to our last location, fixed the worm if somehow broken. /mob/living/simple_animal/hostile/eldritch/armsy/proc/update_chain_links() + SIGNAL_HANDLER if(!follow) return gib_trail() diff --git a/code/modules/mob/living/simple_animal/guardian/types/explosive.dm b/code/modules/mob/living/simple_animal/guardian/types/explosive.dm index 11795f7ffaf..037bb3001b4 100644 --- a/code/modules/mob/living/simple_animal/guardian/types/explosive.dm +++ b/code/modules/mob/living/simple_animal/guardian/types/explosive.dm @@ -54,6 +54,7 @@ to_chat(src, "Your powers are on cooldown! You must wait 20 seconds between bombs.") /mob/living/simple_animal/hostile/guardian/bomb/proc/kaboom(atom/source, mob/living/explodee) + SIGNAL_HANDLER if(!istype(explodee)) return if(explodee == src || explodee == summoner || hasmatchingsummoner(explodee)) @@ -71,6 +72,7 @@ UNREGISTER_BOMB_SIGNALS(A) /mob/living/simple_animal/hostile/guardian/bomb/proc/display_examine(datum/source, mob/user, text) + SIGNAL_HANDLER text += "It glows with a strange light!" #undef UNREGISTER_BOMB_SIGNALS diff --git a/code/modules/mob/living/simple_animal/guardian/types/gravitokinetic.dm b/code/modules/mob/living/simple_animal/guardian/types/gravitokinetic.dm index e36c4b11085..352262a48ee 100644 --- a/code/modules/mob/living/simple_animal/guardian/types/gravitokinetic.dm +++ b/code/modules/mob/living/simple_animal/guardian/types/gravitokinetic.dm @@ -70,5 +70,6 @@ gravito_targets -= target /mob/living/simple_animal/hostile/guardian/gravitokinetic/proc/__distance_check(atom/movable/AM, OldLoc, Dir, Forced) + SIGNAL_HANDLER if(get_dist(src, AM) > gravity_power_range) remove_gravity(AM) diff --git a/code/modules/mob/living/simple_animal/hostile/goose.dm b/code/modules/mob/living/simple_animal/hostile/goose.dm index e4a25b209b7..0f9b33522b2 100644 --- a/code/modules/mob/living/simple_animal/hostile/goose.dm +++ b/code/modules/mob/living/simple_animal/hostile/goose.dm @@ -43,6 +43,7 @@ RegisterSignal(src, COMSIG_MOVABLE_MOVED, .proc/goosement) /mob/living/simple_animal/hostile/retaliate/goose/proc/goosement(atom/movable/AM, OldLoc, Dir, Forced) + SIGNAL_HANDLER if(stat == DEAD) return if(prob(5) && random_retaliate) @@ -219,7 +220,7 @@ /mob/living/simple_animal/hostile/retaliate/goose/vomit/goosement(atom/movable/AM, OldLoc, Dir, Forced) . = ..() if(vomiting) - vomit() // its supposed to keep vomiting if you move + INVOKE_ASYNC(src, .proc/vomit) // its supposed to keep vomiting if you move return if(prob(vomitCoefficient * 0.2)) vomit_prestart(vomitTimeBonus + 25) diff --git a/code/modules/mob/living/simple_animal/hostile/megafauna/demonic_frost_miner.dm b/code/modules/mob/living/simple_animal/hostile/megafauna/demonic_frost_miner.dm index 45968629d12..76430ee6866 100644 --- a/code/modules/mob/living/simple_animal/hostile/megafauna/demonic_frost_miner.dm +++ b/code/modules/mob/living/simple_animal/hostile/megafauna/demonic_frost_miner.dm @@ -299,6 +299,7 @@ Difficulty: Extremely Hard /// Resurrects the target when they die by moving them and dusting a clone in their place, one life for another /obj/item/resurrection_crystal/proc/resurrect(mob/living/carbon/user, gibbed) + SIGNAL_HANDLER if(gibbed) to_chat(user, "This power cannot be used if your entire mortal body is disintegrated...") return @@ -306,12 +307,12 @@ Difficulty: Extremely Hard var/typepath = user.type var/mob/living/carbon/clone = new typepath(user.loc) clone.real_name = user.real_name - user.dna.transfer_identity(clone) + INVOKE_ASYNC(user.dna, /datum/dna.proc/transfer_identity, clone) clone.updateappearance(mutcolor_update=1) var/turf/T = find_safe_turf() user.forceMove(T) user.revive(full_heal = TRUE, admin_revive = TRUE) - user.set_species(/datum/species/shadow) + INVOKE_ASYNC(user, /mob/living/carbon.proc/set_species, /datum/species/shadow) to_chat(user, "You blink and find yourself in [get_area_name(T)]... feeling a bit darker.") clone.dust() qdel(src) @@ -413,6 +414,7 @@ Difficulty: Extremely Hard /// Blocks movement from the status effect owner /datum/status_effect/ice_block_talisman/proc/owner_moved() + SIGNAL_HANDLER return COMPONENT_MOVABLE_BLOCK_PRE_MOVE /datum/status_effect/ice_block_talisman/on_remove() diff --git a/code/modules/mob/living/simple_animal/hostile/ooze.dm b/code/modules/mob/living/simple_animal/hostile/ooze.dm index a7d49c4d2b1..2b51b955f16 100644 --- a/code/modules/mob/living/simple_animal/hostile/ooze.dm +++ b/code/modules/mob/living/simple_animal/hostile/ooze.dm @@ -212,6 +212,7 @@ RegisterSignal(owner, COMSIG_PARENT_PREQDELETED, .proc/handle_mob_deletion) /datum/action/consume/proc/handle_mob_deletion() + SIGNAL_HANDLER stop_consuming() //Shit out the vored mob before u go go ///Try to consume the pulled mob diff --git a/code/modules/modular_computers/file_system/programs/sm_monitor.dm b/code/modules/modular_computers/file_system/programs/sm_monitor.dm index 3e7b1c067af..432f7cbbd2a 100644 --- a/code/modules/modular_computers/file_system/programs/sm_monitor.dm +++ b/code/modules/modular_computers/file_system/programs/sm_monitor.dm @@ -91,6 +91,7 @@ * the supermatter probably don't need constant beeping to distract them. */ /datum/computer_file/program/supermatter_monitor/proc/send_alert() + SIGNAL_HANDLER if(!computer.get_ntnet_status()) return if(computer.active_program != src) @@ -107,6 +108,7 @@ * minimized or closed to avoid double-notifications. */ /datum/computer_file/program/supermatter_monitor/proc/send_start_alert() + SIGNAL_HANDLER if(!computer.get_ntnet_status()) return if(computer.active_program == src) @@ -131,9 +133,9 @@ data["SM_power"] = active.power data["SM_ambienttemp"] = air.temperature data["SM_ambientpressure"] = air.return_pressure() - data["SM_bad_moles_amount"] = MOLE_PENALTY_THRESHOLD / active.gasefficency + data["SM_bad_moles_amount"] = MOLE_PENALTY_THRESHOLD / active.gasefficency data["SM_moles"] = 0 - + var/list/gasdata = list() if(air.total_moles()) diff --git a/code/modules/plumbing/plumbers/plumbing_buffer.dm b/code/modules/plumbing/plumbers/plumbing_buffer.dm index 6c7a7c33ed7..7ec177ca5b2 100644 --- a/code/modules/plumbing/plumbers/plumbing_buffer.dm +++ b/code/modules/plumbing/plumbers/plumbing_buffer.dm @@ -29,6 +29,7 @@ return NONE /obj/machinery/plumbing/buffer/proc/on_reagent_change() + SIGNAL_HANDLER if(!buffer_net) return if(reagents.total_volume + CHEMICAL_QUANTISATION_LEVEL >= activation_volume && mode == UNREADY) diff --git a/code/modules/projectiles/guns/ballistic.dm b/code/modules/projectiles/guns/ballistic.dm index 201d639c3ff..b14bd0810fc 100644 --- a/code/modules/projectiles/guns/ballistic.dm +++ b/code/modules/projectiles/guns/ballistic.dm @@ -652,6 +652,7 @@ GLOBAL_LIST_INIT(gun_saw_types, typecacheof(list( . = TRUE /obj/item/gun/ballistic/proc/instant_reload() + SIGNAL_HANDLER if(magazine) magazine.top_off() else diff --git a/code/modules/projectiles/guns/energy.dm b/code/modules/projectiles/guns/energy.dm index b27b3627ced..d6786e6c3db 100644 --- a/code/modules/projectiles/guns/energy.dm +++ b/code/modules/projectiles/guns/energy.dm @@ -276,6 +276,7 @@ . = "[user] casually lights [A.loc == user ? "[user.p_their()] [A.name]" : A] with [src]. Damn." /obj/item/gun/energy/proc/instant_recharge() + SIGNAL_HANDLER if(!cell) return cell.charge = cell.maxcharge diff --git a/code/modules/projectiles/guns/energy/special.dm b/code/modules/projectiles/guns/energy/special.dm index 8e9db021bab..4b7cd9f55bf 100644 --- a/code/modules/projectiles/guns/energy/special.dm +++ b/code/modules/projectiles/guns/energy/special.dm @@ -243,6 +243,7 @@ select_fire() /obj/item/gun/energy/wormhole_projector/proc/on_portal_destroy(obj/effect/portal/P) + SIGNAL_HANDLER if(P == p_blue) p_blue = null else if(P == p_orange) diff --git a/code/modules/projectiles/guns/magic.dm b/code/modules/projectiles/guns/magic.dm index 757b1b1a10e..4ccf9aec009 100644 --- a/code/modules/projectiles/guns/magic.dm +++ b/code/modules/projectiles/guns/magic.dm @@ -94,6 +94,7 @@ recharge_newshot() /obj/item/gun/magic/proc/instant_recharge() + SIGNAL_HANDLER charges = max_charges recharge_newshot() update_appearance() diff --git a/code/modules/projectiles/guns/misc/beam_rifle.dm b/code/modules/projectiles/guns/misc/beam_rifle.dm index 03f06e4c12f..c2b72b2f410 100644 --- a/code/modules/projectiles/guns/misc/beam_rifle.dm +++ b/code/modules/projectiles/guns/misc/beam_rifle.dm @@ -232,11 +232,12 @@ lastangle = angle /obj/item/gun/energy/beam_rifle/proc/on_mob_move() + SIGNAL_HANDLER check_user() if(aiming) delay_penalty(aiming_time_increase_user_movement) process_aim() - aiming_beam(TRUE) + INVOKE_ASYNC(src, .proc/aiming_beam, TRUE) /obj/item/gun/energy/beam_rifle/proc/start_aiming() aiming_time_left = aiming_time diff --git a/code/modules/projectiles/guns/misc/blastcannon.dm b/code/modules/projectiles/guns/misc/blastcannon.dm index 85460bb6e62..0cb443f1a2a 100644 --- a/code/modules/projectiles/guns/misc/blastcannon.dm +++ b/code/modules/projectiles/guns/misc/blastcannon.dm @@ -134,6 +134,7 @@ * - [blastwave_data][/list]: A list containing all of the data for the blastwave. */ /obj/item/gun/blastcannon/proc/channel_blastwave(atom/source, list/arguments) + SIGNAL_HANDLER . = COMSIG_CANCEL_EXPLOSION var/heavy = arguments[EXARG_KEY_DEV_RANGE] @@ -145,15 +146,15 @@ return if(!ismob(loc)) - fire_dropped(heavy, medium, light) + INVOKE_ASYNC(src, .proc/fire_dropped, heavy, medium, light) return var/mob/holding = loc var/target = cached_target?.resolve() if(target && (holding.get_active_held_item() == src) && cached_firer && (holding == cached_firer.resolve())) - fire_intentionally(target, holding, heavy, medium, light, cached_modifiers) + INVOKE_ASYNC(src, .proc/fire_intentionally, target, holding, heavy, medium, light, cached_modifiers) else - fire_accidentally(holding, heavy, medium, light) + INVOKE_ASYNC(src, .proc/fire_accidentally, holding, heavy, medium, light) return /** diff --git a/code/modules/projectiles/guns/misc/medbeam.dm b/code/modules/projectiles/guns/misc/medbeam.dm index 23a53c195fd..035b0224a2c 100644 --- a/code/modules/projectiles/guns/misc/medbeam.dm +++ b/code/modules/projectiles/guns/misc/medbeam.dm @@ -50,6 +50,7 @@ * automatic disconnection = beam_died, so we can give a warning message first */ /obj/item/gun/medbeam/proc/beam_died() + SIGNAL_HANDLER active = FALSE //skip qdelling the beam again if we're doing this proc, because if(isliving(loc)) to_chat(loc, "You lose control of the beam!") diff --git a/code/modules/reagents/chemistry/items.dm b/code/modules/reagents/chemistry/items.dm index 85267661fe1..c21f485bc57 100644 --- a/code/modules/reagents/chemistry/items.dm +++ b/code/modules/reagents/chemistry/items.dm @@ -310,7 +310,7 @@ /obj/item/thermometer/ui_close(mob/user) . = ..() - remove_thermometer(user) + INVOKE_ASYNC(src, .proc/remove_thermometer, user) /obj/item/thermometer/ui_status(mob/user) if(!(in_range(src, user))) diff --git a/code/modules/research/anomaly/explosive_compressor.dm b/code/modules/research/anomaly/explosive_compressor.dm index e41fe01a7b8..4072a462140 100644 --- a/code/modules/research/anomaly/explosive_compressor.dm +++ b/code/modules/research/anomaly/explosive_compressor.dm @@ -178,6 +178,7 @@ * Checks whether an internal explosion was sufficient to compress the core. */ /obj/machinery/research/explosive_compressor/proc/check_test(atom/source, list/arguments) + SIGNAL_HANDLER . = COMSIG_CANCEL_EXPLOSION if(!inserted_core) test_status = "ERROR: No core present during detonation." diff --git a/code/modules/research/nanites/nanite_programs/sensor.dm b/code/modules/research/nanites/nanite_programs/sensor.dm index 400134ebc70..06a239574f9 100644 --- a/code/modules/research/nanites/nanite_programs/sensor.dm +++ b/code/modules/research/nanites/nanite_programs/sensor.dm @@ -250,6 +250,7 @@ UnregisterSignal(host_mob, COMSIG_MOVABLE_HEAR, .proc/on_hear) /datum/nanite_program/sensor/voice/proc/on_hear(datum/source, list/hearing_args) + SIGNAL_HANDLER var/datum/nanite_extra_setting/sentence = extra_settings[NES_SENTENCE] var/datum/nanite_extra_setting/inclusive = extra_settings[NES_INCLUSIVE_MODE] if(!sentence.get_value()) diff --git a/code/modules/research/stock_parts.dm b/code/modules/research/stock_parts.dm index 3207547bc8f..2a2bfd64b5f 100644 --- a/code/modules/research/stock_parts.dm +++ b/code/modules/research/stock_parts.dm @@ -57,6 +57,7 @@ If you create T5+ please take a pass at mech_fabricator.dm. The parts being good RegisterSignal(src, COMSIG_ATOM_ENTERED, .proc/on_part_entered) /obj/item/storage/part_replacer/bluespace/proc/on_part_entered(datum/source, obj/item/I) + SIGNAL_HANDLER if(!istype(I, /obj/item/stock_parts/cell)) return diff --git a/code/modules/research/xenobiology/crossbreeding/_status_effects.dm b/code/modules/research/xenobiology/crossbreeding/_status_effects.dm index 568d7a2fbc4..f8e36b3be45 100644 --- a/code/modules/research/xenobiology/crossbreeding/_status_effects.dm +++ b/code/modules/research/xenobiology/crossbreeding/_status_effects.dm @@ -75,8 +75,10 @@ return ..() /datum/status_effect/slimerecall/proc/resistField() + SIGNAL_HANDLER interrupted = TRUE owner.remove_status_effect(src) + /datum/status_effect/slimerecall/on_remove() UnregisterSignal(owner, COMSIG_LIVING_RESIST) owner.cut_overlay(bluespace) diff --git a/code/modules/research/xenobiology/xenobio_camera.dm b/code/modules/research/xenobiology/xenobio_camera.dm index 4e41c74e902..caab1bf7b06 100644 --- a/code/modules/research/xenobiology/xenobio_camera.dm +++ b/code/modules/research/xenobiology/xenobio_camera.dm @@ -373,6 +373,7 @@ //Feeds a potion to slime /obj/machinery/computer/camera_advanced/xenobio/proc/XenoSlimeClickAlt(mob/living/user, mob/living/simple_animal/slime/S) + SIGNAL_HANDLER if(!GLOB.cameranet.checkTurfVis(S.loc)) to_chat(user, "Target is not near a camera. Cannot proceed.") return @@ -384,10 +385,11 @@ to_chat(C, "No potion loaded.") return if(mobarea.name == E.allowed_area || (mobarea.area_flags & XENOBIOLOGY_COMPATIBLE)) - X.current_potion.attack(S, C) + INVOKE_ASYNC(X.current_potion, /obj/item/slimepotion/slime.proc/attack, S, C) //Picks up slime /obj/machinery/computer/camera_advanced/xenobio/proc/XenoSlimeClickShift(mob/living/user, mob/living/simple_animal/slime/S) + SIGNAL_HANDLER if(!GLOB.cameranet.checkTurfVis(S.loc)) to_chat(user, "Target is not near a camera. Cannot proceed.") return diff --git a/code/modules/ruins/icemoonruin_code/hotsprings.dm b/code/modules/ruins/icemoonruin_code/hotsprings.dm index 1613f499c29..29165a29209 100644 --- a/code/modules/ruins/icemoonruin_code/hotsprings.dm +++ b/code/modules/ruins/icemoonruin_code/hotsprings.dm @@ -53,4 +53,5 @@ GLOBAL_LIST_EMPTY(cursed_minds) * */ /turf/open/water/cursed_spring/proc/remove_from_cursed(datum/mind/M) + SIGNAL_HANDLER GLOB.cursed_minds -= M diff --git a/code/modules/ruins/icemoonruin_code/wrath.dm b/code/modules/ruins/icemoonruin_code/wrath.dm index 97c79d93e36..fab6f9f32d0 100644 --- a/code/modules/ruins/icemoonruin_code/wrath.dm +++ b/code/modules/ruins/icemoonruin_code/wrath.dm @@ -25,6 +25,7 @@ butchering.butchering_enabled = FALSE /obj/item/clothing/gloves/butchering/proc/butcher_target(mob/user, atom/target, proximity) + SIGNAL_HANDLER if(!isliving(target)) return return SEND_SIGNAL(src, COMSIG_ITEM_ATTACK, target, user) diff --git a/code/modules/ruins/spaceruin_code/hilbertshotel.dm b/code/modules/ruins/spaceruin_code/hilbertshotel.dm index 1eb19980299..46382d5d35c 100644 --- a/code/modules/ruins/spaceruin_code/hilbertshotel.dm +++ b/code/modules/ruins/spaceruin_code/hilbertshotel.dm @@ -330,7 +330,7 @@ GLOBAL_VAR_INIT(hhMysteryRoomNumber, rand(1, 999999)) /turf/closed/indestructible/hoteldoor/check_eye(mob/user) if(get_dist(get_turf(src), get_turf(user)) >= 2) for(var/datum/action/peephole_cancel/PHC in user.actions) - PHC.Trigger() + INVOKE_ASYNC(PHC, /datum/action/peephole_cancel.proc/Trigger) /datum/action/peephole_cancel name = "Cancel View" diff --git a/code/modules/surgery/organs/augments_arms.dm b/code/modules/surgery/organs/augments_arms.dm index d3bd07fa734..ede5d3cc6ab 100644 --- a/code/modules/surgery/organs/augments_arms.dm +++ b/code/modules/surgery/organs/augments_arms.dm @@ -56,7 +56,7 @@ var/side = zone == BODY_ZONE_R_ARM? RIGHT_HANDS : LEFT_HANDS hand = arm_owner.hand_bodyparts[side] if(hand) - RegisterSignal(hand, COMSIG_ITEM_ATTACK_SELF, .proc/ui_action_click) //If the limb gets an attack-self, open the menu. Only happens when hand is empty + RegisterSignal(hand, COMSIG_ITEM_ATTACK_SELF, .proc/on_item_attack_self) //If the limb gets an attack-self, open the menu. Only happens when hand is empty RegisterSignal(arm_owner, COMSIG_KB_MOB_DROPITEM_DOWN, .proc/dropkey) //We're nodrop, but we'll watch for the drop hotkey anyway and then stow if possible. /obj/item/organ/cyberimp/arm/Remove(mob/living/carbon/arm_owner, special = 0) @@ -66,6 +66,10 @@ UnregisterSignal(arm_owner, COMSIG_KB_MOB_DROPITEM_DOWN) ..() +/obj/item/organ/cyberimp/arm/proc/on_item_attack_self() + SIGNAL_HANDLER + INVOKE_ASYNC(src, .proc/ui_action_click) + /obj/item/organ/cyberimp/arm/emp_act(severity) . = ..() if(. & EMP_PROTECT_SELF) @@ -83,6 +87,7 @@ * selected, and that the item is actually owned by us, and then we'll hand off the rest to Retract() **/ /obj/item/organ/cyberimp/arm/proc/dropkey(mob/living/carbon/host) + SIGNAL_HANDLER if(!host) return //How did we even get here if(hand != host.hand_bodyparts[host.active_hand_index]) diff --git a/code/modules/surgery/organs/augments_chest.dm b/code/modules/surgery/organs/augments_chest.dm index f8367f801c4..d9719ca2675 100644 --- a/code/modules/surgery/organs/augments_chest.dm +++ b/code/modules/surgery/organs/augments_chest.dm @@ -174,6 +174,7 @@ return ..() /obj/item/organ/cyberimp/chest/thrusters/proc/move_react() + SIGNAL_HANDLER if(!on)//If jet dont work, it dont work return if(!owner)//Don't allow jet self using @@ -190,6 +191,7 @@ allow_thrust(0.01) /obj/item/organ/cyberimp/chest/thrusters/proc/pre_move_react() + SIGNAL_HANDLER ion_trail.oldposition = get_turf(owner) /obj/item/organ/cyberimp/chest/thrusters/proc/allow_thrust(num) diff --git a/code/modules/surgery/organs/augments_internal.dm b/code/modules/surgery/organs/augments_internal.dm index 2a1e3fcec6d..156f3bac3db 100644 --- a/code/modules/surgery/organs/augments_internal.dm +++ b/code/modules/surgery/organs/augments_internal.dm @@ -118,6 +118,7 @@ RegisterSignal(owner, signalCache, .proc/on_signal) /obj/item/organ/cyberimp/brain/anti_stun/proc/on_signal(datum/source, amount) + SIGNAL_HANDLER if(!(organ_flags & ORGAN_FAILING) && amount > 0) addtimer(CALLBACK(src, .proc/clear_stuns), stun_cap_amount, TIMER_UNIQUE|TIMER_OVERRIDE) diff --git a/code/modules/surgery/organs/eyes.dm b/code/modules/surgery/organs/eyes.dm index de3bda97943..37de20c99d0 100644 --- a/code/modules/surgery/organs/eyes.dm +++ b/code/modules/surgery/organs/eyes.dm @@ -344,6 +344,7 @@ remove_mob_overlay() /obj/item/organ/eyes/robotic/glow/proc/update_visuals(datum/source, olddir, newdir) + SIGNAL_HANDLER if(!active) return // Don't update if we're not active! if((LAZYLEN(eye_lighting) < light_beam_distance) || !on_mob) diff --git a/code/modules/surgery/organs/organ_internal.dm b/code/modules/surgery/organs/organ_internal.dm index f26e4770a2c..46ed4655f01 100644 --- a/code/modules/surgery/organs/organ_internal.dm +++ b/code/modules/surgery/organs/organ_internal.dm @@ -98,6 +98,7 @@ /obj/item/organ/proc/on_owner_examine(datum/source, mob/user, list/examine_list) + SIGNAL_HANDLER return /obj/item/organ/proc/on_find(mob/living/finder) diff --git a/code/modules/surgery/organs/stomach.dm b/code/modules/surgery/organs/stomach.dm index 9e91064d991..cc25b90f91e 100755 --- a/code/modules/surgery/organs/stomach.dm +++ b/code/modules/surgery/organs/stomach.dm @@ -210,9 +210,11 @@ ..() /obj/item/organ/stomach/ethereal/proc/charge(datum/source, amount, repairs) + SIGNAL_HANDLER adjust_charge(amount / 3.5) /obj/item/organ/stomach/ethereal/proc/on_electrocute(datum/source, shock_damage, siemens_coeff = 1, flags = NONE) + SIGNAL_HANDLER if(flags & SHOCK_ILLUSION) return adjust_charge(shock_damage * siemens_coeff * 2) diff --git a/code/modules/surgery/organs/tongue.dm b/code/modules/surgery/organs/tongue.dm index e302a3cfcd0..3b9cf05ad60 100644 --- a/code/modules/surgery/organs/tongue.dm +++ b/code/modules/surgery/organs/tongue.dm @@ -36,6 +36,7 @@ languages_possible = languages_possible_base /obj/item/organ/tongue/proc/handle_speech(datum/source, list/speech_args) + SIGNAL_HANDLER /obj/item/organ/tongue/Insert(mob/living/carbon/tongue_owner, special = 0) ..() diff --git a/code/modules/tgui/external.dm b/code/modules/tgui/external.dm index e3ca964256e..69888bd6417 100644 --- a/code/modules/tgui/external.dm +++ b/code/modules/tgui/external.dm @@ -146,6 +146,7 @@ * client/verb/uiclose(), which closes the ui window */ /datum/proc/ui_close(mob/user) + SIGNAL_HANDLER /** * verb diff --git a/code/modules/unit_tests/combat.dm b/code/modules/unit_tests/combat.dm index 806944912e3..62fce5c70b6 100644 --- a/code/modules/unit_tests/combat.dm +++ b/code/modules/unit_tests/combat.dm @@ -41,12 +41,15 @@ var/pre_attack_hit /datum/unit_test/attack_chain/proc/attack_hit() + SIGNAL_HANDLER attack_hit = TRUE /datum/unit_test/attack_chain/proc/post_attack_hit() + SIGNAL_HANDLER post_attack_hit = TRUE /datum/unit_test/attack_chain/proc/pre_attack_hit() + SIGNAL_HANDLER pre_attack_hit = TRUE /datum/unit_test/attack_chain/Run() diff --git a/code/modules/unit_tests/emoting.dm b/code/modules/unit_tests/emoting.dm index 5795ab34374..efa6c34b592 100644 --- a/code/modules/unit_tests/emoting.dm +++ b/code/modules/unit_tests/emoting.dm @@ -22,4 +22,5 @@ TEST_ASSERT_EQUAL(emotes_used, 2, "Human could not deathgasp while unconscious") /datum/unit_test/emoting/proc/on_emote_used() + SIGNAL_HANDLER emotes_used += 1 diff --git a/code/modules/vehicles/mecha/combat/durand.dm b/code/modules/vehicles/mecha/combat/durand.dm index bd44bbd3c1c..311bcbe8682 100644 --- a/code/modules/vehicles/mecha/combat/durand.dm +++ b/code/modules/vehicles/mecha/combat/durand.dm @@ -69,10 +69,10 @@ //Redirects projectiles to the shield if defense_check decides they should be blocked and returns true. /obj/vehicle/sealed/mecha/combat/durand/proc/prehit(obj/projectile/source, list/signal_args) + SIGNAL_HANDLER if(defense_check(source.loc) && shield) signal_args[2] = shield - /**Checks if defense mode is enabled, and if the attacker is standing in an area covered by the shield. Expects a turf. Returns true if the attack should be blocked, false if not.*/ /obj/vehicle/sealed/mecha/combat/durand/proc/defense_check(turf/aloc) @@ -222,6 +222,7 @@ own integrity back to max. Shield is automatically dropped if we run out of powe switching = FALSE /obj/durand_shield/proc/resetdir(datum/source, olddir, newdir) + SIGNAL_HANDLER setDir(newdir) /obj/durand_shield/take_damage()