From f77b5c91c334ac13e953d411f938deed95af76ea Mon Sep 17 00:00:00 2001 From: SkyratBot <59378654+SkyratBot@users.noreply.github.com> Date: Wed, 9 Aug 2023 22:56:25 +0200 Subject: [PATCH] [MIRROR] Moving a signal to the connect loc list for projectiles. [MDB IGNORE] (#22966) * Moving a signal to the connect loc list for projectiles. (#77448) ## About The Pull Request Projectiles already have a connect_loc element attached to them. * Moving a signal to the connect loc list for projectiles. --------- Co-authored-by: Ghom <42542238+Ghommie@users.noreply.github.com> --- code/modules/projectiles/projectile.dm | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/code/modules/projectiles/projectile.dm b/code/modules/projectiles/projectile.dm index 7f53613a672..c9eb286f598 100644 --- a/code/modules/projectiles/projectile.dm +++ b/code/modules/projectiles/projectile.dm @@ -197,6 +197,7 @@ var/embed_falloff_tile var/static/list/projectile_connections = list( COMSIG_ATOM_ENTERED = PROC_REF(on_entered), + COMSIG_ATOM_ATTACK_HAND = PROC_REF(attempt_parry), ) //SKYRAT ADDITION START /// If this should be able to hit the target even on direct firing when `ignored_factions` applies @@ -214,7 +215,6 @@ if(embedding) updateEmbedding() AddElement(/datum/element/connect_loc, projectile_connections) - RegisterSignal(src, COMSIG_MOVABLE_MOVED, PROC_REF(on_enter)) /obj/projectile/proc/Range() range-- @@ -386,15 +386,6 @@ return Impact(A) -/// Signal proc for when a projectile enters a turf. -/obj/projectile/proc/on_enter(datum/source, atom/old_loc, dir, forced, list/old_locs) - SIGNAL_HANDLER - - UnregisterSignal(old_loc, COMSIG_ATOM_ATTACK_HAND) - - if(isturf(loc)) - RegisterSignal(loc, COMSIG_ATOM_ATTACK_HAND, PROC_REF(attempt_parry)) - /// Signal proc for when a mob attempts to attack this projectile or the turf it's on with an empty hand. /obj/projectile/proc/attempt_parry(datum/source, mob/user, list/modifiers) SIGNAL_HANDLER