Finally fixed the issues with handling ahelps (#13078)

* Finally fixed the issues with handling ahelps

* Applied suggestion

Co-authored-by: Zonespace <41448081+Zonespace27@users.noreply.github.com>

Co-authored-by: Zonespace <41448081+Zonespace27@users.noreply.github.com>
This commit is contained in:
GoldenAlpharex
2022-04-25 14:34:40 +01:00
committed by GitHub
co-authored by Zonespace
parent fe8dcd5360
commit 6dfe650f1a
3 changed files with 15 additions and 17 deletions
+7 -5
View File
@@ -394,7 +394,7 @@ GLOBAL_DATUM_INIT(ahelp_tickets, /datum/admin_help_tickets, new)
. += " (<A HREF='?_src_=holder;[HrefToken(TRUE)];ahelp=[ref_src];ahelp_action=icissue'>IC</A>)"
. += " (<A HREF='?_src_=holder;[HrefToken(TRUE)];ahelp=[ref_src];ahelp_action=close'>CLOSE</A>)"
. += " (<A HREF='?_src_=holder;[HrefToken(TRUE)];ahelp=[ref_src];ahelp_action=resolve'>RSLVE</A>)"
. += " (<A HREF='?_src_=holder;[HrefToken(TRUE)];ahelp=[ref_src];ahelp_action=handleissue'>HANDLE</A>)" //SKYRAT EDIT ADDITION - ADMIN
. += " (<A HREF='?_src_=holder;[HrefToken(TRUE)];ahelp=[ref_src];ahelp_action=handle_issue'>HANDLE</A>)" //SKYRAT EDIT ADDITION - ADMIN
. += " (<A HREF='?_src_=holder;[HrefToken(TRUE)];ahelp=[ref_src];ahelp_action=pingmute'>PING MUTE</A>)" //SKYRAT EDIT
//private
@@ -671,8 +671,10 @@ GLOBAL_DATUM_INIT(ahelp_tickets, /datum/admin_help_tickets, new)
if("reject")
Reject()
if("reply")
HandleIssue() /// SKYRAT EDIT ADDITION - ADMIN HANDLE
usr.client.cmd_ahelp_reply(initiator)
// SKYRAT EDIT START - ADMIN HANDLE
if(handle_issue())
usr?.client.cmd_ahelp_reply(initiator)
// SKYRAT EDIT END
if("icissue")
ICIssue()
if("close")
@@ -682,8 +684,8 @@ GLOBAL_DATUM_INIT(ahelp_tickets, /datum/admin_help_tickets, new)
if("reopen")
Reopen()
//SKYRAT EDIT ADDITION BEING - ADMIN
if("handleissue")
HandleIssue()
if("handle_issue")
handle_issue()
if("pingmute")
ticket_ping_stop = !ticket_ping_stop
SSblackbox.record_feedback("tally", "ahelp_stats", 1, "pingmute")
+3 -8
View File
@@ -269,14 +269,9 @@
SSblackbox.LogAhelp(recipient.current_ticket.id, "Ticket Opened", msg, recipient.ckey, src.ckey)
//SKYRAT EDIT ADDITION BEGIN - ADMIN
if(recipient.current_ticket.handler)
if(recipient.current_ticket.handler != usr.ckey)
var/response = tgui_alert(usr, "This ticket is already being handled by [recipient.current_ticket.handler]. Do you want to continue?", "Ticket already assigned", list("Yes", "No"))
if(response == "No")
return
else
recipient.current_ticket.HandleIssue()
// Basically, if we realized that we shouldn't've been handling the ticket, let's bail. Otherwise, we just change who's handling it.
if(!recipient.current_ticket.handle_issue())
return
//SKYRAT EDIT ADDITION END
to_chat(recipient,