From d5a783a7dcef7edb2e1b8b68bd3dde27e4cd02b6 Mon Sep 17 00:00:00 2001 From: Unknown Date: Mon, 31 Jul 2017 20:05:17 +0200 Subject: [PATCH] adds cooldown of 5 seconds --- code/modules/food_and_drinks/food.dm | 24 +++++++++++++----------- 1 file changed, 13 insertions(+), 11 deletions(-) diff --git a/code/modules/food_and_drinks/food.dm b/code/modules/food_and_drinks/food.dm index 03f5e79bb02..0d11e011dce 100644 --- a/code/modules/food_and_drinks/food.dm +++ b/code/modules/food_and_drinks/food.dm @@ -15,14 +15,16 @@ /obj/item/weapon/reagent_containers/food/proc/checkLiked(var/fraction, mob/M) - if(ishuman(M)) - var/mob/living/carbon/human/H = M - if(foodtype & H.dna.species.toxic_food) - to_chat(H,"What the hell was that thing?!") - H.adjust_disgust(25 + 30 * fraction) - else if(foodtype & H.dna.species.disliked_food) - to_chat(H,"That didn't taste very good...") - H.adjust_disgust(11 + 15 * fraction) - else if(foodtype & H.dna.species.liked_food) - to_chat(H,"I love this taste!") - H.adjust_disgust(-5 + -2.5 * fraction) + if(last_check_time + 50 < world.time) + if(ishuman(M)) + var/mob/living/carbon/human/H = M + if(foodtype & H.dna.species.toxic_food) + to_chat(H,"What the hell was that thing?!") + H.adjust_disgust(25 + 30 * fraction) + else if(foodtype & H.dna.species.disliked_food) + to_chat(H,"That didn't taste very good...") + H.adjust_disgust(11 + 15 * fraction) + else if(foodtype & H.dna.species.liked_food) + to_chat(H,"I love this taste!") + H.adjust_disgust(-5 + -2.5 * fraction) + last_check_time = world.time