Skip to content
This repository was archived by the owner on May 22, 2025. It is now read-only.

Commit de78fe0

Browse files
authored
Fixes the mentorwho verb (#22650)
* clean and fix * fixes * Update topic.dm * Update admin_verbs.dm
1 parent bf9f643 commit de78fe0

File tree

5 files changed

+18
-83
lines changed

5 files changed

+18
-83
lines changed

code/modules/admin/admin_verbs.dm

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -718,7 +718,7 @@ GLOBAL_PROTECT(admin_verbs_hideable)
718718
to_chat(src, span_interface("You are now a normal player."), confidential=TRUE)
719719

720720
remove_mentor_verbs()
721-
mentor_datum = null
721+
QDEL_NULL(mentor_datum)
722722
GLOB.mentors -= src
723723
add_verb(src, /client/proc/rementor)
724724

yogstation/code/modules/admin/topic.dm

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@
7676
return
7777

7878
C.remove_mentor_verbs()
79-
C.mentor_datum = null
79+
QDEL_NULL(C.mentor_datum)
8080
GLOB.mentors -= C
8181

8282
if(SSdbcore.Connect())

yogstation/code/modules/client/client_procs.dm

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@
6060
new /datum/mentors(ckey)
6161

6262
if(mentor_datum)
63-
if(admin)
63+
if(!admin)
6464
GLOB.mentors |= src // don't add admins to this list too.
6565

6666
mentor_datum.owner = src

yogstation/code/modules/client/verbs/who.dm

Lines changed: 0 additions & 59 deletions
This file was deleted.

yogstation/code/modules/mentor/mentor_verbs.dm

Lines changed: 15 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -43,14 +43,16 @@ GLOBAL_PROTECT(mentor_verbs)
4343
set category = "Mentor"
4444
var/position = "Mentor"
4545
var/msg = "<b>Current Mentors & Wiki:</b>\n"
46-
if(holder)
47-
for(var/client/C in GLOB.mentors)
48-
if(C.holder) continue
49-
if(C.mentor_datum.position)
50-
position = C.mentor_datum.position
51-
msg += "\t[C] is a [position]"
52-
53-
if(C.holder && C.holder.fakekey)
46+
47+
for(var/client/C in GLOB.mentors)
48+
if(C.holder)
49+
continue
50+
if(C.mentor_datum.position)
51+
position = C.mentor_datum.position
52+
msg += "\t[C] is a [position]"
53+
54+
if(holder) //admins get extra info about the mentors
55+
if(C?.holder?.fakekey)
5456
msg += " <i>(as [C.holder.fakekey])</i>"
5557

5658
if(isobserver(C.mob))
@@ -62,18 +64,10 @@ GLOBAL_PROTECT(mentor_verbs)
6264

6365
if(C.is_afk())
6466
msg += " (AFK)"
65-
msg += "\n"
66-
else
67-
for(var/client/C in GLOB.mentors)
68-
if(C.holder) continue
69-
if(C.mentor_datum.position)
70-
position = C.mentor_datum.position
71-
if(C.holder && C.holder.fakekey)
72-
msg += "\t[C.holder.fakekey] is a [position]"
73-
else
74-
msg += "\t[C] is a [position]"
75-
msg += "\n"
76-
msg += span_info("Mentorhelps are also seen by admins. If no mentors are available in game adminhelp instead and an admin will see it and respond.")
67+
else
68+
msg += span_info("Mentorhelps are also seen by admins. If no mentors are available in game adminhelp instead and an admin will see it and respond.")
69+
msg += "\n"
70+
7771
to_chat(src, msg, confidential=TRUE)
7872

7973
/client/verb/mrat()
@@ -110,7 +104,7 @@ GLOBAL_PROTECT(mentor_verbs)
110104
return
111105
mentor_position = mentor_datum.position
112106
remove_mentor_verbs()
113-
mentor_datum = null
107+
QDEL_NULL(mentor_datum)
114108
GLOB.mentors -= src
115109
add_verb(src, /client/proc/rementor)
116110
to_chat(src, span_interface("You are now a normal player."), confidential=TRUE)

0 commit comments

Comments
 (0)