From 7e439ae8459a91191e58aeb51ebb642d1318d9d3 Mon Sep 17 00:00:00 2001 From: ZomgPonies Date: Sun, 24 Nov 2013 02:11:31 -0500 Subject: [PATCH] Added the ability to whisper ONCE while in crit, then you die. --- .../gamemodes/changeling/changeling_powers.dm | 5 ++++ code/game/gamemodes/events/ninja_abilities.dm | 2 ++ .../mob/living/carbon/human/human_defines.dm | 1 + .../mob/living/carbon/human/whisper.dm | 27 ++++++++++++------- code/modules/mob/living/say.dm | 6 +++++ 5 files changed, 32 insertions(+), 9 deletions(-) diff --git a/code/game/gamemodes/changeling/changeling_powers.dm b/code/game/gamemodes/changeling/changeling_powers.dm index 3ac34da573b..c840c9bd4e0 100644 --- a/code/game/gamemodes/changeling/changeling_powers.dm +++ b/code/game/gamemodes/changeling/changeling_powers.dm @@ -481,6 +481,11 @@ src.mind.changeling.chem_charges -= 30 var/mob/living/carbon/human/C = src + if(ishuman(src)) + var/mob/living/carbon/human/H=src + if(H.said_last_words) + H.said_last_words=0 + spawn(0) for(var/i = 0, i<10,i++) if(C) diff --git a/code/game/gamemodes/events/ninja_abilities.dm b/code/game/gamemodes/events/ninja_abilities.dm index 16dfae52493..9353dd5801e 100644 --- a/code/game/gamemodes/events/ninja_abilities.dm +++ b/code/game/gamemodes/events/ninja_abilities.dm @@ -239,6 +239,8 @@ Movement impairing would indicate drugs and the like.*/ Life.dm will kick the player back into unconsciosness the next process loop. */ U.stat = 0//At least now you should be able to teleport away or shoot ninja stars. + if(U.said_last_words) + U.said_last_words=0 spawn(30)//Slight delay so the enemy does not immedietly know the ability was used. Due to lag, this often came before waking up. U.say(pick("A CORNERED FOX IS MORE DANGEROUS THAN A JACKAL!","HURT ME MOOORRREEE!","IMPRESSIVE!")) spawn(70) diff --git a/code/modules/mob/living/carbon/human/human_defines.dm b/code/modules/mob/living/carbon/human/human_defines.dm index 4bc8e6ada94..482766ab563 100644 --- a/code/modules/mob/living/carbon/human/human_defines.dm +++ b/code/modules/mob/living/carbon/human/human_defines.dm @@ -47,6 +47,7 @@ var/miming = null //Toggle for the mime's abilities. var/special_voice = "" // For changing our voice. Used by a symptom. + var/said_last_words=0 var/failed_last_breath = 0 //This is used to determine if the mob failed a breath. If they did fail a brath, they will attempt to breathe each tick, otherwise just once per 4 ticks. diff --git a/code/modules/mob/living/carbon/human/whisper.dm b/code/modules/mob/living/carbon/human/whisper.dm index 53320e3c525..ede4b95973b 100644 --- a/code/modules/mob/living/carbon/human/whisper.dm +++ b/code/modules/mob/living/carbon/human/whisper.dm @@ -24,7 +24,7 @@ if (src.stat == 2) return src.say_dead(message) - if (src.stat) + if (src.stat && said_last_words) // TIME TO WHISPER WHILE IN CRIT return var/alt_name = "" @@ -88,6 +88,11 @@ var/list/heard_a = list() // understood us var/list/heard_b = list() // didn't understand us + var/and_passes_on="" + if(!said_last_words) + and_passes_on=" - and passes on" + said_last_words=src.stat + for (var/mob/M in listening) if (M.say_understands(src)) @@ -99,9 +104,9 @@ for (var/mob/M in watching) if (M.say_understands(src)) - rendered = "[src.name] whispers something." + rendered = "[src.name] whispers something[and_passes_on]." else - rendered = "[src.voice_name] whispers something." + rendered = "[src.voice_name] whispers something[and_passes_on]." M.show_message(rendered, 2) if (length(heard_a)) @@ -110,8 +115,7 @@ if (italics) message_a = "[message_a]" //This appears copied from carbon/living say.dm so the istype check for mob is probably not needed. Appending for src is also not needed as the game will check that automatically. - rendered = "[GetVoice()][alt_name] whispers, \"[message_a]\"" - + rendered = "[GetVoice()][alt_name] whispers, \"[message_a]\"[and_passes_on]" for (var/mob/M in heard_a) M.show_message(rendered, 2) @@ -123,7 +127,7 @@ if (italics) message_b = "[message_b]" - rendered = "[src.voice_name] whispers, \"[message_b]\"" + rendered = "[src.voice_name] whispers, \"[message_b]\"[and_passes_on]" for (var/mob/M in heard_b) M.show_message(rendered, 2) @@ -132,18 +136,23 @@ if (M.say_understands(src)) var/message_c message_c = stars(message) - rendered = "[GetVoice()][alt_name] whispers, \"[message_c]\"" + rendered = "[GetVoice()][alt_name] whispers, \"[message_c]\"[and_passes_on]" M.show_message(rendered, 2) else - rendered = "[src.voice_name] whispers something." + rendered = "[src.voice_name] whispers something[and_passes_on]." M.show_message(rendered, 2) if (italics) message = "[message]" - rendered = "[GetVoice()][alt_name] whispers, \"[message]\"" + rendered = "[GetVoice()][alt_name] whispers, \"[message]\"[and_passes_on]" for (var/mob/M in dead_mob_list) if (!(M.client)) continue if (M.stat > 1 && !(M in heard_a) && (M.client.prefs.toggles & CHAT_GHOSTEARS)) M.show_message(rendered, 2) + if(said_last_words) + src.stat = 2 + src.death() + src.regenerate_icons() + diff --git a/code/modules/mob/living/say.dm b/code/modules/mob/living/say.dm index 9d06078fea9..07456b54011 100644 --- a/code/modules/mob/living/say.dm +++ b/code/modules/mob/living/say.dm @@ -111,6 +111,12 @@ var/list/department_radio_keys = list( return if (src.client.handle_spam_prevention(message,MUTE_IC)) return + // undo last word status. + + if(ishuman(src)) + var/mob/living/carbon/human/H=src + if(H.said_last_words) + H.said_last_words=0 // Mute disability if (sdisabilities & MUTE)