From 5fc73d17c42200aa3f17505b04df99a23c9ab356 Mon Sep 17 00:00:00 2001 From: Azarak Date: Thu, 5 Dec 2019 13:01:36 +0100 Subject: [PATCH] update 2 --- code/modules/mob/living/taste.dm | 21 +++++++++++++++++---- 1 file changed, 17 insertions(+), 4 deletions(-) diff --git a/code/modules/mob/living/taste.dm b/code/modules/mob/living/taste.dm index 28bf475d..f48fb528 100644 --- a/code/modules/mob/living/taste.dm +++ b/code/modules/mob/living/taste.dm @@ -4,6 +4,7 @@ var/last_taste_time var/last_taste_text var/last_ph_taste_time + var/last_ph_taste_number /mob/living/proc/get_taste_sensitivity() return DEFAULT_TASTE_SENSITIVITY @@ -51,17 +52,29 @@ return if (!HAS_TRAIT(src, TRAIT_AGEUSIA)) //I'll let you get away with not having 1 damage. if(last_ph_taste_time + 50 < world.time) + var/ph_taste_number switch(from.pH) if(11.5 to INFINITY) - to_chat(src, "You taste a strong alkaline flavour!") + ph_taste_number = 1 if(8.5 to 11.5) - to_chat(src, "You taste a sort of soapy tone in the mixture.") + ph_taste_number = 2 if(2.5 to 5.5) - to_chat(src, "You taste a sort of acid tone in the mixture.") + ph_taste_number = 3 if(-INFINITY to 2.5) + ph_taste_number = 4 + + if(ph_taste_number != last_ph_taste_number || last_ph_taste_time + 200 < world.time) + if (ph_taste_number == 1) + to_chat(src, "You taste a strong alkaline flavour!") + if (ph_taste_number == 2) + to_chat(src, "You taste a sort of soapy tone in the mixture.") + if (ph_taste_number == 3) + to_chat(src, "You taste a sort of acid tone in the mixture.") + if (ph_taste_number == 4) to_chat(src, "You taste a strong acidic flavour!") - last_ph_taste_time = world.time + last_ph_taste_time = world.time + last_ph_taste_number = ph_taste_number #undef DEFAULT_TASTE_SENSITIVITY