diff --git a/code/__DEFINES/citadel_defines.dm b/code/__DEFINES/citadel_defines.dm index 99b15362c8..c61890c6bc 100644 --- a/code/__DEFINES/citadel_defines.dm +++ b/code/__DEFINES/citadel_defines.dm @@ -108,7 +108,7 @@ //Brainslugs #define isborer(A) (istype(A, /mob/living/simple_animal/borer)) -#define CITADEL_MENTOR_OOC_COLOUR "#ad396e" +#define CITADEL_MENTOR_OOC_COLOUR "#224724" //stamina stuff #define STAMINA_SOFTCRIT 100 //softcrit for stamina damage. prevents standing up, prevents performing actions that cost stamina, etc, but doesn't force a rest or stop movement diff --git a/code/modules/admin/admin.dm b/code/modules/admin/admin.dm index 1f818b442e..5cdc58dae3 100644 --- a/code/modules/admin/admin.dm +++ b/code/modules/admin/admin.dm @@ -53,11 +53,6 @@ body += "\[set\] " body += "\[zero\]" - body += "

" - body += "Make mentor | " - body += "Remove mentor" - body += "
" - body += "

\[ " body += "VV - " if(M.mind) @@ -184,6 +179,8 @@ body += "Thunderdome Admin | " body += "Thunderdome Observer | " + body += usr.client.citaPPoptions(M) // CITADEL + body += "
" body += "" diff --git a/code/modules/admin/secrets.dm b/code/modules/admin/secrets.dm index 77038ee572..726ea19348 100644 --- a/code/modules/admin/secrets.dm +++ b/code/modules/admin/secrets.dm @@ -9,6 +9,7 @@
Show Job Debug
Admin Log
+ Mentor Log
Show Admin List

"} diff --git a/code/modules/client/client_procs.dm b/code/modules/client/client_procs.dm index 6ad71221e3..2ab55911ad 100644 --- a/code/modules/client/client_procs.dm +++ b/code/modules/client/client_procs.dm @@ -87,14 +87,11 @@ GLOBAL_LIST_INIT(blacklisted_builds, list( if(href_list["priv_msg"]) cmd_admin_pm(href_list["priv_msg"],null) return - // Mentor PM - if(href_list["mentor_msg"]) - if(CONFIG_GET(flag.mentors_mobname_only)) - var/mob/M = locate(href_list["mentor_msg"]) - cmd_mentor_pm(M,null) - else - cmd_mentor_pm(href_list["mentor_msg"],null) + + // CITADEL Start - Mentor PM + if (citadel_client_procs(href_list)) return + // CITADEL End switch(href_list["_src_"]) if("holder") diff --git a/modular_citadel/code/modules/client/client_procs.dm b/modular_citadel/code/modules/client/client_procs.dm index 511aac0738..3b91deb6e5 100644 --- a/modular_citadel/code/modules/client/client_procs.dm +++ b/modular_citadel/code/modules/client/client_procs.dm @@ -1,3 +1,24 @@ +/client/New() + . = ..() + mentor_datum_set() + +/client/proc/citadel_client_procs(href_list) + if(href_list["mentor_msg"]) + if(CONFIG_GET(flag/mentors_mobname_only)) + var/mob/M = locate(href_list["mentor_msg"]) + cmd_mentor_pm(M,null) + else + cmd_mentor_pm(href_list["mentor_msg"],null) + return TRUE + + //Mentor Follow + if(href_list["mentor_follow"]) + var/mob/living/M = locate(href_list["mentor_follow"]) + + if(istype(M)) + mentor_follow(M) + return TRUE + /client/proc/mentor_datum_set(admin) mentor_datum = GLOB.mentor_datums[ckey] if(!mentor_datum && check_rights_for(src, R_ADMIN,0)) // admin with no mentor datum?let's fix that diff --git a/modular_citadel/code/modules/mentor/follow.dm b/modular_citadel/code/modules/mentor/follow.dm index 7c53c5c0fb..6695155ad0 100644 --- a/modular_citadel/code/modules/mentor/follow.dm +++ b/modular_citadel/code/modules/mentor/follow.dm @@ -23,4 +23,4 @@ verbs -= /client/proc/mentor_unfollow to_chat(GLOB.admins, "MENTOR: [key_name(usr)] is no longer following [key_name(mentor_datum.following)]") log_mentor("[key_name(usr)] stopped following [key_name(mentor_datum.following)]") - mentor_datum.following = null + mentor_datum.following = null \ No newline at end of file diff --git a/modular_citadel/code/modules/mentor/mentor.dm b/modular_citadel/code/modules/mentor/mentor.dm index e0cdf565b6..036c950e43 100644 --- a/modular_citadel/code/modules/mentor/mentor.dm +++ b/modular_citadel/code/modules/mentor/mentor.dm @@ -57,29 +57,6 @@ GLOBAL_PROTECT(mentor_href_token) /proc/MentorHrefToken(forceGlobal = FALSE) return "mentor_token=[RawMentorHrefToken(forceGlobal)]" -/datum/mentors/Topic(href, href_list) - ..() - if(!usr || !usr.client || usr.client != owner || !usr.client.is_mentor()) - return - if(!CheckMentorHREF(href, href_list)) - return - if(href_list["mentor_msg"]) - if(CONFIG_GET(flag/mentors_mobname_only)) - var/mob/M = locate(href_list["mentor_msg"]) - usr.client.cmd_mentor_pm(M,null) - else - usr.client.cmd_mentor_pm(href_list["mentor_msg"],null) - return - - //Mentor Follow - if(href_list["mentor_follow"]) - var/mob/living/M = locate(href_list["mentor_follow"]) - - if(istype(M)) - usr.client.mentor_follow(M) - - return - /proc/load_mentors() GLOB.mentor_datums.Cut() for(var/client/C in GLOB.mentors) diff --git a/modular_citadel/code/modules/mentor/mentor_verbs.dm b/modular_citadel/code/modules/mentor/mentor_verbs.dm index ae23cbf5d6..b8797e3ef9 100644 --- a/modular_citadel/code/modules/mentor/mentor_verbs.dm +++ b/modular_citadel/code/modules/mentor/mentor_verbs.dm @@ -9,4 +9,4 @@ GLOBAL_LIST_INIT(mentor_verbs, list( verbs += GLOB.mentor_verbs /client/proc/remove_mentor_verbs() - verbs -= GLOB.mentor_verbs + verbs -= GLOB.mentor_verbs \ No newline at end of file diff --git a/modular_citadel/code/modules/mentor/mentorpm.dm b/modular_citadel/code/modules/mentor/mentorpm.dm index 881933d5d6..dc63cb01d2 100644 --- a/modular_citadel/code/modules/mentor/mentorpm.dm +++ b/modular_citadel/code/modules/mentor/mentorpm.dm @@ -35,10 +35,18 @@ if(!msg) msg = input(src,"Message:", "Private message") as text|null - if(!msg) return + if(!msg) + return + if(!C) - if(is_mentor()) to_chat(src, "Error: Mentor-PM: Client not found.") - else mentorhelp(msg) //Mentor we are replying to has vanished, Mentorhelp instead (how the fuck does this work?let's hope it works,shrug) + if(is_mentor()) + to_chat(src, "Error: Mentor-PM: Client not found.") + else + mentorhelp(msg) //Mentor we are replying to has vanished, Mentorhelp instead (how the fuck does this work?let's hope it works,shrug) + return + + // Neither party is a mentor, they shouldn't be PMing! + if (!C.is_mentor() && !is_mentor()) return msg = sanitize(copytext(msg,1,MAX_MESSAGE_LEN)) diff --git a/modular_citadel/code/modules/mentor/mentorsay.dm b/modular_citadel/code/modules/mentor/mentorsay.dm index b921f8863a..6baf969251 100644 --- a/modular_citadel/code/modules/mentor/mentorsay.dm +++ b/modular_citadel/code/modules/mentor/mentorsay.dm @@ -15,4 +15,4 @@ msg = "MENTOR: [key_name(src, 0, 0)]: [msg]" else msg = "MENTOR: [key_name(src, 0, 0)]: [msg]" - to_chat(GLOB.admins | GLOB.mentors, msg) + to_chat(GLOB.admins | GLOB.mentors, msg) \ No newline at end of file