Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ahelp touchups #5859

Merged
merged 3 commits into from
Mar 3, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions code/modules/admin/verbs/adminhelp.dm
Original file line number Diff line number Diff line change
Expand Up @@ -470,7 +470,7 @@ GLOBAL_DATUM_INIT(ahelp_tickets, /datum/admin_help_tickets, new)
if(state != AHELP_ACTIVE)
return

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

Expand All @@ -489,7 +489,7 @@ GLOBAL_DATUM_INIT(ahelp_tickets, /datum/admin_help_tickets, new)
if(state != AHELP_ACTIVE)
return

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

Expand All @@ -511,7 +511,7 @@ GLOBAL_DATUM_INIT(ahelp_tickets, /datum/admin_help_tickets, new)
if(state != AHELP_ACTIVE || !initial_message)
return

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

Expand Down Expand Up @@ -539,7 +539,7 @@ GLOBAL_DATUM_INIT(ahelp_tickets, /datum/admin_help_tickets, new)

/datum/admin_help/proc/mark_ticket()
if(marked_admin)
if(marked_admin == usr.key)
if(marked_admin == usr.ckey)
unmark_ticket()
return
to_chat(usr, SPAN_WARNING("This ticket has already been marked by [marked_admin]."))
Expand All @@ -557,7 +557,7 @@ GLOBAL_DATUM_INIT(ahelp_tickets, /datum/admin_help_tickets, new)
message_admins(msg)
log_admin_private(msg)
log_ahelp(id, "Marked", "Marked by [usr.key]", sender = usr.ckey)
marked_admin = usr.key
marked_admin = usr.ckey

/datum/admin_help/proc/unmark_ticket()
var/key_name = key_name_admin(usr)
Expand Down
3 changes: 2 additions & 1 deletion code/modules/admin/verbs/adminpm.dm
Original file line number Diff line number Diff line change
Expand Up @@ -228,7 +228,8 @@
if(CLIENT_IS_STAFF(src)) //sender is an admin but recipient is not. Do BIG RED TEXT
var/already_logged = FALSE
if(!recipient.current_ticket)
new /datum/admin_help(msg, recipient, TRUE)
var/datum/admin_help/new_ticket = new(msg, recipient, TRUE)
new_ticket.marked_admin = ckey
already_logged = TRUE
log_ahelp(recipient.current_ticket.id, "Ticket Opened", msg, recipient.ckey, src.ckey)

Expand Down
3 changes: 0 additions & 3 deletions code/modules/mob/mob_defines.dm
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,6 @@

var/atom/movable/screen/hands = null //robot

var/adminhelp_marked = 0 // Prevents marking an Adminhelp more than once. Making this a client define will cause runtimes and break some Adminhelps
var/adminhelp_marked_admin = "" // Ckey of last marking admin

/// a ckey that persists client logout / ghosting, replaced when a client inhabits the mob
var/persistent_ckey

Expand Down
Loading