From 9794740de543e4fa67390ebe4fb8e43d1b7ff667 Mon Sep 17 00:00:00 2001 From: Ty-Omaha Date: Mon, 16 Sep 2019 11:47:04 -0400 Subject: [PATCH] Alphabetical sort and cancel --- code/controllers/subsystem/tickets/tickets.dm | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/code/controllers/subsystem/tickets/tickets.dm b/code/controllers/subsystem/tickets/tickets.dm index 3483271c3d7..2189d402b47 100644 --- a/code/controllers/subsystem/tickets/tickets.dm +++ b/code/controllers/subsystem/tickets/tickets.dm @@ -124,8 +124,7 @@ SUBSYSTEM_DEF(tickets) T.assignStaff(C) //try to keep this list where more common things are at the top yeah? thx - var/response_phrases = list("Cancel" = "Cancel", - "Thanks" = "Thanks, have a Paradise day!", + var/response_phrases = list("Thanks" = "Thanks, have a Paradise day!", "Handling It" = "The issue is being looked into, thanks.", "Already Resolved" = "The problem has been resolved already.", "Mentorhelp" = "Please redirect your question to Mentorhelp, as they are better experienced with these types of questions.", @@ -140,10 +139,10 @@ SUBSYSTEM_DEF(tickets) for(var/key in response_phrases) //build a new list based on the short descriptive keys of the master list so we can send this as the input instead of the full paragraphs to the admin choosing which autoresponse sorted_responses += key - var/message_key = input("Select an autoresponse. This will mark the ticket as resolved.", "Autoresponse") as anything in sorted_responses + var/message_key = input("Select an autoresponse. This will mark the ticket as resolved.", "Autoresponse") as null|anything in sortTim(sorted_responses, /proc/cmp_text_asc) //use sortTim and cmp_text_asc to sort alphabetically switch(message_key) - if("Cancel") + if(null) //they cancelled T.staffAssigned = initial(T.staffAssigned) //if they cancel we dont need to hold this ticket anymore return if("Reject")