Skip to content
This repository was archived by the owner on May 22, 2025. It is now read-only.

Commit 9ab0636

Browse files
authored
Makes faxes emaggable (#22969)
1 parent f8a9cb5 commit 9ab0636

File tree

5 files changed

+58
-31
lines changed

5 files changed

+58
-31
lines changed

_maps/RandomRuins/IceRuins/icemoon_surface_syndicate.dmm

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5413,12 +5413,6 @@
54135413
/turf/open/floor/plasteel/dark,
54145414
/area/ruin/syndicate_icemoon/xenobio)
54155415
"CP" = (
5416-
/obj/machinery/photocopier/faxmachine{
5417-
department = "Unidentified";
5418-
desc = "Used to send black pages to Nanotrasen stations.";
5419-
name = "Syndicate Fax Machine";
5420-
req_access = list("syndicate")
5421-
},
54225416
/obj/item/stamp/chameleon{
54235417
pixel_x = -6;
54245418
pixel_y = 10
@@ -5431,6 +5425,7 @@
54315425
/obj/effect/turf_decal/siding/wood{
54325426
dir = 9
54335427
},
5428+
/obj/machinery/photocopier/faxmachine/syndicate,
54345429
/turf/open/floor/wood,
54355430
/area/ruin/syndicate_icemoon/command)
54365431
"CQ" = (

_maps/RandomRuins/SpaceRuins/listeningstation.dmm

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2431,12 +2431,6 @@
24312431
/turf/open/floor/plasteel/dark,
24322432
/area/ruin/space/has_grav/listeningstation/hallway)
24332433
"KJ" = (
2434-
/obj/machinery/photocopier/faxmachine{
2435-
department = "Unidentified";
2436-
desc = "Used to send black pages to Nanotrasen stations.";
2437-
name = "Syndicate Fax Machine";
2438-
req_access = list("syndicate")
2439-
},
24402434
/obj/structure/table/reinforced,
24412435
/obj/effect/decal/cleanable/dirt,
24422436
/obj/effect/turf_decal/stripes/line{
@@ -2449,6 +2443,7 @@
24492443
dir = 1
24502444
},
24512445
/obj/effect/turf_decal/tile/red/fourcorners,
2446+
/obj/machinery/photocopier/faxmachine/syndicate,
24522447
/turf/open/floor/plasteel/dark,
24532448
/area/ruin/space/has_grav/listeningstation/hallway)
24542449
"KS" = (

_maps/map_files/generic/CentCom.dmm

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21480,6 +21480,7 @@
2148021480
dir = 9
2148121481
},
2148221482
/obj/structure/table/reinforced,
21483+
/obj/machinery/photocopier/faxmachine/syndicate_command,
2148321484
/turf/open/floor/plasteel/dark,
2148421485
/area/centcom/syndicate_mothership)
2148521486
"crH" = (

code/modules/admin/topic.dm

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1815,7 +1815,7 @@
18151815
if(info)
18161816
info.examine(usr, TRUE)
18171817

1818-
else if(href_list["CentcomFaxReply"])
1818+
else if(href_list["AdminFaxReply"])
18191819
var/obj/machinery/photocopier/faxmachine/F = locate(href_list["originfax"]) in GLOB.allfaxes
18201820
if(!istype(F))
18211821
to_chat(src.owner, span_danger("Unable to locate fax!"))
@@ -1830,20 +1830,21 @@
18301830
send_admin_fax()
18311831

18321832
/client/proc/send_admin_fax(obj/machinery/photocopier/faxmachine/F)
1833-
var/inputsubject = input(src, "Please enter a subject", "Outgoing message from CentCom", "") as text|null
1833+
var/syndicate = (F?.obj_flags & EMAGGED)
1834+
var/inputsubject = input(src, "Please enter a subject", "Outgoing message from [syndicate ? "Syndicate" : "CentCom"]", "") as text|null
18341835
if(!inputsubject)
18351836
return
18361837

1837-
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
1838+
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 [syndicate ? "Syndicate" : "CentCom"]", "") as message|null
18381839
if(!inputmessage)
18391840
return
18401841

1841-
var/inputsigned = input(src, "Please enter CentCom Official name.", "Outgoing message from CentCom", usr?.client?.holder?.admin_signature || "") as text|null
1842+
var/inputsigned = input(src, "Please enter [syndicate ? "Syndicate" : "CentCom"] Official name.", "Outgoing message from [syndicate ? "Syndicate" : "CentCom"]", usr?.client?.holder?.admin_signature || "") as text|null
18421843
if(!inputsigned)
18431844
return
18441845

18451846
var/customname = input(src, "Pick a title for the report", "Title") as text|null
1846-
var/prefix = "<center><b>Nanotrasen Fax Network</b></center><hr><center>RE: [inputsubject]</center><hr>"
1847+
var/prefix = "<center><b>[syndicate ? "Syndicate" : "Nanotrasen"] Fax Network</b></center><hr><center>RE: [inputsubject]</center><hr>"
18471848
var/suffix = "<hr><b>Signed:</b> <font face=\"[SIGNFONT]\"><i>[inputsigned]</i></font>"
18481849

18491850
inputmessage = parsemarkdown(inputmessage)

code/modules/paperwork/faxmachine.dm

Lines changed: 49 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,12 @@ GLOBAL_LIST_EMPTY(adminfaxes)
1717
var/sendcooldown = 0 // to avoid spamming fax messages
1818
var/department = "Unknown" // our department
1919
var/destination = "Central Command" // the department we're sending to
20+
var/hidefromfaxlist = FALSE // If enabled does not show up in the destination fax list
2021

2122
/obj/machinery/photocopier/faxmachine/Initialize(mapload)
2223
. = ..()
24+
if(hidefromfaxlist)
25+
return
2326
GLOB.allfaxes += src
2427
if( !((department in GLOB.alldepartments) || (department in GLOB.admin_departments)) )
2528
GLOB.alldepartments |= department
@@ -45,7 +48,7 @@ GLOBAL_LIST_EMPTY(adminfaxes)
4548
.["has_copy"] = !copier_empty()
4649
.["copy_name"] = copy?.name || photocopy?.name || doccopy?.name
4750
.["cooldown"] = sendcooldown - world.time
48-
.["depts"] = (GLOB.alldepartments + GLOB.admin_departments)
51+
.["depts"] = obj_flags & EMAGGED ? (GLOB.alldepartments + GLOB.admin_departments + list("Syndicate")) : (GLOB.alldepartments + GLOB.admin_departments)
4952
.["destination"] = destination
5053

5154
/obj/machinery/photocopier/faxmachine/ui_act(action, list/params)
@@ -62,6 +65,8 @@ GLOBAL_LIST_EMPTY(adminfaxes)
6265
sendcooldown = world.time + 1 MINUTES
6366
if (destination in GLOB.admin_departments)
6467
INVOKE_ASYNC(src, PROC_REF(send_admin_fax), usr, destination)
68+
if (destination == "Syndicate")
69+
INVOKE_ASYNC(src, PROC_REF(send_admin_fax), usr, destination)
6570
else
6671
INVOKE_ASYNC(src, PROC_REF(sendfax), destination)
6772
return
@@ -91,6 +96,10 @@ GLOBAL_LIST_EMPTY(adminfaxes)
9196
authenticated = TRUE
9297
auth_name = usr.client.holder.admin_signature
9398
return
99+
if(obj_flags & EMAGGED)
100+
authenticated = TRUE
101+
auth_name = "$#%*! - ERROR"
102+
return
94103
var/obj/item/card/id/id_card = usr.get_idcard(hand_first = TRUE)
95104
if (check_access(id_card))
96105
authenticated = TRUE
@@ -163,13 +172,11 @@ GLOBAL_LIST_EMPTY(adminfaxes)
163172
F.recievefax(rcvdcopy)
164173

165174
//message badmins that a fax has arrived
166-
switch(destination)
167-
if ("Central Command")
168-
for(var/client/C in GLOB.permissions.admins) //linked to prayers cause we are running out of legacy toggles
169-
if(C.prefs.chat_toggles & CHAT_PRAYER_N_FAX) //if to be moved elsewhere then we must declutter legacy toggles
170-
if(C.prefs.toggles & SOUND_PRAYER_N_FAX)//if done then delete these comments
171-
SEND_SOUND(sender, sound('sound/effects/admin_fax.ogg'))
172-
send_adminmessage(sender, "CENTCOM FAX", rcvdcopy, "CentcomFaxReply", "#006100")
175+
for(var/client/C in GLOB.permissions.admins) //linked to prayers cause we are running out of legacy toggles
176+
if(C.prefs.chat_toggles & CHAT_PRAYER_N_FAX) //if to be moved elsewhere then we must declutter legacy toggles
177+
if(C.prefs.toggles & SOUND_PRAYER_N_FAX)//if done then delete these comments
178+
SEND_SOUND(sender, sound('sound/effects/admin_fax.ogg'))
179+
send_adminmessage(sender, destination == "Syndicate" ? "SYNDICATE FAX" : "CENTCOM FAX", rcvdcopy, "AdminFaxReply", destination == "Syndicate" ? "crimson" : "#006100")
173180
sendcooldown = world.time + 1 MINUTES
174181
sleep(5 SECONDS)
175182
visible_message("[src] beeps, \"Message transmitted successfully.\"")
@@ -194,7 +201,8 @@ GLOBAL_LIST_EMPTY(adminfaxes)
194201
// give the sprite some time to flick
195202
spawn(20)
196203
var/obj/item/paper/P = new /obj/item/paper( loc )
197-
P.name = "[command_name()] - [customname]"
204+
var/syndicate = obj_flags & EMAGGED
205+
P.name = syndicate ? "The Syndicate - [customname]" : "[command_name()] - [customname]"
198206

199207
var/list/templist = list() // All the stuff we're adding to $written
200208
for(var/text in T)
@@ -212,19 +220,46 @@ GLOBAL_LIST_EMPTY(adminfaxes)
212220
var/datum/asset/spritesheet/sheet = get_asset_datum(/datum/asset/spritesheet/simple/paper)
213221
if (isnull(P.stamps))
214222
P.stamps = sheet.css_tag()
215-
P.stamps += sheet.icon_tag("stamp-cent")
216-
P.stamps += "<br><i>This paper has been verified by the Central Command Quantum Relay.</i><br>"
217-
var/mutable_appearance/stampoverlay = mutable_appearance('icons/obj/bureaucracy.dmi', "paper_stamp-cent")
223+
P.stamps += syndicate ? sheet.icon_tag("stamp-syndiround") : sheet.icon_tag("stamp-cent")
224+
P.stamps += "<br><i>This paper has [syndicate ? "not" : ""] been verified by the Central Command Quantum Relay.</i><br>"
225+
var/mutable_appearance/stampoverlay = mutable_appearance('icons/obj/bureaucracy.dmi', syndicate ? "paper_stamp-syndiround" : "paper_stamp-cent")
218226
stampoverlay.pixel_x = rand(-2, 2)
219227
stampoverlay.pixel_y = rand(-3, 2)
220228

221-
LAZYADD(P.stamped, "stamp-cent")
229+
LAZYADD(P.stamped, syndicate ? "stamp-syndiround" : "stamp-cent")
222230
P.add_overlay(stampoverlay)
223231

224232
/obj/machinery/photocopier/faxmachine/AltClick(mob/user)
225233
if(IsAdminGhost(user))
226-
send_admin_fax(src)
234+
send_admin_fax(src)
227235

228236
/obj/machinery/photocopier/faxmachine/examine(mob/user)
237+
. = ..()
229238
if(IsAdminGhost(user))
230239
.+= span_notice("You can send admin faxes via Alt-Click to this specific fax machine.")
240+
241+
/obj/machinery/photocopier/faxmachine/emag_act(mob/user, /obj/item/card/emag/emag_card)
242+
if(obj_flags & EMAGGED)
243+
to_chat(user, span_warning("[src]'s transceiver is damaged!"))
244+
return FALSE
245+
obj_flags |= EMAGGED
246+
playsound(src, "sparks", 100, 1)
247+
to_chat(user, span_warning("You short out the security protocols on [src]'s transceiver!"))
248+
return TRUE
249+
250+
///Common syndicate fax machines, comes pre-emagged
251+
/obj/machinery/photocopier/faxmachine/syndicate
252+
department = "Unidentified"
253+
desc = "Used to send black pages to Nanotrasen stations."
254+
name = "Syndicate Fax Machine"
255+
obj_flags = CAN_BE_HIT | EMAGGED
256+
req_access = list(ACCESS_SYNDICATE)
257+
258+
///The fax machine in the Syndicate mothership
259+
/obj/machinery/photocopier/faxmachine/syndicate_command
260+
department = "Syndicate"
261+
desc = "Used for communication between the different echelons of the Syndicate. It has a note on the side reading <i>'DO NOT MOVE'</i>."
262+
destination = "Bridge"
263+
hidefromfaxlist = TRUE
264+
name = "Syndicate Fax Machine"
265+
req_access = list(ACCESS_SYNDICATE)

0 commit comments

Comments
 (0)