Merge branch 'master' of https://github.com/tgstation/-tg-station into srsbsns-determinism

This commit is contained in:
sirbayer
2014-01-07 15:33:41 -08:00
80 changed files with 2901 additions and 2813 deletions
+23 -20
View File
@@ -179,27 +179,30 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp
set name = "Follow" // "Haunt"
set desc = "Follow and haunt a mob."
if(istype(usr, /mob/dead/observer))
var/list/mobs = getmobs()
var/input = input("Please, select a mob!", "Haunt", null, null) as null|anything in mobs
var/mob/target = mobs[input]
if(target && target != usr)
following = target
spawn(0)
var/turf/pos = get_turf(src)
while(src.loc == pos)
var/list/mobs = getmobs()
var/input = input("Please, select a mob!", "Haunt", null, null) as null|anything in mobs
var/mob/target = mobs[input]
ManualFollow(target)
var/turf/T = get_turf(target)
if(!T)
break
if(following != target)
break
if(!client)
break
src.loc = T
pos = src.loc
sleep(15)
following = null
// This is the ghost's follow verb with an argument
/mob/dead/observer/proc/ManualFollow(var/atom/movable/target)
if(target && target != src)
if(following && following == target)
return
following = target
src << "\blue Now following [target]"
spawn(0)
var/turf/pos = get_turf(src)
while(loc == pos && target && following == target && client)
var/turf/T = get_turf(target)
if(!T)
break
// To stop the ghost flickering.
if(loc != T)
loc = T
pos = loc
sleep(15)
following = null
/mob/dead/observer/verb/jumptomob() //Moves the ghost instead of just changing the ghosts's eye -Nodrak
@@ -28,14 +28,8 @@
if(!gibbed)
emote("deathgasp") //let the world KNOW WE ARE DEAD
//For ninjas exploding when they die./N
if( istype(wear_suit, /obj/item/clothing/suit/space/space_ninja) && wear_suit:s_initialized )
src << browse(null, "window=spideros")//Just in case.
var/location = loc
explosion(location, 1, 2, 3, 4)
update_canmove()
if(client) blind.layer = 0
if(client) blind.layer = 0
tod = worldtime2text() //weasellos time of death patch
if(mind) mind.store_memory("Time of death: [tod]", 0)
@@ -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)
@@ -278,6 +278,10 @@
icon_state = null
gender = MALE
parted
name = "Side Part"
icon_state = "hair_part"
/////////////////////////////
// Facial Hair Definitions //
/////////////////////////////