/proc/clear_cciaa_job(var/mob/living/carbon/human/M) addtimer(CALLBACK(GLOBAL_PROC, /proc/actual_clear_ccia_job, M), 9000) /proc/actual_clear_ccia_job(mob/living/carbon/human/H) if (!H.client) var/oldjob = H.mind.assigned_role SSjobs.FreeRole(oldjob) /datum/admins/proc/create_admin_fax(var/department in alldepartments) set name = "Send admin fax" set desc = "Send a fax from Central Command" set category = "Special Verbs" if (!check_rights(R_ADMIN|R_CCIAA|R_FUN)) to_chat(usr, "You do not have enough powers to do this.") return if (!department) to_chat(usr, "No target department specified!") return var/obj/machinery/photocopier/faxmachine/fax = null for (var/obj/machinery/photocopier/faxmachine/F in allfaxes) if (F.department == department) fax = F break if (!fax) to_chat(usr, "Couldn't find a fax machine to send this to!") return //todo: sanitize var/input = input(usr, "Please enter a message to reply to via secure connection. NOTE: BBCode does not work, but HTML tags do! Use
for line breaks.", "Outgoing message from Centcomm", "") as message|null if (!input) to_chat(usr, "Cancelled.") return var/customname = input(usr, "Pick a title for the report", "Title") as text|null if (!customname) to_chat(usr, "Cancelled.") return var/announce = alert(usr, "Do you wish to announce the fax being sent?", "Announce Fax", "Yes", "No") if(announce == "Yes") announce = 1 // 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.name = "[current_map.boss_name] - [customname]" P.info = input P.update_icon() // 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.add_overlay(stampoverlay) P.stamps += "
This paper has been stamped by the Central Command Quantum Relay." if(fax.receivefax(P)) if(announce == 1) command_announcement.Announce("A fax has been sent to the [department] fax machine.", "Fax Sent") to_chat(usr, "Message transmitted successfully.") log_and_message_admins("sent a fax message to the [department] fax machine. (JMP)") sent_faxes += P else to_chat(usr, "Message reply failed.") qdel(P) return /client/proc/check_fax_history() set name = "Check fax history" set desc = "Look up the faxes sent this round." set category = "Special Verbs" if (!check_rights(R_ADMIN|R_CCIAA|R_FUN)) to_chat(usr, "You do not have enough powers to do this.") return var/data = "
Send New Fax
" data += "
" data += "
Received Faxes:

" if (arrived_faxes && arrived_faxes.len) for (var/obj/item/item in arrived_faxes) data += "[item.name] - view message
" else data += "
No faxes have been received.
" data += "
Sent Faxes:

" if (sent_faxes && sent_faxes.len) for (var/obj/item/item in sent_faxes) data += "[item.name] - view message
" else data += "
No faxes have been sent out.
" usr << browse("Centcomm Fax History[data]", "window=Centcomm Fax History") /client/proc/launch_ccia_shuttle() set name = "Launch CCIA Shuttle" set desc = "Launches the CCIA Shuttle." set category = "Special Verbs" var/datum/shuttle/autodock/ferry/S = SSshuttle.shuttles["Agent Shuttle"] S.launch(usr)