diff --git a/code/game/machinery/ARES/ARES_interface.dm b/code/game/machinery/ARES/ARES_interface.dm
index cfe3fe2669bc..dd99240b2550 100644
--- a/code/game/machinery/ARES/ARES_interface.dm
+++ b/code/game/machinery/ARES/ARES_interface.dm
@@ -218,17 +218,17 @@
return
playsound(src, "keyboard_alt", 15, 1)
+ var/mob/living/carbon/human/operator = ui.user
switch (action)
if("go_back")
if(!last_menu)
- return to_chat(usr, SPAN_WARNING("Error, no previous page detected."))
+ return to_chat(operator, SPAN_WARNING("Error, no previous page detected."))
var/temp_holder = current_menu
current_menu = last_menu
last_menu = temp_holder
if("login")
- var/mob/living/carbon/human/operator = usr
var/obj/item/card/id/idcard = operator.get_active_hand()
if(istype(idcard))
authentication = get_ares_access(idcard)
@@ -239,7 +239,7 @@
authentication = get_ares_access(idcard)
last_login = idcard.registered_name
else
- to_chat(usr, SPAN_WARNING("You require an ID card to access this terminal!"))
+ to_chat(operator, SPAN_WARNING("You require an ID card to access this terminal!"))
playsound(src, 'sound/machines/buzz-two.ogg', 15, 1)
return FALSE
if(authentication)
@@ -247,14 +247,14 @@
current_menu = "main"
if("sudo")
- var/new_user = tgui_input_text(usr, "Enter Sudo Username", "Sudo User", encode = FALSE)
+ var/new_user = tgui_input_text(operator, "Enter Sudo Username", "Sudo User", encode = FALSE)
if(new_user)
if(new_user == sudo_holder)
last_login = sudo_holder
sudo_holder = null
return FALSE
if(new_user == last_login)
- to_chat(usr, SPAN_WARNING("Already remote logged in as this user."))
+ to_chat(operator, SPAN_WARNING("Already remote logged in as this user."))
playsound(src, 'sound/machines/buzz-two.ogg', 15, 1)
return FALSE
sudo_holder = last_login
@@ -370,9 +370,9 @@
datacore.records_talking -= conversation
if("message_ares")
- var/message = tgui_input_text(usr, "What do you wish to say to ARES?", "ARES Message", encode = FALSE)
+ var/message = tgui_input_text(operator, "What do you wish to say to ARES?", "ARES Message", encode = FALSE)
if(message)
- message_ares(message, usr, params["active_convo"])
+ message_ares(message, operator, params["active_convo"])
if("read_record")
var/datum/ares_record/deleted_talk/conversation = locate(params["record"])
@@ -385,36 +385,36 @@
// -- Emergency Buttons -- //
if("general_quarters")
if(!COOLDOWN_FINISHED(datacore, ares_quarters_cooldown))
- to_chat(usr, SPAN_WARNING("It has not been long enough since the last General Quarters call!"))
+ to_chat(operator, SPAN_WARNING("It has not been long enough since the last General Quarters call!"))
playsound(src, 'sound/machines/buzz-two.ogg', 15, 1)
return FALSE
if(GLOB.security_level < SEC_LEVEL_RED)
set_security_level(SEC_LEVEL_RED, no_sound = TRUE, announce = FALSE)
shipwide_ai_announcement("ATTENTION! GENERAL QUARTERS. ALL HANDS, MAN YOUR BATTLESTATIONS.", MAIN_AI_SYSTEM, 'sound/effects/GQfullcall.ogg')
- log_game("[key_name(usr)] has called for general quarters via ARES.")
- message_admins("[key_name_admin(usr)] has called for general quarters via ARES.")
+ log_game("[key_name(operator)] has called for general quarters via ARES.")
+ message_admins("[key_name_admin(operator)] has called for general quarters via ARES.")
log_ares_security("General Quarters", "[last_login] has called for general quarters via ARES.")
COOLDOWN_START(datacore, ares_quarters_cooldown, 10 MINUTES)
. = TRUE
if("evacuation_start")
if(GLOB.security_level < SEC_LEVEL_RED)
- to_chat(usr, SPAN_WARNING("The ship must be under red alert in order to enact evacuation procedures."))
+ to_chat(operator, SPAN_WARNING("The ship must be under red alert in order to enact evacuation procedures."))
playsound(src, 'sound/machines/buzz-two.ogg', 15, 1)
return FALSE
if(SShijack.evac_admin_denied)
- to_chat(usr, SPAN_WARNING("The USCM has placed a lock on deploying the evacuation pods."))
+ to_chat(operator, SPAN_WARNING("The USCM has placed a lock on deploying the evacuation pods."))
playsound(src, 'sound/machines/buzz-two.ogg', 15, 1)
return FALSE
if(!SShijack.initiate_evacuation())
- to_chat(usr, SPAN_WARNING("You are unable to initiate an evacuation procedure right now!"))
+ to_chat(operator, SPAN_WARNING("You are unable to initiate an evacuation procedure right now!"))
playsound(src, 'sound/machines/buzz-two.ogg', 15, 1)
return FALSE
- log_game("[key_name(usr)] has called for an emergency evacuation via ARES.")
- message_admins("[key_name_admin(usr)] has called for an emergency evacuation via ARES.")
+ log_game("[key_name(operator)] has called for an emergency evacuation via ARES.")
+ message_admins("[key_name_admin(operator)] has called for an emergency evacuation via ARES.")
log_ares_security("Initiate Evacuation", "[last_login] has called for an emergency evacuation via ARES.")
. = TRUE
@@ -422,27 +422,27 @@
if(!SSticker.mode)
return FALSE //Not a game mode?
if(world.time < DISTRESS_TIME_LOCK)
- to_chat(usr, SPAN_WARNING("You have been here for less than six minutes... what could you possibly have done!"))
+ to_chat(operator, SPAN_WARNING("You have been here for less than six minutes... what could you possibly have done!"))
playsound(src, 'sound/machines/buzz-two.ogg', 15, 1)
return FALSE
if(!COOLDOWN_FINISHED(datacore, ares_distress_cooldown))
- to_chat(usr, SPAN_WARNING("The distress launcher is cooling down!"))
+ to_chat(operator, SPAN_WARNING("The distress launcher is cooling down!"))
playsound(src, 'sound/machines/buzz-two.ogg', 15, 1)
return FALSE
if(GLOB.security_level == SEC_LEVEL_DELTA)
- to_chat(usr, SPAN_WARNING("The ship is already undergoing self destruct procedures!"))
+ to_chat(operator, SPAN_WARNING("The ship is already undergoing self destruct procedures!"))
playsound(src, 'sound/machines/buzz-two.ogg', 15, 1)
return FALSE
if(GLOB.security_level < SEC_LEVEL_RED)
- to_chat(usr, SPAN_WARNING("The ship must be under red alert to launch a distress beacon!"))
+ to_chat(operator, SPAN_WARNING("The ship must be under red alert to launch a distress beacon!"))
playsound(src, 'sound/machines/buzz-two.ogg', 15, 1)
return FALSE
for(var/client/admin in GLOB.admins)
if((R_ADMIN|R_MOD) & admin.admin_holder.rights)
playsound_client(admin,'sound/effects/sos-morse-code.ogg',10)
- SSticker.mode.request_ert(usr, TRUE)
- to_chat(usr, SPAN_NOTICE("A distress beacon request has been sent to USCM High Command."))
+ SSticker.mode.request_ert(operator, TRUE)
+ to_chat(operator, SPAN_NOTICE("A distress beacon request has been sent to USCM High Command."))
COOLDOWN_START(datacore, ares_distress_cooldown, COOLDOWN_COMM_REQUEST)
return TRUE
@@ -450,25 +450,25 @@
if(!SSticker.mode)
return FALSE //Not a game mode?
if(world.time < NUCLEAR_TIME_LOCK)
- to_chat(usr, SPAN_WARNING("It is too soon to request Nuclear Ordnance!"))
+ to_chat(operator, SPAN_WARNING("It is too soon to request Nuclear Ordnance!"))
playsound(src, 'sound/machines/buzz-two.ogg', 15, 1)
return FALSE
if(!COOLDOWN_FINISHED(datacore, ares_nuclear_cooldown))
- to_chat(usr, SPAN_WARNING("The ordnance request frequency is garbled, wait for reset!"))
+ to_chat(operator, SPAN_WARNING("The ordnance request frequency is garbled, wait for reset!"))
playsound(src, 'sound/machines/buzz-two.ogg', 15, 1)
return FALSE
if(GLOB.security_level == SEC_LEVEL_DELTA || SSticker.mode.is_in_endgame)
- to_chat(usr, SPAN_WARNING("The mission has failed catastrophically, what do you want a nuke for?!"))
+ to_chat(operator, SPAN_WARNING("The mission has failed catastrophically, what do you want a nuke for?!"))
playsound(src, 'sound/machines/buzz-two.ogg', 15, 1)
return FALSE
- var/reason = tgui_input_text(usr, "Please enter reason nuclear ordnance is required.", "Reason for Nuclear Ordnance")
+ var/reason = tgui_input_text(operator, "Please enter reason nuclear ordnance is required.", "Reason for Nuclear Ordnance")
if(!reason)
return FALSE
for(var/client/admin in GLOB.admins)
if((R_ADMIN|R_MOD) & admin.admin_holder.rights)
playsound_client(admin,'sound/effects/sos-morse-code.ogg',10)
- message_admins("[key_name(usr)] has requested use of Nuclear Ordnance (via ARES)! Reason: [reason] [CC_MARK(usr)] (APPROVE) (DENY) [ADMIN_JMP_USER(usr)] [CC_REPLY(usr)]")
- to_chat(usr, SPAN_NOTICE("A nuclear ordnance request has been sent to USCM High Command for the following reason: [reason]"))
+ message_admins("[key_name(operator)] has requested use of Nuclear Ordnance (via ARES)! Reason: [reason] [CC_MARK(operator)] (APPROVE) (DENY) [ADMIN_JMP_USER(operator)] [CC_REPLY(operator)]")
+ to_chat(operator, SPAN_NOTICE("A nuclear ordnance request has been sent to USCM High Command for the following reason: [reason]"))
log_ares_security("Nuclear Ordnance Request", "[last_login] has sent a request for nuclear ordnance for the following reason: [reason]")
if(ares_can_interface())
ai_silent_announcement("[last_login] has sent a request for nuclear ordnance to USCM High Command.", ".V")
diff --git a/code/game/machinery/ARES/ARES_interface_apollo.dm b/code/game/machinery/ARES/ARES_interface_apollo.dm
index 56283417ae05..c1c936676dc5 100644
--- a/code/game/machinery/ARES/ARES_interface_apollo.dm
+++ b/code/game/machinery/ARES/ARES_interface_apollo.dm
@@ -18,6 +18,9 @@
/// The last person to login.
var/last_login
+ /// Notification sound
+ var/notify_sounds = TRUE
+
/obj/structure/machinery/computer/working_joe/proc/link_systems(datum/ares_link/new_link = GLOB.ares_link, override)
if(link && !override)
@@ -34,6 +37,16 @@
link_systems(override = FALSE)
. = ..()
+/obj/structure/machinery/computer/working_joe/proc/notify()
+ if(notify_sounds)
+ playsound(src, 'sound/machines/pda_ping.ogg', 25, 0)
+
+/obj/structure/machinery/computer/working_joe/proc/send_notifcation()
+ for(var/obj/structure/machinery/computer/working_joe/ticketer as anything in link.ticket_computers)
+ if(ticketer == src)
+ continue
+ ticketer.notify()
+
/obj/structure/machinery/computer/working_joe/proc/delink()
if(link)
link.ticket_computers -= src
@@ -76,8 +89,9 @@
data["access_log"] = list()
data["access_log"] += datacore.apollo_login_list
- data["apollo_log"] = list()
- data["apollo_log"] += datacore.apollo_log
+ data["apollo_log"] = datacore.apollo_log
+
+ data["notify_sounds"] = notify_sounds
var/list/logged_maintenance = list()
for(var/datum/ares_ticket/maintenance/maint_ticket as anything in link.tickets_maintenance)
@@ -142,12 +156,12 @@
return
var/playsound = TRUE
- var/mob/living/carbon/human/operator = usr
+ var/mob/living/carbon/human/operator = ui.user
switch (action)
if("go_back")
if(!last_menu)
- return to_chat(usr, SPAN_WARNING("Error, no previous page detected."))
+ return to_chat(operator, SPAN_WARNING("Error, no previous page detected."))
var/temp_holder = current_menu
current_menu = last_menu
last_menu = temp_holder
@@ -198,6 +212,9 @@
last_menu = current_menu
current_menu = "maint_claim"
+ if("toggle_sound")
+ notify_sounds = !notify_sounds
+
if("new_report")
var/priority_report = FALSE
var/maint_type = tgui_input_list(operator, "What is the type of maintenance item you wish to report?", "Report Category", GLOB.maintenance_categories, 30 SECONDS)
@@ -223,6 +240,8 @@
link.tickets_maintenance += maint_ticket
if(priority_report)
ares_apollo_talk("Priority Maintenance Report: [maint_type] - ID [maint_ticket.ticket_id]. Seek and resolve.")
+ else
+ send_notifcation()
log_game("ARES: Maintenance Ticket '\ref[maint_ticket]' created by [key_name(operator)] as [last_login] with Category '[maint_type]' and Details of '[details]'.")
return TRUE
return FALSE
@@ -235,14 +254,14 @@
var/assigned = ticket.ticket_assignee
if(assigned)
if(assigned == last_login)
- var/prompt = tgui_alert(usr, "You already claimed this ticket! Do you wish to drop your claim?", "Unclaim ticket", list("Yes", "No"))
+ var/prompt = tgui_alert(operator, "You already claimed this ticket! Do you wish to drop your claim?", "Unclaim ticket", list("Yes", "No"))
if(prompt != "Yes")
return FALSE
/// set ticket back to pending
ticket.ticket_assignee = null
ticket.ticket_status = TICKET_PENDING
return claim
- var/choice = tgui_alert(usr, "This ticket has already been claimed by [assigned]! Do you wish to override their claim?", "Claim Override", list("Yes", "No"))
+ var/choice = tgui_alert(operator, "This ticket has already been claimed by [assigned]! Do you wish to override their claim?", "Claim Override", list("Yes", "No"))
if(choice != "Yes")
claim = FALSE
if(claim)
@@ -255,12 +274,14 @@
if(!istype(ticket))
return FALSE
if(ticket.ticket_submitter != last_login)
- to_chat(usr, SPAN_WARNING("You cannot cancel a ticket that does not belong to you!"))
+ to_chat(operator, SPAN_WARNING("You cannot cancel a ticket that does not belong to you!"))
return FALSE
- to_chat(usr, SPAN_WARNING("[ticket.ticket_type] [ticket.ticket_id] has been cancelled."))
+ to_chat(operator, SPAN_WARNING("[ticket.ticket_type] [ticket.ticket_id] has been cancelled."))
ticket.ticket_status = TICKET_CANCELLED
if(ticket.ticket_priority)
ares_apollo_talk("Priority [ticket.ticket_type] [ticket.ticket_id] has been cancelled.")
+ else
+ send_notifcation()
return TRUE
if("mark_ticket")
@@ -268,9 +289,9 @@
if(!istype(ticket))
return FALSE
if(ticket.ticket_assignee != last_login && ticket.ticket_assignee) //must be claimed by you or unclaimed.)
- to_chat(usr, SPAN_WARNING("You cannot update a ticket that is not assigned to you!"))
+ to_chat(operator, SPAN_WARNING("You cannot update a ticket that is not assigned to you!"))
return FALSE
- var/choice = tgui_alert(usr, "What do you wish to mark the ticket as?", "Mark", list(TICKET_COMPLETED, TICKET_REJECTED), 20 SECONDS)
+ var/choice = tgui_alert(operator, "What do you wish to mark the ticket as?", "Mark", list(TICKET_COMPLETED, TICKET_REJECTED), 20 SECONDS)
switch(choice)
if(TICKET_COMPLETED)
ticket.ticket_status = TICKET_COMPLETED
@@ -280,7 +301,9 @@
return FALSE
if(ticket.ticket_priority)
ares_apollo_talk("Priority [ticket.ticket_type] [ticket.ticket_id] has been [choice] by [last_login].")
- to_chat(usr, SPAN_NOTICE("[ticket.ticket_type] [ticket.ticket_id] marked as [choice]."))
+ else
+ send_notifcation()
+ to_chat(operator, SPAN_NOTICE("[ticket.ticket_type] [ticket.ticket_id] marked as [choice]."))
return TRUE
if("new_access")
@@ -328,8 +351,6 @@
break
for(var/obj/item/card/id/identification in link.active_ids)
- if(!istype(identification))
- continue
if(identification.registered_gid != access_ticket.user_id_num)
continue
@@ -353,11 +374,9 @@
if("auth_access")
playsound = FALSE
var/datum/ares_ticket/access/access_ticket = locate(params["ticket"])
- if(!access_ticket)
+ if(!istype(access_ticket))
return FALSE
for(var/obj/item/card/id/identification in link.waiting_ids)
- if(!istype(identification))
- continue
if(identification.registered_gid != access_ticket.user_id_num)
continue
identification.handle_ares_access(last_login, operator)
@@ -366,8 +385,6 @@
ares_apollo_talk("Access Ticket [access_ticket.ticket_id]: [access_ticket.ticket_submitter] was granted access by [last_login].")
return TRUE
for(var/obj/item/card/id/identification in link.active_ids)
- if(!istype(identification))
- continue
if(identification.registered_gid != access_ticket.user_id_num)
continue
identification.handle_ares_access(last_login, operator)
@@ -382,22 +399,29 @@
if(!istype(access_ticket))
return FALSE
if(access_ticket.ticket_assignee != last_login && access_ticket.ticket_assignee) //must be claimed by you or unclaimed.)
- to_chat(usr, SPAN_WARNING("You cannot update a ticket that is not assigned to you!"))
+ to_chat(operator, SPAN_WARNING("You cannot update a ticket that is not assigned to you!"))
return FALSE
access_ticket.ticket_status = TICKET_REJECTED
- to_chat(usr, SPAN_NOTICE("[access_ticket.ticket_type] [access_ticket.ticket_id] marked as rejected."))
+ to_chat(operator, SPAN_NOTICE("[access_ticket.ticket_type] [access_ticket.ticket_id] marked as rejected."))
ares_apollo_talk("Access Ticket [access_ticket.ticket_id]: [access_ticket.ticket_submitter] was rejected access by [last_login].")
+ for(var/obj/item/card/id/identification in link.waiting_ids)
+ if(identification.registered_gid != access_ticket.user_id_num)
+ continue
+ var/mob/living/carbon/human/id_owner = identification.registered_ref?.resolve()
+ if(id_owner)
+ to_chat(id_owner, SPAN_WARNING("AI visitation access rejected."))
+ playsound_client(id_owner?.client, 'sound/machines/pda_ping.ogg', src, 25, 0)
return TRUE
if(playsound)
playsound(src, "keyboard_alt", 15, 1)
-/obj/item/card/id/proc/handle_ares_access(logged_in, mob/user)
+/obj/item/card/id/proc/handle_ares_access(logged_in = MAIN_AI_SYSTEM, mob/user)
var/operator = key_name(user)
var/datum/ares_link/link = GLOB.ares_link
if(logged_in == MAIN_AI_SYSTEM)
if(!user)
- operator = "[MAIN_AI_SYSTEM] (Sensor Trip)"
+ operator = "[MAIN_AI_SYSTEM] (Automated)"
else
operator = "[user.ckey]/([MAIN_AI_SYSTEM])"
if(ACCESS_MARINE_AI_TEMP in access)
@@ -405,10 +429,18 @@
link.active_ids -= src
modification_log += "Temporary AI access revoked by [operator]"
to_chat(user, SPAN_NOTICE("Access revoked from [registered_name]."))
+ var/mob/living/carbon/human/id_owner = registered_ref?.resolve()
+ if(id_owner)
+ to_chat(id_owner, SPAN_WARNING("AI visitation access revoked."))
+ playsound_client(id_owner?.client, 'sound/machines/pda_ping.ogg', src, 25, 0)
else
access += ACCESS_MARINE_AI_TEMP
modification_log += "Temporary AI access granted by [operator]"
to_chat(user, SPAN_NOTICE("Access granted to [registered_name]."))
link.waiting_ids -= src
link.active_ids += src
+ var/mob/living/carbon/human/id_owner = registered_ref?.resolve()
+ if(id_owner)
+ to_chat(id_owner, SPAN_HELPFUL("AI visitation access granted."))
+ playsound_client(id_owner?.client, 'sound/machines/pda_ping.ogg', src, 25, 0)
return TRUE
diff --git a/code/game/machinery/ARES/apollo_pda.dm b/code/game/machinery/ARES/apollo_pda.dm
index 8df3faf79260..69e774cf0da3 100644
--- a/code/game/machinery/ARES/apollo_pda.dm
+++ b/code/game/machinery/ARES/apollo_pda.dm
@@ -19,6 +19,9 @@
/// The last person to login.
var/last_login
+ /// Notification sound
+ var/notify_sounds = TRUE
+
/obj/item/device/working_joe_pda/proc/link_systems(datum/ares_link/new_link = GLOB.ares_link, override)
if(link && !override)
@@ -35,6 +38,16 @@
link_systems(override = FALSE)
. = ..()
+/obj/item/device/working_joe_pda/proc/notify()
+ if(notify_sounds)
+ playsound(src, 'sound/machines/pda_ping.ogg', 25, 0)
+
+/obj/item/device/working_joe_pda/proc/send_notifcation()
+ for(var/obj/item/device/working_joe_pda/ticketer as anything in link.ticket_computers)
+ if(ticketer == src)
+ continue
+ ticketer.notify()
+
/obj/item/device/working_joe_pda/proc/delink()
if(link)
link.ticket_computers -= src
@@ -103,6 +116,8 @@
data["apollo_log"] = list()
data["apollo_log"] += datacore.apollo_log
+ data["notify_sounds"] = notify_sounds
+
var/list/logged_maintenance = list()
for(var/datum/ares_ticket/maintenance/maint_ticket as anything in link.tickets_maintenance)
if(!istype(maint_ticket))
@@ -164,12 +179,12 @@
return
var/playsound = TRUE
- var/mob/living/carbon/human/operator = usr
+ var/mob/living/carbon/human/operator = ui.user
switch (action)
if("go_back")
if(!last_menu)
- return to_chat(usr, SPAN_WARNING("Error, no previous page detected."))
+ return to_chat(operator, SPAN_WARNING("Error, no previous page detected."))
var/temp_holder = current_menu
current_menu = last_menu
last_menu = temp_holder
@@ -223,6 +238,9 @@
last_menu = current_menu
current_menu = "maint_claim"
+ if("toggle_sound")
+ notify_sounds = !notify_sounds
+
if("new_report")
var/priority_report = FALSE
var/maint_type = tgui_input_list(operator, "What is the type of maintenance item you wish to report?", "Report Category", GLOB.maintenance_categories, 30 SECONDS)
@@ -248,6 +266,8 @@
link.tickets_maintenance += maint_ticket
if(priority_report)
ares_apollo_talk("Priority Maintenance Report: [maint_type] - ID [maint_ticket.ticket_id]. Seek and resolve.")
+ else
+ send_notifcation()
log_game("ARES: Maintenance Ticket '\ref[maint_ticket]' created by [key_name(operator)] as [last_login] with Category '[maint_type]' and Details of '[details]'.")
return TRUE
return FALSE
@@ -260,14 +280,14 @@
var/assigned = ticket.ticket_assignee
if(assigned)
if(assigned == last_login)
- var/prompt = tgui_alert(usr, "You already claimed this ticket! Do you wish to drop your claim?", "Unclaim ticket", list("Yes", "No"))
+ var/prompt = tgui_alert(operator, "You already claimed this ticket! Do you wish to drop your claim?", "Unclaim ticket", list("Yes", "No"))
if(prompt != "Yes")
return FALSE
/// set ticket back to pending
ticket.ticket_assignee = null
ticket.ticket_status = TICKET_PENDING
return claim
- var/choice = tgui_alert(usr, "This ticket has already been claimed by [assigned]! Do you wish to override their claim?", "Claim Override", list("Yes", "No"))
+ var/choice = tgui_alert(operator, "This ticket has already been claimed by [assigned]! Do you wish to override their claim?", "Claim Override", list("Yes", "No"))
if(choice != "Yes")
claim = FALSE
if(claim)
@@ -280,12 +300,14 @@
if(!istype(ticket))
return FALSE
if(ticket.ticket_submitter != last_login)
- to_chat(usr, SPAN_WARNING("You cannot cancel a ticket that does not belong to you!"))
+ to_chat(operator, SPAN_WARNING("You cannot cancel a ticket that does not belong to you!"))
return FALSE
- to_chat(usr, SPAN_WARNING("[ticket.ticket_type] [ticket.ticket_id] has been cancelled."))
+ to_chat(operator, SPAN_WARNING("[ticket.ticket_type] [ticket.ticket_id] has been cancelled."))
ticket.ticket_status = TICKET_CANCELLED
if(ticket.ticket_priority)
ares_apollo_talk("Priority [ticket.ticket_type] [ticket.ticket_id] has been cancelled.")
+ else
+ send_notifcation()
return TRUE
if("mark_ticket")
@@ -293,9 +315,9 @@
if(!istype(ticket))
return FALSE
if(ticket.ticket_assignee != last_login && ticket.ticket_assignee) //must be claimed by you or unclaimed.)
- to_chat(usr, SPAN_WARNING("You cannot update a ticket that is not assigned to you!"))
+ to_chat(operator, SPAN_WARNING("You cannot update a ticket that is not assigned to you!"))
return FALSE
- var/choice = tgui_alert(usr, "What do you wish to mark the ticket as?", "Mark", list(TICKET_COMPLETED, TICKET_REJECTED), 20 SECONDS)
+ var/choice = tgui_alert(operator, "What do you wish to mark the ticket as?", "Mark", list(TICKET_COMPLETED, TICKET_REJECTED), 20 SECONDS)
switch(choice)
if(TICKET_COMPLETED)
ticket.ticket_status = TICKET_COMPLETED
@@ -305,7 +327,9 @@
return FALSE
if(ticket.ticket_priority)
ares_apollo_talk("Priority [ticket.ticket_type] [ticket.ticket_id] has been [choice] by [last_login].")
- to_chat(usr, SPAN_NOTICE("[ticket.ticket_type] [ticket.ticket_id] marked as [choice]."))
+ else
+ send_notifcation()
+ to_chat(operator, SPAN_NOTICE("[ticket.ticket_type] [ticket.ticket_id] marked as [choice]."))
return TRUE
if("new_access")
@@ -353,8 +377,6 @@
break
for(var/obj/item/card/id/identification in link.active_ids)
- if(!istype(identification))
- continue
if(identification.registered_gid != access_ticket.user_id_num)
continue
@@ -381,8 +403,6 @@
if(!access_ticket)
return FALSE
for(var/obj/item/card/id/identification in link.waiting_ids)
- if(!istype(identification))
- continue
if(identification.registered_gid != access_ticket.user_id_num)
continue
identification.handle_ares_access(last_login, operator)
@@ -391,8 +411,6 @@
ares_apollo_talk("Access Ticket [access_ticket.ticket_id]: [access_ticket.ticket_submitter] was granted access by [last_login].")
return TRUE
for(var/obj/item/card/id/identification in link.active_ids)
- if(!istype(identification))
- continue
if(identification.registered_gid != access_ticket.user_id_num)
continue
identification.handle_ares_access(last_login, operator)
@@ -407,11 +425,18 @@
if(!istype(access_ticket))
return FALSE
if(access_ticket.ticket_assignee != last_login && access_ticket.ticket_assignee) //must be claimed by you or unclaimed.)
- to_chat(usr, SPAN_WARNING("You cannot update a ticket that is not assigned to you!"))
+ to_chat(operator, SPAN_WARNING("You cannot update a ticket that is not assigned to you!"))
return FALSE
access_ticket.ticket_status = TICKET_REJECTED
- to_chat(usr, SPAN_NOTICE("[access_ticket.ticket_type] [access_ticket.ticket_id] marked as rejected."))
+ to_chat(operator, SPAN_NOTICE("[access_ticket.ticket_type] [access_ticket.ticket_id] marked as rejected."))
ares_apollo_talk("Access Ticket [access_ticket.ticket_id]: [access_ticket.ticket_submitter] was rejected access by [last_login].")
+ for(var/obj/item/card/id/identification in link.waiting_ids)
+ if(identification.registered_gid != access_ticket.user_id_num)
+ continue
+ var/mob/living/carbon/human/id_owner = identification.registered_ref?.resolve()
+ if(id_owner)
+ to_chat(id_owner, SPAN_WARNING("AI visitation access rejected."))
+ playsound_client(id_owner?.client, 'sound/machines/pda_ping.ogg', src, 25, 0)
return TRUE
if(playsound)
diff --git a/code/game/objects/items/cards_ids.dm b/code/game/objects/items/cards_ids.dm
index 9addf3346a39..31158d055327 100644
--- a/code/game/objects/items/cards_ids.dm
+++ b/code/game/objects/items/cards_ids.dm
@@ -67,7 +67,7 @@
/// The name registered_name on the card
var/registered_name = "Unknown"
- var/registered_ref = null
+ var/datum/weakref/registered_ref = null
var/registered_gid = 0
flags_equip_slot = SLOT_ID
diff --git a/sound/machines/pda_ping.ogg b/sound/machines/pda_ping.ogg
new file mode 100644
index 000000000000..2f3135bc3c22
Binary files /dev/null and b/sound/machines/pda_ping.ogg differ
diff --git a/tgui/packages/tgui/interfaces/WorkingJoe.jsx b/tgui/packages/tgui/interfaces/WorkingJoe.jsx
index fed64c923116..4864631aa152 100644
--- a/tgui/packages/tgui/interfaces/WorkingJoe.jsx
+++ b/tgui/packages/tgui/interfaces/WorkingJoe.jsx
@@ -63,12 +63,22 @@ const Login = (props) => {
const MainMenu = (props) => {
const { data, act } = useBackend();
- const { logged_in, access_text, last_page, current_menu, access_level } =
- data;
+ const {
+ logged_in,
+ access_text,
+ last_page,
+ current_menu,
+ access_level,
+ notify_sounds,
+ } = data;
let can_request_access = 'Yes';
if (access_level > 2) {
can_request_access = 'No';
}
+ let soundicon = 'volume-high';
+ if (!notify_sounds) {
+ soundicon = 'volume-xmark';
+ }
return (
<>
@@ -86,11 +96,17 @@ const MainMenu = (props) => {