Updated the closing permissions and added a new message for the closing of mhelps

This commit is contained in:
joep van der velden
2019-03-09 23:20:16 +01:00
parent 70528f4ba4
commit f9d01f396c
3 changed files with 19 additions and 13 deletions
@@ -9,7 +9,13 @@ GLOBAL_REAL(SSmentor_tickets, /datum/controller/subsystem/tickets/mentor_tickets
ticket_system_name = "Mentor Tickets"
ticket_name = "Mentor Ticket"
span_text = "<span class='mentorhelp'>"
close_rights = R_MENTOR
/datum/controller/subsystem/tickets/mentor_tickets/message_staf(var/msg)
message_mentorTicket(msg)
/datum/controller/subsystem/tickets/mentor_tickets/Initialize()
close_messages = list("<font color='red' size='3'><b>- [ticket_name] Closed -</b></font>",
"<span class='boldmessage'>Please try to be as descriptive as possible in mentor helps. Mentors do not know the full situation you're in and need more information to give you a helpful response.</span>",
"[span_text]Your [ticket_name] has now been closed.</span>")
return ..()
+10 -10
View File
@@ -15,7 +15,8 @@ SUBSYSTEM_DEF(tickets)
var/span_text = "<span class='adminticket'>"
var/ticket_system_name = "Admin Tickets"
var/ticket_name = "Admin Ticket"
var/close_rights = R_ADMIN
var/list/close_messages
init_order = INIT_ORDER_TICKETS
wait = 300
priority = FIRE_PRIORITY_TICKETS
@@ -27,6 +28,9 @@ SUBSYSTEM_DEF(tickets)
var/ticketCounter = 1
/datum/controller/subsystem/tickets/Initialize()
close_messages = list("<font color='red' size='4'><b>- [ticket_name] Rejected! -</b></font>",
"<span class='boldmessage'>Please try to be calm, clear, and descriptive in admin helps, do not assume the staf member has seen any related events, and clearly state the names of anybody you are reporting. If you asked a question, please ensure it was clear what you were asking.</span>",
"[span_text]Your [ticket_name] has now been closed.</span>")
LAZYINITLIST(allTickets)
return ..()
@@ -375,19 +379,15 @@ UI STUFF
showDetailUI(usr, indexNum)
if(href_list["detailclose"])
if(!check_rights(R_ADMIN))
to_chat(usr, "Admin status is required to close tickets.")
return
var/indexNum = text2num(href_list["detailclose"])
if(!check_rights(close_rights))
to_chat(usr, "Not enough rights to close this ticket.")
return
if(alert("Are you sure? This will send a negative message.",,"Yes","No") != "Yes")
return
if(closeTicket(indexNum))
message_staf("[usr.client] / ([usr]) closed [ticket_name] number [indexNum]")
to_chat_safe(returnClient(indexNum), list(
"<font color='red' size='4'><b>- [ticket_name] Rejected! -</b></font>",
"<span class='boldmessage'>Please try to be calm, clear, and descriptive in admin helps, do not assume the staf member has seen any related events, and clearly state the names of anybody you are reporting. If you asked a question, please ensure it was clear what you were asking.</span>",
"[span_text]Your [ticket_name] has now been closed.</span>"
))
to_chat_safe(returnClient(indexNum), close_messages)
showDetailUI(usr, indexNum)
@@ -405,4 +405,4 @@ UI STUFF
/datum/controller/subsystem/tickets/proc/takeTicket(var/index)
if(assignStafToTicket(usr.client, index))
message_staf("[usr.client] / ([usr]) has taken [ticket_name] number [index]")
to_chat_safe(returnClient(index), "[span_text]Your [ticket_name] is being handled by [usr.client].")
to_chat_safe(returnClient(index), "[span_text]Your [ticket_name] is being handled by [usr.client].")