diff --git a/baystation12.dme b/baystation12.dme index bf6eb6b488c..2ff92a6e54f 100644 --- a/baystation12.dme +++ b/baystation12.dme @@ -650,6 +650,7 @@ #include "code\game\objects\structures\window.dm" #include "code\game\objects\structures\crates_lockers\closets.dm" #include "code\game\objects\structures\crates_lockers\crates.dm" +#include "code\game\objects\structures\crates_lockers\crittercrate.dm" #include "code\game\objects\structures\crates_lockers\largecrate.dm" #include "code\game\objects\structures\crates_lockers\closets\coffin.dm" #include "code\game\objects\structures\crates_lockers\closets\crittercrate.dm" diff --git a/code/datums/supplypacks.dm b/code/datums/supplypacks.dm index 3150f2c09cd..5a9da2ec0a7 100755 --- a/code/datums/supplypacks.dm +++ b/code/datums/supplypacks.dm @@ -5,7 +5,7 @@ //BIG NOTE: Don't add living things to crates, that's bad, it will break the shuttle. //NEW NOTE: Do NOT set the price of any crates below 7 points. Doing so allows infinite points. -var/list/all_supply_groups = list("Operations","Security","Hospitality","Engineering","Medical / Science","Hydroponics") +var/list/all_supply_groups = list("Operations","Security","Hospitality","Engineering","Medical / Science","Hydroponics","Organic") /datum/supply_packs var/name = null @@ -243,14 +243,6 @@ var/list/all_supply_groups = list("Operations","Security","Hospitality","Enginee containername = "MULEbot Crate" group = "Operations" -/datum/supply_packs/lisa - name = "Corgi Crate" - contains = list() - cost = 50 - containertype = /obj/structure/largecrate/lisa - containername = "Corgi Crate" - group = "Hydroponics" - /datum/supply_packs/hydroponics // -- Skie name = "Hydroponics Supply Crate" contains = list(/obj/item/weapon/reagent_containers/spray/plantbgone, @@ -268,37 +260,40 @@ var/list/all_supply_groups = list("Operations","Security","Hospitality","Enginee access = access_hydroponics group = "Hydroponics" -//farm animals - useless and annoying, but potentially a good source of food -/datum/supply_packs/cow +/datum/supply_packs/organic + group = "Organic" + containertype = /obj/structure/closet/crate/freezer + +//////// livestock +/datum/supply_packs/organic/cow name = "Cow Crate" cost = 30 - containertype = /obj/structure/largecrate/cow - containername = "Cow Crate" - access = access_hydroponics + containertype = /obj/structure/closet/critter/cow + containername = "cow crate" -/datum/supply_packs/goat +/datum/supply_packs/organic/goat name = "Goat Crate" cost = 25 - containertype = /obj/structure/largecrate/goat - containername = "Goat Crate" - access = access_hydroponics - group = "Hydroponics" + containertype = /obj/structure/closet/critter/goat + containername = "goat crate" -/datum/supply_packs/chicken +/datum/supply_packs/organic/chicken name = "Chicken Crate" cost = 20 - containertype = /obj/structure/largecrate/chick - containername = "Chicken Crate" - access = access_hydroponics - group = "Hydroponics" + containertype = /obj/structure/closet/critter/chick + containername = "chicken crate" -/datum/supply_packs/lisa +/datum/supply_packs/organic/corgi name = "Corgi Crate" - contains = list() cost = 50 - containertype = /obj/structure/largecrate/lisa - containername = "Corgi Crate" - group = "Hydroponics" + containertype = /obj/structure/closet/critter/corgi + containername = "corgi crate" + +/datum/supply_packs/organic/cat + name = "Cat crate" + cost = 50 //Cats are worth as much as corgis. + containertype = /obj/structure/closet/critter/cat + containername = "cat crate" /datum/supply_packs/seeds name = "Seeds Crate" diff --git a/code/game/objects/structures/crates_lockers/crittercrate.dm b/code/game/objects/structures/crates_lockers/crittercrate.dm new file mode 100644 index 00000000000..40468d9be84 --- /dev/null +++ b/code/game/objects/structures/crates_lockers/crittercrate.dm @@ -0,0 +1,72 @@ +/obj/structure/closet/critter + name = "critter crate" + desc = "A crate designed for safe transport of animals. Only openable from the the outside." + icon_state = "critter" + icon_opened = "critteropen" + icon_closed = "critter" + var/already_opened = 0 + var/content_mob = null + +/obj/structure/closet/critter/can_open() + if(welded) + return 0 + return 1 + +/obj/structure/closet/critter/open() + if(!can_open()) + return 0 + + if(content_mob == null) //making sure we don't spawn anything too eldritch + already_opened = 1 + return ..() + + if(content_mob != null && already_opened == 0) + if(content_mob == /mob/living/simple_animal/chick) + var/num = rand(4, 6) + for(var/i = 0, i < num, i++) + new content_mob(loc) + else if(content_mob == /mob/living/simple_animal/corgi) + var/num = rand(0, 1) + if(num) //No more matriarchy for cargo + content_mob = /mob/living/simple_animal/corgi/Lisa + new content_mob(loc) + else if(content_mob == /mob/living/simple_animal/cat) + if(prob(50)) + content_mob = /mob/living/simple_animal/cat/Proc + else + new content_mob(loc) + already_opened = 1 + ..() + +/obj/structure/closet/critter/close() + ..() + return 1 + +/obj/structure/closet/critter/attack_hand(mob/user as mob) + src.add_fingerprint(user) + + if(src.loc == user.loc) + user << "It won't budge!" + toggle() + else + toggle() + +/obj/structure/closet/critter/corgi + name = "corgi crate" + content_mob = /mob/living/simple_animal/corgi //This statement is (not) false. See above. + +/obj/structure/closet/critter/cow + name = "cow crate" + content_mob = /mob/living/simple_animal/cow + +/obj/structure/closet/critter/goat + name = "goat crate" + content_mob = /mob/living/simple_animal/hostile/retaliate/goat + +/obj/structure/closet/critter/chick + name = "chicken crate" + content_mob = /mob/living/simple_animal/chick + +/obj/structure/closet/critter/cat + name = "cat crate" + content_mob = /mob/living/simple_animal/cat \ No newline at end of file diff --git a/code/modules/mob/living/simple_animal/friendly/cat.dm b/code/modules/mob/living/simple_animal/friendly/cat.dm index d858a200e17..4137ade2a5b 100644 --- a/code/modules/mob/living/simple_animal/friendly/cat.dm +++ b/code/modules/mob/living/simple_animal/friendly/cat.dm @@ -1,45 +1,51 @@ //Cat /mob/living/simple_animal/cat name = "cat" - desc = "A domesticated, feline pet. Has a tendency to adopt crewmembers." - icon_state = "cat" - icon_living = "cat" - icon_dead = "cat_dead" - speak = list("Meow!","Esp!","Purr!","HSSSSS") + desc = "Kitty!!" + icon_state = "cat2" + icon_living = "cat2" + icon_dead = "cat2_dead" + gender = MALE + speak = list("Meow!", "Esp!", "Purr!", "HSSSSS") speak_emote = list("purrs", "meows") - emote_hear = list("meows","mews") + emote_hear = list("meows", "mews") emote_see = list("shakes its head", "shivers") speak_chance = 1 turns_per_move = 5 see_in_dark = 6 + simplespecies = /mob/living/simple_animal/cat + childtype = /mob/living/simple_animal/cat/kitten meat_type = /obj/item/weapon/reagent_containers/food/snacks/meat - response_help = "pets the" - response_disarm = "gently pushes aside the" - response_harm = "kicks the" + response_help = "pets" + response_disarm = "gently pushes aside" + response_harm = "kicks" + +//RUNTIME IS ALIVE! SQUEEEEEEEE~ +/mob/living/simple_animal/cat/Runtime + name = "Runtime" + desc = "GCAT" + icon_state = "cat" + icon_living = "cat" + icon_dead = "cat2_dead" + gender = FEMALE var/turns_since_scan = 0 var/mob/living/simple_animal/mouse/movement_target - min_oxy = 16 //Require atleast 16kPA oxygen - minbodytemp = 223 //Below -50 Degrees Celcius - maxbodytemp = 323 //Above 50 Degrees Celcius -/mob/living/simple_animal/cat/Life() +/mob/living/simple_animal/cat/Runtime/Life() //MICE! if((src.loc) && isturf(src.loc)) if(!stat && !resting && !buckled) for(var/mob/living/simple_animal/mouse/M in view(1,src)) if(!M.stat) M.splat() - emote(pick("\red splats the [M]!","\red toys with the [M]","worries the [M]")) + emote("splats \the [M]") movement_target = null stop_automated_movement = 0 break ..() - for(var/mob/living/simple_animal/mouse/snack in oview(src, 3)) - if(prob(15)) - emote(pick("hisses and spits!","mrowls fiercely!","eyes [snack] hungrily.")) - break + make_babies() if(!stat && !resting && !buckled) turns_since_scan++ @@ -60,9 +66,13 @@ stop_automated_movement = 1 walk_to(src,movement_target,0,3) -//RUNTIME IS ALIVE! SQUEEEEEEEE~ -/mob/living/simple_animal/cat/Runtime - name = "Runtime" - desc = "Its fur has the look and feel of velvet, and it's tail quivers occasionally." - +/mob/living/simple_animal/cat/Proc + name = "Proc" +/mob/living/simple_animal/cat/kitten + name = "kitten" + desc = "D'aaawwww" + icon_state = "kitten" + icon_living = "kitten" + icon_dead = "kitten_dead" + gender = NEUTER diff --git a/code/modules/mob/living/simple_animal/friendly/corgi.dm b/code/modules/mob/living/simple_animal/friendly/corgi.dm index 7fdf63d9368..f7163d1b348 100644 --- a/code/modules/mob/living/simple_animal/friendly/corgi.dm +++ b/code/modules/mob/living/simple_animal/friendly/corgi.dm @@ -3,6 +3,7 @@ name = "\improper corgi" real_name = "corgi" desc = "It's a corgi." + gender = MALE icon_state = "corgi" icon_living = "corgi" icon_dead = "corgi_dead" @@ -18,6 +19,8 @@ response_disarm = "bops the" response_harm = "kicks the" see_in_dark = 5 + childtype = /mob/living/simple_animal/corgi/puppy + simplespecies = /mob/living/simple_animal/corgi var/obj/item/inventory_head var/obj/item/inventory_back var/facehugger @@ -449,29 +452,9 @@ /mob/living/simple_animal/corgi/Lisa/Life() ..() + make_babies() if(!stat && !resting && !buckled) - turns_since_scan++ - if(turns_since_scan > 15) - turns_since_scan = 0 - var/alone = 1 - var/ian = 0 - for(var/mob/M in oviewers(7, src)) - if(istype(M, /mob/living/simple_animal/corgi/Ian)) - if(M.client) - alone = 0 - break - else - ian = M - else - alone = 0 - break - if(alone && ian && puppies < 4) - if(near_camera(src) || near_camera(ian)) - return - new /mob/living/simple_animal/corgi/puppy(loc) - - if(prob(1)) emote(pick("dances around","chases her tail")) spawn(0) diff --git a/code/modules/mob/living/simple_animal/simple_animal.dm b/code/modules/mob/living/simple_animal/simple_animal.dm index bf969d23aba..0eb755965c7 100644 --- a/code/modules/mob/living/simple_animal/simple_animal.dm +++ b/code/modules/mob/living/simple_animal/simple_animal.dm @@ -57,6 +57,12 @@ var/speed = 0 //LETS SEE IF I CAN SET SPEEDS FOR SIMPLE MOBS WITHOUT DESTROYING EVERYTHING. Higher speed is slower, negative speed is faster var/can_hide = 0 +//Hot simple_animal baby making vars + var/childtype = null + var/scan_ready = 1 + var/simplespecies //Sorry, no spider+corgi buttbabies. + + /mob/living/simple_animal/New() ..() verbs -= /mob/verb/observe @@ -480,3 +486,27 @@ icon_state = icon_living density = initial(density) update_canmove() + + +/mob/living/simple_animal/proc/make_babies() // <3 <3 <3 + if(gender != FEMALE || stat || !scan_ready || !childtype || !simplespecies) + return + scan_ready = 0 + spawn(400) + scan_ready = 1 + var/alone = 1 + var/mob/living/simple_animal/partner + var/children = 0 + for(var/mob/M in oview(7, src)) + if(istype(M, childtype)) //Check for children FIRST. + children++ + else if(istype(M, simplespecies)) + if(M.client) + continue + else if(!istype(M, childtype) && M.gender == MALE) //Better safe than sorry ;_; + partner = M + else if(istype(M, /mob/)) + alone = 0 + continue + if(alone && partner && children < 3) + new childtype(loc) \ No newline at end of file diff --git a/icons/mob/animal.dmi b/icons/mob/animal.dmi index b59a197c7f1..4cf25471a02 100644 Binary files a/icons/mob/animal.dmi and b/icons/mob/animal.dmi differ