Merge pull request #5008 from Miauw62/EVERYTHINGBKEARPESK

Simple animal emotes work again.
This commit is contained in:
Cheridan
2014-10-01 10:45:53 -05:00
13 changed files with 32 additions and 36 deletions
+1 -1
View File
@@ -2,7 +2,7 @@
//Things like airguitar can be done without arms, and the flap thing makes so little sense it's a keeper.
//Intended to be called by a higher up emote proc if the requested emote isn't in the custom emotes.
/mob/living/emote(var/act,var/m_type=1,var/message = null)
/mob/living/emote(var/act, var/m_type=1, var/message = null)
var/param = null
if (findtext(act, "-", 1, null))
@@ -90,10 +90,10 @@
/mob/living/simple_animal/construct/attack_animal(mob/living/simple_animal/M as mob)
if(istype(M, /mob/living/simple_animal/construct/builder))
health += 5
M.emote("mends some of \the <EM>[src]'s</EM> wounds.")
M.emote("me", 1, "mends some of \the <EM>[src]'s</EM> wounds.")
else if(src != M)
if(M.melee_damage_upper <= 0)
M.emote("[M.friendly] \the <EM>[src]</EM>")
M.emote("me", 1, "[M.friendly] \the <EM>[src]</EM>")
else
if(M.attack_sound)
playsound(loc, M.attack_sound, 50, 1, 1)
@@ -39,7 +39,7 @@
for(var/mob/living/simple_animal/mouse/M in view(1,src))
if(!M.stat)
M.splat()
emote("splats \the [M]")
emote("me", 1, "splats \the [M]")
movement_target = null
stop_automated_movement = 0
break
@@ -66,7 +66,7 @@
for (var/mob/M in viewers(src, null))
M.show_message("<span class='danger'>[user] gently taps [src] with [O].</span>")
if(health>0 && prob(15))
emote("looks at [user] with [pick("an amused","an annoyed","a confused","a resentful", "a happy", "an excited")] expression")
emote("me", 1, "looks at [user] with [pick("an amused","an annoyed","a confused","a resentful", "a happy", "an excited")] expression")
return
..()
@@ -388,10 +388,10 @@
movement_target.attack_animal(src)
else if(ishuman(movement_target.loc) )
if(prob(20))
emote("stares at [movement_target.loc]'s [movement_target] with a sad puppy-face")
emote("me", 1, "stares at [movement_target.loc]'s [movement_target] with a sad puppy-face")
if(prob(1))
emote(pick("dances around","chases its tail"))
emote("me", 1, pick("dances around","chases its tail"))
spawn(0)
for(var/i in list(1,2,4,8,4,2,1,2,4,8,4,2,1,2,4,8,4,2))
dir = i
@@ -512,7 +512,7 @@
if(!stat && !resting && !buckled)
if(prob(1))
emote(pick("dances around","chases her tail"))
emote("me", 1, pick("dances around","chases her tail"))
spawn(0)
for(var/i in list(1,2,4,8,4,2,1,2,4,8,4,2,1,2,4,8,4,2))
dir = i
@@ -529,7 +529,7 @@
if(change > 0)
if(M && stat != DEAD) // Added check to see if this mob (the corgi) is dead to fix issue 2454
flick_overlay(image('icons/mob/animal.dmi',src,"heart-ani2",MOB_LAYER+1), list(M.client), 20)
emote("yaps happily")
emote("me", 1, "yaps happily")
else
if(M && stat != DEAD) // Same check here, even though emote checks it as well (poor form to check it only in the help case)
emote("growls")
emote("me", 1, "growls")
@@ -1,4 +1,4 @@
//Corgi
//Corgi //best comment 2014
/mob/living/simple_animal/pug
name = "\improper pug"
real_name = "pug"
@@ -24,7 +24,7 @@
if(!stat && !resting && !buckled)
if(prob(1))
emote(pick("chases its tail"))
emote("me", 1, pick("chases its tail"))
spawn(0)
for(var/i in list(1,2,4,8,4,2,1,2,4,8,4,2,1,2,4,8,4,2))
dir = i
@@ -60,7 +60,7 @@
/mob/living/simple_animal/hostile/bear/FindTarget()
. = ..()
if(.)
emote("stares alertly at [.]")
emote("me", 1, "stares alertly at [.]")
stance = HOSTILE_STANCE_ATTACK
/mob/living/simple_animal/hostile/bear/LoseTarget()
@@ -44,7 +44,7 @@
/mob/living/simple_animal/hostile/carp/FindTarget()
. = ..()
if(.)
emote("nashes at [.]")
emote("me", 1, "nashes at [.]")
/mob/living/simple_animal/hostile/carp/AttackingTarget()
. =..()
@@ -37,7 +37,7 @@
/mob/living/simple_animal/hostile/faithless/FindTarget()
. = ..()
if(.)
emote("wails at [.]")
emote("me", 1, "wails at [.]")
/mob/living/simple_animal/hostile/faithless/AttackingTarget()
. =..()
@@ -38,7 +38,7 @@
/mob/living/simple_animal/hostile/mimic/FindTarget()
. = ..()
if(.)
emote("growls at [.]")
emote("me", 1, "growls at [.]")
/mob/living/simple_animal/hostile/mimic/Die()
..()
@@ -39,7 +39,7 @@
/mob/living/simple_animal/hostile/tree/FindTarget()
. = ..()
if(.)
emote("growls at [.]")
emote("me", 1, "growls at [.]")
/mob/living/simple_animal/hostile/tree/AttackingTarget()
. =..()
@@ -419,7 +419,7 @@
//Search for item to steal
parrot_interest = search_for_item()
if(parrot_interest)
emote("looks in [parrot_interest]'s direction and takes flight")
emote("me", 1, "looks in [parrot_interest]'s direction and takes flight")
parrot_state = PARROT_SWOOP | PARROT_STEAL
icon_state = "parrot_fly"
return
@@ -441,7 +441,7 @@
if(AM)
if(istype(AM, /obj/item) || isliving(AM)) //If stealable item
parrot_interest = AM
emote("turns and flies towards [parrot_interest]")
emote("me", 1, "turns and flies towards [parrot_interest]")
parrot_state = PARROT_SWOOP | PARROT_STEAL
return
else //Else it's a perch
@@ -739,7 +739,7 @@
held_item = null
if(health < maxHealth)
adjustBruteLoss(-10)
emote("[src] eagerly downs the cracker")
emote("me", 1, "[src] eagerly downs the cracker")
return 1
@@ -134,23 +134,23 @@
else
randomValue -= speak.len
if(emote_see && randomValue <= emote_see.len)
emote(pick(emote_see),1)
emote("me", 1, pick(emote_see))
else
emote(pick(emote_hear),2)
emote("me", 2, pick(emote_see))
else
say(pick(speak))
else
if(!(emote_hear && emote_hear.len) && (emote_see && emote_see.len))
emote(pick(emote_see),1)
emote("me", 1, pick(emote_see))
if((emote_hear && emote_hear.len) && !(emote_see && emote_see.len))
emote(pick(emote_hear),2)
emote("me", 2, pick(emote_see))
if((emote_hear && emote_hear.len) && (emote_see && emote_see.len))
var/length = emote_hear.len + emote_see.len
var/pick = rand(1,length)
if(pick <= emote_see.len)
emote(pick(emote_see),1)
emote("me", 1, pick(emote_see))
else
emote(pick(emote_hear),2)
emote("me", 2, pick(emote_see))
//Atmos
@@ -243,18 +243,17 @@
return "[emote], \"[text]\""
return "says, \"[text]\"";
/mob/living/simple_animal/emote(var/act)
/mob/living/simple_animal/emote(var/act, var/m_type=1, var/message = null)
if(stat)
return
if(act == "scream")
act = "makes a loud and pained whimper" //ugly hack to stop animals screaming when crushed :P
visible_message("<B>[src]</B> [act].")
return
..(act)
message = "makes a loud and pained whimper" //ugly hack to stop animals screaming when crushed :P
act = "me"
..(act, m_type, message)
/mob/living/simple_animal/attack_animal(mob/living/simple_animal/M as mob)
if(M.melee_damage_upper == 0)
M.emote("[M.friendly] [src]")
M.emote("me", 1, "[M.friendly] [src]")
else
if(M.attack_sound)
playsound(loc, M.attack_sound, 50, 1, 1)
+1 -4
View File
@@ -22,10 +22,7 @@
message = trim(copytext(sanitize(message), 1, MAX_MESSAGE_LEN))
if(ishuman(src) || isrobot(src))
usr.emote("me",1,message)
else
usr.emote(message)
usr.emote("me",1,message)
/mob/proc/say_dead(var/message)
var/name = src.real_name