Skip to content

Commit

Permalink
Panel (#22951)
Browse files Browse the repository at this point in the history
  • Loading branch information
Oblisk234 authored Jan 13, 2025
1 parent 47c1534 commit 0bacaf9
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
1 change: 1 addition & 0 deletions yogstation/code/modules/mentor/mentor_verbs.dm
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ GLOBAL_LIST_INIT(mentor_verbs, list(
/client/proc/show_mentor_memo,
/client/proc/show_mentor_tickets,
/client/proc/cmd_mentor_pm_context,
/client/proc/cmd_mentor_pm_panel,
/client/proc/dementor
))
GLOBAL_PROTECT(mentor_verbs)
Expand Down
9 changes: 6 additions & 3 deletions yogstation/code/modules/mentor/mentorpm.dm
Original file line number Diff line number Diff line change
@@ -1,18 +1,21 @@
//shows a list of clients we could send PMs to, then forwards our choice to cmd_Mentor_pm
/client/proc/cmd_mentor_pm_panel()
set category = "Mentor"
set name = "Mentor PM"
set name = "Mentor PM Panel"

if(!is_mentor())
to_chat(src, "<font color='red'>Error: Mentor-PM-Panel: Only Mentors and Admins may use this command.</font>", confidential=TRUE)
return

var/list/client/targets[0]
for(var/client/T)
targets["[T]"] = T
if(T.mob)
targets["[T.mob.name]"] = T
else
targets["[T]"] = T

var/list/sorted = sortList(targets)
var/target = input(src,"To whom shall we send a message?","Mentor PM",null) in sorted|null
var/target = input(src,"To whom shall we send a message?","Mentor PM",null) as null|anything in sorted|null
cmd_mentor_pm(targets[target],null)
SSblackbox.record_feedback("tally", "Mentor_verb", 1, "APM") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!

Expand Down

0 comments on commit 0bacaf9

Please sign in to comment.