Merge pull request #6410 from Kyep/ahelp_take

Adds 'take ahelp' option on ahelp/mhelp
This commit is contained in:
Fox McCloud
2017-02-18 08:30:14 -05:00
committed by GitHub
2 changed files with 19 additions and 2 deletions
+17
View File
@@ -1533,6 +1533,23 @@
else if(href_list["check_antagonist"])
check_antagonists()
else if(href_list["take_question"])
var/mob/M = locateUID(href_list["take_question"])
var/is_mhelp = href_list["is_mhelp"]
if(ismob(M))
var/helptype = "ADMINHELP"
if(is_mhelp)
helptype = "MENTORHELP"
var/take_msg = "<span class='notice'><b>[helptype]</b>: <b>[key_name(usr.client)]</b> is attending to <b>[key_name(M)]'s</b> question.</span>"
for(var/client/X in admins)
if(check_rights(R_ADMIN, 0, X.mob))
to_chat(X, take_msg)
else if(is_mhelp && check_rights(R_MOD|R_MENTOR, 0, X.mob))
to_chat(X, take_msg)
to_chat(M, "<span class='notice'><b>Your question is being attended to by [key_name(usr.client)]. Thanks for your patience!</b></span>")
else
to_chat(usr, "<span class='warning'>Unable to locate mob.</span>")
else if(href_list["cult_nextobj"])
if(alert(usr, "Validate the current Cult objective and unlock the next one?", "Cult Cheat Code", "Yes", "No") != "Yes")
return