mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-10 02:09:41 +00:00
217 lines
4.5 KiB
Plaintext
217 lines
4.5 KiB
Plaintext
/mob/living/silicon/robot/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))
|
|
|
|
switch(act)
|
|
if ("me")
|
|
if (src.client)
|
|
if(client.prefs.muted & MUTE_IC)
|
|
src << "You cannot send IC messages (muted)."
|
|
return
|
|
if (src.client.handle_spam_prevention(message,MUTE_IC))
|
|
return
|
|
if (stat)
|
|
return
|
|
if(!(message))
|
|
return
|
|
else
|
|
return custom_emote(m_type, message)
|
|
|
|
if ("custom")
|
|
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 = "salutes to [param]."
|
|
else
|
|
message = "salutes."
|
|
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 = "bows to [param]."
|
|
else
|
|
message = "bows."
|
|
m_type = 1
|
|
|
|
if ("clap")
|
|
if (!src.restrained())
|
|
message = "claps."
|
|
m_type = 2
|
|
if ("flap")
|
|
if (!src.restrained())
|
|
message = "flaps its wings."
|
|
m_type = 2
|
|
|
|
if ("aflap")
|
|
if (!src.restrained())
|
|
message = "flaps its wings ANGRILY!"
|
|
m_type = 2
|
|
|
|
if ("twitch")
|
|
message = "twitches violently."
|
|
m_type = 1
|
|
|
|
if ("twitch_s")
|
|
message = "twitches."
|
|
m_type = 1
|
|
|
|
if ("nod")
|
|
message = "nods."
|
|
m_type = 1
|
|
|
|
if ("deathgasp")
|
|
message = "shudders violently for a moment, then becomes motionless, its eyes slowly darkening."
|
|
m_type = 1
|
|
|
|
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 = "glares at [param]."
|
|
else
|
|
message = "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 = "stares at [param]."
|
|
else
|
|
message = "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 = "looks at [param]."
|
|
else
|
|
message = "looks."
|
|
m_type = 1
|
|
|
|
if("beep")
|
|
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 = "beeps at [param]."
|
|
else
|
|
message = "beeps."
|
|
playsound(src.loc, 'sound/machines/twobeep.ogg', 50, 0)
|
|
m_type = 1
|
|
|
|
if("ping")
|
|
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 = "pings at [param]."
|
|
else
|
|
message = "pings."
|
|
playsound(src.loc, 'sound/machines/ping.ogg', 50, 0)
|
|
m_type = 1
|
|
|
|
if("buzz")
|
|
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 = "buzzes at [param]."
|
|
else
|
|
message = "buzzes."
|
|
playsound(src.loc, 'sound/machines/buzz-sigh.ogg', 50, 0)
|
|
m_type = 1
|
|
|
|
if("law")
|
|
if (istype(module,/obj/item/weapon/robot_module/security))
|
|
message = "shows its legal authorization barcode."
|
|
|
|
playsound(src.loc, 'sound/voice/biamthelaw.ogg', 50, 0)
|
|
m_type = 2
|
|
else
|
|
src << "You are not THE LAW, pal."
|
|
|
|
if("halt")
|
|
if (istype(module,/obj/item/weapon/robot_module/security))
|
|
message = "<B>[src]</B>'s speakers skreech, \"Halt! Security!\"."
|
|
|
|
playsound(src.loc, 'sound/voice/halt.ogg', 50, 0)
|
|
m_type = 2
|
|
else
|
|
src << "You are not security."
|
|
|
|
if ("help")
|
|
src << "salute, bow-(none)/mob, clap, flap, aflap, twitch, twitch_s, nod, deathgasp, glare-(none)/mob, stare-(none)/mob, look, beep, ping, \nbuzz, law, halt"
|
|
else
|
|
src << "\blue Unusable emote '[act]'. Say *help for a list."
|
|
|
|
if ((message && src.stat == 0))
|
|
custom_emote(m_type,message)
|
|
|
|
return
|