* Maps and things no code/icons * helpers defines globalvars * Onclick world.dm orphaned_procs * subsystems Round vote and shuttle autocall done here too * datums * Game folder * Admin - chatter modules * clothing - mining * modular computers - zambies * client * mob level 1 * mob stage 2 + simple_animal * silicons n brains * mob stage 3 + Alien/Monkey * human mobs * icons updated * some sounds * emitter y u no commit * update tgstation.dme * compile fixes * travis fixes Also removes Fast digest mode, because reasons. * tweaks for travis Mentors are broke again Also fixes Sizeray guns * oxygen loss fix for vore code. * removes unused code * some code updates * bulk fixes * further fixes * outside things * whoops. * Maint bar ported * GLOBs.
101 lines
2.6 KiB
Plaintext
101 lines
2.6 KiB
Plaintext
/client/verb/mentorhelp(msg as text)
|
|
set category = "Mentor"
|
|
set name = "mentorhelp"
|
|
|
|
//remove out adminhelp verb temporarily to prevent spamming of mentors.
|
|
src.verbs -= /client/verb/mentorhelp
|
|
spawn(300)
|
|
src.verbs += /client/verb/mentorhelp // 30 second cool-down for mentorhelp
|
|
|
|
//clean the input msg
|
|
if(!msg) return
|
|
msg = sanitize(copytext(msg,1,MAX_MESSAGE_LEN))
|
|
if(!msg) return
|
|
if(!mob) return //this doesn't happen
|
|
|
|
var/show_char = config.mentors_mobname_only
|
|
var/mentor_msg = "<span class='mentornotice'><b><font color='purple'>MENTORHELP:</b> <b>[key_name_mentor(src, 1, 0, 0, show_char)]</b>: [msg]</font></span>"
|
|
var/admin_msg = "<span class='mentornotice'><b><font color='purple'>MENTORHELP:</b> <b>[ADMIN_FULLMONTY(src.mob)]</b>: [msg]</font></span>"
|
|
log_mentor("MENTORHELP: [key_name_mentor(src, 0, 0, 0, 0)]: [msg]")
|
|
|
|
for(var/client/X in GLOB.mentors)
|
|
to_chat(X, 'sound/items/bikehorn.ogg')
|
|
to_chat(X, mentor_msg)
|
|
|
|
for(var/client/A in GLOB.admins)
|
|
to_chat(A, 'sound/items/bikehorn.ogg')
|
|
to_chat(A, admin_msg)
|
|
|
|
to_chat(src, "<span class='mentornotice'><font color='purple'>PM to-<b>Mentors</b>: [msg]</font></span>")
|
|
return
|
|
|
|
/proc/get_mentor_counts()
|
|
. = list("total" = 0, "afk" = 0, "present" = 0)
|
|
for(var/client/X in GLOB.mentors)
|
|
.["total"]++
|
|
if(X.is_afk())
|
|
.["afk"]++
|
|
else
|
|
.["present"]++
|
|
|
|
/proc/key_name_mentor(var/whom, var/include_link = null, var/include_name = 0, var/include_follow = 0, var/char_name_only = 0)
|
|
var/mob/M
|
|
var/client/C
|
|
var/key
|
|
var/ckey
|
|
|
|
if(!whom) return "*null*"
|
|
if(istype(whom, /client))
|
|
C = whom
|
|
M = C.mob
|
|
key = C.key
|
|
ckey = C.ckey
|
|
else if(ismob(whom))
|
|
M = whom
|
|
C = M.client
|
|
key = M.key
|
|
ckey = M.ckey
|
|
else if(istext(whom))
|
|
key = whom
|
|
ckey = ckey(whom)
|
|
C = GLOB.directory[ckey]
|
|
if(C)
|
|
M = C.mob
|
|
else
|
|
return "*invalid*"
|
|
|
|
. = ""
|
|
|
|
if(!ckey)
|
|
include_link = 0
|
|
|
|
if(key)
|
|
if(include_link)
|
|
if(config.mentors_mobname_only)
|
|
. += "<a href='?mentor_msg=\ref[M]'>"
|
|
else
|
|
. += "<a href='?mentor_msg=[ckey]'>"
|
|
|
|
if(C && C.holder && C.holder.fakekey)
|
|
. += "Administrator"
|
|
else if (char_name_only && config.mentors_mobname_only)
|
|
if(istype(C.mob,/mob/dead/new_player) || istype(C.mob, /mob/dead/observer)) //If they're in the lobby or observing, display their ckey
|
|
. += key
|
|
else if(C && C.mob) //If they're playing/in the round, only show the mob name
|
|
. += C.mob.name
|
|
else //If for some reason neither of those are applicable and they're mentorhelping, show ckey
|
|
. += key
|
|
else
|
|
. += key
|
|
if(!C)
|
|
. += "\[DC\]"
|
|
|
|
if(include_link)
|
|
. += "</a>"
|
|
else
|
|
. += "*no key*"
|
|
|
|
if(include_follow)
|
|
. += " (<a href='?mentor_follow=\ref[M]'>F</a>)"
|
|
|
|
return . |