Files
Polaris/code/modules/mob/say.dm
baloh.matevz 00d055d7f6 - Moved another proc from datums/disease.dm to mob.dm so doubleclicking /mob actually gets you to the mob's definition.
- Two new admin verbs. "toggle hear radio" and "toggle hear deadcast". These don't care if you're a ghost or what you had for breakfast, they work because they're tied to your client, not your mob. To non-admins it might seem silly that this is needed but when dealing with multiple adminhelps you don't want text to move at lightning speed, so anything that you can disable is good.

git-svn-id: http://tgstation13.googlecode.com/svn/trunk@2259 316c924e-a436-60f5-8080-3fe189b3f50e
2011-09-23 22:47:00 +00:00

73 lines
2.0 KiB
Plaintext

/mob/proc/say()
return
/mob/verb/whisper()
set name = "Whisper"
set category = "IC"
return
/mob/verb/say_verb(message as text)
set name = "Say"
set category = "IC"
usr.say(message)
/mob/verb/me_verb(message as text)
set name = "Me"
set category = "IC"
message = trim(copytext(sanitize(message), 1, MAX_MESSAGE_LEN))
if(ishuman(src))
usr.emote("me",1,message)
else
usr.emote(message)
/mob/proc/say_dead(var/message)
var/name = src.real_name
var/alt_name = ""
if (istype(src, /mob/living/carbon/human) && src.name != src.real_name)
var/mob/living/carbon/human/H = src
alt_name = " (as [H.get_authentification_name()])"
else if (istype(src, /mob/dead/observer))
name = "Ghost"
alt_name = " ([src.real_name])"
else if (!istype(src, /mob/living/carbon/human))
name = src.name
message = src.say_quote(message)
var/rendered = "<span class='game deadsay'><span class='prefix'>DEAD:</span> <span class='name'>[name]</span>[alt_name] <span class='message'>[message]</span></span>"
for (var/mob/M in world)
if (istype(M, /mob/new_player))
continue
if (M.stat == 2 || (M.client && M.client.holder && M.client.deadchat)) //admins can toggle deadchat on and off. This is a proc in admin.dm and is only give to Administrators and above
if(M.client && !M.client.STFU_ghosts) //Admin shut-off for ghosts chatter
M.show_message(rendered, 2)
/mob/proc/say_understands(var/mob/other)
if (src.stat == 2)
return 1
else if (istype(other, src.type))
return 1
else if(other.universal_speak || src.universal_speak)
return 1
return 0
/mob/proc/say_quote(var/text)
var/ending = copytext(text, length(text))
if (src.stuttering)
return "stammers, \"[text]\"";
if (src.brainloss >= 60)
return "gibbers, \"[text]\"";
if (ending == "?")
return "asks, \"[text]\"";
else if (ending == "!")
return "exclaims, \"[text]\"";
return "says, \"[text]\"";
/mob/proc/emote(var/act)
return