From 127bab5337adb74f8fb59b22250db1ed7f2ae1ff Mon Sep 17 00:00:00 2001 From: Miauw Date: Sun, 28 Sep 2014 20:49:14 +0200 Subject: [PATCH] Simple animal emotes work again. Fixed #4963 --- code/modules/mob/living/emote.dm | 2 +- .../mob/living/simple_animal/simple_animal.dm | 21 +++++++++---------- code/modules/mob/say.dm | 5 +---- 3 files changed, 12 insertions(+), 16 deletions(-) diff --git a/code/modules/mob/living/emote.dm b/code/modules/mob/living/emote.dm index 91e4fd3a7c2..38586236e9a 100644 --- a/code/modules/mob/living/emote.dm +++ b/code/modules/mob/living/emote.dm @@ -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)) diff --git a/code/modules/mob/living/simple_animal/simple_animal.dm b/code/modules/mob/living/simple_animal/simple_animal.dm index 8f1615f4aed..2481f81c155 100644 --- a/code/modules/mob/living/simple_animal/simple_animal.dm +++ b/code/modules/mob/living/simple_animal/simple_animal.dm @@ -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,14 +243,13 @@ 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("[src] [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) diff --git a/code/modules/mob/say.dm b/code/modules/mob/say.dm index 5bf229f61d5..544522c7934 100644 --- a/code/modules/mob/say.dm +++ b/code/modules/mob/say.dm @@ -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