From f0494e70fd58a111ea7007cfbb011e7dd4555374 Mon Sep 17 00:00:00 2001 From: Seth Scherer Date: Fri, 25 Mar 2022 23:08:58 -0400 Subject: [PATCH] Makes the heretic worm use the blood walk element (#65658) * Makes the heretic worm use the blood walk element It was using a custom proc for this, but we have an element just for this. * Update code/modules/mob/living/simple_animal/heretic_monsters.dm Co-authored-by: John Willard <53777086+JohnFulpWillard@users.noreply.github.com> * dont need this' * adds an extra arg the to the element to keep direction * moves da eement Co-authored-by: John Willard <53777086+JohnFulpWillard@users.noreply.github.com> --- code/datums/elements/blood_walk.dm | 8 +++++++- .../mob/living/simple_animal/heretic_monsters.dm | 11 ++--------- 2 files changed, 9 insertions(+), 10 deletions(-) diff --git a/code/datums/elements/blood_walk.dm b/code/datums/elements/blood_walk.dm index e27ba3ccc7c..2b37bea1625 100644 --- a/code/datums/elements/blood_walk.dm +++ b/code/datums/elements/blood_walk.dm @@ -11,6 +11,8 @@ var/sound_volume ///The chance of spawning blood whenever walking var/blood_spawn_chance + ///Should the decal face the direction of the target + var/target_dir_change /datum/element/blood_walk/Attach( @@ -19,6 +21,7 @@ sound_played, sound_volume = 80, blood_spawn_chance = 100, + target_dir_change = FALSE ) . = ..() if(!ismovable(target)) @@ -28,6 +31,7 @@ src.sound_played = sound_played src.sound_volume = sound_volume src.blood_spawn_chance = blood_spawn_chance + src.target_dir_change = target_dir_change RegisterSignal(target, COMSIG_MOVABLE_MOVED, .proc/spread_blood) /datum/element/blood_walk/Detach(datum/target) @@ -45,6 +49,8 @@ if(!prob(blood_spawn_chance)) return - new blood_type(current_turf) + var/obj/effect/decal/blood = new blood_type(current_turf) + if (target_dir_change) + blood.setDir(movable_source.dir) if(!isnull(sound_played)) playsound(movable_source, sound_played, sound_volume, TRUE, 2, TRUE) diff --git a/code/modules/mob/living/simple_animal/heretic_monsters.dm b/code/modules/mob/living/simple_animal/heretic_monsters.dm index 94227d3a298..af19683a97f 100644 --- a/code/modules/mob/living/simple_animal/heretic_monsters.dm +++ b/code/modules/mob/living/simple_animal/heretic_monsters.dm @@ -187,6 +187,8 @@ if(!spawn_bodyparts) return + AddElement(/datum/element/blood_walk, /obj/effect/decal/cleanable/blood/tracks, target_dir_change = TRUE) + allow_pulling = TRUE // Sets the hp of the head to be exactly the (length * hp), so the head is de facto the hardest to destroy. maxHealth = worm_length * maxHealth @@ -251,7 +253,6 @@ if(!follow) return - gib_trail() if(back && back.loc != oldloc) back.Move(oldloc) @@ -261,14 +262,6 @@ oldloc = loc -/// Creates a tail of blood / gibs as we move. -/mob/living/simple_animal/hostile/heretic_summon/armsy/proc/gib_trail() - if(front) // head makes gibs - return - var/chosen_decal = pick(typesof(/obj/effect/decal/cleanable/blood/tracks)) - var/obj/effect/decal/cleanable/blood/gibs/decal = new chosen_decal(drop_location()) - decal.setDir(dir) - /mob/living/simple_animal/hostile/heretic_summon/armsy/Destroy() if(front) front.icon_state = "armsy_end"