diff --git a/code/__DEFINES/misc.dm.rej b/code/__DEFINES/misc.dm.rej new file mode 100644 index 0000000000..8aeab16ceb --- /dev/null +++ b/code/__DEFINES/misc.dm.rej @@ -0,0 +1,7 @@ +diff a/code/__DEFINES/misc.dm b/code/__DEFINES/misc.dm (rejected hunks) +@@ -440,4 +440,4 @@ GLOBAL_LIST_INIT(ghost_others_options, list(GHOST_OTHERS_SIMPLE, GHOST_OTHERS_DE + #define BEAT_SLOW 2 + #define BEAT_NONE 0 + +-#define BEAT_CHANNEL 150 //sound channel for heartbeats ++ diff --git a/code/__DEFINES/sound.dm.rej b/code/__DEFINES/sound.dm.rej new file mode 100644 index 0000000000..e47ebb9375 --- /dev/null +++ b/code/__DEFINES/sound.dm.rej @@ -0,0 +1,8 @@ +diff a/code/__DEFINES/sound.dm b/code/__DEFINES/sound.dm (rejected hunks) +@@ -9,5 +9,5 @@ + //THIS SHOULD ALWAYS BE THE LOWEST ONE! + //KEEP IT UPDATED + +-#define CHANNEL_HIGHEST_AVAILABLE 1019 ++#define CHANNEL_HIGHEST_AVAILABLE 1018 + diff --git a/code/modules/mob/living/carbon/carbon_defines.dm b/code/modules/mob/living/carbon/carbon_defines.dm index 0cd21170b9..ad1ee3143b 100644 --- a/code/modules/mob/living/carbon/carbon_defines.dm +++ b/code/modules/mob/living/carbon/carbon_defines.dm @@ -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() \ No newline at end of file diff --git a/code/modules/mob/living/carbon/life.dm b/code/modules/mob/living/carbon/life.dm index 373107edf3..d4fe2eeb62 100644 --- a/code/modules/mob/living/carbon/life.dm +++ b/code/modules/mob/living/carbon/life.dm @@ -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) diff --git a/code/modules/mob/living/carbon/life.dm.rej b/code/modules/mob/living/carbon/life.dm.rej new file mode 100644 index 0000000000..8cc1950622 --- /dev/null +++ b/code/modules/mob/living/carbon/life.dm.rej @@ -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) diff --git a/code/modules/surgery/organs/heart.dm b/code/modules/surgery/organs/heart.dm index 9ffe8b6d06..500bb9ac40 100644 --- a/code/modules/surgery/organs/heart.dm +++ b/code/modules/surgery/organs/heart.dm @@ -8,6 +8,7 @@ var/beating = 1 var/icon_base = "heart" attack_verb = list("beat", "thumped") + var/beat = BEAT_NONE//is this mob having a heatbeat sound played? if so, which? /obj/item/organ/heart/update_icon() if(beating) @@ -48,6 +49,21 @@ S.icon_state = "heart-off" return S +/obj/item/organ/heart/on_life() + if(owner.client) + var/mob/living/carbon/H = owner + if(H.health <= HEALTH_THRESHOLD_CRIT && beat != BEAT_SLOW) + beat = BEAT_SLOW + H.playsound_local(get_turf(H),'sound/health/slowbeat.ogg',40,0, channel = CHANNEL_HEARTBEAT) + to_chat(owner, "You feel your heart slow down...") + if(beat == BEAT_SLOW && H.health > HEALTH_THRESHOLD_CRIT) + H.stop_sound_channel(CHANNEL_HEARTBEAT) + beat = BEAT_NONE + + if(H.jitteriness) + if(!beat || beat == BEAT_SLOW) + H.playsound_local(get_turf(H),'sound/health/fastbeat.ogg',40,0, channel = CHANNEL_HEARTBEAT) + beat = BEAT_FAST /obj/item/organ/heart/cursed name = "cursed heart" diff --git a/sound/health/fastbeat.ogg b/sound/health/fastbeat.ogg new file mode 100644 index 0000000000..29df92812b Binary files /dev/null and b/sound/health/fastbeat.ogg differ diff --git a/sound/health/slowbeat.ogg b/sound/health/slowbeat.ogg new file mode 100644 index 0000000000..a44b609eeb Binary files /dev/null and b/sound/health/slowbeat.ogg differ