mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-07-18 19:44:58 +01:00
Most compoennts/elements that register COMSIG_PROJECTILE_ON_HIT can now be applied to turrets and projectile spells (#68238)
expands elements that register COMSIG_PROJECTILE_ON_HIT
This commit is contained in:
@@ -165,9 +165,9 @@
|
||||
|
||||
/datum/action/cooldown/spell/pointed/projectile/proc/ready_projectile(obj/projectile/to_fire, atom/target, mob/user, iteration)
|
||||
to_fire.firer = owner
|
||||
to_fire.fired_from = get_turf(owner)
|
||||
to_fire.fired_from = src
|
||||
to_fire.preparePixelProjectile(target, owner)
|
||||
RegisterSignal(to_fire, COMSIG_PROJECTILE_ON_HIT, .proc/on_cast_hit)
|
||||
RegisterSignal(to_fire, COMSIG_PROJECTILE_SELF_ON_HIT, .proc/on_cast_hit)
|
||||
|
||||
if(istype(to_fire, /obj/projectile/magic))
|
||||
var/obj/projectile/magic/magic_to_fire = to_fire
|
||||
@@ -175,7 +175,7 @@
|
||||
|
||||
/// Signal proc for whenever the projectile we fire hits someone.
|
||||
/// Pretty much relays to the spell when the projectile actually hits something.
|
||||
/datum/action/cooldown/spell/pointed/projectile/proc/on_cast_hit(atom/source, mob/firer, atom/hit, angle)
|
||||
/datum/action/cooldown/spell/pointed/projectile/proc/on_cast_hit(datum/source, mob/firer, atom/target, angle, hit_limb)
|
||||
SIGNAL_HANDLER
|
||||
|
||||
SEND_SIGNAL(src, COMSIG_SPELL_PROJECTILE_HIT, hit, firer, source)
|
||||
SEND_SIGNAL(src, COMSIG_SPELL_PROJECTILE_HIT, source, firer, target, angle, hit_limb)
|
||||
|
||||
Reference in New Issue
Block a user