diff --git a/code/modules/admin/admin.dm b/code/modules/admin/admin.dm index dc1cbf1c8cd..c43832cd372 100644 --- a/code/modules/admin/admin.dm +++ b/code/modules/admin/admin.dm @@ -1348,6 +1348,7 @@ proc/admin_notice(var/message, var/rights) H.paralysis = 0 msg = "has unparalyzed [key_name(H)]." log_and_message_admins(msg) + /datum/admins/proc/set_tcrystals(mob/living/carbon/human/H as mob) set category = "Debug" set name = "Set Telecrystals" @@ -1380,3 +1381,93 @@ proc/admin_notice(var/message, var/rights) else usr << "You do not have access to this command." + +/datum/admins/proc/sendFax() + set category = "Special Verbs" + set name = "Send Fax" + set desc = "Sends a fax to this machine" + var/department = input("Choose a fax", "Fax") as null|anything in alldepartments + for(var/obj/machinery/photocopier/faxmachine/sendto in allfaxes) + if(sendto.department == department) + + if (!istype(src,/datum/admins)) + src = usr.client.holder + if (!istype(src,/datum/admins)) + usr << "Error: you are not an admin!" + return + + var/replyorigin = input(src.owner, "Please specify who the fax is coming from", "Origin") as text|null + + var/obj/item/weapon/paper/admin/P = new /obj/item/weapon/paper/admin( null ) //hopefully the null loc won't cause trouble for us + faxreply = P + + P.admindatum = src + P.origin = replyorigin + P.destination = sendto + + P.adminbrowse() + + +datum/admins/var/obj/item/weapon/paper/admin/faxreply // var to hold fax replies in + +/datum/admins/proc/faxCallback(var/obj/item/weapon/paper/admin/P, var/obj/machinery/photocopier/faxmachine/destination) + var/customname = input(src.owner, "Pick a title for the report", "Title") as text|null + + P.name = "[P.origin] - [customname]" + P.desc = "This is a paper titled '" + P.name + "'." + + var/shouldStamp = 1 + if(!P.sender) // admin initiated + switch(alert("Would you like the fax stamped?",, "Yes", "No")) + if("No") + shouldStamp = 0 + + if(shouldStamp) + P.stamps += "
"
+ text += "[origin] quantum uplink signed message
")
+
+ t = "[t]"
+ else // If it is a crayon, and he still tries to use these, make them empty!
+ t = replacetext(t, "\[*\]", "")
+ t = replacetext(t, "\[hr\]", "")
+ t = replacetext(t, "\[small\]", "")
+ t = replacetext(t, "\[/small\]", "")
+ t = replacetext(t, "\[list\]", "")
+ t = replacetext(t, "\[/list\]", "")
+ t = replacetext(t, "\[table\]", "")
+ t = replacetext(t, "\[/table\]", "")
+ t = replacetext(t, "\[row\]", "")
+ t = replacetext(t, "\[cell\]", "")
+ t = replacetext(t, "\[logo\]", "")
+
+ t = "[t]"
+
+//Count the fields
+ var/laststart = 1
+ while(1)
+ var/i = findtext(t, "", laststart) //
+ if(i==0)
+ break
+ laststart = i+1
+ fields++
+
+ return t
+
+/obj/item/weapon/paper/admin/get_signature()
+ return input(usr, "Enter the name you wish to sign the paper with (will prompt for multiple entries, in order of entry)", "Signature") as text|null
\ No newline at end of file
diff --git a/code/modules/paperwork/faxmachine.dm b/code/modules/paperwork/faxmachine.dm
index 8c30f1d4863..ff489f56943 100644
--- a/code/modules/paperwork/faxmachine.dm
+++ b/code/modules/paperwork/faxmachine.dm
@@ -142,6 +142,7 @@ var/list/adminfaxes = list() //cache for faxes that have been sent to admins
flick("faxreceive", src)
playsound(loc, "sound/effects/printer.ogg", 50, 1)
+
// give the sprite some time to flick
sleep(20)
@@ -163,11 +164,12 @@ var/list/adminfaxes = list() //cache for faxes that have been sent to admins
use_power(200)
+ //recieved copies should not use toner since it's being used by admins only.
var/obj/item/rcvdcopy
if (istype(copyitem, /obj/item/weapon/paper))
- rcvdcopy = copy(copyitem)
+ rcvdcopy = copy(copyitem, 0)
else if (istype(copyitem, /obj/item/weapon/photo))
- rcvdcopy = photocopy(copyitem)
+ rcvdcopy = photocopy(copyitem, 0)
else if (istype(copyitem, /obj/item/weapon/paper_bundle))
rcvdcopy = bundlecopy(copyitem, 0)
else
@@ -178,14 +180,15 @@ var/list/adminfaxes = list() //cache for faxes that have been sent to admins
adminfaxes += rcvdcopy
//message badmins that a fax has arrived
- switch(destination)
- if (boss_name)
- message_admins(sender, "[uppertext(boss_short)] FAX", rcvdcopy, "CentcommFaxReply", "#006100")
- if ("Sif Governmental Authority")
- message_admins(sender, "SIF GOVERNMENT FAX", rcvdcopy, "CentcommFaxReply", "#1F66A0")
- //message_admins(sender, "SOL GOVERNMENT FAX", rcvdcopy, "SolGovFaxReply", "#1F66A0")
- if ("Supply")
- message_admins(sender, "[uppertext(boss_short)] SUPPLY FAX", rcvdcopy, "CentcommFaxReply", "#5F4519")
+ if (destination == boss_name)
+ message_admins(sender, "[uppertext(boss_short)] FAX", rcvdcopy, "CentcommFaxReply", "#006100")
+ else if ("Sif Governmental Authority")
+ message_admins(sender, "SIF GOVERNMENT FAX", rcvdcopy, "CentcommFaxReply", "#1F66A0")
+ else if ("Supply")
+ message_admins(sender, "[uppertext(boss_short)] SUPPLY FAX", rcvdcopy, "CentcommFaxReply", "#5F4519")
+ else
+ message_admins(sender, "[uppertext(destination)] FAX", rcvdcopy, "UNKNOWN")
+
sendcooldown = 1800
sleep(50)
@@ -193,9 +196,11 @@ var/list/adminfaxes = list() //cache for faxes that have been sent to admins
/obj/machinery/photocopier/faxmachine/proc/message_admins(var/mob/sender, var/faxname, var/obj/item/sent, var/reply_type, font_colour="#006100")
- var/msg = "\blue [faxname]: [key_name(sender, 1)] (PP) (VV) (SM) ([admin_jump_link(sender, src)]) (CA) (REPLY): Receiving '[sent.name]' via secure connection ... view message"
+ var/msg = "\blue [faxname]: [get_options_bar(sender, 2,1,1)]"
+ msg += "(REPLY): "
+ msg += "Receiving '[sent.name]' via secure connection ... view message"
for(var/client/C in admins)
- if(R_ADMIN & C.holder.rights)
+ if((R_ADMIN | R_MOD) & C.holder.rights)
C << msg
C << 'sound/effects/printer.ogg'
diff --git a/code/modules/paperwork/photocopier.dm b/code/modules/paperwork/photocopier.dm
index ec0d7acf19f..4d0e22f1860 100644
--- a/code/modules/paperwork/photocopier.dm
+++ b/code/modules/paperwork/photocopier.dm
@@ -165,7 +165,7 @@
toner = 0
return
-/obj/machinery/photocopier/proc/copy(var/obj/item/weapon/paper/copy)
+/obj/machinery/photocopier/proc/copy(var/obj/item/weapon/paper/copy, var/need_toner=1)
var/obj/item/weapon/paper/c = new /obj/item/weapon/paper (loc)
if(toner > 10) //lots of toner, make it dark
c.info = ""
@@ -196,13 +196,14 @@
img.pixel_y = copy.offset_y[j]
c.overlays += img
c.updateinfolinks()
- toner--
+ if(need_toner)
+ toner--
if(toner == 0)
visible_message("A red light on \the [src] flashes, indicating that it is out of toner.")
return c
-/obj/machinery/photocopier/proc/photocopy(var/obj/item/weapon/photo/photocopy)
+/obj/machinery/photocopier/proc/photocopy(var/obj/item/weapon/photo/photocopy, var/need_toner=1)
var/obj/item/weapon/photo/p = photocopy.copy()
p.loc = src.loc
@@ -216,7 +217,8 @@
p.img.MapColors(rgb(77,77,77), rgb(150,150,150), rgb(28,28,28), rgb(100,100,100))
p.tiny.MapColors(rgb(77,77,77), rgb(150,150,150), rgb(28,28,28), rgb(100,100,100))
p.icon = I
- toner -= 5 //photos use a lot of ink!
+ if(need_toner)
+ toner -= 5 //photos use a lot of ink!
if(toner < 0)
toner = 0
visible_message("A red light on \the [src] flashes, indicating that it is out of toner.")
diff --git a/polaris.dme b/polaris.dme
index 1ef2cb70fa1..3309a393081 100644
--- a/polaris.dme
+++ b/polaris.dme
@@ -1704,6 +1704,7 @@
#include "code\modules\overmap\ships\computers\shuttle.dm"
#include "code\modules\overmap\ships\engines\engine.dm"
#include "code\modules\overmap\ships\engines\thermal.dm"
+#include "code\modules\paperwork\adminpaper.dm"
#include "code\modules\paperwork\carbonpaper.dm"
#include "code\modules\paperwork\clipboard.dm"
#include "code\modules\paperwork\faxmachine.dm"