mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-22 20:48:56 +01:00
[MIRROR] Admins now get a little notice if they start responding to a ticket someone else is already responding to [MDB IGNORE] (#8922)
* Admins now get a little notice if they start responding to a ticket someone else is already responding to * Fixing a conflict Co-authored-by: Ryll Ryll <3589655+Ryll-Ryll@users.noreply.github.com> Co-authored-by: GoldenAlpharex <58045821+GoldenAlpharex@users.noreply.github.com>
This commit is contained in:
co-authored by
Ryll Ryll
GoldenAlpharex
parent
7136859fb7
commit
7dbc5324f9
@@ -186,11 +186,13 @@ GLOBAL_DATUM_INIT(ahelp_tickets, /datum/admin_help_tickets, new)
|
||||
/// If any admins were online when the ticket was initialized
|
||||
var/heard_by_no_admins = FALSE
|
||||
/// The collection of interactions with this ticket. Use AddInteraction() or, preferably, admin_ticket_log()
|
||||
var/list/_interactions
|
||||
var/list/ticket_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
|
||||
/// The list of clients currently responding to the opening ticket before it gets a response
|
||||
var/list/opening_responders
|
||||
|
||||
/**
|
||||
* Call this on its own to create a ticket, don't manually assign current_ticket
|
||||
@@ -228,7 +230,7 @@ GLOBAL_DATUM_INIT(ahelp_tickets, /datum/admin_help_tickets, new)
|
||||
TimeoutVerb()
|
||||
|
||||
statclick = new(null, src)
|
||||
_interactions = list()
|
||||
ticket_interactions = list()
|
||||
_interactions_player = list() // SKYRAT EDIT ADDITION -- Player ticket viewing
|
||||
|
||||
if(is_bwoink)
|
||||
@@ -256,7 +258,7 @@ GLOBAL_DATUM_INIT(ahelp_tickets, /datum/admin_help_tickets, new)
|
||||
if(heard_by_no_admins && usr && usr.ckey != initiator_ckey)
|
||||
heard_by_no_admins = FALSE
|
||||
send2adminchat(initiator_ckey, "Ticket #[id]: Answered by [key_name(usr)]")
|
||||
_interactions += "[time_stamp()]: [formatted_message]"
|
||||
ticket_interactions += "[time_stamp()]: [formatted_message]"
|
||||
|
||||
//Removes the ahelp verb and returns it after 2 minutes
|
||||
/datum/admin_help/proc/TimeoutVerb()
|
||||
@@ -494,7 +496,7 @@ GLOBAL_DATUM_INIT(ahelp_tickets, /datum/admin_help_tickets, new)
|
||||
else
|
||||
dat += "<b>DISCONNECTED</b>[FOURSPACES][ClosureLinks(ref_src)]<br>"
|
||||
dat += "<br><b>Log:</b><br><br>"
|
||||
for(var/I in _interactions)
|
||||
for(var/I in ticket_interactions)
|
||||
dat += "[I]<br>"
|
||||
|
||||
// Append any tickets also opened by this user if relevant
|
||||
|
||||
@@ -64,9 +64,19 @@
|
||||
|
||||
var/datum/admin_help/AH = C.current_ticket
|
||||
|
||||
var/message_prompt = "Message:"
|
||||
|
||||
if(AH?.opening_responders && length(AH.ticket_interactions) == 1)
|
||||
SEND_SOUND(src, sound('sound/machines/buzz-sigh.ogg', volume=30))
|
||||
message_prompt += "\n\n**This ticket is already being responded to by: [english_list(AH.opening_responders)]**"
|
||||
|
||||
if(AH)
|
||||
message_admins("[key_name_admin(src)] has started replying to [key_name_admin(C, 0, 0)]'s admin help.")
|
||||
var/msg = input(src,"Message:", "Private message to [C.holder?.fakekey ? "an Administrator" : key_name(C, 0, 0)].") as message|null
|
||||
if(length(AH.ticket_interactions) == 1) // add the admin who is currently responding to the list of people responding
|
||||
LAZYADD(AH.opening_responders, src)
|
||||
|
||||
var/msg = input(src, message_prompt, "Private message to [C.holder?.fakekey ? "an Administrator" : key_name(C, 0, 0)].") as message|null
|
||||
LAZYREMOVE(AH.opening_responders, src)
|
||||
if (!msg)
|
||||
message_admins("[key_name_admin(src)] has cancelled their reply to [key_name_admin(C, 0, 0)]'s admin help.")
|
||||
return
|
||||
|
||||
Reference in New Issue
Block a user