From 028d885ee050bc14d8db1ddb240e55a2e5469702 Mon Sep 17 00:00:00 2001 From: Kyep Date: Sun, 23 Jul 2017 16:48:41 -0700 Subject: [PATCH] Fixes Ian being able to spam eat --- code/modules/food_and_drinks/food/snacks.dm | 7 ++++++- code/modules/mob/living/simple_animal/friendly/corgi.dm | 3 ++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/code/modules/food_and_drinks/food/snacks.dm b/code/modules/food_and_drinks/food/snacks.dm index 64e57227e46..325a909689b 100644 --- a/code/modules/food_and_drinks/food/snacks.dm +++ b/code/modules/food_and_drinks/food/snacks.dm @@ -194,17 +194,22 @@ if(isanimal(M)) M.changeNext_move(CLICK_CD_MELEE) if(iscorgi(M)) - if(bitecount >= 4) + var/mob/living/simple_animal/pet/corgi/G = M + if(world.time < (G.last_eaten + 300)) + to_chat(G, text("You are too full to try eating [src] right now.")) + else if(bitecount >= 4) M.visible_message("[M] [pick("burps from enjoyment", "yaps for more", "woofs twice", "looks at the area where [src] was")].","You swallow up the last part of [src].") playsound(loc,'sound/items/eatfood.ogg', rand(10,50), 1) var/mob/living/simple_animal/pet/corgi/C = M C.adjustBruteLoss(-5) C.adjustFireLoss(-5) qdel(src) + G.last_eaten = world.time else M.visible_message("[M] takes a bite of [src].","You take a bite of [src].") playsound(loc,'sound/items/eatfood.ogg', rand(10,50), 1) bitecount++ + G.last_eaten = world.time else if(ismouse(M)) var/mob/living/simple_animal/mouse/N = M to_chat(N, text("You nibble away at [src].")) diff --git a/code/modules/mob/living/simple_animal/friendly/corgi.dm b/code/modules/mob/living/simple_animal/friendly/corgi.dm index bf4ac4a1664..45029891575 100644 --- a/code/modules/mob/living/simple_animal/friendly/corgi.dm +++ b/code/modules/mob/living/simple_animal/friendly/corgi.dm @@ -22,12 +22,13 @@ see_in_dark = 5 childtype = /mob/living/simple_animal/pet/corgi/puppy simplespecies = /mob/living/simple_animal/pet/corgi + gold_core_spawnable = CHEM_MOB_SPAWN_FRIENDLY var/shaved = 0 var/obj/item/inventory_head var/obj/item/inventory_back var/facehugger var/default_atmos_requirements = 0 - gold_core_spawnable = CHEM_MOB_SPAWN_FRIENDLY + var/last_eaten = 0 /mob/living/simple_animal/pet/corgi/New() ..()