diff --git a/code/__DEFINES/qdel.dm b/code/__DEFINES/qdel.dm index 2e5c3cebaac..392e16bb453 100644 --- a/code/__DEFINES/qdel.dm +++ b/code/__DEFINES/qdel.dm @@ -43,7 +43,7 @@ #define GC_CURRENTLY_BEING_QDELETED -2 #define QDELING(X) (X.gc_destroyed) -#define QDELETED(X) (!X || QDELING(X)) +#define QDELETED(X) (isnull(X) || QDELING(X)) #define QDESTROYING(X) (!X || X.gc_destroyed == GC_CURRENTLY_BEING_QDELETED) #define QDEL_IN(item, time) addtimer(CALLBACK(GLOBAL_PROC, GLOBAL_PROC_REF(qdel), (time) > GC_FILTER_QUEUE ? WEAKREF(item) : item), time, TIMER_STOPPABLE) diff --git a/code/datums/ai/dog/dog_controller.dm b/code/datums/ai/dog/dog_controller.dm index 79d112f9a10..90f544306a0 100644 --- a/code/datums/ai/dog/dog_controller.dm +++ b/code/datums/ai/dog/dog_controller.dm @@ -30,7 +30,7 @@ RegisterSignal(new_pawn, COMSIG_ATOM_ATTACK_HAND, PROC_REF(on_attack_hand)) RegisterSignal(new_pawn, COMSIG_PARENT_EXAMINE, PROC_REF(on_examined)) RegisterSignal(new_pawn, COMSIG_CLICK_ALT, PROC_REF(check_altclicked)) - RegisterSignal(new_pawn, list(COMSIG_LIVING_DEATH, COMSIG_PARENT_QDELETING), PROC_REF(on_death)) + RegisterSignals(new_pawn, list(COMSIG_LIVING_DEATH, COMSIG_PARENT_QDELETING), PROC_REF(on_death)) RegisterSignal(SSdcs, COMSIG_GLOB_CARBON_THROW_THING, PROC_REF(listened_throw)) return ..() //Run parent at end diff --git a/code/datums/components/_component.dm b/code/datums/components/_component.dm index bdf64fc11b8..3aff1a95855 100644 --- a/code/datums/components/_component.dm +++ b/code/datums/components/_component.dm @@ -176,37 +176,49 @@ * * Arguments: * * datum/target The target to listen for signals from - * * sig_type_or_types Either a string signal name, or a list of signal names (strings) + * * signal_type A signal name * * proctype The proc to call back when the signal is emitted * * override If a previous registration exists you must explicitly set this */ -/datum/proc/RegisterSignal(datum/target, sig_type_or_types, proctype, override = FALSE) +/datum/proc/RegisterSignal(datum/target, signal_type, proctype, override = FALSE) if(QDELETED(src) || QDELETED(target)) return - var/list/procs = signal_procs - if(!procs) - signal_procs = procs = list() - var/list/target_procs = procs[target] || (procs[target] = list()) - var/list/lookup = target.comp_lookup - if(!lookup) - target.comp_lookup = lookup = list() + if (islist(signal_type)) + var/static/list/known_failures = list() + var/list/signal_type_list = signal_type + var/message = "([target.type]) is registering [signal_type_list.Join(", ")] as a list, the older method. Change it to RegisterSignals." - for(var/sig_type in (islist(sig_type_or_types) ? sig_type_or_types : list(sig_type_or_types))) - if(!override && target_procs[sig_type]) - log_signal("[sig_type] overridden. Use override = TRUE to suppress this warning.\nTarget: [target] ([target.type]) Proc: [proctype]") + if (!(message in known_failures)) + known_failures[message] = TRUE + stack_trace("[target] [message]") - target_procs[sig_type] = proctype - var/list/looked_up = lookup[sig_type] + RegisterSignals(target, signal_type, proctype, override) + return - if(!looked_up) // Nothing has registered here yet - lookup[sig_type] = src - else if(looked_up == src) // We already registered here - continue - else if(!length(looked_up)) // One other thing registered here - lookup[sig_type] = list((looked_up) = TRUE, (src) = TRUE) - else // Many other things have registered here - looked_up[src] = TRUE + var/list/procs = (signal_procs ||= list()) + var/list/target_procs = (procs[target] ||= list()) + var/list/lookup = (target.comp_lookup ||= list()) + + if(!override && target_procs[signal_type]) + log_signal("[signal_type] overridden. Use override = TRUE to suppress this warning.\nTarget: [target] ([target.type]) Proc: [proctype]") + + target_procs[signal_type] = proctype + var/list/looked_up = lookup[signal_type] + + if(isnull(looked_up)) // Nothing has registered here yet + lookup[signal_type] = src + else if(looked_up == src) // We already registered here + return + else if(!length(looked_up)) // One other thing registered here + lookup[signal_type] = list((looked_up) = TRUE, (src) = TRUE) + else // Many other things have registered here + looked_up[src] = TRUE + +/// Registers multiple signals to the same proc. +/datum/proc/RegisterSignals(datum/target, list/signal_types, proctype, override = FALSE) + for (var/signal_type in signal_types) + RegisterSignal(target, signal_type, proctype) /** * Stop listening to a given signal from target diff --git a/code/datums/components/aquarium.dm b/code/datums/components/aquarium.dm index b302532c14a..b3cc795665f 100644 --- a/code/datums/components/aquarium.dm +++ b/code/datums/components/aquarium.dm @@ -68,7 +68,7 @@ src.animation_getter = animation_getter src.animation_update_signals = animation_update_signals if(animation_update_signals) - RegisterSignal(parent, animation_update_signals, PROC_REF(generate_animation)) + RegisterSignals(parent, animation_update_signals, PROC_REF(generate_animation)) if(istype(parent,/obj/item/fish)) InitializeFromFish() diff --git a/code/datums/components/creamed.dm b/code/datums/components/creamed.dm index cba28030189..e2ff48e770c 100644 --- a/code/datums/components/creamed.dm +++ b/code/datums/components/creamed.dm @@ -50,7 +50,7 @@ GLOBAL_LIST_INIT(creamable, typecacheof(list( return ..() /datum/component/creamed/RegisterWithParent() - RegisterSignal(parent, list( + RegisterSignals(parent, list( COMSIG_COMPONENT_CLEAN_ACT, COMSIG_COMPONENT_CLEAN_FACE_ACT), PROC_REF(clean_up) diff --git a/code/datums/components/embedded.dm b/code/datums/components/embedded.dm index c838cd230fb..0e3f240463f 100644 --- a/code/datums/components/embedded.dm +++ b/code/datums/components/embedded.dm @@ -86,7 +86,7 @@ limb._embed_object(weapon) // on the inside... on the inside... weapon.forceMove(victim) - RegisterSignal(weapon, list(COMSIG_MOVABLE_MOVED, COMSIG_PARENT_QDELETING), PROC_REF(weaponDeleted)) + RegisterSignals(weapon, list(COMSIG_MOVABLE_MOVED, COMSIG_PARENT_QDELETING), PROC_REF(weaponDeleted)) victim.visible_message(span_danger("[weapon] [harmful ? "embeds" : "sticks"] itself [harmful ? "in" : "to"] [victim]'s [limb.plaintext_zone]!"), span_userdanger("[weapon] [harmful ? "embeds" : "sticks"] itself [harmful ? "in" : "to"] your [limb.plaintext_zone]!")) var/damage = weapon.throwforce diff --git a/code/datums/components/explodable.dm b/code/datums/components/explodable.dm index c200968a184..8a6479a3f6a 100644 --- a/code/datums/components/explodable.dm +++ b/code/datums/components/explodable.dm @@ -31,7 +31,7 @@ RegisterSignal(parent, COMSIG_MOVABLE_IMPACT, PROC_REF(explodable_impact)) RegisterSignal(parent, COMSIG_MOVABLE_BUMP, PROC_REF(explodable_bump)) if(isitem(parent)) - RegisterSignal(parent, list(COMSIG_ITEM_ATTACK, COMSIG_ITEM_ATTACK_OBJ, COMSIG_ITEM_HIT_REACT), PROC_REF(explodable_attack)) + RegisterSignals(parent, list(COMSIG_ITEM_ATTACK, COMSIG_ITEM_ATTACK_OBJ, COMSIG_ITEM_HIT_REACT), PROC_REF(explodable_attack)) if(isclothing(parent)) RegisterSignal(parent, COMSIG_ITEM_EQUIPPED, PROC_REF(on_equip)) RegisterSignal(parent, COMSIG_ITEM_DROPPED, PROC_REF(on_drop)) diff --git a/code/datums/components/food/decomposition.dm b/code/datums/components/food/decomposition.dm index d051a80336d..dc6a8119e9b 100644 --- a/code/datums/components/food/decomposition.dm +++ b/code/datums/components/food/decomposition.dm @@ -34,11 +34,11 @@ src.produce_ants = ant_attracting RegisterSignal(parent, COMSIG_MOVABLE_MOVED, PROC_REF(handle_movement)) - RegisterSignal(parent, list( + RegisterSignals(parent, list( COMSIG_ITEM_PICKUP, //person picks up an item COMSIG_ATOM_ENTERED), //Object enters a storage object (boxes, etc.) PROC_REF(picked_up)) - RegisterSignal(parent, list( + RegisterSignals(parent, list( COMSIG_ITEM_DROPPED, //Object is dropped anywhere COMSIG_ATOM_EXITED), //Object exits a storage object (boxes, etc) PROC_REF(dropped)) diff --git a/code/datums/components/fullauto.dm b/code/datums/components/fullauto.dm index 3b51d5f14d1..28009784233 100644 --- a/code/datums/components/fullauto.dm +++ b/code/datums/components/fullauto.dm @@ -81,7 +81,7 @@ if(!QDELETED(shooter)) RegisterSignal(shooter, COMSIG_MOB_LOGOUT, PROC_REF(autofire_off)) UnregisterSignal(shooter, COMSIG_MOB_LOGIN) - RegisterSignal(parent, list(COMSIG_PARENT_QDELETING, COMSIG_ITEM_DROPPED), PROC_REF(autofire_off)) + RegisterSignals(parent, list(COMSIG_PARENT_QDELETING, COMSIG_ITEM_DROPPED), PROC_REF(autofire_off)) parent.RegisterSignal(src, COMSIG_AUTOFIRE_ONMOUSEDOWN, TYPE_PROC_REF(/obj/item/gun/, autofire_bypass_check)) parent.RegisterSignal(parent, COMSIG_AUTOFIRE_SHOT, TYPE_PROC_REF(/obj/item/gun/, do_autofire)) diff --git a/code/datums/components/gunpoint.dm b/code/datums/components/gunpoint.dm index 59c241f814f..f458830a38e 100644 --- a/code/datums/components/gunpoint.dm +++ b/code/datums/components/gunpoint.dm @@ -33,9 +33,9 @@ var/mob/living/shooter = parent target = targ weapon = wep - RegisterSignal(targ, list(COMSIG_MOB_ATTACK_HAND, COMSIG_MOB_ITEM_ATTACK, COMSIG_MOVABLE_MOVED, COMSIG_MOB_FIRED_GUN), PROC_REF(trigger_reaction)) + RegisterSignals(targ, list(COMSIG_MOB_ATTACK_HAND, COMSIG_MOB_ITEM_ATTACK, COMSIG_MOVABLE_MOVED, COMSIG_MOB_FIRED_GUN), PROC_REF(trigger_reaction)) - RegisterSignal(weapon, list(COMSIG_ITEM_DROPPED, COMSIG_ITEM_EQUIPPED), PROC_REF(cancel)) + RegisterSignals(weapon, list(COMSIG_ITEM_DROPPED, COMSIG_ITEM_EQUIPPED), PROC_REF(cancel)) shooter.visible_message(span_danger("[shooter] aims [weapon] point blank at [target]!"), \ span_danger("You aim [weapon] point blank at [target]!"), ignored_mobs = target) @@ -67,7 +67,7 @@ RegisterSignal(parent, COMSIG_MOB_APPLY_DAMAGE, PROC_REF(flinch)) RegisterSignal(parent, COMSIG_MOB_ATTACK_HAND, PROC_REF(check_shove)) RegisterSignal(parent, COMSIG_MOB_UPDATE_SIGHT, PROC_REF(check_deescalate)) - RegisterSignal(parent, list(COMSIG_LIVING_START_PULL, COMSIG_MOVABLE_BUMP), PROC_REF(check_bump)) + RegisterSignals(parent, list(COMSIG_LIVING_START_PULL, COMSIG_MOVABLE_BUMP), PROC_REF(check_bump)) /datum/component/gunpoint/UnregisterFromParent() UnregisterSignal(parent, COMSIG_MOVABLE_MOVED) diff --git a/code/datums/components/holderloving.dm b/code/datums/components/holderloving.dm index c6eeb3be0cb..e8f797511c2 100644 --- a/code/datums/components/holderloving.dm +++ b/code/datums/components/holderloving.dm @@ -32,7 +32,7 @@ /datum/component/holderloving/RegisterWithParent() RegisterSignal(holder, COMSIG_MOVABLE_MOVED, PROC_REF(check_my_loc)) RegisterSignal(holder, COMSIG_PARENT_QDELETING, PROC_REF(holder_deleting)) - RegisterSignal(parent, list( + RegisterSignals(parent, list( COMSIG_ITEM_DROPPED, COMSIG_ITEM_EQUIPPED, COMSIG_ATOM_ENTERED, diff --git a/code/datums/components/mind_linker.dm b/code/datums/components/mind_linker.dm index be13abc3f74..c507d7478cb 100644 --- a/code/datums/components/mind_linker.dm +++ b/code/datums/components/mind_linker.dm @@ -85,7 +85,7 @@ /datum/component/mind_linker/RegisterWithParent() if(signals_which_destroy_us) - RegisterSignal(parent, signals_which_destroy_us, PROC_REF(destroy_link)) + RegisterSignals(parent, signals_which_destroy_us, PROC_REF(destroy_link)) /datum/component/mind_linker/UnregisterFromParent() if(signals_which_destroy_us) @@ -120,7 +120,7 @@ new_link.Grant(to_link) linked_mobs[to_link] = new_link - RegisterSignal(to_link, list(COMSIG_LIVING_DEATH, COMSIG_PARENT_QDELETING, COMSIG_MINDSHIELD_IMPLANTED), PROC_REF(unlink_mob)) + RegisterSignals(to_link, list(COMSIG_LIVING_DEATH, COMSIG_PARENT_QDELETING, COMSIG_MINDSHIELD_IMPLANTED), PROC_REF(unlink_mob)) return TRUE diff --git a/code/datums/components/pellet_cloud.dm b/code/datums/components/pellet_cloud.dm index c7a2a996a9f..64bb540e2c7 100644 --- a/code/datums/components/pellet_cloud.dm +++ b/code/datums/components/pellet_cloud.dm @@ -120,7 +120,7 @@ spread = round((i / num_pellets - 0.5) * distro) RegisterSignal(shell.loaded_projectile, COMSIG_PROJECTILE_SELF_ON_HIT, PROC_REF(pellet_hit)) - RegisterSignal(shell.loaded_projectile, list(COMSIG_PROJECTILE_RANGE_OUT, COMSIG_PARENT_QDELETING), PROC_REF(pellet_range)) + RegisterSignals(shell.loaded_projectile, list(COMSIG_PROJECTILE_RANGE_OUT, COMSIG_PARENT_QDELETING), PROC_REF(pellet_range)) shell.loaded_projectile.damage = original_damage shell.loaded_projectile.wound_bonus = original_wb shell.loaded_projectile.bare_wound_bonus = original_bwb @@ -281,7 +281,7 @@ P.suppressed = SUPPRESSED_VERY // set the projectiles to make no message so we can do our own aggregate message P.preparePixelProjectile(target, parent) RegisterSignal(P, COMSIG_PROJECTILE_SELF_ON_HIT, PROC_REF(pellet_hit)) - RegisterSignal(P, list(COMSIG_PROJECTILE_RANGE_OUT, COMSIG_PARENT_QDELETING), PROC_REF(pellet_range)) + RegisterSignals(P, list(COMSIG_PROJECTILE_RANGE_OUT, COMSIG_PARENT_QDELETING), PROC_REF(pellet_range)) pellets += P P.fire() if(landmine_victim) diff --git a/code/datums/components/plumbing/IV_drip.dm b/code/datums/components/plumbing/IV_drip.dm index cc5be40a62c..e14c07a9fe0 100644 --- a/code/datums/components/plumbing/IV_drip.dm +++ b/code/datums/components/plumbing/IV_drip.dm @@ -13,12 +13,12 @@ /datum/component/plumbing/iv_drip/RegisterWithParent() . = ..() - RegisterSignal(parent, list(COMSIG_IV_ATTACH), PROC_REF(update_attached)) - RegisterSignal(parent, list(COMSIG_IV_DETACH), PROC_REF(clear_attached)) + RegisterSignal(parent, COMSIG_IV_ATTACH, PROC_REF(update_attached)) + RegisterSignal(parent, COMSIG_IV_DETACH, PROC_REF(clear_attached)) /datum/component/plumbing/iv_drip/UnregisterFromParent() - UnregisterSignal(parent, list(COMSIG_IV_ATTACH)) - UnregisterSignal(parent, list(COMSIG_IV_DETACH)) + UnregisterSignal(parent, COMSIG_IV_ATTACH) + UnregisterSignal(parent, COMSIG_IV_DETACH) ///When an IV is attached, we will use whoever is attached as our receiving container /datum/component/plumbing/iv_drip/proc/update_attached(datum/source, mob/living/attachee) diff --git a/code/datums/components/plumbing/_plumbing.dm b/code/datums/components/plumbing/_plumbing.dm index 7039e584e10..19061435600 100644 --- a/code/datums/components/plumbing/_plumbing.dm +++ b/code/datums/components/plumbing/_plumbing.dm @@ -50,15 +50,15 @@ if(start) //We're registering here because I need to check whether we start active or not, and this is just easier //Should be called after we finished. Done this way because other networks need to finish setting up aswell - RegisterSignal(parent, list(COMSIG_COMPONENT_ADDED), PROC_REF(enable)) + RegisterSignal(parent, COMSIG_COMPONENT_ADDED, PROC_REF(enable)) /datum/component/plumbing/RegisterWithParent() - RegisterSignal(parent, list(COMSIG_MOVABLE_MOVED, COMSIG_PARENT_QDELETING), PROC_REF(disable)) - RegisterSignal(parent, list(COMSIG_OBJ_DEFAULT_UNFASTEN_WRENCH), PROC_REF(toggle_active)) - RegisterSignal(parent, list(COMSIG_OBJ_HIDE), PROC_REF(hide)) - RegisterSignal(parent, list(COMSIG_ATOM_UPDATE_OVERLAYS), PROC_REF(create_overlays)) //called by lateinit on startup - RegisterSignal(parent, list(COMSIG_ATOM_DIR_CHANGE), PROC_REF(on_parent_dir_change)) //called when placed on a shuttle and it moves, and other edge cases - RegisterSignal(parent, list(COMSIG_MOVABLE_CHANGE_DUCT_LAYER), PROC_REF(change_ducting_layer)) + RegisterSignals(parent, list(COMSIG_MOVABLE_MOVED, COMSIG_PARENT_QDELETING), PROC_REF(disable)) + RegisterSignals(parent, list(COMSIG_OBJ_DEFAULT_UNFASTEN_WRENCH), PROC_REF(toggle_active)) + RegisterSignal(parent, COMSIG_OBJ_HIDE, PROC_REF(hide)) + RegisterSignal(parent, COMSIG_ATOM_UPDATE_OVERLAYS, PROC_REF(create_overlays)) //called by lateinit on startup + RegisterSignal(parent, COMSIG_ATOM_DIR_CHANGE, PROC_REF(on_parent_dir_change)) //called when placed on a shuttle and it moves, and other edge cases + RegisterSignal(parent, COMSIG_MOVABLE_CHANGE_DUCT_LAYER, PROC_REF(change_ducting_layer)) /datum/component/plumbing/UnregisterFromParent() UnregisterSignal(parent, list(COMSIG_MOVABLE_MOVED, COMSIG_PARENT_QDELETING, COMSIG_OBJ_DEFAULT_UNFASTEN_WRENCH, COMSIG_OBJ_HIDE, \ diff --git a/code/datums/components/rot.dm b/code/datums/components/rot.dm index 4e99d27cee4..beea0d209b2 100644 --- a/code/datums/components/rot.dm +++ b/code/datums/components/rot.dm @@ -36,7 +36,7 @@ scaling_delay = scaling strength = severity - RegisterSignal(parent, list(COMSIG_ATOM_HULK_ATTACK, COMSIG_ATOM_ATTACK_ANIMAL, COMSIG_ATOM_ATTACK_HAND), PROC_REF(rot_react_touch)) + RegisterSignals(parent, list(COMSIG_ATOM_HULK_ATTACK, COMSIG_ATOM_ATTACK_ANIMAL, COMSIG_ATOM_ATTACK_HAND), PROC_REF(rot_react_touch)) RegisterSignal(parent, COMSIG_PARENT_ATTACKBY, PROC_REF(rot_hit_react)) if(ismovable(parent)) AddComponent(/datum/component/connect_loc_behalf, parent, loc_connections) @@ -46,10 +46,10 @@ RegisterSignal(parent, COMSIG_LIVING_GET_PULLED, PROC_REF(rot_react_touch)) if(iscarbon(parent)) var/mob/living/carbon/carbon_parent = parent - RegisterSignal(carbon_parent.reagents, list(COMSIG_REAGENTS_ADD_REAGENT, + RegisterSignals(carbon_parent.reagents, list(COMSIG_REAGENTS_ADD_REAGENT, COMSIG_REAGENTS_REM_REAGENT, COMSIG_REAGENTS_DEL_REAGENT), PROC_REF(check_reagent)) - RegisterSignal(parent, list(SIGNAL_ADDTRAIT(TRAIT_HUSK), SIGNAL_REMOVETRAIT(TRAIT_HUSK)), PROC_REF(check_husk_trait)) + RegisterSignals(parent, list(SIGNAL_ADDTRAIT(TRAIT_HUSK), SIGNAL_REMOVETRAIT(TRAIT_HUSK)), PROC_REF(check_husk_trait)) check_reagent(carbon_parent.reagents, null) check_husk_trait(null) if(ishuman(parent)) diff --git a/code/datums/components/shy.dm b/code/datums/components/shy.dm index 114c38fcdf5..845da7e0f7d 100644 --- a/code/datums/components/shy.dm +++ b/code/datums/components/shy.dm @@ -46,7 +46,7 @@ /datum/component/shy/RegisterWithParent() RegisterSignal(parent, COMSIG_MOB_CLICKON, PROC_REF(on_clickon)) RegisterSignal(parent, COMSIG_LIVING_TRY_PULL, PROC_REF(on_try_pull)) - RegisterSignal(parent, list(COMSIG_LIVING_UNARMED_ATTACK, COMSIG_HUMAN_EARLY_UNARMED_ATTACK), PROC_REF(on_unarmed_attack)) + RegisterSignals(parent, list(COMSIG_LIVING_UNARMED_ATTACK, COMSIG_HUMAN_EARLY_UNARMED_ATTACK), PROC_REF(on_unarmed_attack)) RegisterSignal(parent, COMSIG_TRY_STRIP, PROC_REF(on_try_strip)) RegisterSignal(parent, COMSIG_TRY_ALT_ACTION, PROC_REF(on_try_alt_action)) diff --git a/code/datums/components/shy_in_room.dm b/code/datums/components/shy_in_room.dm index cf431933963..2413c9abafd 100644 --- a/code/datums/components/shy_in_room.dm +++ b/code/datums/components/shy_in_room.dm @@ -17,7 +17,7 @@ /datum/component/shy_in_room/RegisterWithParent() RegisterSignal(parent, COMSIG_MOB_CLICKON, PROC_REF(on_clickon)) RegisterSignal(parent, COMSIG_LIVING_TRY_PULL, PROC_REF(on_try_pull)) - RegisterSignal(parent, list(COMSIG_LIVING_UNARMED_ATTACK, COMSIG_HUMAN_EARLY_UNARMED_ATTACK), PROC_REF(on_unarmed_attack)) + RegisterSignals(parent, list(COMSIG_LIVING_UNARMED_ATTACK, COMSIG_HUMAN_EARLY_UNARMED_ATTACK), PROC_REF(on_unarmed_attack)) RegisterSignal(parent, COMSIG_TRY_STRIP, PROC_REF(on_try_strip)) RegisterSignal(parent, COMSIG_TRY_ALT_ACTION, PROC_REF(on_try_alt_action)) diff --git a/code/datums/components/singularity.dm b/code/datums/components/singularity.dm index 282b823d5d6..c7e30b9e0b0 100644 --- a/code/datums/components/singularity.dm +++ b/code/datums/components/singularity.dm @@ -79,7 +79,7 @@ RegisterSignal(parent, COMSIG_ATOM_BLOB_ACT, PROC_REF(block_blob)) - RegisterSignal(parent, list( + RegisterSignals(parent, list( COMSIG_ATOM_ATTACK_ANIMAL, COMSIG_ATOM_ATTACK_HAND, COMSIG_ATOM_ATTACK_PAW, diff --git a/code/datums/components/sound_player.dm b/code/datums/components/sound_player.dm index ecbe804a9ea..9bad9718a05 100644 --- a/code/datums/components/sound_player.dm +++ b/code/datums/components/sound_player.dm @@ -21,7 +21,7 @@ src.sounds = sounds src.uses = uses - RegisterSignal(parent, signal_list, PROC_REF(play_sound)) + RegisterSignals(parent, signal_list, PROC_REF(play_sound)) /** * Attempt to play the sound on parent diff --git a/code/datums/components/spawner.dm b/code/datums/components/spawner.dm index 1719b1a5a0e..d3e824ae0e1 100644 --- a/code/datums/components/spawner.dm +++ b/code/datums/components/spawner.dm @@ -21,7 +21,7 @@ if(_max_mobs) max_mobs=_max_mobs - RegisterSignal(parent, list(COMSIG_PARENT_QDELETING), PROC_REF(stop_spawning)) + RegisterSignal(parent, COMSIG_PARENT_QDELETING, PROC_REF(stop_spawning)) START_PROCESSING(SSprocessing, src) /datum/component/spawner/process() diff --git a/code/datums/components/squeak.dm b/code/datums/components/squeak.dm index 14714e33c76..23f6d5b28b8 100644 --- a/code/datums/components/squeak.dm +++ b/code/datums/components/squeak.dm @@ -30,14 +30,14 @@ /datum/component/squeak/Initialize(custom_sounds, volume_override, chance_override, step_delay_override, use_delay_override, extrarange, falloff_exponent, fallof_distance) if(!isatom(parent)) return COMPONENT_INCOMPATIBLE - RegisterSignal(parent, list(COMSIG_ATOM_ENTERED, COMSIG_ATOM_BLOB_ACT, COMSIG_ATOM_HULK_ATTACK, COMSIG_PARENT_ATTACKBY), PROC_REF(play_squeak)) + RegisterSignals(parent, list(COMSIG_ATOM_ENTERED, COMSIG_ATOM_BLOB_ACT, COMSIG_ATOM_HULK_ATTACK, COMSIG_PARENT_ATTACKBY), PROC_REF(play_squeak)) if(ismovable(parent)) - RegisterSignal(parent, list(COMSIG_MOVABLE_BUMP, COMSIG_MOVABLE_IMPACT, COMSIG_PROJECTILE_BEFORE_FIRE), PROC_REF(play_squeak)) + RegisterSignals(parent, list(COMSIG_MOVABLE_BUMP, COMSIG_MOVABLE_IMPACT, COMSIG_PROJECTILE_BEFORE_FIRE), PROC_REF(play_squeak)) AddComponent(/datum/component/connect_loc_behalf, parent, item_connections) RegisterSignal(parent, COMSIG_MOVABLE_DISPOSING, PROC_REF(disposing_react)) if(isitem(parent)) - RegisterSignal(parent, list(COMSIG_ITEM_ATTACK, COMSIG_ITEM_ATTACK_OBJ, COMSIG_ITEM_HIT_REACT), PROC_REF(play_squeak)) + RegisterSignals(parent, list(COMSIG_ITEM_ATTACK, COMSIG_ITEM_ATTACK_OBJ, COMSIG_ITEM_HIT_REACT), PROC_REF(play_squeak)) RegisterSignal(parent, COMSIG_ITEM_ATTACK_SELF, PROC_REF(use_squeak)) RegisterSignal(parent, COMSIG_ITEM_EQUIPPED, PROC_REF(on_equip)) RegisterSignal(parent, COMSIG_ITEM_DROPPED, PROC_REF(on_drop)) diff --git a/code/datums/components/stationstuck.dm b/code/datums/components/stationstuck.dm index 6c838a6d71f..2438bbe1428 100644 --- a/code/datums/components/stationstuck.dm +++ b/code/datums/components/stationstuck.dm @@ -21,7 +21,7 @@ It has a punishment variable that is what happens to the parent when they leave if(!isliving(parent)) return COMPONENT_INCOMPATIBLE var/mob/living/L = parent - RegisterSignal(L, list(COMSIG_MOVABLE_Z_CHANGED), PROC_REF(punish)) + RegisterSignals(L, list(COMSIG_MOVABLE_Z_CHANGED), PROC_REF(punish)) punishment = _punishment message = _message stuck_zlevel = L.z diff --git a/code/datums/components/tether.dm b/code/datums/components/tether.dm index 347af914752..e76f5d5b53c 100644 --- a/code/datums/components/tether.dm +++ b/code/datums/components/tether.dm @@ -14,7 +14,7 @@ src.tether_name = initial(tmp.name) else src.tether_name = tether_name - RegisterSignal(parent, list(COMSIG_MOVABLE_PRE_MOVE), PROC_REF(checkTether)) + RegisterSignals(parent, list(COMSIG_MOVABLE_PRE_MOVE), PROC_REF(checkTether)) /datum/component/tether/proc/checkTether(mob/mover, newloc) SIGNAL_HANDLER diff --git a/code/datums/components/wearertargeting.dm b/code/datums/components/wearertargeting.dm index a7405ee9560..44c16aa72bd 100644 --- a/code/datums/components/wearertargeting.dm +++ b/code/datums/components/wearertargeting.dm @@ -16,7 +16,7 @@ SIGNAL_HANDLER if((slot in valid_slots) && istype(equipper, mobtype)) - RegisterSignal(equipper, signals, proctype, TRUE) + RegisterSignals(equipper, signals, proctype, TRUE) else UnregisterSignal(equipper, signals) diff --git a/code/datums/elements/content_barfer.dm b/code/datums/elements/content_barfer.dm index d1a52b864b8..782574a2221 100644 --- a/code/datums/elements/content_barfer.dm +++ b/code/datums/elements/content_barfer.dm @@ -12,7 +12,7 @@ if(!isliving(target)) return ELEMENT_INCOMPATIBLE - RegisterSignal(target, list(COMSIG_LIVING_DEATH, COMSIG_LIVING_ON_WABBAJACKED), PROC_REF(barf_contents)) + RegisterSignals(target, list(COMSIG_LIVING_DEATH, COMSIG_LIVING_ON_WABBAJACKED), PROC_REF(barf_contents)) /datum/element/content_barfer/Detach(datum/target) UnregisterSignal(target, list(COMSIG_LIVING_DEATH, COMSIG_LIVING_ON_WABBAJACKED)) diff --git a/code/datums/elements/cult_eyes.dm b/code/datums/elements/cult_eyes.dm index a9a5d846510..388d902c735 100644 --- a/code/datums/elements/cult_eyes.dm +++ b/code/datums/elements/cult_eyes.dm @@ -11,7 +11,7 @@ return ELEMENT_INCOMPATIBLE // Register signals for mob transformation to prevent premature halo removal - RegisterSignal(target, list(COMSIG_CHANGELING_TRANSFORM, COMSIG_MONKEY_HUMANIZE, COMSIG_HUMAN_MONKEYIZE), PROC_REF(set_eyes)) + RegisterSignals(target, list(COMSIG_CHANGELING_TRANSFORM, COMSIG_MONKEY_HUMANIZE, COMSIG_HUMAN_MONKEYIZE), PROC_REF(set_eyes)) addtimer(CALLBACK(src, PROC_REF(set_eyes), target), initial_delay) /** diff --git a/code/datums/elements/cult_halo.dm b/code/datums/elements/cult_halo.dm index e5b77fb1ae4..f20e5765561 100644 --- a/code/datums/elements/cult_halo.dm +++ b/code/datums/elements/cult_halo.dm @@ -11,7 +11,7 @@ return ELEMENT_INCOMPATIBLE // Register signals for mob transformation to prevent premature halo removal - RegisterSignal(target, list(COMSIG_CHANGELING_TRANSFORM, COMSIG_MONKEY_HUMANIZE, COMSIG_HUMAN_MONKEYIZE), PROC_REF(set_halo)) + RegisterSignals(target, list(COMSIG_CHANGELING_TRANSFORM, COMSIG_MONKEY_HUMANIZE, COMSIG_HUMAN_MONKEYIZE), PROC_REF(set_halo)) addtimer(CALLBACK(src, PROC_REF(set_halo), target), initial_delay) /** diff --git a/code/datums/elements/delete_on_drop.dm b/code/datums/elements/delete_on_drop.dm index afb39f97fb9..16f32a2a64f 100644 --- a/code/datums/elements/delete_on_drop.dm +++ b/code/datums/elements/delete_on_drop.dm @@ -8,7 +8,7 @@ . = ..() if(!isitem(target)) return COMPONENT_INCOMPATIBLE - RegisterSignal(target, list(COMSIG_ITEM_DROPPED, COMSIG_CASING_EJECTED), PROC_REF(del_on_drop)) + RegisterSignals(target, list(COMSIG_ITEM_DROPPED, COMSIG_CASING_EJECTED), PROC_REF(del_on_drop)) /datum/element/delete_on_drop/Detach(datum/source) . = ..() diff --git a/code/datums/elements/earhealing.dm b/code/datums/elements/earhealing.dm index 838b2d93377..5db1250af8d 100644 --- a/code/datums/elements/earhealing.dm +++ b/code/datums/elements/earhealing.dm @@ -7,7 +7,7 @@ if(!isitem(target)) return ELEMENT_INCOMPATIBLE - RegisterSignal(target, list(COMSIG_ITEM_EQUIPPED, COMSIG_ITEM_DROPPED), PROC_REF(on_equip)) + RegisterSignals(target, list(COMSIG_ITEM_EQUIPPED, COMSIG_ITEM_DROPPED), PROC_REF(on_equip)) /datum/element/earhealing/Detach(datum/target) . = ..() diff --git a/code/datums/elements/item_scaling.dm b/code/datums/elements/item_scaling.dm index cec1a511643..ce0af70a0b4 100644 --- a/code/datums/elements/item_scaling.dm +++ b/code/datums/elements/item_scaling.dm @@ -43,9 +43,9 @@ ADD_KEEP_TOGETHER(target, ITEM_SCALING_TRAIT) // Object scaled when dropped/thrown OR when exiting a storage object. - RegisterSignal(target, list(COMSIG_ITEM_DROPPED, COMSIG_ATOM_EXITED), PROC_REF(scale_overworld)) + RegisterSignals(target, list(COMSIG_ITEM_DROPPED, COMSIG_ATOM_EXITED), PROC_REF(scale_overworld)) // Object scaled when placed in an inventory slot OR when entering a storage component. - RegisterSignal(target, list(COMSIG_ITEM_EQUIPPED, COMSIG_ATOM_ENTERED), PROC_REF(scale_storage)) + RegisterSignals(target, list(COMSIG_ITEM_EQUIPPED, COMSIG_ATOM_ENTERED), PROC_REF(scale_storage)) /** * Detach proc for the item_scaling element. diff --git a/code/datums/elements/movetype_handler.dm b/code/datums/elements/movetype_handler.dm index cdfe9988d26..6d730d345e2 100644 --- a/code/datums/elements/movetype_handler.dm +++ b/code/datums/elements/movetype_handler.dm @@ -18,8 +18,8 @@ return var/atom/movable/movable_target = target - RegisterSignal(movable_target, GLOB.movement_type_addtrait_signals, PROC_REF(on_movement_type_trait_gain)) - RegisterSignal(movable_target, GLOB.movement_type_removetrait_signals, PROC_REF(on_movement_type_trait_loss)) + RegisterSignals(movable_target, GLOB.movement_type_addtrait_signals, PROC_REF(on_movement_type_trait_gain)) + RegisterSignals(movable_target, GLOB.movement_type_removetrait_signals, PROC_REF(on_movement_type_trait_loss)) RegisterSignal(movable_target, SIGNAL_ADDTRAIT(TRAIT_NO_FLOATING_ANIM), PROC_REF(on_no_floating_anim_trait_gain)) RegisterSignal(movable_target, SIGNAL_REMOVETRAIT(TRAIT_NO_FLOATING_ANIM), PROC_REF(on_no_floating_anim_trait_loss)) RegisterSignal(movable_target, COMSIG_PAUSE_FLOATING_ANIM, PROC_REF(pause_floating_anim)) diff --git a/code/datums/elements/rust.dm b/code/datums/elements/rust.dm index 333829b3c01..4ab2447e1c0 100644 --- a/code/datums/elements/rust.dm +++ b/code/datums/elements/rust.dm @@ -17,7 +17,7 @@ ADD_TRAIT(target, TRAIT_RUSTY, ELEMENT_TRAIT(type)) RegisterSignal(target, COMSIG_ATOM_UPDATE_OVERLAYS, PROC_REF(apply_rust_overlay)) RegisterSignal(target, COMSIG_PARENT_EXAMINE, PROC_REF(handle_examine)) - RegisterSignal(target, list(COMSIG_ATOM_SECONDARY_TOOL_ACT(TOOL_WELDER), COMSIG_ATOM_SECONDARY_TOOL_ACT(TOOL_RUSTSCRAPER)), PROC_REF(secondary_tool_act)) + RegisterSignals(target, list(COMSIG_ATOM_SECONDARY_TOOL_ACT(TOOL_WELDER), COMSIG_ATOM_SECONDARY_TOOL_ACT(TOOL_RUSTSCRAPER)), PROC_REF(secondary_tool_act)) // Unfortunately registering with parent sometimes doesn't cause an overlay update target.update_icon(UPDATE_OVERLAYS) diff --git a/code/datums/mergers/_merger.dm b/code/datums/mergers/_merger.dm index 1c677e0fbf5..e99e9c7dfef 100644 --- a/code/datums/mergers/_merger.dm +++ b/code/datums/mergers/_merger.dm @@ -18,9 +18,6 @@ var/debug_color #endif - /// Signals in members to trigger a refresh - var/static/list/refresh_signals = list(COMSIG_MOVABLE_MOVED) - /datum/merger/New(id, list/merged_typecache, atom/origin, attempt_merge_proc) #if MERGERS_DEBUG debug_color = rgb(rand(0, 255), rand(0, 255), rand(0, 255)) @@ -38,7 +35,7 @@ /datum/merger/proc/RemoveMember(atom/thing, clean=TRUE) SEND_SIGNAL(thing, COMSIG_MERGER_REMOVING, src) - UnregisterSignal(thing, refresh_signals) + UnregisterSignal(thing, COMSIG_MOVABLE_MOVED) UnregisterSignal(thing, COMSIG_PARENT_QDELETING) if(!thing.mergers) return @@ -52,7 +49,7 @@ /datum/merger/proc/AddMember(atom/thing, connected_dir) // note that this fires for the origin of the merger as well SEND_SIGNAL(thing, COMSIG_MERGER_ADDING, src) - RegisterSignal(thing, refresh_signals, PROC_REF(QueueRefresh)) + RegisterSignal(thing, COMSIG_MOVABLE_MOVED, PROC_REF(QueueRefresh)) RegisterSignal(thing, COMSIG_PARENT_QDELETING, PROC_REF(HandleMemberDel)) if(!thing.mergers) thing.mergers = list() diff --git a/code/datums/quirks/negative.dm b/code/datums/quirks/negative.dm index a0bf445cd20..93885b6ae11 100644 --- a/code/datums/quirks/negative.dm +++ b/code/datums/quirks/negative.dm @@ -908,7 +908,7 @@ mail_goodies = list(/obj/item/reagent_containers/spray/pepper) // show me on the doll where the bad man touched you /datum/quirk/bad_touch/add() - RegisterSignal(quirk_holder, list(COMSIG_LIVING_GET_PULLED, COMSIG_CARBON_HELP_ACT), PROC_REF(uncomfortable_touch)) + RegisterSignals(quirk_holder, list(COMSIG_LIVING_GET_PULLED, COMSIG_CARBON_HELP_ACT), PROC_REF(uncomfortable_touch)) /datum/quirk/bad_touch/remove() UnregisterSignal(quirk_holder, list(COMSIG_LIVING_GET_PULLED, COMSIG_CARBON_HELP_ACT)) diff --git a/code/datums/status_effects/neutral.dm b/code/datums/status_effects/neutral.dm index 4299bd5d1ac..312346ebcab 100644 --- a/code/datums/status_effects/neutral.dm +++ b/code/datums/status_effects/neutral.dm @@ -184,7 +184,7 @@ return RegisterSignal(owner, COMSIG_MOVABLE_MOVED, PROC_REF(check_owner_in_range)) - RegisterSignal(offered_item, list(COMSIG_PARENT_QDELETING, COMSIG_ITEM_DROPPED), PROC_REF(dropped_item)) + RegisterSignals(offered_item, list(COMSIG_PARENT_QDELETING, COMSIG_ITEM_DROPPED), PROC_REF(dropped_item)) //RegisterSignal(owner, COMSIG_PARENT_EXAMINE_MORE, PROC_REF(check_fake_out)) /datum/status_effect/offering/Destroy() diff --git a/code/datums/status_effects/wound_effects.dm b/code/datums/status_effects/wound_effects.dm index c64e07f59c0..d0bdbd53602 100644 --- a/code/datums/status_effects/wound_effects.dm +++ b/code/datums/status_effects/wound_effects.dm @@ -54,7 +54,7 @@ right = C.get_bodypart(BODY_ZONE_R_LEG) update_limp() RegisterSignal(C, COMSIG_MOVABLE_MOVED, PROC_REF(check_step)) - RegisterSignal(C, list(COMSIG_CARBON_GAIN_WOUND, COMSIG_CARBON_LOSE_WOUND, COMSIG_CARBON_ATTACH_LIMB, COMSIG_CARBON_REMOVE_LIMB), PROC_REF(update_limp)) + RegisterSignals(C, list(COMSIG_CARBON_GAIN_WOUND, COMSIG_CARBON_LOSE_WOUND, COMSIG_CARBON_ATTACH_LIMB, COMSIG_CARBON_REMOVE_LIMB), PROC_REF(update_limp)) return TRUE /datum/status_effect/limp/on_remove() diff --git a/code/datums/storage/storage.dm b/code/datums/storage/storage.dm index 7d513eb9b23..72b97bb9047 100644 --- a/code/datums/storage/storage.dm +++ b/code/datums/storage/storage.dm @@ -111,7 +111,7 @@ qdel(src) return - RegisterSignal(resolve_parent, list(COMSIG_ATOM_ATTACK_PAW, COMSIG_ATOM_ATTACK_HAND), PROC_REF(on_attack)) + RegisterSignals(resolve_parent, list(COMSIG_ATOM_ATTACK_PAW, COMSIG_ATOM_ATTACK_HAND), PROC_REF(on_attack)) RegisterSignal(resolve_parent, COMSIG_MOUSEDROP_ONTO, PROC_REF(on_mousedrop_onto)) RegisterSignal(resolve_parent, COMSIG_MOUSEDROPPED_ONTO, PROC_REF(on_mousedropped_onto)) @@ -122,7 +122,7 @@ RegisterSignal(resolve_parent, COMSIG_ITEM_ATTACK_SELF, PROC_REF(mass_empty)) - RegisterSignal(resolve_parent, list(COMSIG_CLICK_ALT, COMSIG_ATOM_ATTACK_GHOST, COMSIG_ATOM_ATTACK_HAND_SECONDARY), PROC_REF(open_storage_on_signal)) + RegisterSignals(resolve_parent, list(COMSIG_CLICK_ALT, COMSIG_ATOM_ATTACK_GHOST, COMSIG_ATOM_ATTACK_HAND_SECONDARY), PROC_REF(open_storage_on_signal)) RegisterSignal(resolve_parent, COMSIG_PARENT_ATTACKBY_SECONDARY, PROC_REF(open_storage_attackby_secondary)) RegisterSignal(resolve_location, COMSIG_ATOM_ENTERED, PROC_REF(handle_enter)) diff --git a/code/datums/wounds/bones.dm b/code/datums/wounds/bones.dm index 6293b7f5df0..a2221f0837b 100644 --- a/code/datums/wounds/bones.dm +++ b/code/datums/wounds/bones.dm @@ -34,7 +34,7 @@ */ /datum/wound/blunt/wound_injury(datum/wound/old_wound = null, attack_direction = null) // hook into gaining/losing gauze so crit bone wounds can re-enable/disable depending if they're slung or not - RegisterSignal(limb, list(COMSIG_BODYPART_GAUZED, COMSIG_BODYPART_GAUZE_DESTROYED), PROC_REF(update_inefficiencies)) + RegisterSignals(limb, list(COMSIG_BODYPART_GAUZED, COMSIG_BODYPART_GAUZE_DESTROYED), PROC_REF(update_inefficiencies)) if(limb.body_zone == BODY_ZONE_HEAD && brain_trauma_group) processes = TRUE diff --git a/code/game/machinery/computer/station_alert.dm b/code/game/machinery/computer/station_alert.dm index 9a19dbc77e4..a2303e2e93b 100644 --- a/code/game/machinery/computer/station_alert.dm +++ b/code/game/machinery/computer/station_alert.dm @@ -10,7 +10,7 @@ /obj/machinery/computer/station_alert/Initialize(mapload) alert_control = new(src, list(ALARM_ATMOS, ALARM_FIRE, ALARM_POWER), list(z), title = name) - RegisterSignal(alert_control.listener, list(COMSIG_ALARM_LISTENER_TRIGGERED, COMSIG_ALARM_LISTENER_CLEARED), PROC_REF(update_alarm_display)) + RegisterSignals(alert_control.listener, list(COMSIG_ALARM_LISTENER_TRIGGERED, COMSIG_ALARM_LISTENER_CLEARED), PROC_REF(update_alarm_display)) return ..() /obj/machinery/computer/station_alert/Destroy() diff --git a/code/game/objects/items/robot/robot_upgrades.dm b/code/game/objects/items/robot/robot_upgrades.dm index 90ddb0b4943..1336a043e7f 100644 --- a/code/game/objects/items/robot/robot_upgrades.dm +++ b/code/game/objects/items/robot/robot_upgrades.dm @@ -473,7 +473,7 @@ defib_instance = D name = defib_instance.name defib_instance.moveToNullspace() - RegisterSignal(defib_instance, list(COMSIG_PARENT_QDELETING, COMSIG_MOVABLE_MOVED), PROC_REF(on_defib_instance_qdel_or_moved)) + RegisterSignals(defib_instance, list(COMSIG_PARENT_QDELETING, COMSIG_MOVABLE_MOVED), PROC_REF(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 diff --git a/code/game/objects/items/v8_engine.dm b/code/game/objects/items/v8_engine.dm index aadc5dbe9e5..86363e40b21 100644 --- a/code/game/objects/items/v8_engine.dm +++ b/code/game/objects/items/v8_engine.dm @@ -69,7 +69,7 @@ /obj/item/house_edge/Initialize(mapload) . = ..() AddComponent(/datum/component/two_handed, force_unwielded = 12, force_wielded = 22, attacksound = active_hitsound) - RegisterSignal(src, list(COMSIG_ITEM_DROPPED, COMSIG_MOVABLE_PRE_THROW, COMSIG_ITEM_ATTACK_SELF), PROC_REF(reset_charges)) + RegisterSignals(src, list(COMSIG_ITEM_DROPPED, COMSIG_MOVABLE_PRE_THROW, COMSIG_ITEM_ATTACK_SELF), PROC_REF(reset_charges)) /obj/item/house_edge/afterattack(atom/target, mob/user, proximity_flag, click_parameters) . = ..() diff --git a/code/game/objects/structures/lavaland/geyser.dm b/code/game/objects/structures/lavaland/geyser.dm index f408ddbd636..4077238e409 100644 --- a/code/game/objects/structures/lavaland/geyser.dm +++ b/code/game/objects/structures/lavaland/geyser.dm @@ -34,7 +34,7 @@ create_reagents(max_volume, DRAINABLE) reagents.add_reagent(reagent_id, max_volume) - RegisterSignal(src, list(COMSIG_REAGENTS_REM_REAGENT, COMSIG_REAGENTS_DEL_REAGENT), PROC_REF(start_chemming)) + RegisterSignals(src, list(COMSIG_REAGENTS_REM_REAGENT, COMSIG_REAGENTS_DEL_REAGENT), PROC_REF(start_chemming)) if(erupting_state) icon_state = erupting_state diff --git a/code/modules/antagonists/_common/antag_hud.dm b/code/modules/antagonists/_common/antag_hud.dm index 516631e8f50..9bcf662b2bb 100644 --- a/code/modules/antagonists/_common/antag_hud.dm +++ b/code/modules/antagonists/_common/antag_hud.dm @@ -31,7 +31,7 @@ GLOBAL_LIST_EMPTY_TYPED(has_antagonist_huds, /datum/atom_hud/alternate_appearanc var/image/first_antagonist = get_antag_image(1) || image(icon('icons/blanks/32x32.dmi', "nothing"), mind.current) - RegisterSignal( + RegisterSignals( mind, list(COMSIG_ANTAGONIST_GAINED, COMSIG_ANTAGONIST_REMOVED), PROC_REF(update_antag_hud_images) diff --git a/code/modules/antagonists/changeling/changeling.dm b/code/modules/antagonists/changeling/changeling.dm index 257032eb514..fca6bb55851 100644 --- a/code/modules/antagonists/changeling/changeling.dm +++ b/code/modules/antagonists/changeling/changeling.dm @@ -142,7 +142,7 @@ RegisterSignal(living_mob, COMSIG_MOB_LOGIN, PROC_REF(on_login)) RegisterSignal(living_mob, COMSIG_LIVING_LIFE, PROC_REF(on_life)) RegisterSignal(living_mob, COMSIG_LIVING_POST_FULLY_HEAL, PROC_REF(on_fullhealed)) - RegisterSignal(living_mob, list(COMSIG_MOB_MIDDLECLICKON, COMSIG_MOB_ALTCLICKON), PROC_REF(on_click_sting)) + RegisterSignals(living_mob, list(COMSIG_MOB_MIDDLECLICKON, COMSIG_MOB_ALTCLICKON), PROC_REF(on_click_sting)) if(living_mob.hud_used) var/datum/hud/hud_used = living_mob.hud_used diff --git a/code/modules/antagonists/heretic/heretic_antag.dm b/code/modules/antagonists/heretic/heretic_antag.dm index 8aa5711bded..7fca29460b1 100644 --- a/code/modules/antagonists/heretic/heretic_antag.dm +++ b/code/modules/antagonists/heretic/heretic_antag.dm @@ -197,7 +197,7 @@ handle_clown_mutation(our_mob, "Ancient knowledge described to you has allowed you to overcome your clownish nature, allowing you to wield weapons without harming yourself.") our_mob.faction |= FACTION_HERETIC - RegisterSignal(our_mob, list(COMSIG_MOB_BEFORE_SPELL_CAST, COMSIG_MOB_SPELL_ACTIVATED), PROC_REF(on_spell_cast)) + RegisterSignals(our_mob, list(COMSIG_MOB_BEFORE_SPELL_CAST, COMSIG_MOB_SPELL_ACTIVATED), PROC_REF(on_spell_cast)) RegisterSignal(our_mob, COMSIG_MOB_ITEM_AFTERATTACK, PROC_REF(on_item_afterattack)) RegisterSignal(our_mob, COMSIG_MOB_LOGIN, PROC_REF(fix_influence_network)) RegisterSignal(our_mob, COMSIG_LIVING_POST_FULLY_HEAL, PROC_REF(after_fully_healed)) diff --git a/code/modules/antagonists/heretic/knowledge/void_lore.dm b/code/modules/antagonists/heretic/knowledge/void_lore.dm index df7e921273d..e812843f8e8 100644 --- a/code/modules/antagonists/heretic/knowledge/void_lore.dm +++ b/code/modules/antagonists/heretic/knowledge/void_lore.dm @@ -213,7 +213,7 @@ /datum/heretic_knowledge/ultimate/void_final/on_lose(mob/user, datum/antagonist/heretic/our_heretic) on_death() // Losing is pretty much dying. I think - RegisterSignal(user, list(COMSIG_LIVING_LIFE, COMSIG_LIVING_DEATH)) + RegisterSignals(user, list(COMSIG_LIVING_LIFE, COMSIG_LIVING_DEATH)) /** * Signal proc for [COMSIG_LIVING_LIFE]. diff --git a/code/modules/antagonists/slaughter/slaughter.dm b/code/modules/antagonists/slaughter/slaughter.dm index 8b25d32b962..43f86eabe17 100644 --- a/code/modules/antagonists/slaughter/slaughter.dm +++ b/code/modules/antagonists/slaughter/slaughter.dm @@ -80,7 +80,7 @@ . = ..() var/datum/action/cooldown/spell/jaunt/bloodcrawl/slaughter_demon/crawl = new crawl_type(src) crawl.Grant(src) - RegisterSignal(src, list(COMSIG_MOB_ENTER_JAUNT, COMSIG_MOB_AFTER_EXIT_JAUNT), PROC_REF(on_crawl)) + RegisterSignals(src, list(COMSIG_MOB_ENTER_JAUNT, COMSIG_MOB_AFTER_EXIT_JAUNT), PROC_REF(on_crawl)) /// Whenever we enter or exit blood crawl, reset our bonus and hitstreaks. /mob/living/simple_animal/hostile/imp/slaughter/proc/on_crawl(datum/source) diff --git a/code/modules/antagonists/traitor/components/traitor_objective_helpers.dm b/code/modules/antagonists/traitor/components/traitor_objective_helpers.dm index e5dc5e4cf58..6bf5ce5d117 100644 --- a/code/modules/antagonists/traitor/components/traitor_objective_helpers.dm +++ b/code/modules/antagonists/traitor/components/traitor_objective_helpers.dm @@ -23,10 +23,10 @@ /datum/component/traitor_objective_register/RegisterWithParent() if(succeed_signals) - RegisterSignal(target, succeed_signals, PROC_REF(on_success)) + RegisterSignals(target, succeed_signals, PROC_REF(on_success)) if(fail_signals) - RegisterSignal(target, fail_signals, PROC_REF(on_fail)) - RegisterSignal(parent, list(COMSIG_TRAITOR_OBJECTIVE_COMPLETED, COMSIG_TRAITOR_OBJECTIVE_FAILED), PROC_REF(delete_self)) + RegisterSignals(target, fail_signals, PROC_REF(on_fail)) + RegisterSignals(parent, list(COMSIG_TRAITOR_OBJECTIVE_COMPLETED, COMSIG_TRAITOR_OBJECTIVE_FAILED), PROC_REF(delete_self)) /datum/component/traitor_objective_register/UnregisterFromParent() if(target) diff --git a/code/modules/antagonists/traitor/components/traitor_objective_mind_tracker.dm b/code/modules/antagonists/traitor/components/traitor_objective_mind_tracker.dm index 1bd27c5ac32..2eef6b96cb2 100644 --- a/code/modules/antagonists/traitor/components/traitor_objective_mind_tracker.dm +++ b/code/modules/antagonists/traitor/components/traitor_objective_mind_tracker.dm @@ -19,7 +19,7 @@ /datum/component/traitor_objective_mind_tracker/RegisterWithParent() RegisterSignal(target, COMSIG_MIND_TRANSFERRED, PROC_REF(handle_mind_transferred)) RegisterSignal(target, COMSIG_PARENT_QDELETING, PROC_REF(delete_self)) - RegisterSignal(parent, list(COMSIG_TRAITOR_OBJECTIVE_COMPLETED, COMSIG_TRAITOR_OBJECTIVE_FAILED), PROC_REF(delete_self)) + RegisterSignals(parent, list(COMSIG_TRAITOR_OBJECTIVE_COMPLETED, COMSIG_TRAITOR_OBJECTIVE_FAILED), PROC_REF(delete_self)) handle_mind_transferred(target) /datum/component/traitor_objective_mind_tracker/UnregisterFromParent() diff --git a/code/modules/explorer_drone/scanner_array.dm b/code/modules/explorer_drone/scanner_array.dm index 322917d2f1f..c2e0678b6e1 100644 --- a/code/modules/explorer_drone/scanner_array.dm +++ b/code/modules/explorer_drone/scanner_array.dm @@ -198,7 +198,7 @@ GLOBAL_LIST_INIT(scan_conditions,init_scan_conditions()) /obj/machinery/exoscanner/Initialize(mapload) . = ..() - RegisterSignal(GLOB.exoscanner_controller,list(COMSIG_EXOSCAN_STARTED,COMSIG_EXOSCAN_FINISHED), PROC_REF(scan_change)) + RegisterSignals(GLOB.exoscanner_controller,list(COMSIG_EXOSCAN_STARTED,COMSIG_EXOSCAN_FINISHED), PROC_REF(scan_change)) update_readiness() /obj/machinery/exoscanner/proc/scan_change() diff --git a/code/modules/hallucination/screwy_health_doll.dm b/code/modules/hallucination/screwy_health_doll.dm index 56bfff4385b..6ddfec87aff 100644 --- a/code/modules/hallucination/screwy_health_doll.dm +++ b/code/modules/hallucination/screwy_health_doll.dm @@ -51,7 +51,7 @@ var/obj/item/bodypart/picked = specific_limb || pick(human_mob.bodyparts) if(!(picked in bodyparts)) - RegisterSignal(picked, list(COMSIG_PARENT_QDELETING, COMSIG_BODYPART_REMOVED), PROC_REF(remove_bodypart)) + RegisterSignals(picked, list(COMSIG_PARENT_QDELETING, COMSIG_BODYPART_REMOVED), PROC_REF(remove_bodypart)) RegisterSignal(picked, COMSIG_BODYPART_UPDATING_HEALTH_HUD, PROC_REF(on_bodypart_hud_update)) RegisterSignal(picked, COMSIG_BODYPART_CHECKED_FOR_INJURY, PROC_REF(on_bodypart_checked)) diff --git a/code/modules/hydroponics/grown/replicapod.dm b/code/modules/hydroponics/grown/replicapod.dm index 89801785cef..bbf5a4c9b5b 100644 --- a/code/modules/hydroponics/grown/replicapod.dm +++ b/code/modules/hydroponics/grown/replicapod.dm @@ -65,7 +65,7 @@ /obj/item/seeds/replicapod/create_reagents(max_vol, flags) . = ..() - RegisterSignal(reagents, list(COMSIG_REAGENTS_ADD_REAGENT, COMSIG_REAGENTS_NEW_REAGENT), PROC_REF(on_reagent_add)) + RegisterSignals(reagents, list(COMSIG_REAGENTS_ADD_REAGENT, COMSIG_REAGENTS_NEW_REAGENT), PROC_REF(on_reagent_add)) RegisterSignal(reagents, COMSIG_REAGENTS_DEL_REAGENT, PROC_REF(on_reagent_del)) RegisterSignal(reagents, COMSIG_PARENT_QDELETING, PROC_REF(on_reagents_del)) diff --git a/code/modules/hydroponics/unique_plant_genes.dm b/code/modules/hydroponics/unique_plant_genes.dm index c94dd08b315..ecab43d3588 100644 --- a/code/modules/hydroponics/unique_plant_genes.dm +++ b/code/modules/hydroponics/unique_plant_genes.dm @@ -264,7 +264,7 @@ return our_chili = WEAKREF(our_plant) - RegisterSignal(our_plant, list(COMSIG_PARENT_QDELETING, COMSIG_ITEM_DROPPED), PROC_REF(stop_backfire_effect)) + RegisterSignals(our_plant, list(COMSIG_PARENT_QDELETING, COMSIG_ITEM_DROPPED), PROC_REF(stop_backfire_effect)) /* * Begin processing the trait on backfire. diff --git a/code/modules/industrial_lift/industrial_lift.dm b/code/modules/industrial_lift/industrial_lift.dm index f3b49519415..425b45a84d5 100644 --- a/code/modules/industrial_lift/industrial_lift.dm +++ b/code/modules/industrial_lift/industrial_lift.dm @@ -97,7 +97,7 @@ GLOBAL_LIST_EMPTY(lifts) /obj/structure/industrial_lift/proc/set_movement_registrations(list/turfs_to_set) for(var/turf/turf_loc as anything in turfs_to_set || locs) RegisterSignal(turf_loc, COMSIG_ATOM_EXITED, PROC_REF(UncrossedRemoveItemFromLift)) - RegisterSignal(turf_loc, list(COMSIG_ATOM_ENTERED,COMSIG_ATOM_INITIALIZED_ON), PROC_REF(AddItemOnLift)) + RegisterSignals(turf_loc, list(COMSIG_ATOM_ENTERED,COMSIG_ATOM_INITIALIZED_ON), PROC_REF(AddItemOnLift)) ///unset our movement registrations from turfs that no longer contain us (or every loc if turfs_to_unset is unspecified) /obj/structure/industrial_lift/proc/unset_movement_registrations(list/turfs_to_unset) diff --git a/code/modules/mining/machine_processing.dm b/code/modules/mining/machine_processing.dm index 1f6de708617..f7163499d0d 100644 --- a/code/modules/mining/machine_processing.dm +++ b/code/modules/mining/machine_processing.dm @@ -24,7 +24,7 @@ /obj/machinery/mineral/proc/register_input_turf() input_turf = get_step(src, input_dir) if(input_turf) // make sure there is actually a turf - RegisterSignal(input_turf, list(COMSIG_ATOM_INITIALIZED_ON, COMSIG_ATOM_ENTERED), PROC_REF(pickup_item)) + RegisterSignals(input_turf, list(COMSIG_ATOM_INITIALIZED_ON, COMSIG_ATOM_ENTERED), PROC_REF(pickup_item)) /// Unregisters signals that are registered the machine's input turf, if it has one. /obj/machinery/mineral/proc/unregister_input_turf() diff --git a/code/modules/mob/living/carbon/carbon_defense.dm b/code/modules/mob/living/carbon/carbon_defense.dm index be16ce41cd0..24e72142d6c 100644 --- a/code/modules/mob/living/carbon/carbon_defense.dm +++ b/code/modules/mob/living/carbon/carbon_defense.dm @@ -742,7 +742,7 @@ grasped_part.grasped_by = src grasped_part.refresh_bleed_rate() RegisterSignal(user, COMSIG_PARENT_QDELETING, PROC_REF(qdel_void)) - RegisterSignal(grasped_part, list(COMSIG_CARBON_REMOVE_LIMB, COMSIG_PARENT_QDELETING), PROC_REF(qdel_void)) + RegisterSignals(grasped_part, list(COMSIG_CARBON_REMOVE_LIMB, COMSIG_PARENT_QDELETING), PROC_REF(qdel_void)) user.visible_message(span_danger("[user] grasps at [user.p_their()] [grasped_part.name], trying to stop the bleeding."), span_notice("You grab hold of your [grasped_part.name] tightly."), vision_distance=COMBAT_MESSAGE_RANGE) playsound(get_turf(src), 'sound/weapons/thudswoosh.ogg', 50, TRUE, -1) diff --git a/code/modules/mob/living/carbon/human/init_signals.dm b/code/modules/mob/living/carbon/human/init_signals.dm index 16d7916ed3e..4c6824712eb 100644 --- a/code/modules/mob/living/carbon/human/init_signals.dm +++ b/code/modules/mob/living/carbon/human/init_signals.dm @@ -1,7 +1,7 @@ /mob/living/carbon/human/register_init_signals() . = ..() - RegisterSignal(src, list(SIGNAL_ADDTRAIT(TRAIT_UNKNOWN), SIGNAL_REMOVETRAIT(TRAIT_UNKNOWN)), PROC_REF(on_unknown_trait)) + RegisterSignals(src, list(SIGNAL_ADDTRAIT(TRAIT_UNKNOWN), SIGNAL_REMOVETRAIT(TRAIT_UNKNOWN)), PROC_REF(on_unknown_trait)) /// Gaining or losing [TRAIT_UNKNOWN] updates our name and our sechud /mob/living/carbon/human/proc/on_unknown_trait(datum/source) diff --git a/code/modules/mob/living/init_signals.dm b/code/modules/mob/living/init_signals.dm index 5d519d145be..d3f813f76f2 100644 --- a/code/modules/mob/living/init_signals.dm +++ b/code/modules/mob/living/init_signals.dm @@ -30,7 +30,7 @@ RegisterSignal(src, SIGNAL_ADDTRAIT(TRAIT_RESTRAINED), PROC_REF(on_restrained_trait_gain)) RegisterSignal(src, SIGNAL_REMOVETRAIT(TRAIT_RESTRAINED), PROC_REF(on_restrained_trait_loss)) - RegisterSignal(src, list( + RegisterSignals(src, list( SIGNAL_ADDTRAIT(TRAIT_CRITICAL_CONDITION), SIGNAL_REMOVETRAIT(TRAIT_CRITICAL_CONDITION), diff --git a/code/modules/mob/living/simple_animal/hostile/bosses/paperwizard.dm b/code/modules/mob/living/simple_animal/hostile/bosses/paperwizard.dm index 345fcf20102..50045ec90cb 100644 --- a/code/modules/mob/living/simple_animal/hostile/bosses/paperwizard.dm +++ b/code/modules/mob/living/simple_animal/hostile/bosses/paperwizard.dm @@ -68,7 +68,7 @@ for(var/i in 1 to summon_amount) var/atom/chosen_minion = pick_n_take(minions) chosen_minion = new chosen_minion(get_step(boss, pick_n_take(directions))) - RegisterSignal(chosen_minion, list(COMSIG_PARENT_QDELETING, COMSIG_LIVING_DEATH), PROC_REF(lost_minion)) + RegisterSignals(chosen_minion, list(COMSIG_PARENT_QDELETING, COMSIG_LIVING_DEATH), PROC_REF(lost_minion)) summoned_minions++ /// Called when a minion is qdeleted or dies, removes it from our minion list diff --git a/code/modules/mob/living/simple_animal/hostile/giant_spider.dm b/code/modules/mob/living/simple_animal/hostile/giant_spider.dm index 35feb539f77..4e6d9a72b35 100644 --- a/code/modules/mob/living/simple_animal/hostile/giant_spider.dm +++ b/code/modules/mob/living/simple_animal/hostile/giant_spider.dm @@ -314,7 +314,7 @@ . = ..() if (!owner) return - RegisterSignal(owner, list(COMSIG_MOVABLE_MOVED, COMSIG_DO_AFTER_BEGAN, COMSIG_DO_AFTER_ENDED), PROC_REF(update_icon_on_signal)) + RegisterSignals(owner, list(COMSIG_MOVABLE_MOVED, COMSIG_DO_AFTER_BEGAN, COMSIG_DO_AFTER_ENDED), PROC_REF(update_icon_on_signal)) /datum/action/innate/spider/lay_web/Remove(mob/removed_from) . = ..() @@ -383,7 +383,7 @@ . = ..() if (!owner) return - RegisterSignal(owner, list(COMSIG_DO_AFTER_BEGAN, COMSIG_DO_AFTER_ENDED), PROC_REF(update_icon_on_signal)) + RegisterSignals(owner, list(COMSIG_DO_AFTER_BEGAN, COMSIG_DO_AFTER_ENDED), PROC_REF(update_icon_on_signal)) /datum/action/cooldown/wrap/Remove(mob/removed_from) . = ..() @@ -496,7 +496,7 @@ . = ..() if (!owner) return - RegisterSignal(owner, list(COMSIG_MOVABLE_MOVED, COMSIG_DO_AFTER_BEGAN, COMSIG_DO_AFTER_ENDED), PROC_REF(update_icon_on_signal)) + RegisterSignals(owner, list(COMSIG_MOVABLE_MOVED, COMSIG_DO_AFTER_BEGAN, COMSIG_DO_AFTER_ENDED), PROC_REF(update_icon_on_signal)) /datum/action/innate/spider/lay_eggs/Remove(mob/removed_from) . = ..() diff --git a/code/modules/mob/living/simple_animal/slime/slime.dm b/code/modules/mob/living/simple_animal/slime/slime.dm index 479df77c72e..84de21adc58 100644 --- a/code/modules/mob/living/simple_animal/slime/slime.dm +++ b/code/modules/mob/living/simple_animal/slime/slime.dm @@ -120,7 +120,7 @@ /mob/living/simple_animal/slime/create_reagents(max_vol, flags) . = ..() - RegisterSignal(reagents, list(COMSIG_REAGENTS_NEW_REAGENT, COMSIG_REAGENTS_DEL_REAGENT), PROC_REF(on_reagent_change)) + RegisterSignals(reagents, list(COMSIG_REAGENTS_NEW_REAGENT, COMSIG_REAGENTS_DEL_REAGENT), PROC_REF(on_reagent_change)) RegisterSignal(reagents, COMSIG_PARENT_QDELETING, PROC_REF(on_reagents_del)) /// Handles removing signal hooks incase someone is crazy enough to reset the reagents datum. diff --git a/code/modules/mod/modules/modules_ninja.dm b/code/modules/mod/modules/modules_ninja.dm index 3bdeb84503c..02656d141b9 100644 --- a/code/modules/mod/modules/modules_ninja.dm +++ b/code/modules/mod/modules/modules_ninja.dm @@ -26,7 +26,7 @@ RegisterSignal(mod.wearer, COMSIG_LIVING_MOB_BUMP, PROC_REF(unstealth)) RegisterSignal(mod.wearer, COMSIG_HUMAN_MELEE_UNARMED_ATTACK, PROC_REF(on_unarmed_attack)) RegisterSignal(mod.wearer, COMSIG_ATOM_BULLET_ACT, PROC_REF(on_bullet_act)) - RegisterSignal(mod.wearer, list(COMSIG_MOB_ITEM_ATTACK, COMSIG_PARENT_ATTACKBY, COMSIG_ATOM_ATTACK_HAND, COMSIG_ATOM_HITBY, COMSIG_ATOM_HULK_ATTACK, COMSIG_ATOM_ATTACK_PAW, COMSIG_CARBON_CUFF_ATTEMPTED), PROC_REF(unstealth)) + RegisterSignals(mod.wearer, list(COMSIG_MOB_ITEM_ATTACK, COMSIG_PARENT_ATTACKBY, COMSIG_ATOM_ATTACK_HAND, COMSIG_ATOM_HITBY, COMSIG_ATOM_HULK_ATTACK, COMSIG_ATOM_ATTACK_PAW, COMSIG_CARBON_CUFF_ATTEMPTED), PROC_REF(unstealth)) animate(mod.wearer, alpha = stealth_alpha, time = 1.5 SECONDS) drain_power(use_power_cost) diff --git a/code/modules/modular_computers/file_system/programs/alarm.dm b/code/modules/modular_computers/file_system/programs/alarm.dm index 7e081bb591f..7430e08ad2c 100644 --- a/code/modules/modular_computers/file_system/programs/alarm.dm +++ b/code/modules/modular_computers/file_system/programs/alarm.dm @@ -19,7 +19,7 @@ //Or if we're on station. Otherwise, die. var/list/allowed_areas = GLOB.the_station_areas + typesof(/area/mine) alert_control = new(computer, list(ALARM_ATMOS, ALARM_FIRE, ALARM_POWER), listener_areas = allowed_areas) - RegisterSignal(alert_control.listener, list(COMSIG_ALARM_LISTENER_TRIGGERED, COMSIG_ALARM_LISTENER_CLEARED), PROC_REF(update_alarm_display)) + RegisterSignals(alert_control.listener, list(COMSIG_ALARM_LISTENER_TRIGGERED, COMSIG_ALARM_LISTENER_CLEARED), PROC_REF(update_alarm_display)) return ..() /datum/computer_file/program/alarm_monitor/Destroy() diff --git a/code/modules/plumbing/plumbers/plumbing_buffer.dm b/code/modules/plumbing/plumbers/plumbing_buffer.dm index 5ebd5f65aa0..a04421a9e77 100644 --- a/code/modules/plumbing/plumbers/plumbing_buffer.dm +++ b/code/modules/plumbing/plumbers/plumbing_buffer.dm @@ -20,7 +20,7 @@ /obj/machinery/plumbing/buffer/create_reagents(max_vol, flags) . = ..() - RegisterSignal(reagents, list(COMSIG_REAGENTS_ADD_REAGENT, COMSIG_REAGENTS_NEW_REAGENT, COMSIG_REAGENTS_REM_REAGENT, COMSIG_REAGENTS_DEL_REAGENT, COMSIG_REAGENTS_CLEAR_REAGENTS, COMSIG_REAGENTS_REACTED), PROC_REF(on_reagent_change)) + RegisterSignals(reagents, list(COMSIG_REAGENTS_ADD_REAGENT, COMSIG_REAGENTS_NEW_REAGENT, COMSIG_REAGENTS_REM_REAGENT, COMSIG_REAGENTS_DEL_REAGENT, COMSIG_REAGENTS_CLEAR_REAGENTS, COMSIG_REAGENTS_REACTED), PROC_REF(on_reagent_change)) RegisterSignal(reagents, COMSIG_PARENT_QDELETING, PROC_REF(on_reagents_del)) /// Handles properly detaching signal hooks. diff --git a/code/modules/plumbing/plumbers/reaction_chamber.dm b/code/modules/plumbing/plumbers/reaction_chamber.dm index 353cc137849..daab133c424 100644 --- a/code/modules/plumbing/plumbers/reaction_chamber.dm +++ b/code/modules/plumbing/plumbers/reaction_chamber.dm @@ -27,7 +27,7 @@ /obj/machinery/plumbing/reaction_chamber/create_reagents(max_vol, flags) . = ..() - RegisterSignal(reagents, list(COMSIG_REAGENTS_REM_REAGENT, COMSIG_REAGENTS_DEL_REAGENT, COMSIG_REAGENTS_CLEAR_REAGENTS, COMSIG_REAGENTS_REACTED), PROC_REF(on_reagent_change)) + RegisterSignals(reagents, list(COMSIG_REAGENTS_REM_REAGENT, COMSIG_REAGENTS_DEL_REAGENT, COMSIG_REAGENTS_CLEAR_REAGENTS, COMSIG_REAGENTS_REACTED), PROC_REF(on_reagent_change)) RegisterSignal(reagents, COMSIG_PARENT_QDELETING, PROC_REF(on_reagents_del)) /// Handles properly detaching signal hooks. diff --git a/code/modules/power/cell.dm b/code/modules/power/cell.dm index 140da32e68d..156b75add3a 100644 --- a/code/modules/power/cell.dm +++ b/code/modules/power/cell.dm @@ -104,7 +104,7 @@ /obj/item/stock_parts/cell/create_reagents(max_vol, flags) . = ..() - RegisterSignal(reagents, list(COMSIG_REAGENTS_NEW_REAGENT, COMSIG_REAGENTS_ADD_REAGENT, COMSIG_REAGENTS_DEL_REAGENT, COMSIG_REAGENTS_REM_REAGENT), PROC_REF(on_reagent_change)) + RegisterSignals(reagents, list(COMSIG_REAGENTS_NEW_REAGENT, COMSIG_REAGENTS_ADD_REAGENT, COMSIG_REAGENTS_DEL_REAGENT, COMSIG_REAGENTS_REM_REAGENT), PROC_REF(on_reagent_change)) RegisterSignal(reagents, COMSIG_PARENT_QDELETING, PROC_REF(on_reagents_del)) /// Handles properly detaching signal hooks. diff --git a/code/modules/reagents/chemistry/reagents/alcohol_reagents.dm b/code/modules/reagents/chemistry/reagents/alcohol_reagents.dm index 297c9ba5fd6..9dfad266e17 100644 --- a/code/modules/reagents/chemistry/reagents/alcohol_reagents.dm +++ b/code/modules/reagents/chemistry/reagents/alcohol_reagents.dm @@ -670,7 +670,7 @@ All effects don't start immediately, but rather get worse over time; the rate is COMSIG_REAGENTS_CLEAR_REAGENTS, COMSIG_REAGENTS_REACTED, ) - RegisterSignal(drink.reagents, reagent_change_signals, PROC_REF(on_reagent_change)) + RegisterSignals(drink.reagents, reagent_change_signals, PROC_REF(on_reagent_change)) return ..() diff --git a/code/modules/reagents/reagent_containers.dm b/code/modules/reagents/reagent_containers.dm index b0064d80bec..313246ead15 100644 --- a/code/modules/reagents/reagent_containers.dm +++ b/code/modules/reagents/reagent_containers.dm @@ -40,7 +40,7 @@ /obj/item/reagent_containers/create_reagents(max_vol, flags) . = ..() - RegisterSignal(reagents, list(COMSIG_REAGENTS_NEW_REAGENT, COMSIG_REAGENTS_ADD_REAGENT, COMSIG_REAGENTS_DEL_REAGENT, COMSIG_REAGENTS_REM_REAGENT), PROC_REF(on_reagent_change)) + RegisterSignals(reagents, list(COMSIG_REAGENTS_NEW_REAGENT, COMSIG_REAGENTS_ADD_REAGENT, COMSIG_REAGENTS_DEL_REAGENT, COMSIG_REAGENTS_REM_REAGENT), PROC_REF(on_reagent_change)) RegisterSignal(reagents, COMSIG_PARENT_QDELETING, PROC_REF(on_reagents_del)) /obj/item/reagent_containers/attack(mob/living/target_mob, mob/living/user, params) diff --git a/code/modules/reagents/reagent_containers/condiment.dm b/code/modules/reagents/reagent_containers/condiment.dm index b472bedd70f..e71dbb1dcfb 100644 --- a/code/modules/reagents/reagent_containers/condiment.dm +++ b/code/modules/reagents/reagent_containers/condiment.dm @@ -347,7 +347,7 @@ /obj/item/reagent_containers/condiment/pack/create_reagents(max_vol, flags) . = ..() - RegisterSignal(reagents, list(COMSIG_REAGENTS_NEW_REAGENT, COMSIG_REAGENTS_ADD_REAGENT, COMSIG_REAGENTS_REM_REAGENT), PROC_REF(on_reagent_add), TRUE) + RegisterSignals(reagents, list(COMSIG_REAGENTS_NEW_REAGENT, COMSIG_REAGENTS_ADD_REAGENT, COMSIG_REAGENTS_REM_REAGENT), PROC_REF(on_reagent_add), TRUE) RegisterSignal(reagents, COMSIG_REAGENTS_DEL_REAGENT, PROC_REF(on_reagent_del), TRUE) /obj/item/reagent_containers/condiment/pack/update_icon() diff --git a/code/modules/recycling/disposal/construction.dm b/code/modules/recycling/disposal/construction.dm index b2185ae7b60..440f1131443 100644 --- a/code/modules/recycling/disposal/construction.dm +++ b/code/modules/recycling/disposal/construction.dm @@ -40,7 +40,7 @@ var/datum/component/simple_rotation/rotcomp = GetComponent(/datum/component/simple_rotation) rotcomp.Rotate(usr, ROTATION_FLIP) // this only gets used by pipes created by RPDs or pipe dispensers - update_appearance() + update_appearance(UPDATE_ICON) /obj/structure/disposalconstruct/Move() var/old_dir = dir diff --git a/code/modules/research/machinery/_production.dm b/code/modules/research/machinery/_production.dm index 0720bb0b228..f672df1b461 100644 --- a/code/modules/research/machinery/_production.dm +++ b/code/modules/research/machinery/_production.dm @@ -61,7 +61,7 @@ . = ..() - RegisterSignal( + RegisterSignals( stored_research, list(COMSIG_TECHWEB_ADD_DESIGN, COMSIG_TECHWEB_REMOVE_DESIGN), PROC_REF(on_techweb_update) diff --git a/code/modules/research/xenobiology/vatgrowing/vatgrower.dm b/code/modules/research/xenobiology/vatgrowing/vatgrower.dm index f770a179146..4daae8a520a 100644 --- a/code/modules/research/xenobiology/vatgrowing/vatgrower.dm +++ b/code/modules/research/xenobiology/vatgrowing/vatgrower.dm @@ -16,7 +16,7 @@ /obj/machinery/plumbing/growing_vat/create_reagents(max_vol, flags) . = ..() - RegisterSignal(reagents, list(COMSIG_REAGENTS_NEW_REAGENT, COMSIG_REAGENTS_ADD_REAGENT, COMSIG_REAGENTS_DEL_REAGENT, COMSIG_REAGENTS_REM_REAGENT), PROC_REF(on_reagent_change)) + RegisterSignals(reagents, list(COMSIG_REAGENTS_NEW_REAGENT, COMSIG_REAGENTS_ADD_REAGENT, COMSIG_REAGENTS_DEL_REAGENT, COMSIG_REAGENTS_REM_REAGENT), PROC_REF(on_reagent_change)) RegisterSignal(reagents, COMSIG_PARENT_QDELETING, PROC_REF(on_reagents_del)) /// Handles properly detaching signal hooks. diff --git a/code/modules/spells/spell.dm b/code/modules/spells/spell.dm index 7a0272ae19f..221596c5ae5 100644 --- a/code/modules/spells/spell.dm +++ b/code/modules/spells/spell.dm @@ -100,11 +100,11 @@ if(spell_requirements & (SPELL_REQUIRES_NO_ANTIMAGIC|SPELL_REQUIRES_WIZARD_GARB)) RegisterSignal(owner, COMSIG_MOB_EQUIPPED_ITEM, PROC_REF(update_icon_on_signal)) if(invocation_type == INVOCATION_EMOTE) - RegisterSignal(owner, list(SIGNAL_ADDTRAIT(TRAIT_EMOTEMUTE), SIGNAL_REMOVETRAIT(TRAIT_EMOTEMUTE)), PROC_REF(update_icon_on_signal)) + RegisterSignals(owner, list(SIGNAL_ADDTRAIT(TRAIT_EMOTEMUTE), SIGNAL_REMOVETRAIT(TRAIT_EMOTEMUTE)), PROC_REF(update_icon_on_signal)) if(invocation_type == INVOCATION_SHOUT || invocation_type == INVOCATION_WHISPER) - RegisterSignal(owner, list(SIGNAL_ADDTRAIT(TRAIT_MUTE), SIGNAL_REMOVETRAIT(TRAIT_MUTE)), PROC_REF(update_icon_on_signal)) + RegisterSignals(owner, list(SIGNAL_ADDTRAIT(TRAIT_MUTE), SIGNAL_REMOVETRAIT(TRAIT_MUTE)), PROC_REF(update_icon_on_signal)) - RegisterSignal(owner, list(COMSIG_MOB_ENTER_JAUNT, COMSIG_MOB_AFTER_EXIT_JAUNT), PROC_REF(update_icon_on_signal)) + RegisterSignals(owner, list(COMSIG_MOB_ENTER_JAUNT, COMSIG_MOB_AFTER_EXIT_JAUNT), PROC_REF(update_icon_on_signal)) owner.client?.stat_panel.send_message("check_spells") /datum/action/cooldown/spell/Remove(mob/living/remove_from) diff --git a/code/modules/vehicles/mecha/equipment/tools/medical_tools.dm b/code/modules/vehicles/mecha/equipment/tools/medical_tools.dm index 081e0e5c0ad..00fc6c2916a 100644 --- a/code/modules/vehicles/mecha/equipment/tools/medical_tools.dm +++ b/code/modules/vehicles/mecha/equipment/tools/medical_tools.dm @@ -275,7 +275,7 @@ /obj/item/mecha_parts/mecha_equipment/medical/syringe_gun/create_reagents(max_vol, flags) . = ..() - RegisterSignal(reagents, list(COMSIG_REAGENTS_NEW_REAGENT, COMSIG_REAGENTS_ADD_REAGENT, COMSIG_REAGENTS_DEL_REAGENT, COMSIG_REAGENTS_REM_REAGENT), PROC_REF(on_reagent_change)) + RegisterSignals(reagents, list(COMSIG_REAGENTS_NEW_REAGENT, COMSIG_REAGENTS_ADD_REAGENT, COMSIG_REAGENTS_DEL_REAGENT, COMSIG_REAGENTS_REM_REAGENT), PROC_REF(on_reagent_change)) RegisterSignal(reagents, COMSIG_PARENT_QDELETING, PROC_REF(on_reagents_del)) /// Handles detaching signal hooks incase someone is crazy enough to make this edible. diff --git a/code/modules/vehicles/mecha/mech_fabricator.dm b/code/modules/vehicles/mecha/mech_fabricator.dm index fe7f2083369..dd5dab67739 100644 --- a/code/modules/vehicles/mecha/mech_fabricator.dm +++ b/code/modules/vehicles/mecha/mech_fabricator.dm @@ -67,7 +67,7 @@ UnregisterSignal(stored_research, list(COMSIG_TECHWEB_ADD_DESIGN, COMSIG_TECHWEB_REMOVE_DESIGN)) stored_research = new_techweb - RegisterSignal( + RegisterSignals( stored_research, list(COMSIG_TECHWEB_ADD_DESIGN, COMSIG_TECHWEB_REMOVE_DESIGN), PROC_REF(on_techweb_update) diff --git a/code/modules/wiremod/shell/airlock.dm b/code/modules/wiremod/shell/airlock.dm index a1261f543a2..e330d5a58a5 100644 --- a/code/modules/wiremod/shell/airlock.dm +++ b/code/modules/wiremod/shell/airlock.dm @@ -156,7 +156,7 @@ . = ..() if(istype(shell, /obj/machinery/door/airlock)) attached_airlock = shell - RegisterSignal(shell, list( + RegisterSignals(shell, list( COMSIG_OBJ_ALLOWED, COMSIG_AIRLOCK_SHELL_ALLOWED, ), PROC_REF(handle_allowed)) diff --git a/code/modules/wiremod/shell/assembly.dm b/code/modules/wiremod/shell/assembly.dm index 35114f8dd74..ed060f4b8a7 100644 --- a/code/modules/wiremod/shell/assembly.dm +++ b/code/modules/wiremod/shell/assembly.dm @@ -34,7 +34,7 @@ signal = add_output_port("Signal", PORT_TYPE_SIGNAL) /obj/item/circuit_component/assembly_input/register_shell(atom/movable/shell) - RegisterSignal(shell, list(COMSIG_ASSEMBLY_PULSED, COMSIG_ITEM_ATTACK_SELF), PROC_REF(on_pulsed)) + RegisterSignals(shell, list(COMSIG_ASSEMBLY_PULSED, COMSIG_ITEM_ATTACK_SELF), PROC_REF(on_pulsed)) /obj/item/circuit_component/assembly_input/unregister_shell(atom/movable/shell) UnregisterSignal(shell, list(COMSIG_ASSEMBLY_PULSED, COMSIG_ITEM_ATTACK_SELF)) diff --git a/code/modules/wiremod/shell/dispenser.dm b/code/modules/wiremod/shell/dispenser.dm index 92b66f0a7ba..89bb59f1897 100644 --- a/code/modules/wiremod/shell/dispenser.dm +++ b/code/modules/wiremod/shell/dispenser.dm @@ -164,7 +164,7 @@ var/obj/item/circuit_component/vendor_component/vendor_component = new(parent) parent.add_component(vendor_component, user) vendor_components += vendor_component - RegisterSignal(vendor_component, list( + RegisterSignals(vendor_component, list( COMSIG_PARENT_QDELETING, COMSIG_CIRCUIT_COMPONENT_REMOVED, ), PROC_REF(remove_vendor_component))