diff --git a/code/datums/roundstats/roundstats.dm b/code/datums/roundstats/roundstats.dm index 1626bfa19c5..ebff1fea4fa 100644 --- a/code/datums/roundstats/roundstats.dm +++ b/code/datums/roundstats/roundstats.dm @@ -25,8 +25,7 @@ GLOBAL_VAR_INIT(prey_eaten_roundstat, 0) //VOREStation Edit - Obviously GLOBAL_VAR_INIT(prey_absorbed_roundstat, 0) //VOREStation Edit - Obviously GLOBAL_VAR_INIT(prey_digested_roundstat, 0) //VOREStation Edit - Obviously GLOBAL_VAR_INIT(items_digested_roundstat, 0) //VOREStation Edit - Obviously -//GLOBAL_VAR_INIT(security_tickets, 0) //VOREStation Edit -var/global/list/security_printer_tickets = list() +var/global/list/security_printer_tickets = list() //VOREStation Edit /hook/roundend/proc/RoundTrivia()//bazinga diff --git a/code/game/objects/items/devices/ticket_printer.dm b/code/game/objects/items/devices/ticket_printer.dm index 23bdeec3bfd..8817c7ec876 100644 --- a/code/game/objects/items/devices/ticket_printer.dm +++ b/code/game/objects/items/devices/ticket_printer.dm @@ -16,9 +16,15 @@ /obj/item/device/ticket_printer/proc/print_a_ticket(mob/user) var/ticket_name = sanitize(tgui_input_text(user, "The Name of the person you are issuing the ticket to.", "Name", max_length = 100)) + if(length(ticket_name) > 100) + tgui_alert_async(usr, "Entered name too long. 100 character limit.","Error") + return if(!ticket_name) return var/details = sanitize(tgui_input_text(user, "What is the ticket for? Avoid entering personally identifiable information in this section. This information should not be used to harrass or otherwise make the person feel uncomfortable. (Max length: 200)", "Ticket Details", max_length = 200)) + if(length(details) > 200) + tgui_alert_async(usr, "Entered details too long. 200 character limit.","Error") + return if(!details) return @@ -35,8 +41,6 @@ security_printer_tickets |= details log_and_message_admins("has issued '[ticket_name]' a security citation: \"[details]\"", user) last_print = world.time - to_world(details) - to_world("[security_printer_tickets.len]") /obj/item/weapon/paper/sec_ticket name = "Security Citation" diff --git a/code/modules/admin/admin_verb_lists_vr.dm b/code/modules/admin/admin_verb_lists_vr.dm index d5356564bf6..b51ebf71d16 100644 --- a/code/modules/admin/admin_verb_lists_vr.dm +++ b/code/modules/admin/admin_verb_lists_vr.dm @@ -127,7 +127,8 @@ var/list/admin_verbs_admin = list( /client/proc/despawn_player, /datum/admins/proc/view_feedback, /client/proc/make_mentor, - /client/proc/unmake_mentor + /client/proc/unmake_mentor, + /client/proc/removetickets ) var/list/admin_verbs_ban = list( diff --git a/code/modules/admin/admin_verbs_vr.dm b/code/modules/admin/admin_verbs_vr.dm index 994d12a4ea5..9e86256eaac 100644 --- a/code/modules/admin/admin_verbs_vr.dm +++ b/code/modules/admin/admin_verbs_vr.dm @@ -54,3 +54,20 @@ segments = 36 if(tgui_alert(usr, "\The [orbiter] will orbit around [center]. Is this okay?", "Confirm Orbit", list("Yes", "No")) == "Yes") orbiter.orbit(center, distance, clock, speed, segments) + +/client/proc/removetickets() + set name = "Security Tickets" + set category = "Admin" + set desc = "Allows one to remove tickets from the global list." + + if(!check_rights(R_ADMIN)) + return + + if(security_printer_tickets.len >= 1) + var/input = tgui_input_list(usr, "Which message?", "Security Tickets", security_printer_tickets) + + if(tgui_alert(usr, "Do you want to remove the following message from the global list? \"[input]\"", "Remove Ticket", list("Yes", "No")) == "Yes") + security_printer_tickets -= input + + else + tgui_alert_async(usr, "The ticket list is empty.","Empty")