[MIRROR] Cleans up some Initializes (#943)
* Cleans up some Initializes * Update farm_animals.dm * Delete farm_animals.dm.rej * Update farm_animals.dm
This commit is contained in:
committed by
Poojawa
parent
620b756025
commit
c61bb0476f
@@ -797,7 +797,7 @@ Pass a positive integer as an argument to override a bot's default speed.
|
||||
var/mob/living/simple_animal/bot/owner = null
|
||||
|
||||
/obj/machinery/bot_core/Initialize()
|
||||
..()
|
||||
. = ..()
|
||||
owner = loc
|
||||
if(!istype(owner))
|
||||
qdel(src)
|
||||
@@ -919,4 +919,4 @@ Pass a positive integer as an argument to override a bot's default speed.
|
||||
if(!data_hud_type)
|
||||
return
|
||||
var/datum/atom_hud/datahud = GLOB.huds[data_hud_type]
|
||||
datahud.add_hud_to(src)
|
||||
datahud.add_hud_to(src)
|
||||
@@ -1,331 +1,322 @@
|
||||
//goat
|
||||
/mob/living/simple_animal/hostile/retaliate/goat
|
||||
name = "goat"
|
||||
desc = "Not known for their pleasant disposition."
|
||||
icon_state = "goat"
|
||||
icon_living = "goat"
|
||||
icon_dead = "goat_dead"
|
||||
speak = list("EHEHEHEHEH","eh?")
|
||||
speak_emote = list("brays")
|
||||
emote_hear = list("brays.")
|
||||
emote_see = list("shakes its head.", "stamps a foot.", "glares around.")
|
||||
speak_chance = 1
|
||||
turns_per_move = 5
|
||||
see_in_dark = 6
|
||||
butcher_results = list(/obj/item/weapon/reagent_containers/food/snacks/meat/slab = 4)
|
||||
response_help = "pets"
|
||||
response_disarm = "gently pushes aside"
|
||||
response_harm = "kicks"
|
||||
faction = list("neutral")
|
||||
attack_same = 1
|
||||
attacktext = "kicks"
|
||||
attack_sound = 'sound/weapons/punch1.ogg'
|
||||
health = 40
|
||||
maxHealth = 40
|
||||
melee_damage_lower = 1
|
||||
melee_damage_upper = 2
|
||||
environment_smash = 0
|
||||
stop_automated_movement_when_pulled = 1
|
||||
blood_volume = BLOOD_VOLUME_NORMAL
|
||||
var/obj/item/udder/udder = null
|
||||
devourable = TRUE
|
||||
|
||||
/mob/living/simple_animal/hostile/retaliate/goat/Initialize()
|
||||
udder = new()
|
||||
..()
|
||||
/mob/living/simple_animal/hostile/retaliate/goat/Destroy()
|
||||
qdel(udder)
|
||||
udder = null
|
||||
return ..()
|
||||
|
||||
/mob/living/simple_animal/hostile/retaliate/goat/Life()
|
||||
. = ..()
|
||||
if(.)
|
||||
//chance to go crazy and start wacking stuff
|
||||
if(!enemies.len && prob(1))
|
||||
Retaliate()
|
||||
|
||||
if(enemies.len && prob(10))
|
||||
enemies = list()
|
||||
LoseTarget()
|
||||
src.visible_message("<span class='notice'>[src] calms down.</span>")
|
||||
if(stat == CONSCIOUS)
|
||||
udder.generateMilk()
|
||||
eat_plants()
|
||||
if(!pulledby)
|
||||
for(var/direction in shuffle(list(1,2,4,8,5,6,9,10)))
|
||||
var/step = get_step(src, direction)
|
||||
if(step)
|
||||
if(locate(/obj/structure/spacevine) in step || locate(/obj/structure/glowshroom) in step)
|
||||
Move(step, get_dir(src, step))
|
||||
|
||||
/mob/living/simple_animal/hostile/retaliate/goat/Retaliate()
|
||||
..()
|
||||
src.visible_message("<span class='danger'>[src] gets an evil-looking gleam in [p_their()] eye.</span>")
|
||||
|
||||
/mob/living/simple_animal/hostile/retaliate/goat/Move()
|
||||
..()
|
||||
if(!stat)
|
||||
eat_plants()
|
||||
|
||||
/mob/living/simple_animal/hostile/retaliate/goat/proc/eat_plants()
|
||||
var/eaten = FALSE
|
||||
var/obj/structure/spacevine/SV = locate(/obj/structure/spacevine) in loc
|
||||
if(SV)
|
||||
SV.eat(src)
|
||||
eaten = TRUE
|
||||
|
||||
var/obj/structure/glowshroom/GS = locate(/obj/structure/glowshroom) in loc
|
||||
if(GS)
|
||||
qdel(GS)
|
||||
eaten = TRUE
|
||||
|
||||
if(eaten && prob(10))
|
||||
say("Nom")
|
||||
|
||||
/mob/living/simple_animal/hostile/retaliate/goat/attackby(obj/item/O, mob/user, params)
|
||||
if(stat == CONSCIOUS && istype(O, /obj/item/weapon/reagent_containers/glass))
|
||||
udder.milkAnimal(O, user)
|
||||
return 1
|
||||
else
|
||||
return ..()
|
||||
|
||||
//cow
|
||||
/mob/living/simple_animal/cow
|
||||
name = "cow"
|
||||
desc = "Known for their milk, just don't tip them over."
|
||||
icon_state = "cow"
|
||||
icon_living = "cow"
|
||||
icon_dead = "cow_dead"
|
||||
icon_gib = "cow_gib"
|
||||
gender = FEMALE
|
||||
speak = list("moo?","moo","MOOOOOO")
|
||||
speak_emote = list("moos","moos hauntingly")
|
||||
emote_hear = list("brays.")
|
||||
emote_see = list("shakes its head.")
|
||||
speak_chance = 1
|
||||
turns_per_move = 5
|
||||
see_in_dark = 6
|
||||
butcher_results = list(/obj/item/weapon/reagent_containers/food/snacks/meat/slab = 6)
|
||||
response_help = "pets"
|
||||
response_disarm = "gently pushes aside"
|
||||
response_harm = "kicks"
|
||||
attacktext = "kicks"
|
||||
attack_sound = 'sound/weapons/punch1.ogg'
|
||||
health = 50
|
||||
maxHealth = 50
|
||||
var/obj/item/udder/udder = null
|
||||
gold_core_spawnable = 2
|
||||
blood_volume = BLOOD_VOLUME_NORMAL
|
||||
devourable = TRUE
|
||||
|
||||
/mob/living/simple_animal/cow/Initialize()
|
||||
udder = new()
|
||||
..()
|
||||
|
||||
/mob/living/simple_animal/cow/Destroy()
|
||||
qdel(udder)
|
||||
udder = null
|
||||
return ..()
|
||||
|
||||
/mob/living/simple_animal/cow/attackby(obj/item/O, mob/user, params)
|
||||
if(stat == CONSCIOUS && istype(O, /obj/item/weapon/reagent_containers/glass))
|
||||
udder.milkAnimal(O, user)
|
||||
return 1
|
||||
else
|
||||
return ..()
|
||||
|
||||
/mob/living/simple_animal/cow/Life()
|
||||
. = ..()
|
||||
if(stat == CONSCIOUS)
|
||||
udder.generateMilk()
|
||||
|
||||
/mob/living/simple_animal/cow/attack_hand(mob/living/carbon/M)
|
||||
if(!stat && M.a_intent == INTENT_DISARM && icon_state != icon_dead)
|
||||
M.visible_message("<span class='warning'>[M] tips over [src].</span>",
|
||||
"<span class='notice'>You tip over [src].</span>")
|
||||
to_chat(src, "<span class='userdanger'>You are tipped over by [M]!</span>")
|
||||
Weaken(30)
|
||||
icon_state = icon_dead
|
||||
spawn(rand(20,50))
|
||||
if(!stat && M)
|
||||
icon_state = icon_living
|
||||
var/external
|
||||
var/internal
|
||||
switch(pick(1,2,3,4))
|
||||
if(1,2,3)
|
||||
var/text = pick("imploringly.", "pleadingly.",
|
||||
"with a resigned expression.")
|
||||
external = "[src] looks at [M] [text]"
|
||||
internal = "You look at [M] [text]"
|
||||
if(4)
|
||||
external = "[src] seems resigned to its fate."
|
||||
internal = "You resign yourself to your fate."
|
||||
visible_message("<span class='notice'>[external]</span>",
|
||||
"<span class='revennotice'>[internal]</span>")
|
||||
else
|
||||
..()
|
||||
|
||||
/mob/living/simple_animal/chick
|
||||
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"
|
||||
gender = FEMALE
|
||||
speak = list("Cherp.","Cherp?","Chirrup.","Cheep!")
|
||||
speak_emote = list("cheeps")
|
||||
emote_hear = list("cheeps.")
|
||||
emote_see = list("pecks at the ground.","flaps its tiny wings.")
|
||||
density = 0
|
||||
speak_chance = 2
|
||||
turns_per_move = 2
|
||||
butcher_results = list(/obj/item/weapon/reagent_containers/food/snacks/meat/slab = 1)
|
||||
response_help = "pets"
|
||||
response_disarm = "gently pushes aside"
|
||||
response_harm = "kicks"
|
||||
attacktext = "kicks"
|
||||
health = 3
|
||||
maxHealth = 3
|
||||
ventcrawler = VENTCRAWLER_ALWAYS
|
||||
var/amount_grown = 0
|
||||
pass_flags = PASSTABLE | PASSGRILLE | PASSMOB
|
||||
mob_size = MOB_SIZE_TINY
|
||||
gold_core_spawnable = 2
|
||||
devourable = TRUE
|
||||
|
||||
/mob/living/simple_animal/chick/Initialize()
|
||||
..()
|
||||
pixel_x = rand(-6, 6)
|
||||
pixel_y = rand(0, 10)
|
||||
|
||||
/mob/living/simple_animal/chick/Life()
|
||||
. =..()
|
||||
if(!.)
|
||||
return
|
||||
if(!stat && !ckey)
|
||||
amount_grown += rand(1,2)
|
||||
if(amount_grown >= 100)
|
||||
new /mob/living/simple_animal/chicken(src.loc)
|
||||
qdel(src)
|
||||
|
||||
/mob/living/simple_animal/chick/holo/Life()
|
||||
..()
|
||||
amount_grown = 0
|
||||
|
||||
/mob/living/simple_animal/chicken
|
||||
name = "\improper chicken"
|
||||
desc = "Hopefully the eggs are good this season."
|
||||
gender = FEMALE
|
||||
icon_state = "chicken_brown"
|
||||
icon_living = "chicken_brown"
|
||||
icon_dead = "chicken_brown_dead"
|
||||
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 its wings viciously.")
|
||||
density = 0
|
||||
speak_chance = 2
|
||||
turns_per_move = 3
|
||||
butcher_results = list(/obj/item/weapon/reagent_containers/food/snacks/meat/slab = 2)
|
||||
var/egg_type = /obj/item/weapon/reagent_containers/food/snacks/egg
|
||||
var/food_type = /obj/item/weapon/reagent_containers/food/snacks/grown/wheat
|
||||
response_help = "pets"
|
||||
response_disarm = "gently pushes aside"
|
||||
response_harm = "kicks"
|
||||
attacktext = "kicks"
|
||||
health = 15
|
||||
maxHealth = 15
|
||||
ventcrawler = VENTCRAWLER_ALWAYS
|
||||
var/eggsleft = 0
|
||||
var/eggsFertile = TRUE
|
||||
var/body_color
|
||||
var/icon_prefix = "chicken"
|
||||
pass_flags = PASSTABLE | PASSMOB
|
||||
mob_size = MOB_SIZE_SMALL
|
||||
var/list/feedMessages = list("It clucks happily.","It clucks happily.")
|
||||
var/list/layMessage = list("lays an egg.","squats down and croons.","begins making a huge racket.","begins clucking raucously.")
|
||||
var/list/validColors = list("brown","black","white")
|
||||
gold_core_spawnable = 2
|
||||
var/static/chicken_count = 0
|
||||
devourable = TRUE
|
||||
|
||||
/mob/living/simple_animal/chicken/Initialize()
|
||||
..()
|
||||
if(!body_color)
|
||||
body_color = pick(validColors)
|
||||
icon_state = "[icon_prefix]_[body_color]"
|
||||
icon_living = "[icon_prefix]_[body_color]"
|
||||
icon_dead = "[icon_prefix]_[body_color]_dead"
|
||||
pixel_x = rand(-6, 6)
|
||||
pixel_y = rand(0, 10)
|
||||
++chicken_count
|
||||
|
||||
/mob/living/simple_animal/chicken/Destroy()
|
||||
--chicken_count
|
||||
return ..()
|
||||
|
||||
/mob/living/simple_animal/chicken/attackby(obj/item/O, mob/user, params)
|
||||
if(istype(O, food_type)) //feedin' dem chickens
|
||||
if(!stat && eggsleft < 8)
|
||||
var/feedmsg = "[user] feeds [O] to [name]! [pick(feedMessages)]"
|
||||
user.visible_message(feedmsg)
|
||||
user.drop_item()
|
||||
qdel(O)
|
||||
eggsleft += rand(1, 4)
|
||||
//to_chat(world, eggsleft)
|
||||
else
|
||||
to_chat(user, "<span class='warning'>[name] doesn't seem hungry!</span>")
|
||||
else
|
||||
..()
|
||||
|
||||
/mob/living/simple_animal/chicken/Life()
|
||||
. =..()
|
||||
if(!.)
|
||||
return
|
||||
if((!stat && prob(3) && eggsleft > 0) && egg_type)
|
||||
visible_message("[src] [pick(layMessage)]")
|
||||
eggsleft--
|
||||
var/obj/item/E = new egg_type(get_turf(src))
|
||||
E.pixel_x = rand(-6,6)
|
||||
E.pixel_y = rand(-6,6)
|
||||
if(eggsFertile)
|
||||
if(chicken_count < MAX_CHICKENS && prob(25))
|
||||
START_PROCESSING(SSobj, E)
|
||||
|
||||
/obj/item/weapon/reagent_containers/food/snacks/egg/var/amount_grown = 0
|
||||
/obj/item/weapon/reagent_containers/food/snacks/egg/process()
|
||||
if(isturf(loc))
|
||||
amount_grown += rand(1,2)
|
||||
if(amount_grown >= 100)
|
||||
visible_message("[src] hatches with a quiet cracking sound.")
|
||||
new /mob/living/simple_animal/chick(get_turf(src))
|
||||
STOP_PROCESSING(SSobj, src)
|
||||
qdel(src)
|
||||
else
|
||||
STOP_PROCESSING(SSobj, src)
|
||||
|
||||
|
||||
/obj/item/udder
|
||||
name = "udder"
|
||||
|
||||
/obj/item/udder/Initialize()
|
||||
create_reagents(50)
|
||||
reagents.add_reagent("milk", 20)
|
||||
..()
|
||||
|
||||
/obj/item/udder/proc/generateMilk()
|
||||
if(prob(5))
|
||||
reagents.add_reagent("milk", rand(5, 10))
|
||||
|
||||
/obj/item/udder/proc/milkAnimal(obj/O, mob/user)
|
||||
var/obj/item/weapon/reagent_containers/glass/G = O
|
||||
if(G.reagents.total_volume >= G.volume)
|
||||
to_chat(user, "<span class='danger'>[O] is full.</span>")
|
||||
return
|
||||
var/transfered = reagents.trans_to(O, rand(5,10))
|
||||
if(transfered)
|
||||
user.visible_message("[user] milks [src] using \the [O].", "<span class='notice'>You milk [src] using \the [O].</span>")
|
||||
else
|
||||
to_chat(user, "<span class='danger'>The udder is dry. Wait a bit longer...</span>")
|
||||
//goat
|
||||
/mob/living/simple_animal/hostile/retaliate/goat
|
||||
name = "goat"
|
||||
desc = "Not known for their pleasant disposition."
|
||||
icon_state = "goat"
|
||||
icon_living = "goat"
|
||||
icon_dead = "goat_dead"
|
||||
speak = list("EHEHEHEHEH","eh?")
|
||||
speak_emote = list("brays")
|
||||
emote_hear = list("brays.")
|
||||
emote_see = list("shakes its head.", "stamps a foot.", "glares around.")
|
||||
speak_chance = 1
|
||||
turns_per_move = 5
|
||||
see_in_dark = 6
|
||||
butcher_results = list(/obj/item/weapon/reagent_containers/food/snacks/meat/slab = 4)
|
||||
response_help = "pets"
|
||||
response_disarm = "gently pushes aside"
|
||||
response_harm = "kicks"
|
||||
faction = list("neutral")
|
||||
attack_same = 1
|
||||
attacktext = "kicks"
|
||||
attack_sound = 'sound/weapons/punch1.ogg'
|
||||
health = 40
|
||||
maxHealth = 40
|
||||
melee_damage_lower = 1
|
||||
melee_damage_upper = 2
|
||||
environment_smash = 0
|
||||
stop_automated_movement_when_pulled = 1
|
||||
blood_volume = BLOOD_VOLUME_NORMAL
|
||||
var/obj/item/udder/udder = null
|
||||
devourable = TRUE
|
||||
|
||||
/mob/living/simple_animal/hostile/retaliate/goat/Initialize()
|
||||
udder = new()
|
||||
. = ..()
|
||||
|
||||
/mob/living/simple_animal/hostile/retaliate/goat/Destroy()
|
||||
qdel(udder)
|
||||
udder = null
|
||||
return ..()
|
||||
|
||||
/mob/living/simple_animal/hostile/retaliate/goat/Life()
|
||||
. = ..()
|
||||
if(.)
|
||||
//chance to go crazy and start wacking stuff
|
||||
if(!enemies.len && prob(1))
|
||||
Retaliate()
|
||||
|
||||
if(enemies.len && prob(10))
|
||||
enemies = list()
|
||||
LoseTarget()
|
||||
src.visible_message("<span class='notice'>[src] calms down.</span>")
|
||||
if(stat == CONSCIOUS)
|
||||
udder.generateMilk()
|
||||
var/obj/structure/spacevine/SV = locate(/obj/structure/spacevine) in loc
|
||||
if(SV)
|
||||
SV.eat(src)
|
||||
if(!pulledby)
|
||||
for(var/direction in shuffle(list(1,2,4,8,5,6,9,10)))
|
||||
var/step = get_step(src, direction)
|
||||
if(step)
|
||||
if(locate(/obj/structure/spacevine) in step)
|
||||
Move(step, get_dir(src, step))
|
||||
|
||||
/mob/living/simple_animal/hostile/retaliate/goat/Retaliate()
|
||||
..()
|
||||
src.visible_message("<span class='danger'>[src] gets an evil-looking gleam in [p_their()] eye.</span>")
|
||||
|
||||
/mob/living/simple_animal/hostile/retaliate/goat/Move()
|
||||
..()
|
||||
if(!stat)
|
||||
var/obj/structure/spacevine/SV = locate(/obj/structure/spacevine) in loc
|
||||
if(SV)
|
||||
SV.eat(src)
|
||||
|
||||
/mob/living/simple_animal/hostile/retaliate/goat/attackby(obj/item/O, mob/user, params)
|
||||
if(stat == CONSCIOUS && istype(O, /obj/item/weapon/reagent_containers/glass))
|
||||
udder.milkAnimal(O, user)
|
||||
return 1
|
||||
else
|
||||
return ..()
|
||||
|
||||
//cow
|
||||
/mob/living/simple_animal/cow
|
||||
name = "cow"
|
||||
desc = "Known for their milk, just don't tip them over."
|
||||
icon_state = "cow"
|
||||
icon_living = "cow"
|
||||
icon_dead = "cow_dead"
|
||||
icon_gib = "cow_gib"
|
||||
gender = FEMALE
|
||||
speak = list("moo?","moo","MOOOOOO")
|
||||
speak_emote = list("moos","moos hauntingly")
|
||||
emote_hear = list("brays.")
|
||||
emote_see = list("shakes its head.")
|
||||
speak_chance = 1
|
||||
turns_per_move = 5
|
||||
see_in_dark = 6
|
||||
butcher_results = list(/obj/item/weapon/reagent_containers/food/snacks/meat/slab = 6)
|
||||
response_help = "pets"
|
||||
response_disarm = "gently pushes aside"
|
||||
response_harm = "kicks"
|
||||
attacktext = "kicks"
|
||||
attack_sound = 'sound/weapons/punch1.ogg'
|
||||
health = 50
|
||||
maxHealth = 50
|
||||
var/obj/item/udder/udder = null
|
||||
gold_core_spawnable = 2
|
||||
blood_volume = BLOOD_VOLUME_NORMAL
|
||||
devourable = TRUE
|
||||
|
||||
/mob/living/simple_animal/cow/Initialize()
|
||||
udder = new()
|
||||
. = ..()
|
||||
|
||||
/mob/living/simple_animal/cow/Destroy()
|
||||
qdel(udder)
|
||||
udder = null
|
||||
return ..()
|
||||
|
||||
/mob/living/simple_animal/cow/attackby(obj/item/O, mob/user, params)
|
||||
if(stat == CONSCIOUS && istype(O, /obj/item/weapon/reagent_containers/glass))
|
||||
udder.milkAnimal(O, user)
|
||||
return 1
|
||||
else
|
||||
return ..()
|
||||
|
||||
/mob/living/simple_animal/cow/Life()
|
||||
. = ..()
|
||||
if(stat == CONSCIOUS)
|
||||
udder.generateMilk()
|
||||
|
||||
/mob/living/simple_animal/cow/attack_hand(mob/living/carbon/M)
|
||||
if(!stat && M.a_intent == INTENT_DISARM && icon_state != icon_dead)
|
||||
M.visible_message("<span class='warning'>[M] tips over [src].</span>",
|
||||
"<span class='notice'>You tip over [src].</span>")
|
||||
to_chat(src, "<span class='userdanger'>You are tipped over by [M]!</span>")
|
||||
Weaken(30)
|
||||
icon_state = icon_dead
|
||||
spawn(rand(20,50))
|
||||
if(!stat && M)
|
||||
icon_state = icon_living
|
||||
var/external
|
||||
var/internal
|
||||
switch(pick(1,2,3,4))
|
||||
if(1,2,3)
|
||||
var/text = pick("imploringly.", "pleadingly.",
|
||||
"with a resigned expression.")
|
||||
external = "[src] looks at [M] [text]"
|
||||
internal = "You look at [M] [text]"
|
||||
if(4)
|
||||
external = "[src] seems resigned to its fate."
|
||||
internal = "You resign yourself to your fate."
|
||||
visible_message("<span class='notice'>[external]</span>",
|
||||
"<span class='revennotice'>[internal]</span>")
|
||||
else
|
||||
..()
|
||||
|
||||
/mob/living/simple_animal/chick
|
||||
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"
|
||||
gender = FEMALE
|
||||
speak = list("Cherp.","Cherp?","Chirrup.","Cheep!")
|
||||
speak_emote = list("cheeps")
|
||||
emote_hear = list("cheeps.")
|
||||
emote_see = list("pecks at the ground.","flaps its tiny wings.")
|
||||
density = 0
|
||||
speak_chance = 2
|
||||
turns_per_move = 2
|
||||
butcher_results = list(/obj/item/weapon/reagent_containers/food/snacks/meat/slab = 1)
|
||||
response_help = "pets"
|
||||
response_disarm = "gently pushes aside"
|
||||
response_harm = "kicks"
|
||||
attacktext = "kicks"
|
||||
health = 3
|
||||
maxHealth = 3
|
||||
ventcrawler = VENTCRAWLER_ALWAYS
|
||||
var/amount_grown = 0
|
||||
pass_flags = PASSTABLE | PASSGRILLE | PASSMOB
|
||||
mob_size = MOB_SIZE_TINY
|
||||
gold_core_spawnable = 2
|
||||
devourable = TRUE
|
||||
|
||||
/mob/living/simple_animal/chick/Initialize()
|
||||
. = ..()
|
||||
pixel_x = rand(-6, 6)
|
||||
pixel_y = rand(0, 10)
|
||||
|
||||
/mob/living/simple_animal/chick/Life()
|
||||
. =..()
|
||||
if(!.)
|
||||
return
|
||||
if(!stat && !ckey)
|
||||
amount_grown += rand(1,2)
|
||||
if(amount_grown >= 100)
|
||||
new /mob/living/simple_animal/chicken(src.loc)
|
||||
qdel(src)
|
||||
|
||||
/mob/living/simple_animal/chick/holo/Life()
|
||||
..()
|
||||
amount_grown = 0
|
||||
|
||||
/mob/living/simple_animal/chicken
|
||||
name = "\improper chicken"
|
||||
desc = "Hopefully the eggs are good this season."
|
||||
gender = FEMALE
|
||||
icon_state = "chicken_brown"
|
||||
icon_living = "chicken_brown"
|
||||
icon_dead = "chicken_brown_dead"
|
||||
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 its wings viciously.")
|
||||
density = 0
|
||||
speak_chance = 2
|
||||
turns_per_move = 3
|
||||
butcher_results = list(/obj/item/weapon/reagent_containers/food/snacks/meat/slab = 2)
|
||||
var/egg_type = /obj/item/weapon/reagent_containers/food/snacks/egg
|
||||
var/food_type = /obj/item/weapon/reagent_containers/food/snacks/grown/wheat
|
||||
response_help = "pets"
|
||||
response_disarm = "gently pushes aside"
|
||||
response_harm = "kicks"
|
||||
attacktext = "kicks"
|
||||
health = 15
|
||||
maxHealth = 15
|
||||
ventcrawler = VENTCRAWLER_ALWAYS
|
||||
var/eggsleft = 0
|
||||
var/eggsFertile = TRUE
|
||||
var/body_color
|
||||
var/icon_prefix = "chicken"
|
||||
pass_flags = PASSTABLE | PASSMOB
|
||||
mob_size = MOB_SIZE_SMALL
|
||||
var/list/feedMessages = list("It clucks happily.","It clucks happily.")
|
||||
var/list/layMessage = list("lays an egg.","squats down and croons.","begins making a huge racket.","begins clucking raucously.")
|
||||
var/list/validColors = list("brown","black","white")
|
||||
gold_core_spawnable = 2
|
||||
var/static/chicken_count = 0
|
||||
devourable = TRUE
|
||||
|
||||
/mob/living/simple_animal/chicken/Initialize()
|
||||
. = ..()
|
||||
if(!body_color)
|
||||
body_color = pick(validColors)
|
||||
icon_state = "[icon_prefix]_[body_color]"
|
||||
icon_living = "[icon_prefix]_[body_color]"
|
||||
icon_dead = "[icon_prefix]_[body_color]_dead"
|
||||
pixel_x = rand(-6, 6)
|
||||
pixel_y = rand(0, 10)
|
||||
++chicken_count
|
||||
|
||||
/mob/living/simple_animal/chicken/Destroy()
|
||||
--chicken_count
|
||||
return ..()
|
||||
|
||||
/mob/living/simple_animal/chicken/attackby(obj/item/O, mob/user, params)
|
||||
if(istype(O, food_type)) //feedin' dem chickens
|
||||
if(!stat && eggsleft < 8)
|
||||
var/feedmsg = "[user] feeds [O] to [name]! [pick(feedMessages)]"
|
||||
user.visible_message(feedmsg)
|
||||
user.drop_item()
|
||||
qdel(O)
|
||||
eggsleft += rand(1, 4)
|
||||
//to_chat(world, eggsleft)
|
||||
else
|
||||
to_chat(user, "<span class='warning'>[name] doesn't seem hungry!</span>")
|
||||
else
|
||||
..()
|
||||
|
||||
/mob/living/simple_animal/chicken/Life()
|
||||
. =..()
|
||||
if(!.)
|
||||
return
|
||||
if((!stat && prob(3) && eggsleft > 0) && egg_type)
|
||||
visible_message("[src] [pick(layMessage)]")
|
||||
eggsleft--
|
||||
var/obj/item/E = new egg_type(get_turf(src))
|
||||
E.pixel_x = rand(-6,6)
|
||||
E.pixel_y = rand(-6,6)
|
||||
if(eggsFertile)
|
||||
if(chicken_count < MAX_CHICKENS && prob(25))
|
||||
START_PROCESSING(SSobj, E)
|
||||
|
||||
/obj/item/weapon/reagent_containers/food/snacks/egg/var/amount_grown = 0
|
||||
/obj/item/weapon/reagent_containers/food/snacks/egg/process()
|
||||
if(isturf(loc))
|
||||
amount_grown += rand(1,2)
|
||||
if(amount_grown >= 100)
|
||||
visible_message("[src] hatches with a quiet cracking sound.")
|
||||
new /mob/living/simple_animal/chick(get_turf(src))
|
||||
STOP_PROCESSING(SSobj, src)
|
||||
qdel(src)
|
||||
else
|
||||
STOP_PROCESSING(SSobj, src)
|
||||
|
||||
|
||||
/obj/item/udder
|
||||
name = "udder"
|
||||
|
||||
/obj/item/udder/Initialize()
|
||||
reagents = new(50)
|
||||
reagents.my_atom = src
|
||||
reagents.add_reagent("milk", 20)
|
||||
. = ..()
|
||||
|
||||
/obj/item/udder/proc/generateMilk()
|
||||
if(prob(5))
|
||||
reagents.add_reagent("milk", rand(5, 10))
|
||||
|
||||
/obj/item/udder/proc/milkAnimal(obj/O, mob/user)
|
||||
var/obj/item/weapon/reagent_containers/glass/G = O
|
||||
if(G.reagents.total_volume >= G.volume)
|
||||
to_chat(user, "<span class='danger'>[O] is full.</span>")
|
||||
return
|
||||
var/transfered = reagents.trans_to(O, rand(5,10))
|
||||
if(transfered)
|
||||
user.visible_message("[user] milks [src] using \the [O].", "<span class='notice'>You milk [src] using \the [O].</span>")
|
||||
else
|
||||
to_chat(user, "<span class='danger'>The udder is dry. Wait a bit longer...</span>")
|
||||
|
||||
@@ -55,7 +55,7 @@
|
||||
|
||||
|
||||
/mob/living/simple_animal/hostile/Initialize()
|
||||
..()
|
||||
. = ..()
|
||||
|
||||
if(!targets_from)
|
||||
targets_from = src
|
||||
|
||||
@@ -86,7 +86,7 @@
|
||||
var/tame = 0
|
||||
|
||||
/mob/living/simple_animal/Initialize()
|
||||
..()
|
||||
. = ..()
|
||||
GLOB.simple_animals += src
|
||||
handcrafting = new()
|
||||
if(gender == PLURAL)
|
||||
|
||||
@@ -36,7 +36,7 @@
|
||||
continue
|
||||
var/datum/atom_hud/alternate_appearance/AA = v
|
||||
AA.onNewMob(src)
|
||||
..()
|
||||
. = ..()
|
||||
|
||||
/atom/proc/prepare_huds()
|
||||
hud_list = list()
|
||||
|
||||
Reference in New Issue
Block a user