/datum/admins/proc/create_admin_fax() set name = "Send Admin Fax" set desc = "Send a fax from Central Command." set category = "Special Verbs.Narration/Messaging" if (check_rights(R_ADMIN|R_CCIAA|R_FUN) || isstoryteller(usr)) var/list/faxes = list() for(var/obj/structure/machinery/photocopier/faxmachine/F in GLOB.allfaxes) faxes[F.department] = F if(!length(faxes)) to_chat(usr, SPAN_WARNING("No valid fax machines located!")) return if (isstoryteller(usr)) to_chat(usr, SPAN_DANGER("CCIA NOTE: Remember that you should only interact via CentComm faxes as they relate to your current odyssey. For any questions, please consult CCIA via Discord.")) var/department = tgui_input_list(usr, "Pick a fax machine.", "Send Admin Fax", faxes) var/obj/structure/machinery/photocopier/faxmachine/fax = faxes[department] if (!istype(fax)) to_chat(usr, SPAN_WARNING("Couldn't find a fax machine to send this to!")) return //todo: sanitize var/input = tgui_input_text(usr, "Please enter a message to reply to via secure connection. BBCode and HTML allowed.", \ "Outgoing message from Centcomm", "", MAX_BOOK_MESSAGE_LEN, TRUE) if (!input) to_chat(usr, SPAN_WARNING("Cancelled.")) return var/customname = tgui_input_text(usr, "Pick a title for the report.", "Title") if (!customname) to_chat(usr, SPAN_WARNING("Cancelled.")) return var/announce = alert(usr, "Do you wish to announce the fax being sent?", "Announce Fax", "Yes", "No") if(announce == "Yes") announce = TRUE // Create the reply message var/obj/item/paper/P = new /obj/item/paper(null) //hopefully the null loc won't cause trouble for us P.set_content("[SSatlas.current_map.boss_name] - [customname]", input) // Stamps var/image/stampoverlay = image('icons/obj/bureaucracy.dmi') stampoverlay.icon_state = "paper_stamp-cent" if(!P.stamped) P.stamped = new P.stamped += /obj/item/stamp P.AddOverlays(stampoverlay) P.stamps += "