Chicken Farming V1

This commit is contained in:
quotefox
2022-05-03 17:41:36 +01:00
parent 1a1ab95370
commit b75a07ee53
15 changed files with 442 additions and 232 deletions
+134 -91
View File
@@ -9396,6 +9396,12 @@
dir = 1
},
/area/science/misc_lab)
"bbY" = (
/obj/machinery/atmospherics/pipe/simple/scrubbers/hidden/layer1{
name = "scrubbers pipe"
},
/turf/closed/wall,
/area/hydroponics)
"bcb" = (
/obj/effect/turf_decal/stripes/line{
dir = 8
@@ -10909,8 +10915,8 @@
/obj/structure/cable{
icon_state = "1-4"
},
/turf/open/floor/plating,
/area/maintenance/fore/secondary)
/turf/closed/wall,
/area/hydroponics)
"bwq" = (
/obj/effect/spawner/lootdrop/maintenance{
lootcount = 2;
@@ -30955,6 +30961,17 @@
},
/turf/open/floor/plating,
/area/maintenance/aft)
"gHS" = (
/obj/machinery/light{
dir = 1;
pixel_y = 16
},
/obj/machinery/atmospherics/components/unary/vent_pump/on/layer3{
dir = 4;
name = "air vent"
},
/turf/open/floor/grass,
/area/hydroponics)
"gIv" = (
/obj/effect/turf_decal/loading_area{
dir = 8;
@@ -31764,8 +31781,7 @@
dir = 4
},
/obj/effect/turf_decal/tile/neutral,
/obj/machinery/atmospherics/pipe/simple/scrubbers/hidden/layer1{
dir = 4;
/obj/machinery/atmospherics/pipe/manifold/scrubbers/hidden/layer1{
name = "scrubbers pipe"
},
/turf/open/floor/plasteel/dark,
@@ -34208,6 +34224,19 @@
dir = 8;
pixel_x = 24
},
/obj/structure/table,
/obj/item/watertank,
/obj/item/reagent_containers/spray/plantbgone{
pixel_x = 13;
pixel_y = 5
},
/obj/item/reagent_containers/spray/plantbgone{
pixel_y = 3
},
/obj/item/reagent_containers/spray/plantbgone{
pixel_x = 8;
pixel_y = 8
},
/turf/open/floor/plasteel/dark,
/area/hydroponics)
"hDl" = (
@@ -40033,30 +40062,10 @@
/turf/open/floor/plasteel/dark,
/area/chapel/main)
"iWa" = (
/obj/structure/table,
/obj/item/reagent_containers/spray/plantbgone{
pixel_y = 3
},
/obj/item/reagent_containers/spray/plantbgone{
pixel_x = 8;
pixel_y = 8
},
/obj/item/reagent_containers/spray/plantbgone{
pixel_x = 13;
pixel_y = 5
},
/obj/item/watertank,
/obj/effect/turf_decal/tile/neutral{
/obj/structure/window/reinforced{
dir = 4
},
/obj/effect/turf_decal/tile/neutral{
dir = 1
},
/obj/effect/turf_decal/tile/neutral,
/obj/effect/turf_decal/tile/neutral{
dir = 8
},
/turf/open/floor/plasteel/dark,
/turf/open/floor/grass,
/area/hydroponics)
"iWe" = (
/obj/machinery/atmospherics/components/unary/vent_scrubber/on{
@@ -43215,6 +43224,14 @@
},
/turf/open/floor/plating,
/area/chapel/main)
"jRW" = (
/obj/machinery/door/airlock/maintenance{
dir = 1;
name = "Hydroponics Maintenance";
req_access_txt = "35"
},
/turf/open/floor/plasteel/dark,
/area/hydroponics)
"jSj" = (
/obj/machinery/atmospherics/components/unary/vent_pump/on/layer3{
dir = 8;
@@ -44650,13 +44667,14 @@
/obj/machinery/atmospherics/pipe/simple/scrubbers/hidden/layer1{
name = "scrubbers pipe"
},
/obj/machinery/atmospherics/pipe/simple/supply/hidden/layer3{
name = "air supply pipe"
},
/obj/structure/disposalpipe/segment,
/obj/structure/cable{
icon_state = "1-2"
},
/obj/machinery/atmospherics/pipe/manifold/supply/hidden/layer3{
dir = 4;
name = "air supply pipe"
},
/turf/open/floor/plasteel/dark,
/area/hydroponics)
"knF" = (
@@ -48536,10 +48554,13 @@
/turf/open/floor/plasteel/dark,
/area/crew_quarters/fitness)
"lvD" = (
/obj/structure/kitchenspike,
/obj/machinery/camera{
c_tag = "Kitchen Cold Room"
},
/obj/machinery/light{
dir = 1;
pixel_y = 16
},
/turf/open/floor/plasteel/showroomfloor,
/area/crew_quarters/kitchen)
"lwc" = (
@@ -49928,7 +49949,6 @@
/area/maintenance/fore)
"lSg" = (
/obj/structure/table,
/obj/item/book/manual/hydroponics_pod_people,
/obj/item/paper/guides/jobs/hydroponics,
/obj/item/reagent_containers/glass/bottle/mutagen,
/obj/item/reagent_containers/glass/bottle/mutagen,
@@ -49948,6 +49968,9 @@
dir = 8;
name = "air vent"
},
/obj/machinery/reagentgrinder{
pixel_y = 8
},
/turf/open/floor/plasteel/dark,
/area/hydroponics)
"lSI" = (
@@ -54725,6 +54748,9 @@
},
/turf/open/floor/plasteel,
/area/engine/break_room)
"nfw" = (
/turf/open/floor/grass,
/area/hydroponics)
"nfB" = (
/obj/effect/turf_decal/tile/green{
dir = 1
@@ -66184,11 +66210,6 @@
},
/area/bridge)
"pYk" = (
/obj/machinery/door/airlock/maintenance{
dir = 4;
name = "Hydroponics Maintenance";
req_access_txt = "35"
},
/obj/machinery/atmospherics/pipe/simple/scrubbers/hidden/layer1{
dir = 4;
name = "scrubbers pipe"
@@ -66200,8 +66221,8 @@
/obj/structure/cable{
icon_state = "4-8"
},
/turf/open/floor/plasteel/dark,
/area/maintenance/fore/secondary)
/turf/closed/wall,
/area/hydroponics)
"pYn" = (
/obj/effect/spawner/structure/window/reinforced,
/turf/open/floor/plating,
@@ -67012,26 +67033,17 @@
},
/area/medical/virology)
"qlS" = (
/obj/structure/closet/crate/hydroponics,
/obj/item/shovel/spade,
/obj/item/wrench,
/obj/item/reagent_containers/glass/bucket,
/obj/item/wirecutters,
/obj/item/screwdriver,
/obj/item/crowbar,
/obj/effect/turf_decal/loading_area{
icon_state = "drain";
name = "drain"
/obj/machinery/atmospherics/pipe/simple/supply/hidden/layer3{
dir = 8;
name = "air supply pipe"
},
/obj/effect/turf_decal/loading_area{
/obj/machinery/door/window/northleft{
dir = 4;
icon_state = "drain";
name = "drain"
icon_state = "right";
name = "Chicken Coop";
req_access_txt = "35"
},
/obj/machinery/light_switch{
pixel_x = -23
},
/turf/open/floor/plasteel,
/turf/open/floor/grass,
/area/hydroponics)
"qlU" = (
/obj/structure/sign/logo/kinaris{
@@ -67088,7 +67100,6 @@
},
/area/science/research)
"qmq" = (
/obj/machinery/hydroponics/constructable,
/obj/effect/turf_decal/tile/green{
dir = 4
},
@@ -67596,21 +67607,11 @@
/turf/open/floor/plasteel/dark,
/area/tcommsat/computer)
"qsc" = (
/obj/structure/table,
/obj/machinery/reagentgrinder{
pixel_y = 8
},
/obj/effect/turf_decal/tile/neutral{
/obj/structure/window/reinforced{
dir = 4
},
/obj/effect/turf_decal/tile/neutral{
dir = 1
},
/obj/effect/turf_decal/tile/neutral,
/obj/effect/turf_decal/tile/neutral{
dir = 8
},
/turf/open/floor/plasteel/dark,
/obj/item/reagent_containers/food/snacks/grown/wheat,
/turf/open/floor/grass,
/area/hydroponics)
"qsj" = (
/obj/machinery/atmospherics/components/unary/vent_scrubber/on/layer1{
@@ -69776,10 +69777,16 @@
},
/area/engine/break_room)
"qRW" = (
/obj/item/toy/beach_ball/holoball{
name = "baskingball"
/obj/structure/closet/crate/wooden,
/obj/item/stack/sheet/mineral/wood,
/obj/item/stack/sheet/mineral/wood,
/obj/item/stack/sheet/mineral/wood,
/obj/item/stack/sheet/mineral/wood,
/obj/item/paper/guides/jobs/hydroponics{
info = "Chickens love their wheat, if you feed it to them, they will be encouraged to lay eggs early. But make sure they have somewhere to nest, or they wont lay! Make sure they have soft grass, or hay to walk on, otherwise they will be unhappy. If a chickens unhappy, then you are unhappy.";
name = "paper- 'Chicken Keeping!'"
},
/turf/open/floor/plating,
/turf/open/floor/grass,
/area/hydroponics)
"qSg" = (
/obj/effect/turf_decal/loading_area{
@@ -71973,6 +71980,9 @@
/obj/effect/turf_decal/tile/green{
dir = 4
},
/obj/machinery/atmospherics/pipe/simple/scrubbers/hidden/layer1{
name = "scrubbers pipe"
},
/turf/open/floor/plasteel/dark/side,
/area/hydroponics)
"rrS" = (
@@ -88493,7 +88503,6 @@
/turf/open/floor/plasteel/dark,
/area/quartermaster/miningdock)
"vuZ" = (
/obj/machinery/hydroponics/constructable,
/obj/effect/turf_decal/tile/green{
dir = 4
},
@@ -90502,6 +90511,12 @@
},
/turf/open/floor/plasteel/dark,
/area/hallway/primary/port)
"vTc" = (
/obj/machinery/atmospherics/components/unary/vent_scrubber/on/layer1{
name = "air scrubber"
},
/turf/open/floor/grass,
/area/hydroponics)
"vTh" = (
/obj/effect/turf_decal/loading_area{
dir = 1;
@@ -95099,15 +95114,22 @@
/turf/open/floor/plasteel,
/area/engine/atmos)
"xee" = (
/obj/structure/closet/crate/hydroponics,
/obj/item/shovel/spade,
/obj/item/wrench,
/obj/item/reagent_containers/glass/bucket,
/obj/item/wirecutters,
/obj/item/screwdriver,
/obj/item/crowbar,
/obj/effect/turf_decal/loading_area{
icon_state = "drain";
name = "drain"
},
/obj/effect/turf_decal/loading_area{
dir = 4;
icon_state = "drain";
name = "drain"
},
/obj/machinery/atmospherics/pipe/simple/scrubbers/hidden/layer1{
dir = 4;
name = "scrubbers pipe"
},
/obj/machinery/atmospherics/pipe/simple/supply/hidden/layer3{
dir = 8;
name = "air supply pipe"
@@ -95115,6 +95137,11 @@
/obj/structure/cable{
icon_state = "4-8"
},
/obj/machinery/atmospherics/pipe/simple/scrubbers/hidden/layer1{
dir = 4;
name = "scrubbers pipe"
},
/obj/structure/window/reinforced,
/turf/open/floor/plasteel,
/area/hydroponics)
"xej" = (
@@ -96020,9 +96047,12 @@
/turf/open/floor/plasteel/dark,
/area/arcade)
"xqk" = (
/obj/machinery/space_heater,
/turf/open/floor/plating,
/area/maintenance/fore/secondary)
/mob/living/simple_animal/chicken{
force_gender = male;
name = "rooster"
},
/turf/open/floor/grass,
/area/hydroponics)
"xql" = (
/obj/effect/turf_decal/tile/neutral,
/obj/effect/turf_decal/tile/neutral{
@@ -97856,6 +97886,19 @@
planetary_atmos = 1
},
/area/layenia/cloudlayer)
"xNj" = (
/mob/living/simple_animal/chicken{
force_gender = female;
name = "chicken"
},
/obj/machinery/atmospherics/pipe/simple/scrubbers/hidden/layer1{
name = "scrubbers pipe"
},
/obj/machinery/light{
pixel_y = -1
},
/turf/open/floor/grass,
/area/hydroponics)
"xNp" = (
/obj/machinery/atmospherics/pipe/simple/supply/hidden/layer3{
dir = 8;
@@ -126535,11 +126578,11 @@ tti
aoE
tti
ksw
cHs
cHs
cHs
cHs
cHs
vxc
vxc
vxc
vxc
vxc
cHs
cHs
cHs
@@ -126794,7 +126837,7 @@ pWH
rDw
bwp
xqk
vxc
nfw
qRW
vxc
rrL
@@ -127050,10 +127093,10 @@ aNI
pre
vxc
pYk
vxc
vxc
vxc
vxc
gHS
vTc
xNj
bbY
rrR
gTc
uJs
@@ -127817,7 +127860,7 @@ kXX
oog
eLb
aJe
vxc
jRW
qmq
hDa
lSg
@@ -242,6 +242,7 @@ GLOBAL_LIST_INIT(wood_recipes, list ( \
new/datum/stack_recipe("display case chassis", /obj/structure/displaycase_chassis, 5, one_per_turf = TRUE, on_floor = TRUE), \
new/datum/stack_recipe("loom", /obj/structure/loom, 10, time = 15, one_per_turf = TRUE, on_floor = TRUE), \
new/datum/stack_recipe("apiary", /obj/structure/beebox, 40, time = 50),\
new/datum/stack_recipe("nestbox", /obj/structure/nestbox, 4, time = 30, one_per_turf = TRUE, on_floor = TRUE),\
null, \
new/datum/stack_recipe("picture frame", /obj/item/wallframe/picture, 1, time = 10),\
new/datum/stack_recipe("mortar", /obj/item/reagent_containers/glass/mortar, 3), \
@@ -181,147 +181,6 @@
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
mob_biotypes = MOB_ORGANIC|MOB_BEAST
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 = FALSE
speak_chance = 2
turns_per_move = 2
butcher_results = list(/obj/item/reagent_containers/food/snacks/meat/slab/chicken = 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 = FRIENDLY_SPAWN
do_footstep = 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
mob_biotypes = MOB_ORGANIC|MOB_BEAST
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 = FALSE
speak_chance = 2
turns_per_move = 3
butcher_results = list(/obj/item/reagent_containers/food/snacks/meat/slab/chicken = 2)
var/egg_type = /obj/item/reagent_containers/food/snacks/egg
var/food_type = /obj/item/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 = EGG_LAYING_MESSAGES
var/list/validColors = list("brown","black","white")
gold_core_spawnable = FRIENDLY_SPAWN
var/static/chicken_count = 0
do_footstep = 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)
qdel(O)
eggsleft += rand(1, 4)
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("<span class='alertalien'>[src] [pick(layMessage)]</span>")
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/reagent_containers/food/snacks/egg/var/amount_grown = 0
/obj/item/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)
// Space kiwis, ergo quite a copypasta of chickens.
@@ -0,0 +1,28 @@
/turf/open/floor/
var/farm_quality = 0 //all tiles have a farm quality, which is for farm animals to enjoy. 0 = worse 100 = best!
//Grass quality
/turf/open/floor/grass
farm_quality = 50
/turf/open/floor/grass/fairy
farm_quality = 70
//Hay
/obj/item/stack/tile/hay
name = "hay bedding tile"
singular_name = "hay bedding tile"
desc = "A patch of bundled hay."
icon = 'hyperstation/icons/obj/tiles.dmi'
icon_state = "tile_hay"
item_state = "tile_hay"
turf_type = /turf/open/floor/grass/hay
resistance_flags = FLAMMABLE
/turf/open/floor/grass/hay //like grass
name = "hay bedding"
icon = 'hyperstation/icons/obj/hydroponics/harvest.dmi'
desc = "A patch of bundled hay, to help keep animals happy."
icon_state = "hay"
farm_quality = 100 //the best for farming!
floor_tile = /obj/item/stack/tile/hay
@@ -0,0 +1,245 @@
/mob/living/simple_animal/
var/happiness = 50 //how happy they are.
/////////////
//////////////// CHICKEN /////////////////
/////////////
/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
mob_biotypes = MOB_ORGANIC|MOB_BEAST
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 = FALSE
speak_chance = 2
turns_per_move = 2
butcher_results = list(/obj/item/reagent_containers/food/snacks/meat/slab/chicken = 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 = FRIENDLY_SPAWN
do_footstep = 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
icon = 'hyperstation/icons/mob/chickens.dmi'
name = "\improper chicken"
desc = "Hopefully the eggs are good this season."
gender = FEMALE
mob_biotypes = MOB_ORGANIC|MOB_BEAST
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 = FALSE
speak_chance = 2
turns_per_move = 3
butcher_results = list(/obj/item/reagent_containers/food/snacks/meat/slab/chicken = 2)
var/egg_type = /obj/item/reagent_containers/food/snacks/egg
var/food_type = /obj/item/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 = FALSE
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 = EGG_LAYING_MESSAGES
var/list/validColors = list("brown","black","white")
gold_core_spawnable = FRIENDLY_SPAWN
var/static/chicken_count = 0
var/partner //for the sex.
var/egglay_timer = 0
var/obj/structure/nestbox/nest_target
var/last_egg
var/force_gender //for map loading
do_footstep = TRUE
/mob/living/simple_animal/chicken/Initialize()
. = ..()
if((prob(30) && !force_gender) || force_gender == "male") //30% of a male. or setup if already male.
gender = MALE
name = "rooster"
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 < 2)
var/feedmsg = "[user] feeds [O] to [name]! [pick(feedMessages)]"
user.visible_message(feedmsg)
qdel(O)
eggsleft += 1
egglay_timer = 0
else
to_chat(user, "<span class='warning'>[name] doesn't seem hungry!</span>")
else
..()
/mob/living/simple_animal/chicken/Life()
. = ..()
if(!.)
return
if (istype(get_turf(src), /turf/open/floor))
var/turf/open/floor/turfon = get_turf(src)
if (turfon.farm_quality > happiness)
happiness ++
if (prob(5))
visible_message("[src] pecks happily at the ground.") //CLUCK CLUCK CLUCK
else
happiness --
else
happiness --
happiness = clamp(happiness,0,100) //clamp
if (!(gender == FEMALE)) //only females lay eggs and do the rest of the code.
return
//Breeding.
if (gender == FEMALE && eggsFertile == 0 && eggsleft > 0)
for(var/mob/living/simple_animal/chicken/C in view(2,src)) //look for a male near them, or on them.
if(C)
if(C.gender == MALE) //rooster
eggsFertile = 1 //they had sex, just go with it.
partner = C //you know who the partner is.
//EEGGGG TIME
//after 10mins, lay a egg regardless.
if(world.time > (last_egg+600 SECONDS) && !eggsleft)
if(prob(15)) //just to offset
eggsleft ++
last_egg = world.time
if((!stat && eggsleft > 0) && egg_type)
egglay_timer ++
else
egglay_timer = 0
//chance to lay egg on their own.
//look for nest!
//We have found a nest, override movement
if(nest_target) //if alive and we have a target.
stop_automated_movement = 1
walk_to(src,nest_target,0,8)
else
stop_automated_movement = 0
walk_to(src,0) //reset walk_to
if (egglay_timer > 10 && !stat) //time to lay a egg and not dead.
if((!stat && eggsleft > 0) && egg_type)
if (!nest_target)
for(var/obj/structure/nestbox/N in view(3,src)) // look for a eggbox if you dont have one already
nest_target = N
break
//We are at the nest we have chosen.
if (nest_target)
for(var/obj/structure/nestbox/B in get_turf(src))
if((prob(25) && eggsleft > 0) && egg_type)
visible_message("<span class='alertalien'>[src] [pick(layMessage)]</span>")
eggsleft--
var/obj/item/E = new egg_type(get_turf(src))
E.pixel_x = rand(-6,6)
E.pixel_y = rand(-6,6)
egglay_timer = 0 //set timer
nest_target = null //layed the egg, time to move on
if(eggsFertile && partner)
if(chicken_count < MAX_CHICKENS && prob(happiness))
START_PROCESSING(SSobj, E)
eggsFertile = 0 //youve layed your fertile egg.
E.name = "fertile egg"
partner = null
last_egg = world.time
break
/obj/item/reagent_containers/food/snacks/egg/var/amount_grown = 0
/obj/item/reagent_containers/food/snacks/egg/process()
if(isturf(loc))
for(var/obj/structure/nestbox/B in get_turf(src)) //can only hatch in a nestbox or incubator
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)
break
else
STOP_PROCESSING(SSobj, src)
/mob/living/simple_animal/chicken/examine()
. = ..()
. += "this one is [gender]."
if(happiness<20)
. += "<span class='warning'>It looks stressed.</span>"
+30
View File
@@ -0,0 +1,30 @@
/obj/item/reagent_containers/food/snacks/grown/wheat/
var stacktype = /obj/item/stack/tile/hay
var/tile_coefficient = 0.02 // same as grass
/obj/item/reagent_containers/food/snacks/grown/wheat/attack_self(mob/user)
to_chat(user, "<span class='notice'>You prepare the hay bedding.</span>")
var/grassAmt = 1 + round(seed.potency * tile_coefficient) // The grass we're holding
for(var/obj/item/reagent_containers/food/snacks/grown/wheat/G in user.loc) // The grass on the floor
if(G.type != type)
continue
grassAmt += 1 + round(G.seed.potency * tile_coefficient)
qdel(G)
new stacktype(user.drop_location(), grassAmt)
qdel(src)
/obj/structure/nestbox
name = "nest box"
icon = 'hyperstation/icons/obj/hydroponics/farming.dmi'
icon_state = "nestbox"
desc = "A little nest box, for collecting eggs"
density = FALSE
anchored = TRUE
/obj/structure/nestbox/wrench_act(mob/living/user, obj/item/I)
user.visible_message("<span class='warning'>[user] disassembles [src].</span>",
"<span class='notice'>You start to disassemble [src]...</span>", "You hear clanking and banging noises.")
if(I.use_tool(src, user, 20, volume=50))
new /obj/item/stack/sheet/mineral/wood (loc, 4)
qdel(src)
Binary file not shown.

After

Width:  |  Height:  |  Size: 2.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 887 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 410 B

After

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 649 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 230 KiB

After

Width:  |  Height:  |  Size: 222 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 93 KiB

After

Width:  |  Height:  |  Size: 96 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 20 KiB

After

Width:  |  Height:  |  Size: 21 KiB

+4
View File
@@ -3111,6 +3111,7 @@
#include "hyperstation\code\game\objects\items\coconutcannon.dm"
#include "hyperstation\code\game\objects\items\cosmetics.dm"
#include "hyperstation\code\game\objects\items\lovedice.dm"
#include "hyperstation\code\game\objects\items\stacks\tiles\tile_types.dm"
#include "hyperstation\code\game\objects\items\storage\big_bag.dm"
#include "hyperstation\code\game\objects\structures\bench.dm"
#include "hyperstation\code\game\objects\structures\ghost_role_spawners.dm"
@@ -3180,6 +3181,8 @@
#include "hyperstation\code\modules\mob\living\carbon\carbon.dm"
#include "hyperstation\code\modules\mob\living\silicon\robot\robot.dm"
#include "hyperstation\code\modules\mob\living\silicon\robot\robot_modules.dm"
#include "hyperstation\code\modules\mob\living\simple_animal\friendly\chicken_types.dm"
#include "hyperstation\code\modules\mob\living\simple_animal\friendly\farm_animals.dm"
#include "hyperstation\code\modules\patreon\patreon.dm"
#include "hyperstation\code\modules\power\reactor\fluffed.dm"
#include "hyperstation\code\modules\power\reactor\fuel_rods.dm"
@@ -3218,6 +3221,7 @@
#include "hyperstation\code\obj\sounding.dm"
#include "hyperstation\code\obj\stargate_clothing.dm"
#include "hyperstation\code\obj\vibrator.dm"
#include "hyperstation\code\obj\farming\farming.dm"
#include "hyperstation\code\obj\items\lorebooks.dm"
#include "hyperstation\code\obj\SYSuit\abilities.dm"
#include "hyperstation\code\obj\SYSuit\main.dm"