mirror of
https://github.com/PolarisSS13/Polaris.git
synced 2025-12-26 10:03:45 +00:00
This variable is set ONLY when you spawn. It is also only used for deadchat communication. This variable is not to be changed after mob creation. the new deadchat format is: http://www.kamletos.si/deadchat222.png line before suicide = spoke alive just before I suicided (name = unknown; real_name = "Duncan Sagan"; original_name = "Duncan Sagan") the 2nd to last line is me speaking from the human body (name = "Unknown"; real_name = "Duncan Sagan"; original_name = "Duncan Sagan") the last line is me speaking after ghosting (name = "Duncan Sagan"; real_name = "Unknown"; original_name = "Duncan Sagan") So when alive everything is as before, When you speak as a dead human you get DEAD: Original_name says, "message" When you speak as a ghost you get DEAD: Original_name (as real_name) says, "message" (the as real_name is skipped if the two are the same) If there is some overlooked situation where new mobs are created and original names don't copy over, then real_name is used in all forms of deadcast communication. git-svn-id: http://tgstation13.googlecode.com/svn/trunk@3066 316c924e-a436-60f5-8080-3fe189b3f50e
69 lines
1.8 KiB
Plaintext
69 lines
1.8 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)
|
|
var/ending = copytext(text, length(text))
|
|
if (src.stuttering)
|
|
return "stammers, \"[text]\"";
|
|
if (src.getBrainLoss() >= 60)
|
|
return "gibbers, \"[text]\"";
|
|
if (ending == "?")
|
|
return "asks, \"[text]\"";
|
|
else if (ending == "!")
|
|
return "exclaims, \"[text]\"";
|
|
|
|
return "says, \"[text]\"";
|
|
|
|
/mob/proc/emote(var/act)
|
|
return
|