Files
vgstation13/code/modules/mob/living/carbon/brain/emote.dm
elly1989@rocketmail.com 2e68af07c1 Merged listen_ooc, seeprayers, STFU_ghosts, STFU_radio, deadchat, sound_adminhelp, ghostears, ghostsight, canplaysound, midis, no_ambi and lobby_music into client.prefs.toggles as bitflags.
Toggling these preferences in-game will update your savefile. Meaning that your preferences will persist between rounds.

Added some savefile_version updating stuff. It's pretty crude. If you're changing any of the savefile stuff just ask and I can change it/help.

Removed some unused client vars

Ghosts no longer hear ambience. Simplified ambience code.

Simplified lobby music code. It will no longer cause a massive queue of events (which would eventually balloon in memory use)

Moved ooccolor and sound_adminhelp back to prefs. It's easier and allowed me to remove the setupclient() stuff completely.

git-svn-id: http://tgstation13.googlecode.com/svn/trunk@5143 316c924e-a436-60f5-8080-3fe189b3f50e
2012-11-21 05:58:04 +00:00

65 lines
1.9 KiB
Plaintext

/mob/living/carbon/brain/emote(var/act,var/m_type=1,var/message = null)
if(!(container && istype(container, /obj/item/device/mmi)))//No MMI, no emotes
return
if (findtext(act, "-", 1, null))
var/t1 = findtext(act, "-", 1, null)
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(src.stat == DEAD)
return
switch(act)
if ("alarm")
src << "You sound an alarm."
message = "<B>[src]</B> sounds an alarm."
m_type = 2
if ("alert")
src << "You let out a distressed noise."
message = "<B>[src]</B> lets out a distressed noise."
m_type = 2
if ("notice")
src << "You play a loud tone."
message = "<B>[src]</B> plays a loud tone."
m_type = 2
if ("flash")
message = "The lights on <B>[src]</B> flash quickly."
m_type = 1
if ("blink")
message = "<B>[src]</B> blinks."
m_type = 1
if ("whistle")
src << "You whistle."
message = "<B>[src]</B> whistles."
m_type = 2
if ("beep")
src << "You beep."
message = "<B>[src]</B> beeps."
m_type = 2
if ("boop")
src << "You boop."
message = "<B>[src]</B> 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."
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)