Files
Polaris/code/modules/mob/say.dm
elly1989@rocketmail.com 7afb3f435d Fixing dem runtimes:
Temp-fix for mob/say.dm It's being sent null from Tcomms, so I'll leave it to somebody with experience with that.

Fix for items bein  in your inventory and on the floor

Fix to stop people pulling themselves and causing runtimes (lol)

Fixes a bunch of stuff in the flash code. EMPs will now cause flashes to flash their holder. They don't runtime when flashing cadavers. They don't runtime when being EMPed. They will (hopefully) rev those select few buggy people who weren't getting reved previously. (I can't fix that totally without playing with a bunch of mind stuff)

Fix for throwing nothing. :P

Fix for removing tanks that don't exist from transfer valves.

ummm...I think that's it

git-svn-id: http://tgstation13.googlecode.com/svn/trunk@3441 316c924e-a436-60f5-8080-3fe189b3f50e
2012-04-12 04:44:07 +00:00

71 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(original_name) //Original name is only used in ghost chat! It is not to be edited by anything!
name = src.original_name
if( original_name != real_name )
alt_name = " (died as [src.real_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)
return
/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)
if(!text)
return "says, \"...\""; //not the best solution, but it will stop a large number of runtimes. The cause is somewhere in the Tcomms code
var/ending = copytext(text, length(text))
if (src.stuttering)
return "stammers, \"[text]\"";
if (src.getBrainLoss() >= 60)
return "gibbers, \"[text]\"";
if (ending == "?")
return "asks, \"[text]\"";
if (ending == "!")
return "exclaims, \"[text]\"";
return "says, \"[text]\"";
/mob/proc/emote(var/act)
return