Allow all mobs to emote. Standardising emote proc.

This commit is contained in:
Erthilo
2013-08-20 10:38:57 +01:00
parent ec3000ecfb
commit 16d9b76599
6 changed files with 87 additions and 19 deletions
@@ -1,4 +1,4 @@
/mob/living/carbon/alien/humanoid/emote(var/act)
/mob/living/carbon/alien/humanoid/emote(var/act,var/m_type=1,var/message = null)
var/param = null
if (findtext(act, "-", 1, null))
@@ -9,10 +9,25 @@
if(findtext(act,"s",-1) && !findtext(act,"_",-2))//Removes ending s's unless they are prefixed with a '_'
act = copytext(act,1,length(act))
var/muzzled = istype(src.wear_mask, /obj/item/clothing/mask/muzzle)
var/m_type = 1
var/message
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("<B>The alien</B> signs[].", (text2num(param) ? text(" the number []", text2num(param)) : null))
@@ -1,4 +1,4 @@
/mob/living/carbon/alien/larva/emote(var/act)
/mob/living/carbon/alien/larva/emote(var/act,var/m_type=1,var/message = null)
var/param = null
if (findtext(act, "-", 1, null))
@@ -9,10 +9,25 @@
if(findtext(act,"s",-1) && !findtext(act,"_",-2))//Removes ending s's unless they are prefixed with a '_'
act = copytext(act,1,length(act))
var/muzzled = istype(src.wear_mask, /obj/item/clothing/mask/muzzle)
var/m_type = 1
var/message
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("<B>The alien</B> signs[].", (text2num(param) ? text(" the number []", text2num(param)) : null))
@@ -12,6 +12,23 @@
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 = "<B>[src]</B> sounds an alarm."
@@ -63,7 +63,7 @@
else
alert("Unable to use this emote, must be either hearable or visible.")
return
message = "<B>[src]</B> [input]"
return custom_emote(m_type, message)
if ("me")
if(silent)
@@ -78,7 +78,7 @@
return
if(!(message))
return
message = "<B>[src]</B> [message]"
return custom_emote(m_type, message)
if ("salute")
if (!src.buckled)
@@ -1,4 +1,4 @@
/mob/living/carbon/slime/emote(var/act, var/type, var/desc)
/mob/living/carbon/slime/emote(var/act,var/m_type=1,var/message = null)
if (findtext(act, "-", 1, null))
@@ -9,14 +9,24 @@
if(findtext(act,"s",-1) && !findtext(act,"_",-2))//Removes ending s's unless they are prefixed with a '_'
act = copytext(act,1,length(act))
var/m_type = 1
var/message
switch(act)
if ("me")
return custom_emote(m_type, desc)
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, desc)
return custom_emote(m_type, message)
if("moan")
message = "<B>The [src.name]</B> moans."
m_type = 2
+16 -5
View File
@@ -1,4 +1,4 @@
/mob/living/carbon/monkey/emote(var/act, var/type, var/desc)
/mob/living/carbon/monkey/emote(var/act,var/m_type=1,var/message = null)
var/param = null
if (findtext(act, "-", 1, null))
@@ -10,15 +10,26 @@
act = copytext(act,1,length(act))
var/muzzled = istype(src.wear_mask, /obj/item/clothing/mask/muzzle)
var/m_type = 1
var/message
switch(act)
if ("me")
return custom_emote(m_type, desc)
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, desc)
return custom_emote(m_type, message)
if("sign")
if (!src.restrained())