Skip to content

Commit

Permalink
surrender tweak
Browse files Browse the repository at this point in the history
  • Loading branch information
realforest2001 committed Aug 28, 2023
1 parent 2ad7eea commit b14d11d
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 2 deletions.
5 changes: 4 additions & 1 deletion code/__DEFINES/ARES.dm
Original file line number Diff line number Diff line change
Expand Up @@ -53,10 +53,13 @@
#define TICKET_REJECTED "rejected"
/// Completed by WJs
#define TICKET_COMPLETED "completed"

/// Granted Access Ticket
#define TICKET_GRANTED "granted"
/// Granted Access Ticket
/// Revoked Access Ticket
#define TICKET_REVOKED "revoked"
/// Self-Returned Access Ticket
#define TICKET_RETURNED "returned"

/// Checks for if buttons can be used, these may yet be removed and internalised to the UI programming
#define TICKET_OPEN "OPEN"
Expand Down
2 changes: 1 addition & 1 deletion code/game/machinery/ARES/ARES_procs.dm
Original file line number Diff line number Diff line change
Expand Up @@ -944,7 +944,7 @@ GLOBAL_LIST_INIT(maintenance_categories, list(
if(identification.registered_gid != access_ticket.user_id_num)
continue

access_ticket.ticket_status = TICKET_REVOKED
access_ticket.ticket_status = TICKET_RETURNED
identification.access -= ACCESS_MARINE_AI_TEMP
identification.modification_log += "Temporary AI Access self-returned by [key_name(operator)]."

Expand Down
8 changes: 8 additions & 0 deletions tgui/packages/tgui/interfaces/WorkingJoe.js
Original file line number Diff line number Diff line change
Expand Up @@ -738,6 +738,9 @@ const AccessRequests = (props, context) => {
} else if (ticket.status === 'revoked') {
view_status = 'Access ticket has been revoked.';
view_icon = 'circle-minus';
} else if (ticket.status === 'returned') {
view_status = 'Access ticket has been returned.';
view_icon = 'circle-minus';
}
let can_cancel = 'Yes';
if (ticket.submitter !== logged_in) {
Expand Down Expand Up @@ -886,6 +889,11 @@ const AccessTickets = (props, context) => {
view_status = 'Access ticket has been revoked.';
view_icon = 'circle-minus';
update_tooltip = 'Access revoked. No further changes possible.';
} else if (ticket.status === 'returned') {
view_status = 'Access ticket has been returned.';
view_icon = 'circle-minus';
update_tooltip =
'Access self-returned. No further changes possible.';
}

return (
Expand Down

0 comments on commit b14d11d

Please sign in to comment.