diff --git a/code/modules/admin/topic.dm b/code/modules/admin/topic.dm
index 0f6ef61ff4c..0ddf3441f77 100644
--- a/code/modules/admin/topic.dm
+++ b/code/modules/admin/topic.dm
@@ -24,16 +24,7 @@
else if(href_list["ahelp_tickets"])
GLOB.ahelp_tickets.BrowseTickets(text2num(href_list["ahelp_tickets"]))
- if(href_list["mhelp"])
- var/mhelp_ref = href_list["mhelp"]
- var/datum/mentor_help/MH = locate(mhelp_ref)
- if (MH)
- MH.Action(href_list["mhelp_action"])
- else
- to_chat(usr, "Ticket [mhelp_ref] has been deleted!")
-
- if (href_list["mhelp_tickets"])
- GLOB.mhelp_tickets.BrowseTickets(text2num(href_list["mhelp_tickets"]))
+ mentor_commands(href, href_list, src)
if(href_list["dbsearchckey"] || href_list["dbsearchadmin"])
diff --git a/code/modules/client/preference_setup/global/setting_datums.dm b/code/modules/client/preference_setup/global/setting_datums.dm
index 78694b1866a..08504f1020e 100644
--- a/code/modules/client/preference_setup/global/setting_datums.dm
+++ b/code/modules/client/preference_setup/global/setting_datums.dm
@@ -362,6 +362,12 @@ var/list/_client_preferences_by_type
enabled_description = "Popup New On Login"
disabled_description = "Do Nothing"
+/datum/client_preference/play_mentorhelp_ping
+ description = "Mentorhelps"
+ key = "SOUND_MENTORHELP"
+ enabled_description = "Hear"
+ disabled_description = "Silent"
+
/********************
* Staff Preferences *
********************/
diff --git a/code/modules/client/preferences_vr.dm b/code/modules/client/preferences_vr.dm
index db77b0ba6ee..2241246dd0d 100644
--- a/code/modules/client/preferences_vr.dm
+++ b/code/modules/client/preferences_vr.dm
@@ -104,4 +104,19 @@
L.capture_crystal = prefs.capture_crystal
SScharacter_setup.queue_preferences_save(prefs)
- feedback_add_details("admin_verb","TCaptureCrystal") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
\ No newline at end of file
+ feedback_add_details("admin_verb","TCaptureCrystal") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
+
+/client/verb/toggle_mentorhelp_ping()
+ set name = "Toggle Mentorhelp Ping"
+ set category = "Preferences"
+ set desc = "Toggles the mentorhelp ping"
+
+ var/pref_path = /datum/client_preference/play_mentorhelp_ping
+
+ toggle_preference(pref_path)
+
+ to_chat(src, "Mentorhelp pings are now [ is_preference_enabled(pref_path) ? "enabled" : "disabled"]")
+
+ SScharacter_setup.queue_preferences_save(prefs)
+
+ feedback_add_details("admin_verb", "TSoundMentorhelps")
\ No newline at end of file
diff --git a/code/modules/mentor/mentor.dm b/code/modules/mentor/mentor.dm
index 27c0f93aefd..f897e1632c4 100644
--- a/code/modules/mentor/mentor.dm
+++ b/code/modules/mentor/mentor.dm
@@ -55,8 +55,8 @@ var/list/mentor_verbs_default = list(
if(!target)
return
var/client/C = targets[target]
- if(C.holder)
- to_chat(src, "Error: You cannot make an admin a mentor.")
+ if(has_mentor_powers(C) || C.deadmin_holder) // If an admin is deadminned you could mentor them and that will cause fuckery if they readmin
+ to_chat(src, "Error: They already have mentor powers.")
return
var/datum/mentor/M = new /datum/mentor(C.ckey)
M.associate(C)
@@ -89,7 +89,7 @@ var/list/mentor_verbs_default = list(
set name ="Mentorsay"
//check rights
- if (!src.mentorholder && !src.holder)
+ if (!has_mentor_powers(src))
return
msg = sanitize(msg)
@@ -103,23 +103,28 @@ var/list/mentor_verbs_default = list(
for(var/client/C in GLOB.admins)
to_chat(C, create_text_tag("mentor", "MENTOR:", C) + " [src]: [msg]")
-/datum/mentor/Topic(href, href_list)
- if (usr.client != src.owner || (!usr.client.mentorholder))
- log_admin("[key_name(usr)] tried to illegally use mentor functions.")
- message_admins("[usr.key] tried to illegally use mentor functions.")
- return
-
+/proc/mentor_commands(href, href_list, client/C)
if(href_list["mhelp"])
var/mhelp_ref = href_list["mhelp"]
var/datum/mentor_help/MH = locate(mhelp_ref)
if (MH)
MH.Action(href_list["mhelp_action"])
else
- to_chat(usr, "Ticket [mhelp_ref] has been deleted!")
+ to_chat(C, "Ticket [mhelp_ref] has been deleted!")
if (href_list["mhelp_tickets"])
GLOB.mhelp_tickets.BrowseTickets(text2num(href_list["mhelp_tickets"]))
+
+/datum/mentor/Topic(href, href_list)
+ ..()
+ if (usr.client != src.owner || (!usr.client.mentorholder))
+ log_admin("[key_name(usr)] tried to illegally use mentor functions.")
+ message_admins("[usr.key] tried to illegally use mentor functions.")
+ return
+
+ mentor_commands(href, href_list, usr)
+
/client/proc/cmd_dementor()
set category = "Admin"
set name = "De-mentor"
@@ -137,7 +142,7 @@ var/list/mentor_verbs_default = list(
else if(istype(whom,/client))
C = whom
if(!C)
- if(holder)
+ if(has_mentor_powers(src))
to_chat(src, "Error: Mentor-PM: Client not found.")
return
@@ -151,6 +156,9 @@ var/list/mentor_verbs_default = list(
return
cmd_mentor_pm(whom, msg, MH)
+/proc/has_mentor_powers(client/C)
+ return C.holder || C.mentorholder
+
/client/proc/cmd_mentor_pm(whom, msg, datum/mentor_help/MH)
set category = "Admin"
set name = "Mentor-PM"
@@ -160,7 +168,7 @@ var/list/mentor_verbs_default = list(
to_chat(src, "Error: Mentor-PM: You are unable to use admin PM-s (muted).")
return
- if(!(mentorholder || holder) && !current_mentorhelp)
+ if(!(has_mentor_powers(src)) && !current_mentorhelp)
to_chat(src, "You can no longer reply to this ticket, please open another one by using the Mentorhelp verb if need be.")
to_chat(src, "Message: [msg]")
return
@@ -174,7 +182,7 @@ var/list/mentor_verbs_default = list(
recipient = whom
if(!recipient)
- if(mentorholder)
+ if(has_mentor_powers(src))
to_chat(src, "Error: Mentor-PM: Client not found.")
to_chat(src, msg)
else
@@ -194,7 +202,7 @@ var/list/mentor_verbs_default = list(
return
if(!recipient)
- if(holder)
+ if(has_mentor_powers(src))
to_chat(src, "Error:Mentor-PM: Client not found.")
else
log_admin("Mentorhelp: [key_name(src)] sent [msg]")
@@ -210,13 +218,13 @@ var/list/mentor_verbs_default = list(
var/interaction_message = "Mentor-PM from-[src] to-[recipient]: [msg]"
- if (recipient.current_mentorhelp && !(recipient.mentorholder || recipient.holder))
+ if (recipient.current_mentorhelp && !has_mentor_powers(recipient))
recipient.current_mentorhelp.AddInteraction(interaction_message)
- if (src.current_mentorhelp && !(src.mentorholder || src.holder))
+ if (src.current_mentorhelp && !has_mentor_powers(src))
src.current_mentorhelp.AddInteraction(interaction_message)
// It's a little fucky if they're both mentors, but while admins may need to adminhelp I don't really see any reason a mentor would have to mentorhelp since you can literally just ask any other mentors online
- if ((recipient.mentorholder || recipient.holder) && (src.mentorholder || src.holder))
+ if (has_mentor_powers(recipient) && has_mentor_powers(src))
if (recipient.current_mentorhelp)
recipient.current_mentorhelp.AddInteraction(interaction_message)
if (src.current_mentorhelp)
@@ -227,7 +235,7 @@ var/list/mentor_verbs_default = list(
log_admin("[key_name(src)] sent [msg] to [key_name(recipient)]")
- if(recipient.is_preference_enabled(/datum/client_preference/holder/play_adminhelp_ping))
+ if(recipient.is_preference_enabled(/datum/client_preference/play_mentorhelp_ping))
recipient << 'sound/effects/mentorhelp.mp3'
for(var/client/C in GLOB.mentors)
diff --git a/code/modules/mentor/mentorhelp.dm b/code/modules/mentor/mentorhelp.dm
index 1fd89b1dc16..1b6dd0adbc4 100644
--- a/code/modules/mentor/mentorhelp.dm
+++ b/code/modules/mentor/mentorhelp.dm
@@ -8,19 +8,15 @@ GLOBAL_DATUM_INIT(mhelp_tickets, /datum/mentor_help_tickets, new)
/datum/mentor_help_tickets
var/list/active_tickets = list()
- var/list/closed_tickets = list()
var/list/resolved_tickets = list()
var/obj/effect/statclick/mticket_list/astatclick = new(null, null, AHELP_ACTIVE)
- var/obj/effect/statclick/mticket_list/cstatclick = new(null, null, AHELP_CLOSED)
var/obj/effect/statclick/mticket_list/rstatclick = new(null, null, AHELP_RESOLVED)
/datum/mentor_help_tickets/Destroy()
QDEL_LIST(active_tickets)
- QDEL_LIST(closed_tickets)
QDEL_LIST(resolved_tickets)
QDEL_NULL(astatclick)
- QDEL_NULL(cstatclick)
QDEL_NULL(rstatclick)
return ..()
@@ -30,8 +26,6 @@ GLOBAL_DATUM_INIT(mhelp_tickets, /datum/mentor_help_tickets, new)
switch(new_ticket.state)
if(AHELP_ACTIVE)
mticket_list = active_tickets
- if(AHELP_CLOSED)
- mticket_list = closed_tickets
if(AHELP_RESOLVED)
mticket_list = resolved_tickets
else
@@ -163,13 +157,12 @@ 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, "Mentor-PM to-Mentors: [name]")
GLOB.mhelp_tickets.active_tickets += src
/datum/mentor_help/Destroy()
RemoveActive()
- GLOB.mhelp_tickets.closed_tickets -= src
GLOB.mhelp_tickets.resolved_tickets -= src
return ..()
@@ -194,16 +187,16 @@ GLOBAL_DATUM_INIT(mhelp_tickets, /datum/mentor_help_tickets, new)
ref_src = "\ref[src]"
return "[msg]"
-//message from the initiator without a target, all admins will see this
+//message from the initiator without a target, all people with mentor powers 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]"
AddInteraction("[LinkedReplyName(ref_src)]: [msg]")
for (var/client/C in GLOB.mentors)
- if (C.is_preference_enabled(/datum/client_preference/holder/play_adminhelp_ping))
+ if (C.is_preference_enabled(/datum/client_preference/play_mentorhelp_ping))
C << 'sound/effects/mentorhelp.mp3'
for (var/client/C in GLOB.admins)
- if (C.is_preference_enabled(/datum/client_preference/holder/play_adminhelp_ping))
+ if (C.is_preference_enabled(/datum/client_preference/play_mentorhelp_ping))
C << 'sound/effects/mentorhelp.mp3'
message_mentors(chat_msg)
@@ -219,11 +212,8 @@ GLOBAL_DATUM_INIT(mhelp_tickets, /datum/mentor_help_tickets, new)
statclick = new(null, src)
GLOB.mhelp_tickets.active_tickets += src
- GLOB.mhelp_tickets.closed_tickets -= src
GLOB.mhelp_tickets.resolved_tickets -= src
switch(state)
- if(AHELP_CLOSED)
- feedback_dec("mhelp_close")
if(AHELP_RESOLVED)
feedback_dec("mhelp_resolve")
state = AHELP_ACTIVE
@@ -278,8 +268,6 @@ GLOBAL_DATUM_INIT(mhelp_tickets, /datum/mentor_help_tickets, new)
dat += "OPEN"
if(AHELP_RESOLVED)
dat += "RESOLVED"
- if(AHELP_CLOSED)
- dat += "CLOSED"
else
dat += "UNKNOWN"
dat += "[GLOB.TAB][TicketHref("Refresh", ref_src)]"
@@ -290,7 +278,7 @@ GLOBAL_DATUM_INIT(mhelp_tickets, /datum/mentor_help_tickets, new)
dat += "
Closed at: [gameTimestamp(wtime = closed_at)] (Approx [(world.time - closed_at) / 600] minutes ago)"
dat += "
"
if(initiator)
- dat += "Actions: [FullMonty(ref_src)]
"
+ dat += "Actions: [Context(ref_src)]
"
else
dat += "DISCONNECTED[GLOB.TAB][ClosureLinks(ref_src)]
"
dat += "
Log:
"
@@ -299,7 +287,7 @@ GLOBAL_DATUM_INIT(mhelp_tickets, /datum/mentor_help_tickets, new)
usr << browse(dat.Join(), "window=mhelp[id];size=620x480")
-/datum/mentor_help/proc/FullMonty(ref_src)
+/datum/mentor_help/proc/Context(ref_src)
if(!ref_src)
ref_src = "\ref[src]"
if(state == AHELP_ACTIVE)
@@ -371,7 +359,7 @@ GLOBAL_DATUM_INIT(mhelp_tickets, /datum/mentor_help_tickets, new)
if(current_mentorhelp)
log_admin("Mentorhelp: [key_name(src)] sent [msg]")
current_mentorhelp.MessageNoRecipient(msg)
- to_chat(usr, "PM to-Mentors: [msg]")
+ to_chat(usr, "Mentor-PM to-Mentors: [msg]")
return
else
to_chat(usr, "Ticket not found, creating new one...")
@@ -383,7 +371,7 @@ GLOBAL_DATUM_INIT(mhelp_tickets, /datum/mentor_help_tickets, new)
//admin proc
/client/proc/cmd_mentor_ticket_panel()
- set name = "Show Mentor Ticket List"
+ set name = "Mentor Ticket List"
set category = "Admin"
var/browse_to
diff --git a/code/modules/vchat/css/ss13styles.css b/code/modules/vchat/css/ss13styles.css
index 9ffa85f3163..9906041588e 100644
--- a/code/modules/vchat/css/ss13styles.css
+++ b/code/modules/vchat/css/ss13styles.css
@@ -90,8 +90,8 @@ body.inverted {
.pm .other {color: #0000ff;}
/* Admin: Channels */
-.mentor {color: #ff9933;}
-.mentor_channel {color: #ff9933; font-weight: bold;}
+.mentor {color: #808000;}
+.mentor_channel {color: #808000; font-weight: bold;}
.mod_channel {color: #735638; font-weight: bold;}
.mod_channel .admin {color: #b82e00; font-weight: bold;}
.admin_channel {color: #9611D4; font-weight: bold;}
diff --git a/code/modules/vchat/js/vchat.js b/code/modules/vchat/js/vchat.js
index 91c7d1a5016..a90c9448b32 100644
--- a/code/modules/vchat/js/vchat.js
+++ b/code/modules/vchat/js/vchat.js
@@ -194,6 +194,14 @@ function start_vue() {
admin: false
},
//VOREStation Add End
+ {
+ matches: ".mentor_channel, .mentor",
+ becomes: "vc_mentor",
+ pretty: "Mentor messages",
+ tooltip: "Mentorchat and mentor pms",
+ required: false,
+ admin: false
+ },
{
matches: ".filter_pm, .pm",
becomes: "vc_adminpm",
diff --git a/code/stylesheet.dm b/code/stylesheet.dm
index 7f426a06fb5..8cb902a1832 100644
--- a/code/stylesheet.dm
+++ b/code/stylesheet.dm
@@ -34,8 +34,8 @@ em {font-style: normal;font-weight: bold;}
.pm .other {color: #0000ff;}
/* Admin: Channels */
-.mentor_channel {color: #ff9933; font-weight: bold;}
-.mentor {color: #ff9933;}
+.mentor_channel {color: #808000; font-weight: bold;}
+.mentor {color: #808000;}
.mod_channel {color: #735638; font-weight: bold;}
.mod_channel .admin {color: #b82e00; font-weight: bold;}
.admin_channel {color: #9611D4; font-weight: bold;}
diff --git a/icons/chattags.dmi b/icons/chattags.dmi
index 252e7ae78e5..ef7eee0f4c2 100644
Binary files a/icons/chattags.dmi and b/icons/chattags.dmi differ