diff --git a/code/modules/mob/living/carbon/alien/humanoid/emote.dm b/code/modules/mob/living/carbon/alien/humanoid/emote.dm
index c4ac448293e..a80a0d5892c 100644
--- a/code/modules/mob/living/carbon/alien/humanoid/emote.dm
+++ b/code/modules/mob/living/carbon/alien/humanoid/emote.dm
@@ -1,139 +1,115 @@
/mob/living/carbon/alien/humanoid/emote(var/act,var/m_type=1,var/message = null)
-
var/param = null
if (findtext(act, "-", 1, null))
var/t1 = findtext(act, "-", 1, null)
param = copytext(act, t1 + 1, length(act) + 1)
act = copytext(act, 1, t1)
- if(findtext(act,"s",-1) && !findtext(act,"_",-2))//Removes ending s's unless they are prefixed with a '_'
- act = copytext(act,1,length(act))
+// if(findtext(act,"s",-1) && !findtext(act,"_",-2))//Removes ending s's unless they are prefixed with a '_'
+// act = copytext(act,1,length(act)) //seriously who the fuck wrote this
var/muzzled = is_muzzled()
switch(act)
- if ("me")
- if(silent)
- return
- if (src.client)
- if (client.prefs.muted & MUTE_IC)
- src << "\red You cannot send IC messages (muted)."
- return
- if (src.client.handle_spam_prevention(message,MUTE_IC))
- return
- if (stat)
- return
- if(!(message))
- return
- return custom_emote(m_type, message)
-
- if ("custom")
- return custom_emote(m_type, message)
if("sign")
- if (!src.restrained())
- message = text("The alien signs[].", (text2num(param) ? text(" the number []", text2num(param)) : null))
- m_type = 1
+ if(!restrained())
+ var/num = null
+ if(text2num(param))
+ num = "the number [text2num(param)]"
+ if(num)
+ message = "\The [src] signs [num]."
+ m_type = 1
if ("burp")
if (!muzzled)
- message = "[src] burps."
+ message = "\The [src] burps."
m_type = 2
if ("deathgasp")
- message = "[src] lets out a waning guttural screech, green blood bubbling from its maw..."
+ message = "\The [src] lets out a waning guttural screech, green blood bubbling from its maw..."
m_type = 2
if("scratch")
if (!src.restrained())
- message = "The [src.name] scratches."
+ message = "\The [src] scratches."
m_type = 1
if("whimper")
if (!muzzled)
- message = "The [src.name] whimpers."
+ message = "\The [src] whimpers."
m_type = 2
if("roar")
if (!muzzled)
- message = "The [src.name] roars."
+ message = "\The [src] roars."
m_type = 2
if("hiss")
if(!muzzled)
- message = "The [src.name] hisses."
+ message = "\The [src] hisses."
m_type = 2
if("tail")
- message = "The [src.name] waves its tail."
+ message = "\The [src] waves its tail."
m_type = 1
if("gasp")
- message = "The [src.name] gasps."
+ message = "\The [src] gasps."
m_type = 2
if("shiver")
- message = "The [src.name] shivers."
+ message = "\The [src] shivers."
m_type = 2
if("drool")
- message = "The [src.name] drools."
+ message = "\The [src] drools."
m_type = 1
if("scretch")
if (!muzzled)
- message = "The [src.name] scretches."
+ message = "\The [src] scretches."
m_type = 2
if("choke")
- message = "The [src.name] chokes."
+ message = "\The [src] chokes."
m_type = 2
if("moan")
- message = "The [src.name] moans!"
+ message = "\The [src] moans!"
m_type = 2
if("nod")
- message = "The [src.name] nods its head."
+ message = "\The [src] nods its head."
m_type = 1
if("sit")
- message = "The [src.name] sits down."
+ message = "\The [src] sits down."
m_type = 1
if("sway")
- message = "The [src.name] sways around dizzily."
+ message = "\The [src] sways around dizzily."
m_type = 1
if("sulk")
- message = "The [src.name] sulks down sadly."
+ message = "\The [src] sulks down sadly."
m_type = 1
if("twitch")
- message = "The [src.name] twitches violently."
+ message = "\The [src] twitches violently."
m_type = 1
if("dance")
if (!src.restrained())
- message = "The [src.name] dances around happily."
+ message = "\The [src] dances around happily."
m_type = 1
if("roll")
if (!src.restrained())
- message = "The [src.name] rolls."
+ message = "\The [src] rolls."
m_type = 1
if("shake")
- message = "The [src.name] shakes its head."
+ message = "\The [src] shakes its head."
m_type = 1
if("gnarl")
if (!muzzled)
- message = "The [src.name] gnarls and shows its teeth.."
+ message = "\The [src] gnarls and shows its teeth.."
m_type = 2
if("jump")
- message = "The [src.name] jumps!"
+ message = "\The [src] jumps!"
m_type = 1
if("collapse")
Paralyse(2)
- message = text("[] collapses!", src)
+ message = "\The [src] collapses!"
m_type = 2
if ("flip")
m_type = 1
- message = "[src] does a flip!"
+ message = "\The [src] does a flip!"
src.SpinAnimation(5,1)
if("help")
src << "burp, flip, deathgasp, choke, collapse, dance, drool, gasp, shiver, gnarl, jump, moan, nod, roar, roll, scratch,\nscretch, shake, sign-#, sit, sulk, sway, tail, twitch, whimper"
- else
- src << text("Invalid Emote: []", act)
- if ((message && src.stat == 0))
- log_emote("[name]/[key] : [message]")
+
+ if(!stat)
if (act == "roar")
playsound(src.loc, 'sound/voice/hiss5.ogg', 40, 1, 1)
if (act == "deathgasp")
playsound(src.loc, 'sound/voice/hiss6.ogg', 80, 1, 1)
- if (m_type & 1)
- for(var/mob/O in viewers(src, null))
- O.show_message(message, m_type)
- //Foreach goto(703)
- else
- for(var/mob/O in hearers(src, null))
- O.show_message(message, m_type)
- //Foreach goto(746)
- return
+ ..(act, m_type, message)
\ No newline at end of file
diff --git a/code/modules/mob/living/carbon/brain/emote.dm b/code/modules/mob/living/carbon/brain/emote.dm
index 1995ff5e1cc..0441eb00ac4 100644
--- a/code/modules/mob/living/carbon/brain/emote.dm
+++ b/code/modules/mob/living/carbon/brain/emote.dm
@@ -12,71 +12,39 @@
if(src.stat == DEAD)
return
switch(act)
- if ("me")
- if(silent)
- return
- if (src.client)
- if (client.prefs.muted & MUTE_IC)
- src << "\red You cannot send IC messages (muted)."
- return
- if (src.client.handle_spam_prevention(message,MUTE_IC))
- return
- if (stat)
- return
- if(!(message))
- return
- return custom_emote(m_type, message)
- if ("custom")
- return custom_emote(m_type, message)
if ("alarm")
src << "You sound an alarm."
- message = "[src] sounds an alarm."
+ message = "\The [src] sounds an alarm."
m_type = 2
if ("alert")
src << "You let out a distressed noise."
- message = "[src] lets out a distressed noise."
+ message = "\The [src] lets out a distressed noise."
m_type = 2
if ("notice")
src << "You play a loud tone."
- message = "[src] plays a loud tone."
+ message = "\The [src] plays a loud tone."
m_type = 2
if ("flash")
- message = "The lights on [src] flash quickly."
+ message = "The lights on \the [src] flash quickly."
m_type = 1
if ("blink")
- message = "[src] blinks."
+ message = "\The [src] blinks."
m_type = 1
if ("whistle")
src << "You whistle."
- message = "[src] whistles."
+ message = "\The [src] whistles."
m_type = 2
if ("beep")
src << "You beep."
- message = "[src] beeps."
+ message = "\The [src] beeps."
m_type = 2
if ("boop")
src << "You boop."
- message = "[src] boops."
+ message = "\The [src] boops."
m_type = 2
if ("help")
- src << "alarm,alert,notice,flash,blink,whistle,beep,boop"
- else
- src << "\blue Unusable emote '[act]'. Say *help for a list."
+ src << "alarm, alert, notice, flash,blink, whistle, beep, boop"
- if (message)
- log_emote("[name]/[key] : [message]")
-
- for(var/mob/M in dead_mob_list)
- if (!M.client || istype(M, /mob/new_player))
- continue //skip monkeys, leavers, and new_players
- if(M.stat == DEAD && (M.client.prefs.toggles & CHAT_GHOSTSIGHT) && !(M in viewers(src,null)))
- M.show_message(message)
-
-
- if (m_type & 1)
- for (var/mob/O in viewers(src, null))
- O.show_message(message, m_type)
- else if (m_type & 2)
- for (var/mob/O in hearers(src.loc, null))
- O.show_message(message, m_type)
\ No newline at end of file
+ if(message && !stat)
+ ..(act, m_type, message)
\ No newline at end of file
diff --git a/code/modules/mob/living/carbon/human/emote.dm b/code/modules/mob/living/carbon/human/emote.dm
index abbe2d2cf3d..058e4b01272 100644
--- a/code/modules/mob/living/carbon/human/emote.dm
+++ b/code/modules/mob/living/carbon/human/emote.dm
@@ -1,6 +1,5 @@
/mob/living/carbon/human/emote(var/act,var/m_type=1,var/message = null)
var/param = null
-
if (findtext(act, "-", 1, null))
var/t1 = findtext(act, "-", 1, null)
param = copytext(act, t1 + 1, length(act) + 1)
@@ -18,8 +17,7 @@
if (I.implanted)
I.trigger(act, src)
- if(src.stat == 2.0 && (act != "deathgasp"))
- return
+
//Emote Cooldown System (it's so simple!)
// proc/handle_emote_CD() located in [code\modules\mob\emote.dm]
@@ -167,37 +165,6 @@
message = "[src] bows."
m_type = 1
- if ("custom")
- var/input = sanitize(copytext(input("Choose an emote to display.") as text|null,1,MAX_MESSAGE_LEN))
- if (!input)
- return
- var/input2 = input("Is this a visible or hearable emote?") in list("Visible","Hearable")
- if (input2 == "Visible")
- m_type = 1
- else if (input2 == "Hearable")
- if (src.miming)
- return
- m_type = 2
- else
- alert("Unable to use this emote, must be either hearable or visible.")
- return
- return custom_emote(m_type, message)
-
- if ("me")
- if(silent)
- return
- if (src.client)
- if (client.prefs.muted & MUTE_IC)
- src << "\red You cannot send IC messages (muted)."
- return
- if (src.client.handle_spam_prevention(message,MUTE_IC))
- return
- if (stat)
- return
- if(!(message))
- return
- return custom_emote(m_type, message)
-
if ("salute")
if (!src.buckled)
var/M = null
@@ -820,7 +787,7 @@
- if (message)
+ if(message) //Humans are special fucking snowflakes and have 735 lines of emotes, they get to handle their own emotes, not call the parent
log_emote("[name]/[key] : [message]")
//Hearing gasp and such every five seconds is not good emotes were not global for a reason.
@@ -832,14 +799,11 @@
if(M.stat == DEAD && (M.client.prefs.toggles & CHAT_GHOSTSIGHT) && !(M in viewers(src,null)))
M.show_message(message)
-
- if (m_type & 1)
- for (var/mob/O in get_mobs_in_view(world.view,src))
- O.show_message(message, m_type)
- else if (m_type & 2)
- for (var/mob/O in (hearers(src.loc, null) | get_mobs_in_view(world.view,src)))
- O.show_message(message, m_type)
-
+ switch(m_type)
+ if(1)
+ visible_message(message)
+ if(2)
+ audible_message(message)
/mob/living/carbon/human/verb/pose()
set name = "Set Pose"
diff --git a/code/modules/mob/living/say.dm b/code/modules/mob/living/say.dm
index c8e4af92e84..1dfba41b225 100644
--- a/code/modules/mob/living/say.dm
+++ b/code/modules/mob/living/say.dm
@@ -272,10 +272,23 @@ proc/get_radio_key_from_channel(var/channel)
return 1
if(act && type && message) //parent call
+ log_emote("[name]/[key] : [message]")
+
+ for(var/mob/M in dead_mob_list)
+ if(!M.client || istype(M, /mob/new_player))
+ continue //skip monkeys, leavers and new players //who the hell knows why new players are in the dead mob list
+
+ if(M.stat == DEAD && (M.client.prefs.toggles & CHAT_GHOSTSIGHT) && !(M in viewers(src,null)))
+ M.show_message(message)
+
switch(type)
if(1) //Visible
visible_message(message)
return 1
if(2) //Audible
audible_message(message)
- return 1
\ No newline at end of file
+ return 1
+
+ else //everything else failed, emote is probably invalid
+ if(act == "help") return //except help, because help is handled individually
+ src << "\blue Unusable emote '[act]'. Say *help for a list."
\ No newline at end of file
diff --git a/code/modules/mob/living/silicon/emote.dm b/code/modules/mob/living/silicon/emote.dm
new file mode 100644
index 00000000000..f7ead12e4cc
--- /dev/null
+++ b/code/modules/mob/living/silicon/emote.dm
@@ -0,0 +1,78 @@
+/mob/living/silicon/emote(var/act, var/m_type=1, var/message = null)
+ var/param = null
+ if (findtext(act, "-", 1, null))
+ var/t1 = findtext(act, "-", 1, null)
+ param = copytext(act, t1 + 1, length(act) + 1)
+ act = copytext(act, 1, t1)
+
+ if(findtext(act,"s",-1) && !findtext(act,"_",-2))//Removes ending s's unless they are prefixed with a '_'
+ act = copytext(act,1,length(act))
+
+ //Emote Cooldown System (it's so simple!)
+ // proc/handle_emote_CD() located in [code\modules\mob\emote.dm]
+ var/on_CD = 0
+ switch(act)
+ //Cooldown-inducing emotes
+ if("ping","buzz","beep") //halt is exempt because it's used to stop criminal scum //WHOEVER THOUGHT THAT WAS A GOOD IDEA IS GOING TO GET SHOT.
+ on_CD = handle_emote_CD() //proc located in code\modules\mob\emote.dm
+ //Everything else, including typos of the above emotes
+ else
+ on_CD = 0 //If it doesn't induce the cooldown, we won't check for the cooldown
+
+ if(on_CD == 1) // Check if we need to suppress the emote attempt.
+ return // Suppress emote, you're still cooling off.
+ //--FalseIncarnate
+
+ switch(act)
+ if("ping")
+ var/M = null
+ if(param)
+ for (var/mob/A in view(null, null))
+ if (param == A.name)
+ M = A
+ break
+ if(!M)
+ param = null
+
+ if (param)
+ message = "[src] pings at [param]."
+ else
+ message = "[src] pings."
+ playsound(src.loc, 'sound/machines/ping.ogg', 50, 0)
+ m_type = 1
+
+ if("buzz")
+ var/M = null
+ if(param)
+ for (var/mob/A in view(null, null))
+ if (param == A.name)
+ M = A
+ break
+ if(!M)
+ param = null
+
+ if (param)
+ message = "[src] buzzes at [param]."
+ else
+ message = "[src] buzzes."
+ playsound(src.loc, 'sound/machines/buzz-sigh.ogg', 50, 0)
+ m_type = 1
+
+ if("beep")
+ var/M = null
+ if(param)
+ for (var/mob/A in view(null, null))
+ if (param == A.name)
+ M = A
+ break
+ if(!M)
+ param = null
+
+ if (param)
+ message = "[src] beeps at [param]."
+ else
+ message = "[src] beeps."
+ playsound(src.loc, 'sound/machines/twobeep.ogg', 50, 0)
+ m_type = 1
+
+ ..(act, m_type, message)
\ No newline at end of file
diff --git a/code/modules/mob/living/silicon/pai/emote.dm b/code/modules/mob/living/silicon/pai/emote.dm
index d66d7f555b6..a8eeac8cbb7 100644
--- a/code/modules/mob/living/silicon/pai/emote.dm
+++ b/code/modules/mob/living/silicon/pai/emote.dm
@@ -1,90 +1,6 @@
-/mob/living/silicon/pai/emote(var/act,var/m_type=1,var/message = null)
- var/param = null
- if (findtext(act, "-", 1, null))
- var/t1 = findtext(act, "-", 1, null)
- param = copytext(act, t1 + 1, length(act) + 1)
- act = copytext(act, 1, t1)
-
- if(findtext(act,"s",-1) && !findtext(act,"_",-2))//Removes ending s's unless they are prefixed with a '_'
- act = copytext(act,1,length(act))
-
- //Emote Cooldown System (it's so simple!)
- // proc/handle_emote_CD() located in [code\modules\mob\emote.dm]
- var/on_CD = 0
+/mob/living/silicon/pai/emote(var/act, var/m_type=1, var/message = null)
switch(act)
- //Cooldown-inducing emotes
- if("ping","buzz")
- on_CD = handle_emote_CD() //proc located in code\modules\mob\emote.dm
- //Everything else, including typos of the above emotes
- else
- on_CD = 0 //If it doesn't induce the cooldown, we won't check for the cooldown
-
- if(on_CD == 1) // Check if we need to suppress the emote attempt.
- return // Suppress emote, you're still cooling off.
- //--FalseIncarnate
-
- switch(act)
- if ("me")
- if (src.client)
- if(client.prefs.muted & MUTE_IC)
- src << "You cannot send IC messages (muted)."
- return
- if (src.client.handle_spam_prevention(message,MUTE_IC))
- return
- if (stat)
- return
- if(!(message))
- return
- else
- return custom_emote(m_type, message)
-
- if ("custom")
- return custom_emote(m_type, message)
-
- if("ping")
- var/M = null
- if(param)
- for (var/mob/A in view(null, null))
- if (param == A.name)
- M = A
- break
- if(!M)
- param = null
-
- if (param)
- message = "[src] pings at [param]."
- else
- message = "[src] pings."
- playsound(src.loc, 'sound/machines/ping.ogg', 50, 0)
- m_type = 1
-
- if("buzz")
- var/M = null
- if(param)
- for (var/mob/A in view(null, null))
- if (param == A.name)
- M = A
- break
- if(!M)
- param = null
-
- if (param)
- message = "[src] buzzes at [param]."
- else
- message = "[src] buzzes."
- playsound(src.loc, 'sound/machines/buzz-sigh.ogg', 50, 0)
- m_type = 1
-
if ("help")
- src << "ping, \nbuzz."
- else
- src << "\blue Unusable emote '[act]'. Say *help for a list."
+ src << "ping, beep, buzz."
- if ((message && src.stat == 0))
- if (m_type & 1)
- for(var/mob/O in viewers(src, null))
- O.show_message(message, m_type)
- else
- for(var/mob/O in hearers(src, null))
- O.show_message(message, m_type)
- return
\ No newline at end of file
+ ..(act, m_type, message)
\ No newline at end of file
diff --git a/code/modules/mob/living/silicon/robot/emote.dm b/code/modules/mob/living/silicon/robot/emote.dm
index 82c20434da6..9c01f9ee5ec 100644
--- a/code/modules/mob/living/silicon/robot/emote.dm
+++ b/code/modules/mob/living/silicon/robot/emote.dm
@@ -1,4 +1,4 @@
-/mob/living/silicon/robot/emote(var/act,var/m_type=1,var/message = null)
+/mob/living/silicon/robot/emote(var/act, var/m_type=1, var/message = null)
var/param = null
if (findtext(act, "-", 1, null))
var/t1 = findtext(act, "-", 1, null)
@@ -13,7 +13,7 @@
var/on_CD = 0
switch(act)
//Cooldown-inducing emotes
- if("ping","buzz","beep","law","flip","halt") //halt is exempt because it's used to stop criminal scum //WHOEVER THOUGHT THAT WAS A GOOD IDEA IS GOING TO GET SHOT.
+ if("law","flip","halt") //halt is exempt because it's used to stop criminal scum //WHOEVER THOUGHT THAT WAS A GOOD IDEA IS GOING TO GET SHOT.
on_CD = handle_emote_CD() //proc located in code\modules\mob\emote.dm
//Everything else, including typos of the above emotes
else
@@ -24,22 +24,6 @@
//--FalseIncarnate
switch(act)
- if ("me")
- if (src.client)
- if(client.prefs.muted & MUTE_IC)
- src << "You cannot send IC messages (muted)."
- return
- if (src.client.handle_spam_prevention(message,MUTE_IC))
- return
- if (stat)
- return
- if(!(message))
- return
- else
- return custom_emote(m_type, message)
-
- if ("custom")
- return custom_emote(m_type, message)
if ("salute")
if (!src.buckled)
@@ -151,56 +135,6 @@
message = "[src] looks."
m_type = 1
- if("beep")
- var/M = null
- if(param)
- for (var/mob/A in view(null, null))
- if (param == A.name)
- M = A
- break
- if(!M)
- param = null
-
- if (param)
- message = "[src] beeps at [param]."
- else
- message = "[src] beeps."
- playsound(src.loc, 'sound/machines/twobeep.ogg', 50, 0)
- m_type = 1
-
- if("ping")
- var/M = null
- if(param)
- for (var/mob/A in view(null, null))
- if (param == A.name)
- M = A
- break
- if(!M)
- param = null
-
- if (param)
- message = "[src] pings at [param]."
- else
- message = "[src] pings."
- playsound(src.loc, 'sound/machines/ping.ogg', 50, 0)
- m_type = 1
-
- if("buzz")
- var/M = null
- if(param)
- for (var/mob/A in view(null, null))
- if (param == A.name)
- M = A
- break
- if(!M)
- param = null
-
- if (param)
- message = "[src] buzzes at [param]."
- else
- message = "[src] buzzes."
- playsound(src.loc, 'sound/machines/buzz-sigh.ogg', 50, 0)
- m_type = 1
if("law")
if (istype(module,/obj/item/weapon/robot_module/security))
@@ -227,14 +161,5 @@
if ("help")
src << "salute, bow-(none)/mob, clap, flap, aflap, twitch, twitch_s, nod, deathgasp, glare-(none)/mob, stare-(none)/mob, look, beep, ping, \nbuzz, law, halt"
- else
- src << "\blue Unusable emote '[act]'. Say *help for a list."
- if ((message && src.stat == 0))
- if (m_type & 1)
- for(var/mob/O in viewers(src, null))
- O.show_message(message, m_type)
- else
- for(var/mob/O in hearers(src, null))
- O.show_message(message, m_type)
- return
+ ..(act, m_type, message)
\ No newline at end of file
diff --git a/paradise.dme b/paradise.dme
index 0c12f807b3f..8bdbf09e684 100644
--- a/paradise.dme
+++ b/paradise.dme
@@ -1370,6 +1370,7 @@
#include "code\modules\mob\living\carbon\metroid\subtypes.dm"
#include "code\modules\mob\living\carbon\metroid\update_icons.dm"
#include "code\modules\mob\living\silicon\death.dm"
+#include "code\modules\mob\living\silicon\emote.dm"
#include "code\modules\mob\living\silicon\laws.dm"
#include "code\modules\mob\living\silicon\login.dm"
#include "code\modules\mob\living\silicon\say.dm"