From c8a15aef723867eff897cb312b54279d6054b65d Mon Sep 17 00:00:00 2001 From: "d_h2005@yahoo.com" Date: Sun, 20 Jan 2013 20:49:02 +0000 Subject: [PATCH] Chickens will now lay a certain number of eggs per wheat fed to them. This changes the process from a passive one that happened regardless of user input to an active one that requires conscious effort. Bkaw. git-svn-id: http://tgstation13.googlecode.com/svn/trunk@5589 316c924e-a436-60f5-8080-3fe189b3f50e --- .../simple_animal/friendly/farm_animals.dm | 30 ++++++++++++++----- html/changelog.html | 7 +++++ 2 files changed, 29 insertions(+), 8 deletions(-) diff --git a/code/modules/mob/living/simple_animal/friendly/farm_animals.dm b/code/modules/mob/living/simple_animal/friendly/farm_animals.dm index 7c504d3eb0f..94531574f9d 100644 --- a/code/modules/mob/living/simple_animal/friendly/farm_animals.dm +++ b/code/modules/mob/living/simple_animal/friendly/farm_animals.dm @@ -146,17 +146,17 @@ ..() /mob/living/simple_animal/chick - name = "chick" - desc = "Adorable! They make such a racket though" + name = "\improper chick" + desc = "Adorable! They make such a racket though." icon_state = "chick" icon_living = "chick" icon_dead = "chick_dead" icon_gib = "chick_gib" - speak = list("cherp","cherp?","chirrup","cheep") + speak = list("Cherp.","Cherp?","Chirrup.","Cheep!") speak_emote = list("cheeps") emote_hear = list("cheeps") emote_see = list("pecks at the ground","flaps it's tiny wings") - speak_chance = 5 + speak_chance = 2 turns_per_move = 1 meat_type = /obj/item/weapon/reagent_containers/food/snacks/meat meat_amount = 1 @@ -187,16 +187,16 @@ var/const/MAX_CHICKENS = 50 var/global/chicken_count = 0 /mob/living/simple_animal/chicken - name = "chicken" + name = "\improper chicken" desc = "Hopefully the eggs are good this season." icon_state = "chicken" icon_living = "chicken" icon_dead = "chicken_dead" - speak = list("cluck","BWAAAAARK BWAK BWAK BWAK","bwaak bwak") + speak = list("Cluck!","BWAAAAARK BWAK BWAK BWAK!","Bwaak bwak.") speak_emote = list("clucks","croons") emote_hear = list("clucks") emote_see = list("pecks at the ground","flaps it's wings viciously") - speak_chance = 5 + speak_chance = 2 turns_per_move = 1 meat_type = /obj/item/weapon/reagent_containers/food/snacks/meat meat_amount = 2 @@ -205,6 +205,7 @@ var/global/chicken_count = 0 response_harm = "kicks the" attacktext = "kicks" health = 10 + var/eggsleft = 0 pass_flags = PASSTABLE /mob/living/simple_animal/chicken/New() @@ -217,12 +218,25 @@ var/global/chicken_count = 0 ..() chicken_count -= 1 +/mob/living/simple_animal/chicken/attackby(var/obj/item/O as obj, var/mob/user as mob) + if(istype(O, /obj/item/weapon/reagent_containers/food/snacks/grown/wheat)) //feedin' dem chickens + if(!stat && eggsleft < 10) + user.visible_message("\blue [user] feeds [O] to [name]! It clucks happily.","You feed [O] to [name]! It clucks happily.") + del(O) + eggsleft += rand(1, 4) + //world << eggsleft + else + user << "\blue [name] doesn't seem hungry!" + else + ..() + /mob/living/simple_animal/chicken/Life() . =..() if(!.) return - if(!stat && prob(1)) + if(!stat && prob(5) && eggsleft > 0) visible_message("[src] [pick("lays an egg.","squats down and croons.","begins making a huge racket.","begins clucking raucously.")]") + eggsleft-- var/obj/item/weapon/reagent_containers/food/snacks/egg/E = new(get_turf(src)) E.pixel_x = rand(-6,6) E.pixel_y = rand(-6,6) diff --git a/html/changelog.html b/html/changelog.html index d02895d84cd..c8a50067c78 100644 --- a/html/changelog.html +++ b/html/changelog.html @@ -48,6 +48,13 @@ Stuff which is in development and not yet visible to players or just code relate should be listed in the changelog upon commit tho. Thanks. --> +
+

20 January 2013

+

Cheridan updated:

+ +

16 January 2013