diff --git a/code/controllers/subsystem/tickets/tickets.dm b/code/controllers/subsystem/tickets/tickets.dm index 3c7f810ce85..1cce61e6ccb 100644 --- a/code/controllers/subsystem/tickets/tickets.dm +++ b/code/controllers/subsystem/tickets/tickets.dm @@ -172,6 +172,9 @@ SUBSYSTEM_DEF(tickets) if(!other_ticket_system_staff_check()) return var/datum/ticket/T = allTickets[ticketId] + if(T.ticket_converted) + to_chat(usr, "This ticket has already been converted!") + return convert_ticket(T) /datum/controller/subsystem/tickets/proc/other_ticket_system_staff_check() @@ -183,6 +186,7 @@ SUBSYSTEM_DEF(tickets) /datum/controller/subsystem/tickets/proc/convert_ticket(datum/ticket/T) T.ticketState = TICKET_CLOSED + T.ticket_converted = TRUE var/client/C = usr.client var/client/owner = get_client_by_ckey(T.client_ckey) to_chat_safe(owner, list("[key_name_hidden(C)] has converted your ticket to a [other_ticket_name] ticket.",\ @@ -282,7 +286,7 @@ SUBSYSTEM_DEF(tickets) /datum/controller/subsystem/tickets/proc/assignStaffToTicket(client/C, N) var/datum/ticket/T = allTickets[N] - if(T.staffAssigned != null && T.staffAssigned != C && alert("Ticket is already assigned to [T.staffAssigned.ckey]. Are you sure you want to take it?","Take ticket","No","Yes") != "Yes") + if(T.staffAssigned != null && T.staffAssigned != C && alert("Ticket is already assigned to [T.staffAssigned.ckey]. Are you sure you want to take it?", "Take ticket", "Yes", "No") != "Yes") return FALSE T.assignStaff(C) return TRUE @@ -290,21 +294,36 @@ SUBSYSTEM_DEF(tickets) //Single staff ticket /datum/ticket - var/ticketNum // Ticket number - /// ckey of the client who opened the ticket + /// Ticket number. + var/ticketNum + /// ckey of the client who opened the ticket. var/client_ckey - var/timeOpened // Time the ticket was opened - var/title //The initial message with links - var/raw_title // The title without URLs added - var/list/content // content of the staff help - var/lastStaffResponse // Last staff member who responded - var/lastResponseTime // When the staff last responded - var/locationSent // Location the player was when they send the ticket - var/mobControlled // Mob they were controlling - var/ticketState // State of the ticket, open, closed, resolved etc - var/timeUntilStale // When the ticket goes stale - var/ticketCooldown // Cooldown before allowing the user to open another ticket. - var/client/staffAssigned // Staff member who has assigned themselves to this ticket + /// Time the ticket was opened. + var/timeOpened + /// The initial message with links. + var/title + /// The title without URLs added. + var/raw_title + /// Content of the staff help. + var/list/content + /// Last staff member who responded. + var/lastStaffResponse + /// When the staff last responded. + var/lastResponseTime + /// The location the player was when they sent the ticket. + var/locationSent + /// The mob the player was controlling when they sent the ticket. + var/mobControlled + /// State of the ticket, open, closed, resolved etc. + var/ticketState + /// Has the ticket been converted to another type? (Mhelp to Ahelp, etc.) + var/ticket_converted = FALSE + /// When the ticket goes stale. + var/timeUntilStale + /// Cooldown before allowing the user to open another ticket. + var/ticketCooldown + /// Staff member who has assigned themselves to this ticket. + var/client/staffAssigned /datum/ticket/New(tit, raw_tit, cont, num) title = tit @@ -328,6 +347,8 @@ SUBSYSTEM_DEF(tickets) //Return the ticket state as a colour coded text string. /datum/ticket/proc/state2text() + if(ticket_converted) + return "CONVERTED" switch(ticketState) if(TICKET_OPEN) return "OPEN" @@ -430,7 +451,7 @@ UI STUFF dat += "

Ticket #[T.ticketNum]

" dat += "

[T.client_ckey] / [T.mobControlled] opened this [ticket_name] at [T.timeOpened] at location [T.locationSent]

" - dat += "

Ticket Status: [status]" + dat += "

Ticket Status: [status]" dat += "" dat += "" diff --git a/code/modules/admin/verbs/adminhelp.dm b/code/modules/admin/verbs/adminhelp.dm index 1ad69a31911..e206f345c0c 100644 --- a/code/modules/admin/verbs/adminhelp.dm +++ b/code/modules/admin/verbs/adminhelp.dm @@ -1,7 +1,5 @@ - - //This is a list of words which are ignored by the parser when comparing message contents for names. MUST BE IN LOWER CASE! -GLOBAL_LIST_INIT(adminhelp_ignored_words, list("unknown","the","a","an","of","monkey","alien","as")) +GLOBAL_LIST_INIT(adminhelp_ignored_words, list("unknown", "the", "a", "an", "of", "monkey", "alien", "as")) /client/verb/adminhelp() set category = "Admin" @@ -12,27 +10,28 @@ GLOBAL_LIST_INIT(adminhelp_ignored_words, list("unknown","the","a","an","of","mo to_chat(src, "Error: Admin-PM: You cannot send adminhelps (Muted).") return - adminhelped = 1 //Determines if they get the message to reply by clicking the name. + adminhelped = TRUE //Determines if they get the message to reply by clicking the name. var/msg - var/list/type = list("Mentorhelp","Adminhelp") - var/selected_type = input("Pick a category.", "Admin Help", null, null) as null|anything in type + var/list/type = list("Mentorhelp", "Adminhelp") + var/selected_type = input("Pick a category.", "Admin Help") as null|anything in type if(selected_type) - msg = clean_input("Please enter your message.", "Admin Help", null) + msg = clean_input("Please enter your message.", selected_type) - //clean the input msg if(!msg) return if(handle_spam_prevention(msg, MUTE_ADMINHELP, OOC_COOLDOWN)) return - msg = sanitize_simple(copytext(msg,1,MAX_MESSAGE_LEN)) - if(!msg) return + msg = sanitize_simple(copytext(msg, 1, MAX_MESSAGE_LEN)) + if(!msg) // No message after sanitisation + return + if(selected_type == "Mentorhelp") - SSmentor_tickets.newHelpRequest(src, msg) + SSmentor_tickets.newHelpRequest(src, msg) // Mhelp else - SStickets.newHelpRequest(src, msg) + SStickets.newHelpRequest(src, msg) // Ahelp //show it to the person adminhelping too to_chat(src, "[selected_type]: [msg]") @@ -54,7 +53,7 @@ GLOBAL_LIST_INIT(adminhelp_ignored_words, list("unknown","the","a","an","of","mo var/inactive_mentors = mentorcount[3] if(active_mentors <= 0) - if(inactive_mentors > 0) + if(inactive_mentors) alerttext = " | **ALL MENTORS AFK**" else alerttext = " | **NO MENTORS ONLINE**"
[T.title]