From f4a2da2d5ecb26868263d2fa5e1b6a9205c7bbc0 Mon Sep 17 00:00:00 2001
From: Jamie D <993128+JamieD1@users.noreply.github.com>
Date: Thu, 21 Apr 2022 15:02:13 +0100
Subject: [PATCH 01/13] Admins Send Fax - Adam Fix
---
code/modules/paperwork/faxmachine.dm | 67 ++++++++++++++++++++++++++++
1 file changed, 67 insertions(+)
diff --git a/code/modules/paperwork/faxmachine.dm b/code/modules/paperwork/faxmachine.dm
index 9ef9cf6cd347..b9bfb44427e9 100644
--- a/code/modules/paperwork/faxmachine.dm
+++ b/code/modules/paperwork/faxmachine.dm
@@ -186,3 +186,70 @@ GLOBAL_LIST_EMPTY(adminfaxes)
/obj/machinery/photocopier/faxmachine/check_ass()
return FALSE // No ass here
+
+/proc/get_fax_machines()
+ var/list/faxes = new()
+ for(var/obj/machinery/faxmachine/F in machines)
+ faxes += F
+ return faxes
+
+/obj/machinery/faxmachine/proc/sendFax(var/obj/machinery/faxmachine/fax as obj in get_fax_machines())
+ set name = "Send Fax"
+ set category = "Admin"
+
+
+ var/who = input("Who is sending this?") in list("NanoTrasen","Syndicate","Cancel")
+ if (who == "Cancel")
+ return
+
+ var/inputsubject = input(src, "Please enter a Subject", "Outgoing message from [who]", "") as text|null
+ if (!inputsubject)
+ return
+
+ var/inputmessage = input(src, "Please enter a message to send to [fax] via secure connection. Use
for line breaks.", "Outgoing message from [who]", "") as message|null
+ if (!inputmessage)
+ return
+
+ var/inputsigned = input(src, "Please enter Centcom Offical name.", "Outgoing message from Centcomm", "") as text|null
+ if (!inputsigned)
+ return
+
+
+ var/customname = input(src, "Pick a title for the report", "Title") as text|null
+ var/input = "
[who] Fax Network
[inputsubject]
[inputmessage]
Signed: [inputsigned]"
+
+ if(! (fax.stat & (BROKEN|NOPOWER) ) )
+
+ // animate! it's alive!
+ flick("faxreceive", fax)
+
+ // give the sprite some time to flick
+ spawn(20)
+ var/obj/item/paper/P = new /obj/item/paper( fax.loc )
+ P.name = "[who=="NanoTrasen" ? "Central Command":"Syndicate"] - [customname]"
+ P.info = input
+ P.update_icon()
+
+ playsound(fax.loc, "sound/items/polaroid1.ogg", 50, 1)
+ // Stamps
+ var/image/stampoverlay = image('icons/obj/bureaucracy.dmi')
+ if(who == "NanoTrasen")
+ stampoverlay.icon_state = "paper_stamp-cent"
+ if(who == "Syndicate")
+ stampoverlay.icon_state = "paper_stamp-syndi"
+ if(!P.stamped)
+ P.stamped = new
+ P.stamped += /obj/item/stamp
+ P.overlays += stampoverlay
+ P.stamps += "
This paper has been stamped[who=="NanoTrasen" ? "": " and encrypted"] by the [ who=="NanoTrasen" ? "Central Command":"Syndicate"] Quantum Relay."
+
+ usr << "Message reply to transmitted successfully."
+ log_admin("[key_name(usr)] sent a fax to [fax], as [who].")
+ log_admin_single("[key_name(usr)] sent a fax to [fax], as [who].")
+ send_investigate_log("[key_name(usr)] sent to a fax to [fax], as [who=="NanoTrasen" ? "Central Command":"Syndicate"]. : view message","fax")
+ message_admins("[key_name_admin(usr)] sent a fax to [fax], as [who=="NanoTrasen" ? "Central Command":"Syndicate"].", 1)
+ return
+ else
+ usr<< "\red The fax is broken or has no power!"
+ feedback_add_details("admin_verb","SF") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
+
From 156e6f619f5562ea7552fdf080dced06f709fbd1 Mon Sep 17 00:00:00 2001
From: Jamie D <993128+JamieD1@users.noreply.github.com>
Date: Thu, 21 Apr 2022 15:04:35 +0100
Subject: [PATCH 02/13] e
---
code/modules/paperwork/faxmachine.dm | 4 ----
1 file changed, 4 deletions(-)
diff --git a/code/modules/paperwork/faxmachine.dm b/code/modules/paperwork/faxmachine.dm
index b9bfb44427e9..622f64514407 100644
--- a/code/modules/paperwork/faxmachine.dm
+++ b/code/modules/paperwork/faxmachine.dm
@@ -245,11 +245,7 @@ GLOBAL_LIST_EMPTY(adminfaxes)
usr << "Message reply to transmitted successfully."
log_admin("[key_name(usr)] sent a fax to [fax], as [who].")
- log_admin_single("[key_name(usr)] sent a fax to [fax], as [who].")
- send_investigate_log("[key_name(usr)] sent to a fax to [fax], as [who=="NanoTrasen" ? "Central Command":"Syndicate"]. : view message","fax")
message_admins("[key_name_admin(usr)] sent a fax to [fax], as [who=="NanoTrasen" ? "Central Command":"Syndicate"].", 1)
return
else
usr<< "\red The fax is broken or has no power!"
- feedback_add_details("admin_verb","SF") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
-
From d4bf7882ae3e5cab5428026fd8efc3e564563a80 Mon Sep 17 00:00:00 2001
From: adamsong
Date: Thu, 21 Apr 2022 10:02:49 -0500
Subject: [PATCH 03/13] Tweaks admin fax system, untested
---
code/modules/admin/admin_verbs.dm | 1 +
code/modules/admin/topic.dm | 65 +++++++++++++---------------
code/modules/paperwork/faxmachine.dm | 64 ++++++++-------------------
3 files changed, 47 insertions(+), 83 deletions(-)
diff --git a/code/modules/admin/admin_verbs.dm b/code/modules/admin/admin_verbs.dm
index abff4327533b..4879a0859250 100644
--- a/code/modules/admin/admin_verbs.dm
+++ b/code/modules/admin/admin_verbs.dm
@@ -69,6 +69,7 @@ GLOBAL_PROTECT(admin_verbs_admin)
/client/proc/cmd_admin_world_narrate, /*sends text to all players with no padding*/
/client/proc/cmd_admin_local_narrate, /*sends text to all mobs within view of atom*/
/client/proc/cmd_admin_create_centcom_report,
+ /datum/admins/proc/send_global_fax,
/client/proc/cmd_change_command_name,
/client/proc/cmd_admin_check_player_exp, /* shows players by playtime */
/client/proc/toggle_combo_hud, // toggle display of the combination pizza antag and taco sci/med/eng hud
diff --git a/code/modules/admin/topic.dm b/code/modules/admin/topic.dm
index dd134d4d38f5..02af97e367e5 100644
--- a/code/modules/admin/topic.dm
+++ b/code/modules/admin/topic.dm
@@ -2270,51 +2270,44 @@
info.examine(usr, TRUE)
else if(href_list["CentcomFaxReply"])
- var/mob/living/carbon/human/H = locate(href_list["CentcomFaxReply"])
- var/obj/machinery/photocopier/faxmachine/fax = locate(href_list["originfax"]) in GLOB.allfaxes
-
- var/inputsubject = input(src.owner, "Please enter a Subject", "Outgoing message from Centcom", "") as text|null
- if(!inputsubject) return
+ var/obj/machinery/photocopier/faxmachine/F = locate(href_list["originfax"]) in GLOB.allfaxes
+ if(!istype(F))
+ to_chat(src.owner, span_danger("Unable to locate fax!"))
+ return
- var/inputmessage = input(src.owner, "Please enter a message to reply to [key_name(H)] via secure connection. Use
for line breaks.", "Outgoing message from Centcom", "") as message|null
- if(!inputmessage) return
+ send_admin_fax(F)
- var/inputsigned = input(src.owner, "Please enter Centcom Offical name.", "Outgoing message from Centcom", "") as text|null
- if(!inputsigned) return
+/datum/admins/proc/send_global_fax()
+ set category = "Admin.Round Interaction"
+ set name = "Send Global Fax"
- var/customname = input(src.owner, "Pick a title for the report", "Title") as text|null
- var/input = "NanoTrasen Fax Network
RE: [inputsubject]
[inputmessage]
Signed: [inputsigned]"
+ if(!check_rights(R_ADMIN)) return
+ send_admin_fax(null)
- for(var/obj/machinery/photocopier/faxmachine/F in GLOB.allfaxes)
- if(F == fax)
- if(! (F.stat & (BROKEN|NOPOWER) ) )
+/datum/admins/proc/send_admin_fax(obj/machinery/photocopier/faxmachine/F)
+ var/inputsubject = input(src.owner, "Please enter a Subject", "Outgoing message from Centcom", "") as text|null
+ if(!inputsubject) return
- // animate! it's alive!
- flick("faxreceive", F)
+ var/inputmessage = input(src.owner, "Please enter a message send to [istype(F) ? F : "all fax machines"] via secure connection. Use
for line breaks.", "Outgoing message from Centcom", "") as message|null
+ if(!inputmessage) return
- // give the sprite some time to flick
- spawn(20)
- var/obj/item/paper/P = new /obj/item/paper( F.loc )
- P.name = "[command_name()]- [customname]"
- P.info = input
- P.update_icon()
+ var/inputsigned = input(src.owner, "Please enter Centcom Offical name.", "Outgoing message from Centcom", "") as text|null
+ if(!inputsigned) return
- playsound(F.loc, "sound/items/polaroid1.ogg", 50, 1)
+ var/customname = input(src.owner, "Pick a title for the report", "Title") as text|null
+ var/input = "NanoTrasen Fax Network
RE: [inputsubject]
[inputmessage]
Signed: [inputsigned]"
- // 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.overlays += stampoverlay
- P.stamps += "
This paper has been stamped by the Central Command Quantum Relay."
+ log_admin("[key_name(src.owner)] sent a fax message to [istype(F) ? F : "all fax machines"]: [input]")
+ message_admins("[key_name_admin(src.owner)] sent a fax message to [istype(F) ? F : "all fax machines"]")
- to_chat(owner, "Message reply to Station transmitted successfully.")
- log_admin("[key_name(src.owner)] replied to a fax message from [key_name(H)]: [input]")
- message_admins("[key_name_admin(src.owner)] replied to a fax message from [key_name_admin(H)]", 1)
- return
- to_chat(src.owner, span_danger("Unable to locate fax!"))
+ if(istype(F))
+ INVOKE_ASYNC(F, /obj/machinery/photocopier/faxmachine.proc/recieve_admin_fax, customname, input)
+ return
+
+ for(var/obj/machinery/photocopier/faxmachine/fax in GLOB.allfaxes)
+ INVOKE_ASYNC(fax, /obj/machinery/photocopier/faxmachine.proc/recieve_admin_fax, customname, input)
+
+
/datum/admins/proc/HandleCMode()
if(!check_rights(R_ADMIN))
diff --git a/code/modules/paperwork/faxmachine.dm b/code/modules/paperwork/faxmachine.dm
index 622f64514407..00dcfdb6e191 100644
--- a/code/modules/paperwork/faxmachine.dm
+++ b/code/modules/paperwork/faxmachine.dm
@@ -55,6 +55,8 @@ GLOBAL_LIST_EMPTY(adminfaxes)
if(sendcooldown - world.time > 0)
to_chat(usr, "Transmitter recharging")
return
+
+ sendcooldown = world.time + 1 MINUTES
if (destination in GLOB.admin_departments)
INVOKE_ASYNC(src, .proc/send_admin_fax, usr, destination)
else
@@ -112,7 +114,6 @@ GLOBAL_LIST_EMPTY(adminfaxes)
if (success)
visible_message("[src] beeps, \"Message transmitted successfully.\"")
- sendcooldown = world.time + 1 MINUTES
else
visible_message("[src] beeps, \"Error transmitting message.\"")
@@ -171,13 +172,12 @@ GLOBAL_LIST_EMPTY(adminfaxes)
switch(destination)
if ("Central Command")
send_adminmessage(sender, "CENTCOM FAX", rcvdcopy, "CentcomFaxReply", "#006100")
- sendcooldown = world.time + 1 MINUTES
sleep(50)
visible_message("[src] beeps, \"Message transmitted successfully.\"")
/obj/machinery/photocopier/faxmachine/proc/send_adminmessage(var/mob/sender, var/faxname, var/obj/item/sent, var/reply_type, font_colour="#006100")
- var/msg = "[faxname]: [key_name(sender, 1)] (PP) (VV) (SM) (JMP) (REPLY): Receiving '[sent.name]' via secure connection ... view message"
+ var/msg = "[faxname]: [key_name(sender, 1)] (PP) (VV) (SM) (JMP) (REPLY): Receiving '[sent.name]' via secure connection ... view message"
msg = span_admin("[msg]")
to_chat(GLOB.admins,
type = MESSAGE_TYPE_ADMINLOG,
@@ -187,65 +187,35 @@ GLOBAL_LIST_EMPTY(adminfaxes)
/obj/machinery/photocopier/faxmachine/check_ass()
return FALSE // No ass here
-/proc/get_fax_machines()
- var/list/faxes = new()
- for(var/obj/machinery/faxmachine/F in machines)
- faxes += F
- return faxes
-
-/obj/machinery/faxmachine/proc/sendFax(var/obj/machinery/faxmachine/fax as obj in get_fax_machines())
+/obj/machinery/faxmachine/proc/sendFax(var/obj/machinery/faxmachine/fax as obj in GLOB.allfaxes)
set name = "Send Fax"
set category = "Admin"
+ if(!check_rights(R_ADMIN)) return
+ usr.client.holder.send_admin_fax(src)
- var/who = input("Who is sending this?") in list("NanoTrasen","Syndicate","Cancel")
- if (who == "Cancel")
- return
-
- var/inputsubject = input(src, "Please enter a Subject", "Outgoing message from [who]", "") as text|null
- if (!inputsubject)
- return
-
- var/inputmessage = input(src, "Please enter a message to send to [fax] via secure connection. Use
for line breaks.", "Outgoing message from [who]", "") as message|null
- if (!inputmessage)
- return
-
- var/inputsigned = input(src, "Please enter Centcom Offical name.", "Outgoing message from Centcomm", "") as text|null
- if (!inputsigned)
- return
-
-
- var/customname = input(src, "Pick a title for the report", "Title") as text|null
- var/input = "[who] Fax Network
[inputsubject]
[inputmessage]
Signed: [inputsigned]"
-
- if(! (fax.stat & (BROKEN|NOPOWER) ) )
-
+/obj/machinery/photocopier/faxmachine/proc/recieve_admin_fax(customname, input)
+ if(! (stat & (BROKEN|NOPOWER) ) )
// animate! it's alive!
- flick("faxreceive", fax)
+ flick("faxreceive", src)
// give the sprite some time to flick
spawn(20)
- var/obj/item/paper/P = new /obj/item/paper( fax.loc )
- P.name = "[who=="NanoTrasen" ? "Central Command":"Syndicate"] - [customname]"
+ var/obj/item/paper/P = new /obj/item/paper( loc )
+ P.name = "[command_name()]- [customname]"
P.info = input
P.update_icon()
- playsound(fax.loc, "sound/items/polaroid1.ogg", 50, 1)
+ playsound(loc, "sound/items/polaroid1.ogg", 50, 1)
+
// Stamps
var/image/stampoverlay = image('icons/obj/bureaucracy.dmi')
- if(who == "NanoTrasen")
- stampoverlay.icon_state = "paper_stamp-cent"
- if(who == "Syndicate")
- stampoverlay.icon_state = "paper_stamp-syndi"
+ stampoverlay.icon_state = "paper_stamp-cent"
if(!P.stamped)
P.stamped = new
P.stamped += /obj/item/stamp
P.overlays += stampoverlay
- P.stamps += "
This paper has been stamped[who=="NanoTrasen" ? "": " and encrypted"] by the [ who=="NanoTrasen" ? "Central Command":"Syndicate"] Quantum Relay."
+ P.stamps += "This paper has been stamped by the Central Command Quantum Relay."
+
+
- usr << "Message reply to transmitted successfully."
- log_admin("[key_name(usr)] sent a fax to [fax], as [who].")
- message_admins("[key_name_admin(usr)] sent a fax to [fax], as [who=="NanoTrasen" ? "Central Command":"Syndicate"].", 1)
- return
- else
- usr<< "\red The fax is broken or has no power!"
From 86132c481eff2fd84d67ca7e74083b1c8e713fb0 Mon Sep 17 00:00:00 2001
From: adamsong
Date: Thu, 21 Apr 2022 10:40:58 -0500
Subject: [PATCH 04/13] Makes things work
---
code/modules/admin/admin_verbs.dm | 2 +-
code/modules/admin/topic.dm | 18 +++++++++---------
code/modules/paperwork/faxmachine.dm | 4 ++--
3 files changed, 12 insertions(+), 12 deletions(-)
diff --git a/code/modules/admin/admin_verbs.dm b/code/modules/admin/admin_verbs.dm
index 4879a0859250..2bfac5b373a7 100644
--- a/code/modules/admin/admin_verbs.dm
+++ b/code/modules/admin/admin_verbs.dm
@@ -69,7 +69,7 @@ GLOBAL_PROTECT(admin_verbs_admin)
/client/proc/cmd_admin_world_narrate, /*sends text to all players with no padding*/
/client/proc/cmd_admin_local_narrate, /*sends text to all mobs within view of atom*/
/client/proc/cmd_admin_create_centcom_report,
- /datum/admins/proc/send_global_fax,
+ /client/proc/send_global_fax,
/client/proc/cmd_change_command_name,
/client/proc/cmd_admin_check_player_exp, /* shows players by playtime */
/client/proc/toggle_combo_hud, // toggle display of the combination pizza antag and taco sci/med/eng hud
diff --git a/code/modules/admin/topic.dm b/code/modules/admin/topic.dm
index 02af97e367e5..201f8ab5fdd9 100644
--- a/code/modules/admin/topic.dm
+++ b/code/modules/admin/topic.dm
@@ -2275,30 +2275,30 @@
to_chat(src.owner, span_danger("Unable to locate fax!"))
return
- send_admin_fax(F)
+ owner.send_admin_fax(F)
-/datum/admins/proc/send_global_fax()
+/client/proc/send_global_fax()
set category = "Admin.Round Interaction"
set name = "Send Global Fax"
if(!check_rights(R_ADMIN)) return
send_admin_fax(null)
-/datum/admins/proc/send_admin_fax(obj/machinery/photocopier/faxmachine/F)
- var/inputsubject = input(src.owner, "Please enter a Subject", "Outgoing message from Centcom", "") as text|null
+/client/proc/send_admin_fax(obj/machinery/photocopier/faxmachine/F)
+ var/inputsubject = input(src, "Please enter a Subject", "Outgoing message from Centcom", "") as text|null
if(!inputsubject) return
- var/inputmessage = input(src.owner, "Please enter a message send to [istype(F) ? F : "all fax machines"] via secure connection. Use
for line breaks.", "Outgoing message from Centcom", "") as message|null
+ var/inputmessage = input(src, "Please enter a message send to [istype(F) ? F : "all fax machines"] via secure connection. Use
for line breaks.", "Outgoing message from Centcom", "") as message|null
if(!inputmessage) return
- var/inputsigned = input(src.owner, "Please enter Centcom Offical name.", "Outgoing message from Centcom", "") as text|null
+ var/inputsigned = input(src, "Please enter Centcom Offical name.", "Outgoing message from Centcom", "") as text|null
if(!inputsigned) return
- var/customname = input(src.owner, "Pick a title for the report", "Title") as text|null
+ var/customname = input(src, "Pick a title for the report", "Title") as text|null
var/input = "NanoTrasen Fax Network
RE: [inputsubject]
[inputmessage]
Signed: [inputsigned]"
- log_admin("[key_name(src.owner)] sent a fax message to [istype(F) ? F : "all fax machines"]: [input]")
- message_admins("[key_name_admin(src.owner)] sent a fax message to [istype(F) ? F : "all fax machines"]")
+ log_admin("[key_name(src)] sent a fax message to [istype(F) ? F : "all fax machines"]: [input]")
+ message_admins("[key_name_admin(src)] sent a fax message to [istype(F) ? F : "all fax machines"]")
if(istype(F))
INVOKE_ASYNC(F, /obj/machinery/photocopier/faxmachine.proc/recieve_admin_fax, customname, input)
diff --git a/code/modules/paperwork/faxmachine.dm b/code/modules/paperwork/faxmachine.dm
index 00dcfdb6e191..04609940ff09 100644
--- a/code/modules/paperwork/faxmachine.dm
+++ b/code/modules/paperwork/faxmachine.dm
@@ -187,12 +187,12 @@ GLOBAL_LIST_EMPTY(adminfaxes)
/obj/machinery/photocopier/faxmachine/check_ass()
return FALSE // No ass here
-/obj/machinery/faxmachine/proc/sendFax(var/obj/machinery/faxmachine/fax as obj in GLOB.allfaxes)
+/obj/machinery/photocopier/faxmachine/proc/sendFax(var/obj/machinery/faxmachine/fax as obj in GLOB.allfaxes)
set name = "Send Fax"
set category = "Admin"
if(!check_rights(R_ADMIN)) return
- usr.client.holder.send_admin_fax(src)
+ usr.client.send_admin_fax(src)
/obj/machinery/photocopier/faxmachine/proc/recieve_admin_fax(customname, input)
if(! (stat & (BROKEN|NOPOWER) ) )
From 663afa1eeadcada3e699061574a34984a08ca33c Mon Sep 17 00:00:00 2001
From: adamsong
Date: Thu, 21 Apr 2022 10:47:25 -0500
Subject: [PATCH 05/13] Fixed jamie's typo
---
code/modules/paperwork/faxmachine.dm | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/code/modules/paperwork/faxmachine.dm b/code/modules/paperwork/faxmachine.dm
index 04609940ff09..78fa4cb9c9c9 100644
--- a/code/modules/paperwork/faxmachine.dm
+++ b/code/modules/paperwork/faxmachine.dm
@@ -187,7 +187,7 @@ GLOBAL_LIST_EMPTY(adminfaxes)
/obj/machinery/photocopier/faxmachine/check_ass()
return FALSE // No ass here
-/obj/machinery/photocopier/faxmachine/proc/sendFax(var/obj/machinery/faxmachine/fax as obj in GLOB.allfaxes)
+/obj/machinery/photocopier/faxmachine/proc/sendFax(var/obj/machinery/photocopier/faxmachine/fax as obj in GLOB.allfaxes)
set name = "Send Fax"
set category = "Admin"
From 8a259f5711bcf2c1f131ffe2c4ab24f5f72a6dfa Mon Sep 17 00:00:00 2001
From: adamsong
Date: Thu, 21 Apr 2022 14:56:55 -0500
Subject: [PATCH 06/13] Fix issues
---
code/modules/admin/topic.dm | 2 +-
code/modules/paperwork/faxmachine.dm | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/code/modules/admin/topic.dm b/code/modules/admin/topic.dm
index 201f8ab5fdd9..07b3dfba921a 100644
--- a/code/modules/admin/topic.dm
+++ b/code/modules/admin/topic.dm
@@ -2291,7 +2291,7 @@
var/inputmessage = input(src, "Please enter a message send to [istype(F) ? F : "all fax machines"] via secure connection. Use
for line breaks.", "Outgoing message from Centcom", "") as message|null
if(!inputmessage) return
- var/inputsigned = input(src, "Please enter Centcom Offical name.", "Outgoing message from Centcom", "") as text|null
+ var/inputsigned = input(src, "Please enter Centcom Offical name.", "Outgoing message from Centcom", usr?.client?.holder?.admin_signature || "") as text|null
if(!inputsigned) return
var/customname = input(src, "Pick a title for the report", "Title") as text|null
diff --git a/code/modules/paperwork/faxmachine.dm b/code/modules/paperwork/faxmachine.dm
index 78fa4cb9c9c9..f43f32109f8c 100644
--- a/code/modules/paperwork/faxmachine.dm
+++ b/code/modules/paperwork/faxmachine.dm
@@ -177,7 +177,7 @@ GLOBAL_LIST_EMPTY(adminfaxes)
/obj/machinery/photocopier/faxmachine/proc/send_adminmessage(var/mob/sender, var/faxname, var/obj/item/sent, var/reply_type, font_colour="#006100")
- var/msg = "[faxname]: [key_name(sender, 1)] (PP) (VV) (SM) (JMP) (REPLY): Receiving '[sent.name]' via secure connection ... view message"
+ var/msg = "[faxname]: [key_name(sender, 1)] (PP) (VV) (SM) (JMP) (REPLY): Receiving '[sent.name]' via secure connection ... view message"
msg = span_admin("[msg]")
to_chat(GLOB.admins,
type = MESSAGE_TYPE_ADMINLOG,
From a2eb3804c1ea055f0c512a3bf0cd011bb00729ff Mon Sep 17 00:00:00 2001
From: adamsong
Date: Thu, 21 Apr 2022 16:27:18 -0400
Subject: [PATCH 07/13] Update code/modules/admin/topic.dm
Co-authored-by: TheGamerdk <5618080+TheGamerdk@users.noreply.github.com>
---
code/modules/admin/topic.dm | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/code/modules/admin/topic.dm b/code/modules/admin/topic.dm
index 07b3dfba921a..2191dd0db543 100644
--- a/code/modules/admin/topic.dm
+++ b/code/modules/admin/topic.dm
@@ -2281,7 +2281,8 @@
set category = "Admin.Round Interaction"
set name = "Send Global Fax"
- if(!check_rights(R_ADMIN)) return
+ if(!check_rights(R_ADMIN))
+ return
send_admin_fax(null)
/client/proc/send_admin_fax(obj/machinery/photocopier/faxmachine/F)
From 4ac6807b19f8090da1ed2ed9379aa10b36c282a9 Mon Sep 17 00:00:00 2001
From: Jamie D <993128+JamieD1@users.noreply.github.com>
Date: Thu, 21 Apr 2022 21:32:58 +0100
Subject: [PATCH 08/13] AdminFix
---
code/modules/admin/topic.dm | 3 ++-
code/modules/paperwork/faxmachine.dm | 13 ++++++++++---
2 files changed, 12 insertions(+), 4 deletions(-)
diff --git a/code/modules/admin/topic.dm b/code/modules/admin/topic.dm
index 2191dd0db543..a4b0c2640ac4 100644
--- a/code/modules/admin/topic.dm
+++ b/code/modules/admin/topic.dm
@@ -2276,6 +2276,7 @@
return
owner.send_admin_fax(F)
+
/client/proc/send_global_fax()
set category = "Admin.Round Interaction"
@@ -2300,6 +2301,7 @@
log_admin("[key_name(src)] sent a fax message to [istype(F) ? F : "all fax machines"]: [input]")
message_admins("[key_name_admin(src)] sent a fax message to [istype(F) ? F : "all fax machines"]")
+ minor_announce("Central command has sent a Fax message, this will be printed out at [istype(F) ? F : "all fax machines"]")
if(istype(F))
INVOKE_ASYNC(F, /obj/machinery/photocopier/faxmachine.proc/recieve_admin_fax, customname, input)
@@ -2308,7 +2310,6 @@
for(var/obj/machinery/photocopier/faxmachine/fax in GLOB.allfaxes)
INVOKE_ASYNC(fax, /obj/machinery/photocopier/faxmachine.proc/recieve_admin_fax, customname, input)
-
/datum/admins/proc/HandleCMode()
if(!check_rights(R_ADMIN))
diff --git a/code/modules/paperwork/faxmachine.dm b/code/modules/paperwork/faxmachine.dm
index f43f32109f8c..058620c678e7 100644
--- a/code/modules/paperwork/faxmachine.dm
+++ b/code/modules/paperwork/faxmachine.dm
@@ -187,9 +187,9 @@ GLOBAL_LIST_EMPTY(adminfaxes)
/obj/machinery/photocopier/faxmachine/check_ass()
return FALSE // No ass here
-/obj/machinery/photocopier/faxmachine/proc/sendFax(var/obj/machinery/photocopier/faxmachine/fax as obj in GLOB.allfaxes)
+/obj/machinery/photocopier/faxmachine/proc/sendFax(var/obj/machinery/photocopier/faxmachine/fax in GLOB.allfaxes)
set name = "Send Fax"
- set category = "Admin"
+ set category = "Admin.RoundInteraction"
if(!check_rights(R_ADMIN)) return
usr.client.send_admin_fax(src)
@@ -217,5 +217,12 @@ GLOBAL_LIST_EMPTY(adminfaxes)
P.overlays += stampoverlay
P.stamps += "This paper has been stamped by the Central Command Quantum Relay."
-
+/obj/machinery/photocopier/faxmachine/AltClick(mob/user)
+ . = ..()
+ if(IsAdminGhost(user))
+ send_admin_fax(src)
+/obj/machinery/photocopier/faxmachine/examine(mob/user)
+ . = ..()
+ if(IsAdminGhost(user))
+ .+= "You can send admin faxes via AltClick to this specific Fax Machine."
From 5b16eef4972e3c7477b156e15e8f70b2e5ac3da1 Mon Sep 17 00:00:00 2001
From: adamsong
Date: Thu, 21 Apr 2022 15:47:18 -0500
Subject: [PATCH 09/13] Fixed stamp
---
code/modules/paperwork/faxmachine.dm | 19 +++++++++++--------
1 file changed, 11 insertions(+), 8 deletions(-)
diff --git a/code/modules/paperwork/faxmachine.dm b/code/modules/paperwork/faxmachine.dm
index f43f32109f8c..db996c2dc4ab 100644
--- a/code/modules/paperwork/faxmachine.dm
+++ b/code/modules/paperwork/faxmachine.dm
@@ -209,13 +209,16 @@ GLOBAL_LIST_EMPTY(adminfaxes)
playsound(loc, "sound/items/polaroid1.ogg", 50, 1)
// 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.overlays += stampoverlay
- P.stamps += "This paper has been stamped by the Central Command Quantum Relay."
-
+ var/datum/asset/spritesheet/sheet = get_asset_datum(/datum/asset/spritesheet/simple/paper)
+ if (isnull(P.stamps))
+ P.stamps = sheet.css_tag()
+ P.stamps += sheet.icon_tag("stamp-cent")
+ P.stamps += "
This paper has been stamped by the Central Command Quantum Relay.
"
+ var/mutable_appearance/stampoverlay = mutable_appearance('icons/obj/bureaucracy.dmi', "paper_stamp-cent")
+ stampoverlay.pixel_x = rand(-2, 2)
+ stampoverlay.pixel_y = rand(-3, 2)
+
+ LAZYADD(P.stamped, "stamp-cent")
+ P.add_overlay(stampoverlay)
From 73e284fa1d29c5e1ec7bc1bd485df22fb9ba9d98 Mon Sep 17 00:00:00 2001
From: adamsong
Date: Thu, 21 Apr 2022 23:45:55 -0500
Subject: [PATCH 10/13] Admin faxes can use paper markdown
---
code/__DEFINES/misc.dm | 4 +++-
code/modules/admin/topic.dm | 20 ++++++++++++++------
code/modules/paperwork/faxmachine.dm | 13 +++++++++++--
code/modules/paperwork/paper.dm | 4 ----
4 files changed, 28 insertions(+), 13 deletions(-)
diff --git a/code/__DEFINES/misc.dm b/code/__DEFINES/misc.dm
index f3ccef9ccd9c..c9d711aea662 100644
--- a/code/__DEFINES/misc.dm
+++ b/code/__DEFINES/misc.dm
@@ -104,6 +104,8 @@
#define SIGNFONT "Times New Roman"
#define CHARCOAL_FONT "Candara"
+#define PAPER_FIELD ""
+
#define RESIZE_DEFAULT_SIZE 1
@@ -496,4 +498,4 @@ GLOBAL_LIST_INIT(pda_styles, list(MONO, VT, ORBITRON, SHARE))
/// 2 tiles down
#define ui_vamprank_display "WEST:6,CENTER-2:-5"
/// 6 pixels to the right, zero tiles & 5 pixels DOWN.
-#define ui_sunlight_display "WEST:6,CENTER-0:0"
\ No newline at end of file
+#define ui_sunlight_display "WEST:6,CENTER-0:0"
diff --git a/code/modules/admin/topic.dm b/code/modules/admin/topic.dm
index a4b0c2640ac4..357d387accad 100644
--- a/code/modules/admin/topic.dm
+++ b/code/modules/admin/topic.dm
@@ -2290,25 +2290,33 @@
var/inputsubject = input(src, "Please enter a Subject", "Outgoing message from Centcom", "") as text|null
if(!inputsubject) return
- var/inputmessage = input(src, "Please enter a message send to [istype(F) ? F : "all fax machines"] via secure connection. Use
for line breaks.", "Outgoing message from Centcom", "") as message|null
+ var/inputmessage = input(src, "Please enter a message send to [istype(F) ? F : "all fax machines"] via secure connection. Supports pen markdown.", "Outgoing message from Centcom", "") as message|null
if(!inputmessage) return
var/inputsigned = input(src, "Please enter Centcom Offical name.", "Outgoing message from Centcom", usr?.client?.holder?.admin_signature || "") as text|null
if(!inputsigned) return
var/customname = input(src, "Pick a title for the report", "Title") as text|null
- var/input = "NanoTrasen Fax Network
RE: [inputsubject]
[inputmessage]
Signed: [inputsigned]"
+ var/prefix = "NanoTrasen Fax Network
RE: [inputsubject]
"
+ var/suffix = "
Signed: [inputsigned]"
- log_admin("[key_name(src)] sent a fax message to [istype(F) ? F : "all fax machines"]: [input]")
+ inputmessage = parsemarkdown(inputmessage)
+ inputmessage = "[prefix][inputmessage][suffix]"
+
+ var/list/T = splittext(inputmessage,PAPER_FIELD,1,0,TRUE) // The list of subsections.. Splits the text on where paper fields have been created.
+ //The TRUE marks that we're keeping these "seperator" paper fields; they're included in this list.
+
+ log_admin("[key_name(src)] sent a fax message to [istype(F) ? F : "all fax machines"]: [inputmessage]")
message_admins("[key_name_admin(src)] sent a fax message to [istype(F) ? F : "all fax machines"]")
- minor_announce("Central command has sent a Fax message, this will be printed out at [istype(F) ? F : "all fax machines"]")
+ if(!istype(F))
+ minor_announce("Central command has sent a fax message, this will be printed out at all fax machines")
if(istype(F))
- INVOKE_ASYNC(F, /obj/machinery/photocopier/faxmachine.proc/recieve_admin_fax, customname, input)
+ INVOKE_ASYNC(F, /obj/machinery/photocopier/faxmachine.proc/recieve_admin_fax, customname, T)
return
for(var/obj/machinery/photocopier/faxmachine/fax in GLOB.allfaxes)
- INVOKE_ASYNC(fax, /obj/machinery/photocopier/faxmachine.proc/recieve_admin_fax, customname, input)
+ INVOKE_ASYNC(fax, /obj/machinery/photocopier/faxmachine.proc/recieve_admin_fax, customname, T)
/datum/admins/proc/HandleCMode()
diff --git a/code/modules/paperwork/faxmachine.dm b/code/modules/paperwork/faxmachine.dm
index 89cb217b005d..db39484d8135 100644
--- a/code/modules/paperwork/faxmachine.dm
+++ b/code/modules/paperwork/faxmachine.dm
@@ -194,7 +194,7 @@ GLOBAL_LIST_EMPTY(adminfaxes)
if(!check_rights(R_ADMIN)) return
usr.client.send_admin_fax(src)
-/obj/machinery/photocopier/faxmachine/proc/recieve_admin_fax(customname, input)
+/obj/machinery/photocopier/faxmachine/proc/recieve_admin_fax(customname, list/T)
if(! (stat & (BROKEN|NOPOWER) ) )
// animate! it's alive!
flick("faxreceive", src)
@@ -203,7 +203,16 @@ GLOBAL_LIST_EMPTY(adminfaxes)
spawn(20)
var/obj/item/paper/P = new /obj/item/paper( loc )
P.name = "[command_name()]- [customname]"
- P.info = input
+
+ var/list/templist = list() // All the stuff we're adding to $written
+ for(var/text in T)
+ if(text == PAPER_FIELD)
+ templist += text
+ else
+ var/datum/langtext/L = new(text,/datum/language/common)
+ templist += L
+
+ P.written += templist
P.update_icon()
playsound(loc, "sound/items/polaroid1.ogg", 50, 1)
diff --git a/code/modules/paperwork/paper.dm b/code/modules/paperwork/paper.dm
index a47b74e04884..477ff473ce6d 100644
--- a/code/modules/paperwork/paper.dm
+++ b/code/modules/paperwork/paper.dm
@@ -5,8 +5,6 @@
* lipstick wiping is in code/game/objects/items/weapons/cosmetics.dm!
*/
-#define PAPER_FIELD ""
-
/datum/langtext // A datum to describe a piece of writing that stores a language value with it.
var/text = "" // The text that is written.
var/datum/language/lang // the language it's written in.
@@ -384,5 +382,3 @@
/obj/item/paper/crumpled/bloody
icon_state = "scrap_bloodied"
-
-#undef PAPER_FIELD
From 4a7b3fe7d7f1b0dc620041f52cc6b3db1b28a25b Mon Sep 17 00:00:00 2001
From: Jamie D <993128+JamieD1@users.noreply.github.com>
Date: Sat, 30 Apr 2022 14:40:41 +0100
Subject: [PATCH 11/13] Apply suggestions from code review
Co-authored-by: TheGamerdk <5618080+TheGamerdk@users.noreply.github.com>
---
code/modules/admin/topic.dm | 10 +++++-----
code/modules/paperwork/faxmachine.dm | 9 +++++----
2 files changed, 10 insertions(+), 9 deletions(-)
diff --git a/code/modules/admin/topic.dm b/code/modules/admin/topic.dm
index 357d387accad..f497177a7e65 100644
--- a/code/modules/admin/topic.dm
+++ b/code/modules/admin/topic.dm
@@ -2284,16 +2284,16 @@
if(!check_rights(R_ADMIN))
return
- send_admin_fax(null)
+ send_admin_fax()
/client/proc/send_admin_fax(obj/machinery/photocopier/faxmachine/F)
- var/inputsubject = input(src, "Please enter a Subject", "Outgoing message from Centcom", "") as text|null
+ var/inputsubject = input(src, "Please enter a subject", "Outgoing message from CentCom", "") as text|null
if(!inputsubject) return
- var/inputmessage = input(src, "Please enter a message send to [istype(F) ? F : "all fax machines"] via secure connection. Supports pen markdown.", "Outgoing message from Centcom", "") as message|null
+ var/inputmessage = input(src, "Please enter the message sent to [istype(F) ? F : "all fax machines"] via secure connection. Supports pen markdown.", "Outgoing message from CentCom", "") as message|null
if(!inputmessage) return
- var/inputsigned = input(src, "Please enter Centcom Offical name.", "Outgoing message from Centcom", usr?.client?.holder?.admin_signature || "") as text|null
+ var/inputsigned = input(src, "Please enter CentCom Official name.", "Outgoing message from CentCom", usr?.client?.holder?.admin_signature || "") as text|null
if(!inputsigned) return
var/customname = input(src, "Pick a title for the report", "Title") as text|null
@@ -2309,7 +2309,7 @@
log_admin("[key_name(src)] sent a fax message to [istype(F) ? F : "all fax machines"]: [inputmessage]")
message_admins("[key_name_admin(src)] sent a fax message to [istype(F) ? F : "all fax machines"]")
if(!istype(F))
- minor_announce("Central command has sent a fax message, this will be printed out at all fax machines")
+ minor_announce("Central Command has sent a fax message, it will be printed out at all fax machines.")
if(istype(F))
INVOKE_ASYNC(F, /obj/machinery/photocopier/faxmachine.proc/recieve_admin_fax, customname, T)
diff --git a/code/modules/paperwork/faxmachine.dm b/code/modules/paperwork/faxmachine.dm
index db39484d8135..5e27e258815c 100644
--- a/code/modules/paperwork/faxmachine.dm
+++ b/code/modules/paperwork/faxmachine.dm
@@ -195,14 +195,15 @@ GLOBAL_LIST_EMPTY(adminfaxes)
usr.client.send_admin_fax(src)
/obj/machinery/photocopier/faxmachine/proc/recieve_admin_fax(customname, list/T)
- if(! (stat & (BROKEN|NOPOWER) ) )
+ if(stat & (BROKEN|NOPOWER))
+ return
// animate! it's alive!
flick("faxreceive", src)
// give the sprite some time to flick
spawn(20)
var/obj/item/paper/P = new /obj/item/paper( loc )
- P.name = "[command_name()]- [customname]"
+ P.name = "[command_name()] - [customname]"
var/list/templist = list() // All the stuff we're adding to $written
for(var/text in T)
@@ -222,7 +223,7 @@ GLOBAL_LIST_EMPTY(adminfaxes)
if (isnull(P.stamps))
P.stamps = sheet.css_tag()
P.stamps += sheet.icon_tag("stamp-cent")
- P.stamps += "
This paper has been stamped by the Central Command Quantum Relay.
"
+ P.stamps += "
This paper has been verified by the Central Command Quantum Relay.
"
var/mutable_appearance/stampoverlay = mutable_appearance('icons/obj/bureaucracy.dmi', "paper_stamp-cent")
stampoverlay.pixel_x = rand(-2, 2)
stampoverlay.pixel_y = rand(-3, 2)
@@ -238,4 +239,4 @@ GLOBAL_LIST_EMPTY(adminfaxes)
/obj/machinery/photocopier/faxmachine/examine(mob/user)
. = ..()
if(IsAdminGhost(user))
- .+= "You can send admin faxes via AltClick to this specific Fax Machine."
+ .+= span_notice("You can send admin faxes via Alt-Click to this specific fax machine.")
From 1e5cd93f0196e3e62fe7052e19792e97989c4233 Mon Sep 17 00:00:00 2001
From: Jamie D <993128+JamieD1@users.noreply.github.com>
Date: Sat, 30 Apr 2022 15:02:52 +0100
Subject: [PATCH 12/13] Apply suggestions from code review
---
code/modules/admin/topic.dm | 9 ++++++---
code/modules/paperwork/faxmachine.dm | 3 ++-
2 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/code/modules/admin/topic.dm b/code/modules/admin/topic.dm
index f497177a7e65..5615c16238f2 100644
--- a/code/modules/admin/topic.dm
+++ b/code/modules/admin/topic.dm
@@ -2288,13 +2288,16 @@
/client/proc/send_admin_fax(obj/machinery/photocopier/faxmachine/F)
var/inputsubject = input(src, "Please enter a subject", "Outgoing message from CentCom", "") as text|null
- if(!inputsubject) return
+ if(!inputsubject)
+ return
var/inputmessage = input(src, "Please enter the message sent to [istype(F) ? F : "all fax machines"] via secure connection. Supports pen markdown.", "Outgoing message from CentCom", "") as message|null
- if(!inputmessage) return
+ if(!inputmessage)
+ return
var/inputsigned = input(src, "Please enter CentCom Official name.", "Outgoing message from CentCom", usr?.client?.holder?.admin_signature || "") as text|null
- if(!inputsigned) return
+ if(!inputsigned)
+ return
var/customname = input(src, "Pick a title for the report", "Title") as text|null
var/prefix = "NanoTrasen Fax Network
RE: [inputsubject]
"
diff --git a/code/modules/paperwork/faxmachine.dm b/code/modules/paperwork/faxmachine.dm
index 5e27e258815c..a625eda6892b 100644
--- a/code/modules/paperwork/faxmachine.dm
+++ b/code/modules/paperwork/faxmachine.dm
@@ -191,7 +191,8 @@ GLOBAL_LIST_EMPTY(adminfaxes)
set name = "Send Fax"
set category = "Admin.RoundInteraction"
- if(!check_rights(R_ADMIN)) return
+ if(!check_rights(R_ADMIN))
+ return
usr.client.send_admin_fax(src)
/obj/machinery/photocopier/faxmachine/proc/recieve_admin_fax(customname, list/T)
From 08da83f8956f9e7267079cc6786f67fc4eab0ddc Mon Sep 17 00:00:00 2001
From: Jamie D <993128+JamieD1@users.noreply.github.com>
Date: Sat, 30 Apr 2022 15:18:53 +0100
Subject: [PATCH 13/13] More fixes
---
code/modules/paperwork/faxmachine.dm | 87 ++++++++++------------------
1 file changed, 32 insertions(+), 55 deletions(-)
diff --git a/code/modules/paperwork/faxmachine.dm b/code/modules/paperwork/faxmachine.dm
index a625eda6892b..cdc232f7608d 100644
--- a/code/modules/paperwork/faxmachine.dm
+++ b/code/modules/paperwork/faxmachine.dm
@@ -21,7 +21,6 @@ GLOBAL_LIST_EMPTY(adminfaxes)
/obj/machinery/photocopier/faxmachine/Initialize()
. = ..()
GLOB.allfaxes += src
-
if( !((department in GLOB.alldepartments) || (department in GLOB.admin_departments)) )
GLOB.alldepartments |= department
@@ -54,8 +53,7 @@ GLOBAL_LIST_EMPTY(adminfaxes)
if(!copier_empty())
if(sendcooldown - world.time > 0)
to_chat(usr, "Transmitter recharging")
- return
-
+ return
sendcooldown = world.time + 1 MINUTES
if (destination in GLOB.admin_departments)
INVOKE_ASYNC(src, .proc/send_admin_fax, usr, destination)
@@ -93,25 +91,20 @@ GLOBAL_LIST_EMPTY(adminfaxes)
authenticated = TRUE
auth_name = "[id_card.registered_name] - [id_card.assignment]"
return
-
if("logout")
authenticated = FALSE
auth_name = null
return
-
return FALSE
/obj/machinery/photocopier/faxmachine/proc/sendfax(var/destination)
if(stat & (BROKEN|NOPOWER))
return
-
use_power(200)
-
var/success = FALSE
for(var/obj/machinery/photocopier/faxmachine/F in GLOB.allfaxes)
if( F.department == destination )
success ||= F.recievefax(copy || photocopy)
-
if (success)
visible_message("[src] beeps, \"Message transmitted successfully.\"")
else
@@ -126,10 +119,8 @@ GLOBAL_LIST_EMPTY(adminfaxes)
flick("faxreceive", src)
playsound(loc, "sound/items/polaroid1.ogg", 50, 1)
-
// give the sprite some time to flick
sleep(23)
-
if (istype(incoming, /obj/item/paper))
copy(incoming)
else if (istype(incoming, /obj/item/photo))
@@ -138,14 +129,12 @@ GLOBAL_LIST_EMPTY(adminfaxes)
bundlecopy(incoming)
else
return FALSE
-
use_power(active_power_usage)
return TRUE
/obj/machinery/photocopier/faxmachine/proc/send_admin_fax(var/mob/sender, var/destination)
if(stat & (BROKEN|NOPOWER))
return
-
use_power(200)
var/obj/item/rcvdcopy
@@ -174,7 +163,6 @@ GLOBAL_LIST_EMPTY(adminfaxes)
send_adminmessage(sender, "CENTCOM FAX", rcvdcopy, "CentcomFaxReply", "#006100")
sleep(50)
visible_message("[src] beeps, \"Message transmitted successfully.\"")
-
/obj/machinery/photocopier/faxmachine/proc/send_adminmessage(var/mob/sender, var/faxname, var/obj/item/sent, var/reply_type, font_colour="#006100")
var/msg = "[faxname]: [key_name(sender, 1)] (PP) (VV) (SM) (JMP) (REPLY): Receiving '[sent.name]' via secure connection ... view message"
@@ -187,57 +175,46 @@ GLOBAL_LIST_EMPTY(adminfaxes)
/obj/machinery/photocopier/faxmachine/check_ass()
return FALSE // No ass here
-/obj/machinery/photocopier/faxmachine/proc/sendFax(var/obj/machinery/photocopier/faxmachine/fax in GLOB.allfaxes)
- set name = "Send Fax"
- set category = "Admin.RoundInteraction"
-
- if(!check_rights(R_ADMIN))
- return
- usr.client.send_admin_fax(src)
-
/obj/machinery/photocopier/faxmachine/proc/recieve_admin_fax(customname, list/T)
if(stat & (BROKEN|NOPOWER))
return
- // animate! it's alive!
- flick("faxreceive", src)
-
- // give the sprite some time to flick
- spawn(20)
- var/obj/item/paper/P = new /obj/item/paper( loc )
- P.name = "[command_name()] - [customname]"
-
- var/list/templist = list() // All the stuff we're adding to $written
- for(var/text in T)
- if(text == PAPER_FIELD)
- templist += text
- else
- var/datum/langtext/L = new(text,/datum/language/common)
- templist += L
-
- P.written += templist
- P.update_icon()
-
- playsound(loc, "sound/items/polaroid1.ogg", 50, 1)
-
- // Stamps
- var/datum/asset/spritesheet/sheet = get_asset_datum(/datum/asset/spritesheet/simple/paper)
- if (isnull(P.stamps))
- P.stamps = sheet.css_tag()
- P.stamps += sheet.icon_tag("stamp-cent")
- P.stamps += "
This paper has been verified by the Central Command Quantum Relay.
"
- var/mutable_appearance/stampoverlay = mutable_appearance('icons/obj/bureaucracy.dmi', "paper_stamp-cent")
- stampoverlay.pixel_x = rand(-2, 2)
- stampoverlay.pixel_y = rand(-3, 2)
+ // animate! it's alive!
+ flick("faxreceive", src)
- LAZYADD(P.stamped, "stamp-cent")
- P.add_overlay(stampoverlay)
+ // give the sprite some time to flick
+ spawn(20)
+ var/obj/item/paper/P = new /obj/item/paper( loc )
+ P.name = "[command_name()] - [customname]"
+
+ var/list/templist = list() // All the stuff we're adding to $written
+ for(var/text in T)
+ if(text == PAPER_FIELD)
+ templist += text
+ else
+ var/datum/langtext/L = new(text,/datum/language/common)
+ templist += L
+
+ P.written += templist
+ P.update_icon()
+ playsound(loc, "sound/items/polaroid1.ogg", 50, 1)
+
+ // Stamps
+ var/datum/asset/spritesheet/sheet = get_asset_datum(/datum/asset/spritesheet/simple/paper)
+ if (isnull(P.stamps))
+ P.stamps = sheet.css_tag()
+ P.stamps += sheet.icon_tag("stamp-cent")
+ P.stamps += "
This paper has been verified by the Central Command Quantum Relay.
"
+ var/mutable_appearance/stampoverlay = mutable_appearance('icons/obj/bureaucracy.dmi', "paper_stamp-cent")
+ stampoverlay.pixel_x = rand(-2, 2)
+ stampoverlay.pixel_y = rand(-3, 2)
+
+ LAZYADD(P.stamped, "stamp-cent")
+ P.add_overlay(stampoverlay)
/obj/machinery/photocopier/faxmachine/AltClick(mob/user)
- . = ..()
if(IsAdminGhost(user))
send_admin_fax(src)
/obj/machinery/photocopier/faxmachine/examine(mob/user)
- . = ..()
if(IsAdminGhost(user))
.+= span_notice("You can send admin faxes via Alt-Click to this specific fax machine.")