mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-10 10:12:45 +00:00
638 lines
15 KiB
Plaintext
638 lines
15 KiB
Plaintext
/mob/living/carbon/human/emote(var/act,var/m_type=1,var/message = null)
|
|
var/param = null
|
|
|
|
if (findtext(act, "-", 1, null))
|
|
var/t1 = findtext(act, "-", 1, null)
|
|
param = copytext(act, t1 + 1, length(act) + 1)
|
|
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))
|
|
|
|
var/muzzled = istype(src.wear_mask, /obj/item/clothing/mask/muzzle)
|
|
//var/m_type = 1
|
|
|
|
for (var/obj/item/weapon/implant/I in src)
|
|
if (I.implanted)
|
|
I.trigger(act, src)
|
|
|
|
if(src.stat == 2.0 && (act != "deathgasp"))
|
|
return
|
|
switch(act)
|
|
if ("airguitar")
|
|
if (!src.restrained())
|
|
message = "<B>[src]</B> is strumming the air and headbanging like a safari chimp."
|
|
m_type = 1
|
|
|
|
if ("blink")
|
|
message = "<B>[src]</B> blinks."
|
|
m_type = 1
|
|
|
|
if ("blink_r")
|
|
message = "<B>[src]</B> blinks rapidly."
|
|
m_type = 1
|
|
|
|
if ("bow")
|
|
if (!src.buckled)
|
|
var/M = null
|
|
if (param)
|
|
for (var/mob/A in view(null, null))
|
|
if (param == A.name)
|
|
M = A
|
|
break
|
|
if (!M)
|
|
param = null
|
|
|
|
if (param)
|
|
message = "<B>[src]</B> bows to [param]."
|
|
else
|
|
message = "<B>[src]</B> bows."
|
|
m_type = 1
|
|
|
|
if ("custom")
|
|
var/input = sanitize(input("Choose an emote to display.") as text|null)
|
|
if (!input)
|
|
return
|
|
var/input2 = input("Is this a visible or hearable emote?") in list("Visible","Hearable")
|
|
if (input2 == "Visible")
|
|
m_type = 1
|
|
else if (input2 == "Hearable")
|
|
if (src.miming)
|
|
return
|
|
m_type = 2
|
|
else
|
|
alert("Unable to use this emote, must be either hearable or visible.")
|
|
return
|
|
return custom_emote(m_type, message)
|
|
|
|
if ("me")
|
|
|
|
//if(silent && silent > 0 && findtext(message,"\"",1, null) > 0)
|
|
// return //This check does not work and I have no idea why, I'm leaving it in for reference.
|
|
|
|
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 ("salute")
|
|
if (!src.buckled)
|
|
var/M = null
|
|
if (param)
|
|
for (var/mob/A in view(null, null))
|
|
if (param == A.name)
|
|
M = A
|
|
break
|
|
if (!M)
|
|
param = null
|
|
|
|
if (param)
|
|
message = "<B>[src]</B> salutes to [param]."
|
|
else
|
|
message = "<B>[src]</b> salutes."
|
|
m_type = 1
|
|
|
|
if ("choke")
|
|
if(miming)
|
|
message = "<B>[src]</B> clutches \his throat desperately!"
|
|
m_type = 1
|
|
else
|
|
if (!muzzled)
|
|
message = "<B>[src]</B> chokes!"
|
|
m_type = 2
|
|
else
|
|
message = "<B>[src]</B> makes a strong noise."
|
|
m_type = 2
|
|
|
|
if ("clap")
|
|
if (!src.restrained())
|
|
message = "<B>[src]</B> claps."
|
|
m_type = 2
|
|
if(miming)
|
|
m_type = 1
|
|
if ("flap")
|
|
if (!src.restrained())
|
|
message = "<B>[src]</B> flaps \his wings."
|
|
m_type = 2
|
|
if(miming)
|
|
m_type = 1
|
|
|
|
if ("aflap")
|
|
if (!src.restrained())
|
|
message = "<B>[src]</B> flaps \his wings ANGRILY!"
|
|
m_type = 2
|
|
if(miming)
|
|
m_type = 1
|
|
|
|
if ("drool")
|
|
message = "<B>[src]</B> drools."
|
|
m_type = 1
|
|
|
|
if ("eyebrow")
|
|
message = "<B>[src]</B> raises an eyebrow."
|
|
m_type = 1
|
|
|
|
if ("chuckle")
|
|
if(miming)
|
|
message = "<B>[src]</B> appears to chuckle."
|
|
m_type = 1
|
|
else
|
|
if (!muzzled)
|
|
message = "<B>[src]</B> chuckles."
|
|
m_type = 2
|
|
else
|
|
message = "<B>[src]</B> makes a noise."
|
|
m_type = 2
|
|
|
|
if ("twitch")
|
|
message = "<B>[src]</B> twitches violently."
|
|
m_type = 1
|
|
|
|
if ("twitch_s")
|
|
message = "<B>[src]</B> twitches."
|
|
m_type = 1
|
|
|
|
if ("faint")
|
|
message = "<B>[src]</B> faints."
|
|
if(src.sleeping)
|
|
return //Can't faint while asleep
|
|
src.sleeping += 10 //Short-short nap
|
|
m_type = 1
|
|
|
|
if ("cough")
|
|
if(miming)
|
|
message = "<B>[src]</B> appears to cough!"
|
|
m_type = 1
|
|
else
|
|
if (!muzzled)
|
|
message = "<B>[src]</B> coughs!"
|
|
m_type = 2
|
|
else
|
|
message = "<B>[src]</B> makes a strong noise."
|
|
m_type = 2
|
|
|
|
if ("frown")
|
|
message = "<B>[src]</B> frowns."
|
|
m_type = 1
|
|
|
|
if ("nod")
|
|
message = "<B>[src]</B> nods."
|
|
m_type = 1
|
|
|
|
if ("blush")
|
|
message = "<B>[src]</B> blushes."
|
|
m_type = 1
|
|
|
|
if ("wave")
|
|
message = "<B>[src]</B> waves."
|
|
m_type = 1
|
|
|
|
if ("gasp")
|
|
if(miming)
|
|
message = "<B>[src]</B> appears to be gasping!"
|
|
m_type = 1
|
|
else
|
|
if (!muzzled)
|
|
message = "<B>[src]</B> gasps!"
|
|
m_type = 2
|
|
else
|
|
message = "<B>[src]</B> makes a weak noise."
|
|
m_type = 2
|
|
|
|
if ("deathgasp")
|
|
message = "<B>[src]</B> [species.death_message]"
|
|
m_type = 1
|
|
|
|
if ("giggle")
|
|
if(miming)
|
|
message = "<B>[src]</B> giggles silently!"
|
|
m_type = 1
|
|
else
|
|
if (!muzzled)
|
|
message = "<B>[src]</B> giggles."
|
|
m_type = 2
|
|
else
|
|
message = "<B>[src]</B> makes a noise."
|
|
m_type = 2
|
|
|
|
if ("glare")
|
|
var/M = null
|
|
if (param)
|
|
for (var/mob/A in view(null, null))
|
|
if (param == A.name)
|
|
M = A
|
|
break
|
|
if (!M)
|
|
param = null
|
|
|
|
if (param)
|
|
message = "<B>[src]</B> glares at [param]."
|
|
else
|
|
message = "<B>[src]</B> glares."
|
|
|
|
if ("stare")
|
|
var/M = null
|
|
if (param)
|
|
for (var/mob/A in view(null, null))
|
|
if (param == A.name)
|
|
M = A
|
|
break
|
|
if (!M)
|
|
param = null
|
|
|
|
if (param)
|
|
message = "<B>[src]</B> stares at [param]."
|
|
else
|
|
message = "<B>[src]</B> stares."
|
|
|
|
if ("look")
|
|
var/M = null
|
|
if (param)
|
|
for (var/mob/A in view(null, null))
|
|
if (param == A.name)
|
|
M = A
|
|
break
|
|
|
|
if (!M)
|
|
param = null
|
|
|
|
if (param)
|
|
message = "<B>[src]</B> looks at [param]."
|
|
else
|
|
message = "<B>[src]</B> looks."
|
|
m_type = 1
|
|
|
|
if ("grin")
|
|
message = "<B>[src]</B> grins."
|
|
m_type = 1
|
|
|
|
if ("cry")
|
|
if(miming)
|
|
message = "<B>[src]</B> cries."
|
|
m_type = 1
|
|
else
|
|
if (!muzzled)
|
|
message = "<B>[src]</B> cries."
|
|
m_type = 2
|
|
else
|
|
message = "<B>[src]</B> makes a weak noise. \He frowns."
|
|
m_type = 2
|
|
|
|
if ("sigh")
|
|
if(miming)
|
|
message = "<B>[src]</B> sighs."
|
|
m_type = 1
|
|
else
|
|
if (!muzzled)
|
|
message = "<B>[src]</B> sighs."
|
|
m_type = 2
|
|
else
|
|
message = "<B>[src]</B> makes a weak noise."
|
|
m_type = 2
|
|
|
|
if ("laugh")
|
|
if(miming)
|
|
message = "<B>[src]</B> acts out a laugh."
|
|
m_type = 1
|
|
else
|
|
if (!muzzled)
|
|
message = "<B>[src]</B> laughs."
|
|
m_type = 2
|
|
else
|
|
message = "<B>[src]</B> makes a noise."
|
|
m_type = 2
|
|
|
|
if ("mumble")
|
|
message = "<B>[src]</B> mumbles!"
|
|
m_type = 2
|
|
if(miming)
|
|
m_type = 1
|
|
|
|
if ("grumble")
|
|
if(miming)
|
|
message = "<B>[src]</B> grumbles!"
|
|
m_type = 1
|
|
if (!muzzled)
|
|
message = "<B>[src]</B> grumbles!"
|
|
m_type = 2
|
|
else
|
|
message = "<B>[src]</B> makes a noise."
|
|
m_type = 2
|
|
|
|
if ("groan")
|
|
if(miming)
|
|
message = "<B>[src]</B> appears to groan!"
|
|
m_type = 1
|
|
else
|
|
if (!muzzled)
|
|
message = "<B>[src]</B> groans!"
|
|
m_type = 2
|
|
else
|
|
message = "<B>[src]</B> makes a loud noise."
|
|
m_type = 2
|
|
|
|
if ("moan")
|
|
if(miming)
|
|
message = "<B>[src]</B> appears to moan!"
|
|
m_type = 1
|
|
else
|
|
message = "<B>[src]</B> moans!"
|
|
m_type = 2
|
|
|
|
if ("johnny")
|
|
var/M
|
|
if (param)
|
|
M = param
|
|
if (!M)
|
|
param = null
|
|
else
|
|
if(miming)
|
|
message = "<B>[src]</B> takes a drag from a cigarette and blows \"[M]\" out in smoke."
|
|
m_type = 1
|
|
else
|
|
message = "<B>[src]</B> says, \"[M], please. He had a family.\" [src.name] takes a drag from a cigarette and blows their name out in smoke."
|
|
m_type = 2
|
|
|
|
if ("point")
|
|
if (!src.restrained())
|
|
var/mob/M = null
|
|
if (param)
|
|
for (var/atom/A as mob|obj|turf|area in view(null, null))
|
|
if (param == A.name)
|
|
M = A
|
|
break
|
|
|
|
if (!M)
|
|
message = "<B>[src]</B> points."
|
|
else
|
|
pointed(M)
|
|
|
|
if (M)
|
|
message = "<B>[src]</B> points to [M]."
|
|
else
|
|
m_type = 1
|
|
|
|
if ("raise")
|
|
if (!src.restrained())
|
|
message = "<B>[src]</B> raises a hand."
|
|
m_type = 1
|
|
|
|
if("shake")
|
|
message = "<B>[src]</B> shakes \his head."
|
|
m_type = 1
|
|
|
|
if ("shrug")
|
|
message = "<B>[src]</B> shrugs."
|
|
m_type = 1
|
|
|
|
if ("signal")
|
|
if (!src.restrained())
|
|
var/t1 = round(text2num(param))
|
|
if (isnum(t1))
|
|
if (t1 <= 5 && (!src.r_hand || !src.l_hand))
|
|
message = "<B>[src]</B> raises [t1] finger\s."
|
|
else if (t1 <= 10 && (!src.r_hand && !src.l_hand))
|
|
message = "<B>[src]</B> raises [t1] finger\s."
|
|
m_type = 1
|
|
|
|
if ("smile")
|
|
message = "<B>[src]</B> smiles."
|
|
m_type = 1
|
|
|
|
if ("shiver")
|
|
message = "<B>[src]</B> shivers."
|
|
m_type = 2
|
|
if(miming)
|
|
m_type = 1
|
|
|
|
if ("pale")
|
|
message = "<B>[src]</B> goes pale for a second."
|
|
m_type = 1
|
|
|
|
if ("tremble")
|
|
message = "<B>[src]</B> trembles in fear!"
|
|
m_type = 1
|
|
|
|
if ("sneeze")
|
|
if (miming)
|
|
message = "<B>[src]</B> sneezes."
|
|
m_type = 1
|
|
else
|
|
if (!muzzled)
|
|
message = "<B>[src]</B> sneezes."
|
|
m_type = 2
|
|
else
|
|
message = "<B>[src]</B> makes a strange noise."
|
|
m_type = 2
|
|
|
|
if ("sniff")
|
|
message = "<B>[src]</B> sniffs."
|
|
m_type = 2
|
|
if(miming)
|
|
m_type = 1
|
|
|
|
if ("snore")
|
|
if (miming)
|
|
message = "<B>[src]</B> sleeps soundly."
|
|
m_type = 1
|
|
else
|
|
if (!muzzled)
|
|
message = "<B>[src]</B> snores."
|
|
m_type = 2
|
|
else
|
|
message = "<B>[src]</B> makes a noise."
|
|
m_type = 2
|
|
|
|
if ("whimper")
|
|
if (miming)
|
|
message = "<B>[src]</B> appears hurt."
|
|
m_type = 1
|
|
else
|
|
if (!muzzled)
|
|
message = "<B>[src]</B> whimpers."
|
|
m_type = 2
|
|
else
|
|
message = "<B>[src]</B> makes a weak noise."
|
|
m_type = 2
|
|
|
|
if ("wink")
|
|
message = "<B>[src]</B> winks."
|
|
m_type = 1
|
|
|
|
if ("yawn")
|
|
if (!muzzled)
|
|
message = "<B>[src]</B> yawns."
|
|
m_type = 2
|
|
if(miming)
|
|
m_type = 1
|
|
|
|
if ("collapse")
|
|
Paralyse(2)
|
|
message = "<B>[src]</B> collapses!"
|
|
m_type = 2
|
|
if(miming)
|
|
m_type = 1
|
|
|
|
if("hug")
|
|
m_type = 1
|
|
if (!src.restrained())
|
|
var/M = null
|
|
if (param)
|
|
for (var/mob/A in view(1, null))
|
|
if (param == A.name)
|
|
M = A
|
|
break
|
|
if (M == src)
|
|
M = null
|
|
|
|
if (M)
|
|
message = "<B>[src]</B> hugs [M]."
|
|
else
|
|
message = "<B>[src]</B> hugs \himself."
|
|
|
|
if ("handshake")
|
|
m_type = 1
|
|
if (!src.restrained() && !src.r_hand)
|
|
var/mob/M = null
|
|
if (param)
|
|
for (var/mob/A in view(1, null))
|
|
if (param == A.name)
|
|
M = A
|
|
break
|
|
if (M == src)
|
|
M = null
|
|
|
|
if (M)
|
|
if (M.canmove && !M.r_hand && !M.restrained())
|
|
message = "<B>[src]</B> shakes hands with [M]."
|
|
else
|
|
message = "<B>[src]</B> holds out \his hand to [M]."
|
|
|
|
if("dap")
|
|
m_type = 1
|
|
if (!src.restrained())
|
|
var/M = null
|
|
if (param)
|
|
for (var/mob/A in view(1, null))
|
|
if (param == A.name)
|
|
M = A
|
|
break
|
|
if (M)
|
|
message = "<B>[src]</B> gives daps to [M]."
|
|
else
|
|
message = "<B>[src]</B> sadly can't find anybody to give daps to, and daps \himself. Shameful."
|
|
|
|
if ("scream")
|
|
if (miming)
|
|
message = "<B>[src]</B> acts out a scream!"
|
|
m_type = 1
|
|
else
|
|
if (!muzzled)
|
|
message = "<B>[src]</B> screams!"
|
|
m_type = 2
|
|
else
|
|
message = "<B>[src]</B> makes a very loud noise."
|
|
m_type = 2
|
|
|
|
if("swish")
|
|
src.animate_tail_once()
|
|
|
|
if("wag", "sway")
|
|
src.animate_tail_start()
|
|
|
|
if("qwag", "fastsway")
|
|
src.animate_tail_fast()
|
|
|
|
if("swag", "stopsway")
|
|
src.animate_tail_stop()
|
|
|
|
if ("help")
|
|
src << {"blink, blink_r, blush, bow-(none)/mob, burp, choke, chuckle, clap, collapse, cough,
|
|
cry, custom, deathgasp, drool, eyebrow, frown, gasp, giggle, groan, grumble, handshake, hug-(none)/mob, glare-(none)/mob,
|
|
grin, laugh, look-(none)/mob, moan, mumble, nod, pale, point-atom, raise, salute, shake, shiver, shrug,
|
|
sigh, signal-#1-10, smile, sneeze, sniff, snore, stare-(none)/mob, tremble, twitch, twitch_s, whimper,
|
|
wink, yawn, swish, sway/wag, fastsway/qwag, stopsway/swag"}
|
|
|
|
else
|
|
src << "\blue Unusable emote '[act]'. Say *help for a list."
|
|
|
|
|
|
|
|
|
|
|
|
if (message)
|
|
log_emote("[name]/[key] : [message]")
|
|
|
|
//Hearing gasp and such every five seconds is not good emotes were not global for a reason.
|
|
// Maybe some people are okay with that.
|
|
|
|
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 get_mobs_in_view(world.view,src))
|
|
O.show_message(message, m_type)
|
|
else if (m_type & 2)
|
|
for (var/mob/O in (hearers(src.loc, null) | get_mobs_in_view(world.view,src)))
|
|
O.show_message(message, m_type)
|
|
|
|
|
|
/mob/living/carbon/human/verb/pose()
|
|
set name = "Set Pose"
|
|
set desc = "Sets a description which will be shown when someone examines you."
|
|
set category = "IC"
|
|
|
|
pose = sanitize(input(usr, "This is [src]. \He is...", "Pose", null) as text)
|
|
|
|
/mob/living/carbon/human/verb/set_flavor()
|
|
set name = "Set Flavour Text"
|
|
set desc = "Sets an extended description of your character's features."
|
|
set category = "IC"
|
|
|
|
var/HTML = "<body>"
|
|
HTML += "<tt><center>"
|
|
HTML += "<b>Update Flavour Text</b> <hr />"
|
|
HTML += "<br></center>"
|
|
HTML += "<a href='byond://?src=\ref[src];flavor_change=general'>General:</a> "
|
|
HTML += TextPreview(flavor_texts["general"])
|
|
HTML += "<br>"
|
|
HTML += "<a href='byond://?src=\ref[src];flavor_change=head'>Head:</a> "
|
|
HTML += TextPreview(flavor_texts["head"])
|
|
HTML += "<br>"
|
|
HTML += "<a href='byond://?src=\ref[src];flavor_change=face'>Face:</a> "
|
|
HTML += TextPreview(flavor_texts["face"])
|
|
HTML += "<br>"
|
|
HTML += "<a href='byond://?src=\ref[src];flavor_change=eyes'>Eyes:</a> "
|
|
HTML += TextPreview(flavor_texts["eyes"])
|
|
HTML += "<br>"
|
|
HTML += "<a href='byond://?src=\ref[src];flavor_change=torso'>Body:</a> "
|
|
HTML += TextPreview(flavor_texts["torso"])
|
|
HTML += "<br>"
|
|
HTML += "<a href='byond://?src=\ref[src];flavor_change=arms'>Arms:</a> "
|
|
HTML += TextPreview(flavor_texts["arms"])
|
|
HTML += "<br>"
|
|
HTML += "<a href='byond://?src=\ref[src];flavor_change=hands'>Hands:</a> "
|
|
HTML += TextPreview(flavor_texts["hands"])
|
|
HTML += "<br>"
|
|
HTML += "<a href='byond://?src=\ref[src];flavor_change=legs'>Legs:</a> "
|
|
HTML += TextPreview(flavor_texts["legs"])
|
|
HTML += "<br>"
|
|
HTML += "<a href='byond://?src=\ref[src];flavor_change=feet'>Feet:</a> "
|
|
HTML += TextPreview(flavor_texts["feet"])
|
|
HTML += "<br>"
|
|
HTML += "<hr />"
|
|
HTML +="<a href='?src=\ref[src];flavor_change=done'>\[Done\]</a>"
|
|
HTML += "<tt>"
|
|
src << browse(HTML, "window=flavor_changes;size=430x300")
|