From a602c1d8da1cddc4be61d9127540f27bb74853e0 Mon Sep 17 00:00:00 2001 From: Kyep Date: Sat, 11 Feb 2017 21:15:44 -0800 Subject: [PATCH] Adds 'take ahelp' option on ahelp Adds a 'take' option to ahelps and mentorhelps. Can be used by admins/mentors to quickly let the asker know their ahelp/mhelp is being dealt with. Other admins/mentors can see it too, so it should reduce the dogpiling effect where every online admin/mentor answers at once. Based on: https://github.com/Baystation12/Baystation12/pull/15902/files --- code/modules/admin/topic.dm | 17 +++++++++++++++++ code/modules/admin/verbs/adminhelp.dm | 4 ++-- 2 files changed, 19 insertions(+), 2 deletions(-) diff --git a/code/modules/admin/topic.dm b/code/modules/admin/topic.dm index 4a01b1161e8..a404fbe525e 100644 --- a/code/modules/admin/topic.dm +++ b/code/modules/admin/topic.dm @@ -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 = "[helptype]: [key_name(usr.client)] is attending to [key_name(M)]'s question." + 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, "Your question is being attended to by [key_name(usr.client)]. Thanks for your patience!") + else + to_chat(usr, "Unable to locate mob.") + 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 diff --git a/code/modules/admin/verbs/adminhelp.dm b/code/modules/admin/verbs/adminhelp.dm index 73b481bbc6b..972406bbdb3 100644 --- a/code/modules/admin/verbs/adminhelp.dm +++ b/code/modules/admin/verbs/adminhelp.dm @@ -109,13 +109,13 @@ var/list/adminhelp_ignored_words = list("unknown","the","a","an","of","monkey"," switch(selected_type) if("Mentorhelp") - msg = "[selected_type]: [key_name(src, 1, 1, selected_type)] (?) (PP) (VV) (SM) ([admin_jump_link(mob)]) (CA) (REJT) [ai_found ? " (CL)" : ""]: [msg]" + msg = "[selected_type]: [key_name(src, 1, 1, selected_type)] (?) (PP) (VV) (SM) ([admin_jump_link(mob)]) (CA) (REJT) [ai_found ? " (CL)" : ""] (PP) (TAKE) : [msg]" for(var/client/X in mentorholders + modholders + adminholders) if(X.prefs.sound & SOUND_ADMINHELP) X << 'sound/effects/adminhelp.ogg' to_chat(X, msg) if("Adminhelp") - msg = "[selected_type]: [key_name(src, 1, 1, selected_type)] (?) (PP) (VV) (SM) ([admin_jump_link(mob)]) (CA) (REJT) [ai_found ? " (CL)" : ""]: [msg]" + msg = "[selected_type]: [key_name(src, 1, 1, selected_type)] (?) (PP) (VV) (SM) ([admin_jump_link(mob)]) (CA) (REJT) [ai_found ? " (CL)" : ""] (PP) (TAKE) : [msg]" for(var/client/X in modholders + adminholders) if(X.prefs.sound & SOUND_ADMINHELP) X << 'sound/effects/adminhelp.ogg'