Skip to content

Commit

Permalink
forgot to remove behalf requests
Browse files Browse the repository at this point in the history
  • Loading branch information
realforest2001 committed Aug 28, 2023
1 parent a40f023 commit c803742
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 17 deletions.
19 changes: 3 additions & 16 deletions code/game/machinery/ARES/ARES_procs.dm
Original file line number Diff line number Diff line change
Expand Up @@ -898,32 +898,19 @@ GLOBAL_LIST_INIT(maintenance_categories, list(
playsound(src, 'sound/machines/buzz-two.ogg', 15, 1)
return FALSE

var/ticket_holder
var/priority_report = FALSE
var/is_self = tgui_alert(operator, "Is this request for yourself?", "Ticket Holder", list("Yes", "No"))
if(is_self == "No")
ticket_holder = tgui_input_text(operator, "Who is the ticket for? (Please use precise name, with punctuation and capitalisation.)", "Ticket Holder", encode = FALSE)
else if(is_self == "Yes")
ticket_holder = last_login
var/ticket_holder = last_login
if(!ticket_holder)
return FALSE
var/details = tgui_input_text(operator, "What is the purpose of this access ticket?", "Ticket Details", encode = FALSE)
if(!details)
return FALSE

if(authentication >= APOLLO_ACCESS_AUTHED)
var/is_priority = tgui_alert(operator, "Is this a priority request?", "Priority designation", list("Yes", "No"))
if(is_priority == "Yes")
priority_report = TRUE

var/confirm = alert(operator, "Please confirm the submission of your access ticket request. \n\n Priority: [priority_report ? "Yes" : "No"] \n Holder: '[ticket_holder]' \n Details: '[details]' \n\n Is this correct?", "Confirmation", "Yes", "No")
var/confirm = alert(operator, "Please confirm the submission of your access ticket request. \n\nHolder: '[ticket_holder]' \n Details: '[details]' \n\n Is this correct?", "Confirmation", "Yes", "No")
if(confirm != "Yes" || !link)
return FALSE
var/datum/ares_ticket/access/access_ticket = new(last_login, ticket_holder, details, priority_report, idcard.registered_gid)
var/datum/ares_ticket/access/access_ticket = new(last_login, ticket_holder, details, FALSE, idcard.registered_gid)
link.waiting_ids += idcard
link.tickets_access += access_ticket
if(priority_report)
ares_apollo_talk("Priority Access Request: [ticket_holder] - ID [access_ticket.ticket_id]. Seek and resolve.")
log_game("ARES: Access Ticket '\ref[access_ticket]' created by [key_name(operator)] as [last_login] with Holder '[ticket_holder]' and Details of '[details]'.")
return TRUE

Expand Down
3 changes: 2 additions & 1 deletion tgui/packages/tgui/interfaces/WorkingJoe.js
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ const MainMenu = (props, context) => {
const { logged_in, access_text, last_page, current_menu, access_level } =
data;
let can_request_access = 'Yes';
if (access_level === 3) {
if (access_level > 2) {
can_request_access = 'No';
}

Expand Down Expand Up @@ -696,6 +696,7 @@ const AccessRequests = (props, context) => {
fontSize="1.5rem"
mt="5rem"
onClick={() => act('new_access')}
disabled={access_level > 2}
/>
</Flex>

Expand Down

0 comments on commit c803742

Please sign in to comment.