mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-26 22:50:26 +01:00
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>
This commit is contained in:
co-authored by
John Willard
parent
f8eca9fe66
commit
f0494e70fd
@@ -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)
|
||||
|
||||
@@ -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"
|
||||
|
||||
Reference in New Issue
Block a user