[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>
This commit is contained in:
SkyratBot
2023-08-09 16:56:25 -04:00
committed by GitHub
co-authored by Ghom
parent 847ad13fe6
commit f77b5c91c3
+1 -10
View File
@@ -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