/obj/item/ticket_printer name = "ticket printer" desc = "It prints security citations!" icon = 'icons/obj/device_vr.dmi' icon_state = "sec_ticket_printer" slot_flags = SLOT_BELT | SLOT_HOLSTER var/print_cooldown = 1 MINUTE var/last_print w_class = WEIGHT_CLASS_SMALL /obj/item/ticket_printer/attack_self(mob/user) . = ..() if(last_print + print_cooldown <= world.time) print_a_ticket(user) else to_chat(user, SPAN_WARNING("\The [src] is not ready to print another ticket yet.")) /obj/item/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(user, "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(user, "Entered details too long. 200 character limit.","Error") return if(!details) return var/turf/our_turf = get_turf(user) var/final = "