diff --git a/code/modules/admin/verbs/adminhelp.dm b/code/modules/admin/verbs/adminhelp.dm index 9f301492c8e..51bf810f96c 100644 --- a/code/modules/admin/verbs/adminhelp.dm +++ b/code/modules/admin/verbs/adminhelp.dm @@ -1,15 +1,19 @@ -/client/var/adminhelptimerid = 0 //a timer id for returning the ahelp verb -/client/var/datum/admin_help/current_ticket //the current ticket the (usually) not-admin client is dealing with - -// -//TICKET MANAGER -// +/// Client var used for returning the ahelp verb +/client/var/adminhelptimerid = 0 +/// Client var used for tracking the ticket the (usually) not-admin client is dealing with +/client/var/datum/admin_help/current_ticket GLOBAL_DATUM_INIT(ahelp_tickets, /datum/admin_help_tickets, new) +/** + * # Adminhelp Ticket Manager + */ /datum/admin_help_tickets + /// The set of all active tickets var/list/active_tickets = list() + /// The set of all closed tickets var/list/closed_tickets = list() + /// The set of all resolved tickets var/list/resolved_tickets = list() var/obj/effect/statclick/ticket_list/astatclick = new(null, null, AHELP_ACTIVE) @@ -149,32 +153,42 @@ GLOBAL_DATUM_INIT(ahelp_tickets, /datum/admin_help_tickets, new) /obj/effect/statclick/ticket_list/proc/Action() Click() -// -//TICKET DATUM -// - +/** + * # Adminhelp Ticket + */ /datum/admin_help + /// Unique ID of the ticket var/id + /// The current name of the ticket var/name + /// The current state of the ticket var/state = AHELP_ACTIVE - + /// The time at which the ticket was opened var/opened_at + /// The time at which the ticket was closed var/closed_at - - var/client/initiator //semi-misnomer, it's the person who ahelped/was bwoinked + /// Semi-misnomer, it's the person who ahelped/was bwoinked + var/client/initiator + /// The ckey of the initiator var/initiator_ckey + /// The key name of the initiator var/initiator_key_name + /// If any admins were online when the ticket was initialized var/heard_by_no_admins = FALSE - - var/list/_interactions //use AddInteraction() or, preferably, admin_ticket_log() - + /// The collection of interactions with this ticket. Use AddInteraction() or, preferably, admin_ticket_log() + var/list/_interactions + /// Statclick holder for the ticket var/obj/effect/statclick/ahelp/statclick - + /// Static counter used for generating each ticket ID var/static/ticket_counter = 0 -//call this on its own to create a ticket, don't manually assign current_ticket -//msg is the title of the ticket: usually the ahelp text -//is_bwoink is TRUE if this ticket was started by an admin PM +/** + * Call this on its own to create a ticket, don't manually assign current_ticket + * + * Arguments: + * * msg - The title of the ticket: usually the ahelp text + * * is_bwoink - Boolean operator, TRUE if this ticket was started by an admin PM + */ /datum/admin_help/New(msg, client/C, is_bwoink) //clean the input msg msg = sanitize(copytext_char(msg, 1, MAX_MESSAGE_LEN)) @@ -411,17 +425,8 @@ GLOBAL_DATUM_INIT(ahelp_tickets, /datum/admin_help_tickets, new) var/list/dat = list("