diff --git a/code/modules/character_traits/biology_traits.dm b/code/modules/character_traits/biology_traits.dm index e7625c391b75..87fb0b70ec36 100644 --- a/code/modules/character_traits/biology_traits.dm +++ b/code/modules/character_traits/biology_traits.dm @@ -59,11 +59,13 @@ return ADD_TRAIT(target, TRAIT_LISPING, TRAIT_SOURCE_QUIRK) + target.speech_problem_flag = TRUE ..() /datum/character_trait/biology/lisp/unapply_trait(mob/living/carbon/human/target) REMOVE_TRAIT(target, TRAIT_LISPING, TRAIT_SOURCE_QUIRK) + target.speech_problem_flag = FALSE ..() /datum/character_trait/biology/bad_leg diff --git a/code/modules/mob/living/carbon/human/human_damage.dm b/code/modules/mob/living/carbon/human/human_damage.dm index 00659389decb..5c685cc3acac 100644 --- a/code/modules/mob/living/carbon/human/human_damage.dm +++ b/code/modules/mob/living/carbon/human/human_damage.dm @@ -287,7 +287,7 @@ In most cases it makes more sense to use apply_damage() instead! And make sure t apply_damage(burn, BURN, picked, sharp, edge) UpdateDamageIcon() updatehealth() - speech_problem_flag = 1 + speech_problem_flag = TRUE //Heal MANY limbs, in random order @@ -308,7 +308,7 @@ In most cases it makes more sense to use apply_damage() instead! And make sure t parts -= picked updatehealth() - speech_problem_flag = 1 + speech_problem_flag = TRUE if(update) UpdateDamageIcon() // damage MANY limbs, in random order diff --git a/code/modules/mob/living/carbon/human/human_defines.dm b/code/modules/mob/living/carbon/human/human_defines.dm index 7f9801145a8e..989ee52fa63c 100644 --- a/code/modules/mob/living/carbon/human/human_defines.dm +++ b/code/modules/mob/living/carbon/human/human_defines.dm @@ -64,7 +64,7 @@ var/voice - var/speech_problem_flag = 0 + var/speech_problem_flag = FALSE var/special_voice = "" // For changing our voice. Used by a symptom. diff --git a/code/modules/mob/living/carbon/human/life/handle_disabilities.dm b/code/modules/mob/living/carbon/human/life/handle_disabilities.dm index 46b1f3e15515..9ab234212108 100644 --- a/code/modules/mob/living/carbon/human/life/handle_disabilities.dm +++ b/code/modules/mob/living/carbon/human/life/handle_disabilities.dm @@ -17,7 +17,7 @@ return if(disabilities & TOURETTES) - speech_problem_flag = 1 + speech_problem_flag = TRUE if((prob(10) && knocked_out <= 1)) apply_effect(10, STUN) spawn() @@ -36,7 +36,7 @@ return if(disabilities & NERVOUS) - speech_problem_flag = 1 + speech_problem_flag = TRUE if(prob(10)) stuttering = max(10, stuttering) return diff --git a/code/modules/mob/living/carbon/human/life/handle_regular_status_updates.dm b/code/modules/mob/living/carbon/human/life/handle_regular_status_updates.dm index 4a6596104d4a..5c951a8112bf 100644 --- a/code/modules/mob/living/carbon/human/life/handle_regular_status_updates.dm +++ b/code/modules/mob/living/carbon/human/life/handle_regular_status_updates.dm @@ -59,7 +59,7 @@ if(regular_update && halloss > 0) apply_damage(-3, HALLOSS) else if(sleeping) - speech_problem_flag = 1 + speech_problem_flag = TRUE if(regular_update) handle_dreams() apply_damage(-3, HALLOSS) @@ -122,7 +122,7 @@ handle_statuses() if(paralyzed) - speech_problem_flag = 1 + speech_problem_flag = TRUE apply_effect(1, WEAKEN) silent = 1 blinded = TRUE diff --git a/code/modules/mob/living/carbon/human/life/life_helpers.dm b/code/modules/mob/living/carbon/human/life/life_helpers.dm index 0339bf6ec742..fedeaf9fd48c 100644 --- a/code/modules/mob/living/carbon/human/life/life_helpers.dm +++ b/code/modules/mob/living/carbon/human/life/life_helpers.dm @@ -216,18 +216,18 @@ /mob/living/carbon/human/handle_silent() if(..()) - speech_problem_flag = 1 + speech_problem_flag = TRUE return silent /mob/living/carbon/human/handle_slurring() if(..()) - speech_problem_flag = 1 + speech_problem_flag = TRUE return slurring /mob/living/carbon/human/handle_stunned() if(stunned) adjust_effect(-species.stun_reduction, STUN, EFFECT_FLAG_LIFE) - speech_problem_flag = 1 + speech_problem_flag = TRUE return stunned /mob/living/carbon/human/handle_dazed() @@ -237,7 +237,7 @@ var/final_reduction = skill_resistance + 1 adjust_effect(-final_reduction, DAZE, EFFECT_FLAG_LIFE) if(dazed) - speech_problem_flag = 1 + speech_problem_flag = TRUE return dazed /mob/living/carbon/human/handle_knocked_down() @@ -262,7 +262,7 @@ /mob/living/carbon/human/handle_stuttering() if(..()) - speech_problem_flag = 1 + speech_problem_flag = TRUE return stuttering #define HUMAN_TIMER_TO_EFFECT_CONVERSION (0.05) //(1/20) //once per 2 seconds, with effect equal to endurance, which is used later diff --git a/code/modules/mob/living/carbon/human/say.dm b/code/modules/mob/living/carbon/human/say.dm index 46a44fc16611..4b86c827a069 100644 --- a/code/modules/mob/living/carbon/human/say.dm +++ b/code/modules/mob/living/carbon/human/say.dm @@ -262,20 +262,20 @@ for it but just ignore it. /mob/living/carbon/human/proc/handle_speech_problems(message) var/list/returns[3] var/verb = "says" - var/handled = 0 + var/handled = FALSE if(silent) message = "" - handled = 1 + handled = TRUE if(sdisabilities & DISABILITY_MUTE) message = "" - handled = 1 + handled = TRUE if(wear_mask) if(istype(wear_mask, /obj/item/clothing/mask/horsehead)) var/obj/item/clothing/mask/horsehead/hoers = wear_mask if(hoers.voicechange) message = pick("NEEIIGGGHHHH!", "NEEEIIIIGHH!", "NEIIIGGHH!", "HAAWWWWW!", "HAAAWWW!") verb = pick("whinnies","neighs", "says") - handled = 1 + handled = TRUE var/braindam = getBrainLoss() if(slurring || stuttering || dazed || braindam >= 60) @@ -283,17 +283,17 @@ for it but just ignore it. if(slurring) message = slur(message) verb = pick("stammers","stutters") - handled = 1 + handled = TRUE if(stuttering) message = NewStutter(message) verb = pick("stammers", "stutters") - handled = 1 + handled = TRUE if(dazed) message = DazedText(message) verb = pick("mumbles", "babbles") - handled = 1 + handled = TRUE if(braindam >= 60) - handled = 1 + handled = TRUE if(prob(braindam/4)) message = stutter(message, stuttering) verb = pick("stammers", "stutters") @@ -301,6 +301,7 @@ for it but just ignore it. message = uppertext(message) verb = pick("yells like an idiot","says rather loudly") if(HAS_TRAIT(src, TRAIT_LISPING)) + handled = TRUE var/old_message = message message = lisp_replace(message) if(old_message != message)