Skip to content

Commit

Permalink
uncucks marking
Browse files Browse the repository at this point in the history
  • Loading branch information
harryob committed Feb 21, 2024
1 parent 5045c70 commit e2d5828
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 1 deletion.
22 changes: 22 additions & 0 deletions code/modules/admin/verbs/adminhelp.dm
Original file line number Diff line number Diff line change
Expand Up @@ -469,6 +469,11 @@ GLOBAL_DATUM_INIT(ahelp_tickets, /datum/admin_help_tickets, new)
/datum/admin_help/proc/Close(key_name = key_name_admin(usr), silent = FALSE)
if(state != AHELP_ACTIVE)
return

if(marked_admin != usr.key)
to_chat(usr, SPAN_WARNING("This ticket is currently marked by [marked_admin]. Please override their mark to interact with this ticket!"))
return

RemoveActive()
state = AHELP_CLOSED
GLOB.ahelp_tickets.ListInsert(src)
Expand All @@ -483,6 +488,11 @@ GLOBAL_DATUM_INIT(ahelp_tickets, /datum/admin_help_tickets, new)
/datum/admin_help/proc/Resolve(key_name = key_name_admin(usr), silent = FALSE)
if(state != AHELP_ACTIVE)
return

if(marked_admin != usr.key)
to_chat(usr, SPAN_WARNING("This ticket is currently marked by [marked_admin]. Please override their mark to interact with this ticket!"))
return

RemoveActive()
state = AHELP_RESOLVED
GLOB.ahelp_tickets.ListInsert(src)
Expand All @@ -501,6 +511,10 @@ GLOBAL_DATUM_INIT(ahelp_tickets, /datum/admin_help_tickets, new)
if(state != AHELP_ACTIVE || !initial_message)
return

if(marked_admin != usr.key)
to_chat(usr, SPAN_WARNING("This ticket is currently marked by [marked_admin]. Please override their mark to interact with this ticket!"))
return

if(!initiator.current_mhelp)
initiator.current_mhelp = new(initiator)

Expand Down Expand Up @@ -559,6 +573,10 @@ GLOBAL_DATUM_INIT(ahelp_tickets, /datum/admin_help_tickets, new)
if(state != AHELP_ACTIVE)
return

if(marked_admin != usr.key)
to_chat(usr, SPAN_WARNING("This ticket is currently marked by [marked_admin]. Please override their mark to interact with this ticket!"))
return

if(initiator)
initiator.giveadminhelpverb()

Expand All @@ -582,6 +600,10 @@ GLOBAL_DATUM_INIT(ahelp_tickets, /datum/admin_help_tickets, new)
to_chat(usr, SPAN_WARNING("This ticket is already closed!"))
return

if(marked_admin != usr.key)
to_chat(usr, SPAN_WARNING("This ticket is currently marked by [marked_admin]. Please override their mark to interact with this ticket!"))
return

var/chosen = tgui_input_list(usr, "Which auto response do you wish to send?", "AutoReply", GLOB.adminreplies)
var/datum/autoreply/admin/response = GLOB.adminreplies[chosen]

Expand Down
2 changes: 1 addition & 1 deletion code/modules/admin/verbs/adminpm.dm
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@

var/message_prompt = "Message:"

if((AH?.opening_responders && length(AH.ticket_interactions) == 1 ) || (AH?.marked_admin && AH?.marked_admin != usr.key) && length(AH.ticket_interactions) == 2)
if((AH?.opening_responders && length(AH.ticket_interactions) == 1 ) || ((AH?.marked_admin && AH?.marked_admin != usr.key) && length(AH.ticket_interactions) == 2))
SEND_SOUND(src, sound('sound/machines/buzz-sigh.ogg', volume=30))
message_prompt += "\n\n**This ticket is already being responded to by: [length(AH.opening_responders) ? english_list(AH.opening_responders) : AH.marked_admin]**"

Expand Down

0 comments on commit e2d5828

Please sign in to comment.