Adds heartbeats

This commit is contained in:
CitadelStationBot
2017-06-28 14:01:39 -05:00
parent c5aa34c8e9
commit 98ff55f786
8 changed files with 58 additions and 1 deletions
@@ -45,6 +45,6 @@
//Gets filled up in create_bodyparts()
var/list/hand_bodyparts = list() //a collection of arms (or actually whatever the fug /bodyparts you monsters use to wreck my systems)
var/icon_render_key = ""
var/static/list/limb_icon_cache = list()
+7
View File
@@ -20,6 +20,7 @@
//Updates the number of stored chemicals for powers
handle_changeling()
if(stat != DEAD)
return 1
@@ -363,6 +364,12 @@
if(jitteriness)
do_jitter_animation(jitteriness)
jitteriness = max(jitteriness - restingpwr, 0)
var/obj/item/organ/heart/heart = getorgan(/obj/item/organ/heart)
if(heart)
if(!heart.beat || heart.beat == BEAT_SLOW)
stop_sound_channel(BEAT_CHANNEL)
playsound_local(src,'sound/health/fastbeat.ogg',40,0, channel = BEAT_CHANNEL)
heart.beat = BEAT_FAST
if(stuttering)
stuttering = max(stuttering-1, 0)
@@ -0,0 +1,19 @@
diff a/code/modules/mob/living/carbon/life.dm b/code/modules/mob/living/carbon/life.dm (rejected hunks)
@@ -347,16 +347,10 @@
AdjustSleeping(20)
Unconscious(100)
- //Jitteryness
+ //Jitteriness
if(jitteriness)
do_jitter_animation(jitteriness)
jitteriness = max(jitteriness - restingpwr, 0)
- var/obj/item/organ/heart/heart = getorgan(/obj/item/organ/heart)
- if(heart)
- if(!heart.beat || heart.beat == BEAT_SLOW)
- stop_sound_channel(BEAT_CHANNEL)
- playsound_local(src,'sound/health/fastbeat.ogg',40,0, channel = BEAT_CHANNEL)
- heart.beat = BEAT_FAST
if(stuttering)
stuttering = max(stuttering-1, 0)