Merge pull request #2149 from Miauw62/kittens

Kittens!!!! !!! !! !! !!!!!! !
This commit is contained in:
Cheridan
2014-01-04 20:21:15 -08:00
6 changed files with 66 additions and 29 deletions
+3 -1
View File
@@ -684,11 +684,13 @@ var/list/all_supply_groups = list(supply_emergency,supply_security,supply_engine
cost = 50
containertype = /obj/structure/closet/critter/corgi
containername = "corgi crate"
/datum/supply_packs/organic/cat
name = "Cat crate"
cost = 40
cost = 50 //Cats are worth as much as corgis.
containertype = /obj/structure/closet/critter/cat
containername = "cat crate"
/datum/supply_packs/organic/pug
name = "Pug crate"
cost = 50
@@ -30,6 +30,9 @@
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
@@ -2,16 +2,19 @@
/mob/living/simple_animal/cat
name = "cat"
desc = "Kitty!!"
icon_state = "cat"
icon_living = "cat"
icon_dead = "cat_dead"
speak = list("Meow!","Esp!","Purr!","HSSSSS")
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
species = /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"
response_disarm = "gently pushes aside"
@@ -21,6 +24,10 @@
/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
@@ -38,6 +45,8 @@
..()
make_babies()
if(!stat && !resting && !buckled)
turns_since_scan++
if(turns_since_scan > 5)
@@ -55,4 +64,15 @@
break
if(movement_target)
stop_automated_movement = 1
walk_to(src,movement_target,0,3)
walk_to(src,movement_target,0,3)
/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
@@ -6,6 +6,7 @@
icon_state = "corgi"
icon_living = "corgi"
icon_dead = "corgi_dead"
gender = MALE
speak = list("YAP", "Woof!", "Bark!", "AUUUUUU")
speak_emote = list("barks", "woofs")
emote_hear = list("barks", "woofs", "yaps","pants")
@@ -18,6 +19,8 @@
response_disarm = "bops"
response_harm = "kicks"
see_in_dark = 5
childtype = /mob/living/simple_animal/corgi/puppy
species = /mob/living/simple_animal/corgi
var/obj/item/inventory_head
var/obj/item/inventory_back
var/facehugger
@@ -482,28 +485,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)
@@ -57,6 +57,11 @@
var/speed = 0 //LETS SEE IF I CAN SET SPEEDS FOR SIMPLE MOBS WITHOUT DESTROYING EVERYTHING. Higher speed is slower, negative speed is faster
//Hot simple_animal baby making vars
var/childtype = null
var/scan_ready = 1
var/species //Sorry, no spider+corgi buttbabies.
/mob/living/simple_animal/New()
..()
verbs -= /mob/verb/observe
@@ -481,4 +486,27 @@
/mob/living/simple_animal/revive()
health = maxHealth
..()
..()
/mob/living/simple_animal/proc/make_babies() // <3 <3 <3
if(gender != FEMALE || stat || !scan_ready || !childtype || !species)
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, species))
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)
Binary file not shown.

Before

Width:  |  Height:  |  Size: 163 KiB

After

Width:  |  Height:  |  Size: 168 KiB