mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-23 13:10:02 +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)
|
||||
|
||||
Reference in New Issue
Block a user