From 3a1315edb7fb19feab404d65cdf15de83878bdcd Mon Sep 17 00:00:00 2001 From: SkyratBot <59378654+SkyratBot@users.noreply.github.com> Date: Sun, 28 Feb 2021 15:36:38 +0100 Subject: [PATCH] [MIRROR] Move the curse hand's visual effects out of Destroy (and possibly fix the sporadic unit test failure) (#3714) * Move the curse hand's visual effects out of Destroy (and possibly fix the sporadic unit test failure) * Update curse.dm Co-authored-by: Mothblocks <35135081+Mothblocks@users.noreply.github.com> Co-authored-by: KathrinBailey <53862927+KathrinBailey@users.noreply.github.com> --- .../projectiles/projectile/special/curse.dm | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/code/modules/projectiles/projectile/special/curse.dm b/code/modules/projectiles/projectile/special/curse.dm index aa634d18a95..9297e283fec 100644 --- a/code/modules/projectiles/projectile/special/curse.dm +++ b/code/modules/projectiles/projectile/special/curse.dm @@ -33,7 +33,8 @@ /obj/projectile/curse_hand/prehit_pierce(atom/target) return (target == original)? PROJECTILE_PIERCE_NONE : PROJECTILE_PIERCE_PHASE -/obj/projectile/curse_hand/Destroy() +/// The visual effect for the hand disappearing +/obj/projectile/curse_hand/proc/finale() if(arm) QDEL_NULL(arm) if((movement_type & PHASING)) @@ -46,5 +47,20 @@ new /obj/effect/temp_visual/dir_setting/curse/grasp_portal/fading(starting, dir) var/datum/beam/D = starting.Beam(T, icon_state = "curse[handedness]", time = 32, beam_type=/obj/effect/ebeam/curse_arm) animate(D.visuals, alpha = 0, time = 32) + +/obj/projectile/curse_hand/on_range() + finale() return ..() +/obj/projectile/curse_hand/on_hit(atom/target, blocked, pierce_hit) + . = ..() + if (. == BULLET_ACT_HIT) + finale() + +/obj/projectile/curse_hand/hel //Used in helbital's impure reagent + name = "Hel's grasp" + damage = 5 + paralyze = 0 //Lets not stun people! + speed = 1 + range = 20 + color = "#ff7e7e"//Tint it slightly