From fd19d67cc282f10fcc098631e6186c148fe0206f Mon Sep 17 00:00:00 2001 From: BurgerLua Date: Thu, 25 Apr 2019 11:57:02 -0700 Subject: [PATCH] "Improves" how slurring works, and adjusts how fast you recover from slurring. --- code/modules/mob/living/carbon/human/say.dm | 13 +++++++++---- code/modules/mob/living/carbon/life.dm | 2 +- code/modules/mob/living/say.dm | 2 +- code/modules/mob/mob_helpers.dm | 14 +++++++------- .../chemistry/reagents/alcohol_reagents.dm | 12 ++++-------- .../reagents/chemistry/reagents/food_reagents.dm | 3 +-- 6 files changed, 23 insertions(+), 23 deletions(-) diff --git a/code/modules/mob/living/carbon/human/say.dm b/code/modules/mob/living/carbon/human/say.dm index 3cdaf71e68..dc35e65c47 100644 --- a/code/modules/mob/living/carbon/human/say.dm +++ b/code/modules/mob/living/carbon/human/say.dm @@ -1,9 +1,14 @@ /mob/living/carbon/human/say_mod(input, message_mode) verb_say = dna.species.say_mod - if(slurring) - return "slurs" - else - . = ..() + switch(slurring) + if(25 to 50) + return "jumbles" + if(50 to 75) + return "slurs" + if(75 to INFINITY) + return "garbles" + else + . = ..() /mob/living/carbon/human/treat_message(message) message = dna.species.handle_speech(message,src) diff --git a/code/modules/mob/living/carbon/life.dm b/code/modules/mob/living/carbon/life.dm index 48a401802b..2492ece97f 100644 --- a/code/modules/mob/living/carbon/life.dm +++ b/code/modules/mob/living/carbon/life.dm @@ -532,7 +532,7 @@ GLOBAL_LIST_INIT(ballmer_windows_me_msg, list("Yo man, what if, we like, uh, put stuttering = max(stuttering-1, 0) if(slurring) - slurring = max(slurring-1,0) + slurring = max(slurring-0.15,0) if(cultslurring) cultslurring = max(cultslurring-1, 0) diff --git a/code/modules/mob/living/say.dm b/code/modules/mob/living/say.dm index a0f619a7d6..871e33349a 100644 --- a/code/modules/mob/living/say.dm +++ b/code/modules/mob/living/say.dm @@ -334,7 +334,7 @@ GLOBAL_LIST_INIT(department_radio_keys, list( message = stutter(message) if(slurring) - message = slur(message) + message = slur(message,slurring) if(cultslurring) message = cultslur(message) diff --git a/code/modules/mob/mob_helpers.dm b/code/modules/mob/mob_helpers.dm index 35b48afa28..3d4e356464 100644 --- a/code/modules/mob/mob_helpers.dm +++ b/code/modules/mob/mob_helpers.dm @@ -64,7 +64,7 @@ p++ return sanitize(t) -/proc/slur(n) +/proc/slur(n,var/strength=50) var/phrase = html_decode(n) var/leng = lentext(phrase) var/counter=lentext(phrase) @@ -72,7 +72,7 @@ var/newletter="" while(counter>=1) newletter=copytext(phrase,(leng-counter)+1,(leng-counter)+2) - if(rand(1,3)==3) + if(rand(1,100)<=strength) if(lowertext(newletter)=="o") newletter="u" if(lowertext(newletter)=="s") @@ -83,17 +83,17 @@ newletter="oo" if(lowertext(newletter)=="c") newletter="k" - if(rand(1,20)==20) + if(rand(1,100) <= strength*0.5) if(newletter==" ") newletter="...huuuhhh..." if(newletter==".") newletter=" *BURP*." - switch(rand(1,20)) - if(1) + if(rand(1,100) <= strength) + if(rand(1,5) == 1) newletter+="'" - if(10) + if(rand(1,5) == 1) newletter+="[newletter]" - if(20) + if(rand(1,5) == 1) newletter+="[newletter][newletter]" newphrase+="[newletter]";counter-=1 return newphrase diff --git a/code/modules/reagents/chemistry/reagents/alcohol_reagents.dm b/code/modules/reagents/chemistry/reagents/alcohol_reagents.dm index 6e4d5e5a7d..92d9da401b 100644 --- a/code/modules/reagents/chemistry/reagents/alcohol_reagents.dm +++ b/code/modules/reagents/chemistry/reagents/alcohol_reagents.dm @@ -1277,8 +1277,7 @@ All effects don't start immediately, but rather get worse over time; the rate is if(!M.has_trait(TRAIT_ALCOHOL_TOLERANCE)) M.confused = max(M.confused+2,0) M.Dizzy(10) - if (!M.slurring) - M.slurring = 1 + M.slurring = max(M.slurring,50) M.slurring += 3 switch(current_cycle) if(51 to 200) @@ -1306,8 +1305,7 @@ All effects don't start immediately, but rather get worse over time; the rate is M.dizziness +=1.5 switch(current_cycle) if(15 to 45) - if(!M.slurring) - M.slurring = 1 + M.slurring = max(M.slurring,50) M.slurring += 3 if(45 to 55) if(prob(50)) @@ -1336,8 +1334,7 @@ All effects don't start immediately, but rather get worse over time; the rate is M.dizziness +=2 switch(current_cycle) if(15 to 45) - if(!M.slurring) - M.slurring = 1 + M.slurring = max(M.slurring,50) M.slurring += 3 if(45 to 55) if(prob(50)) @@ -1364,8 +1361,7 @@ All effects don't start immediately, but rather get worse over time; the rate is glass_desc = "A drink enjoyed by people during the 1960's." /datum/reagent/consumable/ethanol/hippies_delight/on_mob_life(mob/living/carbon/M) - if (!M.slurring) - M.slurring = 1 + M.slurring = max(M.slurring,50) switch(current_cycle) if(1 to 5) M.Dizzy(10) diff --git a/code/modules/reagents/chemistry/reagents/food_reagents.dm b/code/modules/reagents/chemistry/reagents/food_reagents.dm index 52b212f8c5..5071150e24 100644 --- a/code/modules/reagents/chemistry/reagents/food_reagents.dm +++ b/code/modules/reagents/chemistry/reagents/food_reagents.dm @@ -402,8 +402,7 @@ taste_description = "mushroom" /datum/reagent/mushroomhallucinogen/on_mob_life(mob/living/carbon/M) - if(!M.slurring) - M.slurring = 1 + M.slurring = max(M.slurring,50) switch(current_cycle) if(1 to 5) M.Dizzy(5)