From e3ce2af09bdc4cbc7f919b5e1f3b560fe3667d6f Mon Sep 17 00:00:00 2001 From: lm40 Date: Sun, 14 Aug 2022 00:03:54 -0400 Subject: [PATCH] Buffs make/unmake mentor --- code/modules/mentor/mentor.dm | 14 +++++++++----- code/modules/mentor/mentorhelp.dm | 4 ++-- code/modules/vchat/css/ss13styles.css | 1 + code/stylesheet.dm | 1 + 4 files changed, 13 insertions(+), 7 deletions(-) diff --git a/code/modules/mentor/mentor.dm b/code/modules/mentor/mentor.dm index fe7a11721f2..27c0f93aefd 100644 --- a/code/modules/mentor/mentor.dm +++ b/code/modules/mentor/mentor.dm @@ -31,6 +31,8 @@ var/list/mentor_verbs_default = list( GLOB.mentors -= owner owner.remove_mentor_verbs() owner.mentorholder = null + mentor_datums[owner.ckey] = null + qdel(src) /client/proc/add_mentor_verbs() if(mentorholder) @@ -56,7 +58,7 @@ var/list/mentor_verbs_default = list( if(C.holder) to_chat(src, "Error: You cannot make an admin a mentor.") return - var/datum/mentor/M = new /datum/mentor(C.key) + var/datum/mentor/M = new /datum/mentor(C.ckey) M.associate(C) to_chat(C, "You have been granted mentorship.") to_chat(src, "You have made [C] a mentor.") @@ -121,7 +123,9 @@ var/list/mentor_verbs_default = list( /client/proc/cmd_dementor() set category = "Admin" set name = "De-mentor" - src.mentorholder.disassociate() + + if(tgui_alert(usr, "Confirm self-dementor for the round? You can't re-mentor yourself without someone promoting you.","Dementor",list("Yes","No")) == "Yes") + src.mentorholder.disassociate() /client/proc/cmd_mhelp_reply(whom) if(prefs.muted & MUTE_ADMINHELP) @@ -204,7 +208,7 @@ var/list/mentor_verbs_default = list( if(!msg) return - var/interaction_message = "Mentor-PM from-[src] to-[recipient]: [msg]" + var/interaction_message = "Mentor-PM from-[src] to-[recipient]: [msg]" if (recipient.current_mentorhelp && !(recipient.mentorholder || recipient.holder)) recipient.current_mentorhelp.AddInteraction(interaction_message) @@ -218,8 +222,8 @@ var/list/mentor_verbs_default = list( if (src.current_mentorhelp) src.current_mentorhelp.AddInteraction(interaction_message) - to_chat(recipient, "Mentor-PM from-[src]: [msg]") - to_chat(src, "Mentor-PM to-[recipient]: [msg]") + to_chat(recipient, "Mentor-PM from-[src]: [msg]") + to_chat(src, "Mentor-PM to-[recipient]: [msg]") log_admin("[key_name(src)] sent [msg] to [key_name(recipient)]") diff --git a/code/modules/mentor/mentorhelp.dm b/code/modules/mentor/mentorhelp.dm index 2dfd049359f..1fd89b1dc16 100644 --- a/code/modules/mentor/mentorhelp.dm +++ b/code/modules/mentor/mentorhelp.dm @@ -163,7 +163,7 @@ GLOBAL_DATUM_INIT(mhelp_tickets, /datum/mentor_help_tickets, new) log_admin("Mentorhelp: [key_name(C)] sent [msg]") MessageNoRecipient(msg) //show it to the person adminhelping too - to_chat(C, "PM to-Mentors: [name]") + to_chat(C, "PM to-Mentors: [name]") GLOB.mhelp_tickets.active_tickets += src @@ -197,7 +197,7 @@ GLOBAL_DATUM_INIT(mhelp_tickets, /datum/mentor_help_tickets, new) //message from the initiator without a target, all admins will see this /datum/mentor_help/proc/MessageNoRecipient(msg) var/ref_src = "\ref[src]" - var/chat_msg = "Ticket [TicketHref("#[id]", ref_src)]: [LinkedReplyName(ref_src)]: [msg]" + var/chat_msg = "Ticket [TicketHref("#[id]", ref_src)]: [LinkedReplyName(ref_src)]: [msg]" AddInteraction("[LinkedReplyName(ref_src)]: [msg]") for (var/client/C in GLOB.mentors) if (C.is_preference_enabled(/datum/client_preference/holder/play_adminhelp_ping)) diff --git a/code/modules/vchat/css/ss13styles.css b/code/modules/vchat/css/ss13styles.css index 3b1405f5231..9ffa85f3163 100644 --- a/code/modules/vchat/css/ss13styles.css +++ b/code/modules/vchat/css/ss13styles.css @@ -90,6 +90,7 @@ body.inverted { .pm .other {color: #0000ff;} /* Admin: Channels */ +.mentor {color: #ff9933;} .mentor_channel {color: #ff9933; font-weight: bold;} .mod_channel {color: #735638; font-weight: bold;} .mod_channel .admin {color: #b82e00; font-weight: bold;} diff --git a/code/stylesheet.dm b/code/stylesheet.dm index de6c4dd8a77..7f426a06fb5 100644 --- a/code/stylesheet.dm +++ b/code/stylesheet.dm @@ -35,6 +35,7 @@ em {font-style: normal;font-weight: bold;} /* Admin: Channels */ .mentor_channel {color: #ff9933; font-weight: bold;} +.mentor {color: #ff9933;} .mod_channel {color: #735638; font-weight: bold;} .mod_channel .admin {color: #b82e00; font-weight: bold;} .admin_channel {color: #9611D4; font-weight: bold;}