diff --git a/code/game/machinery/fax_machine.dm b/code/game/machinery/fax_machine.dm
index 97364905ed84..76f0db7e23ed 100644
--- a/code/game/machinery/fax_machine.dm
+++ b/code/game/machinery/fax_machine.dm
@@ -1,17 +1,25 @@
-GLOBAL_LIST_INIT_TYPED(all_faxmachines, /obj/structure/machinery/faxmachine, list())
-GLOBAL_LIST_EMPTY(all_fax_departments)
-GLOBAL_LIST_EMPTY(all_faxcodes)
-
-#define DEPARTMENT_WY "Weyland-Yutani"
-#define DEPARTMENT_HC "USCM High Command"
-#define DEPARTMENT_CMB "CMB Incident Command Center, Local Operations"
-#define DEPARTMENT_PROVOST "USCM Provost Office"
-#define DEPARTMENT_PRESS "Various Press Organizations"
-#define DEPARTMENT_TWE "Three World Empire"
-#define DEPARTMENT_UPP "Union of Progress Peoples"
-#define DEPARTMENT_CLF "Colonial Liberation Front"
-#define DEPARTMENT_TARGET "Specific Machine Code"//Used to send to a single specific machine.
-#define HIGHCOM_DEPARTMENTS list(DEPARTMENT_WY, DEPARTMENT_HC, DEPARTMENT_CMB, DEPARTMENT_PROVOST, DEPARTMENT_PRESS, DEPARTMENT_TWE, DEPARTMENT_UPP, DEPARTMENT_CLF)
+/datum/fax_network
+ var/list/all_departments = list()
+ var/list/all_faxcodes = list()
+
+GLOBAL_DATUM_INIT(fax_network, /datum/fax_network, new)
+
+#define FAX_DEPARTMENT_WY "Weyland-Yutani"
+#define FAX_DEPARTMENT_HC "USCM High Command"
+#define FAX_DEPARTMENT_CMB "CMB Incident Command Center, Local Operations"
+#define FAX_DEPARTMENT_PROVOST "USCM Provost Office"
+#define FAX_DEPARTMENT_PRESS "Various Press Organizations"
+#define FAX_DEPARTMENT_TWE "Three World Empire"
+#define FAX_DEPARTMENT_UPP "Union of Progress Peoples"
+#define FAX_DEPARTMENT_CLF "Colonial Liberation Front"
+#define FAX_DEPARTMENT_SPECIFIC_CODE "Specific Machine Code"//Used to send to a single specific machine.
+#define FAX_HIGHCOM_DEPARTMENTS list(FAX_DEPARTMENT_WY, FAX_DEPARTMENT_HC, FAX_DEPARTMENT_CMB, FAX_DEPARTMENT_PROVOST, FAX_DEPARTMENT_PRESS, FAX_DEPARTMENT_TWE, FAX_DEPARTMENT_UPP, FAX_DEPARTMENT_CLF)
+
+#define FAX_DEPARTMENT_ALMAYER "USS Almayer"
+#define FAX_DEPARTMENT_ALMAYER_COMMAND "USS Almayer Command"
+#define FAX_DEPARTMENT_ALMAYER_BRIG "USS Almayer Brig"
+#define FAX_DEPARTMENT_ALMAYER_AICORE "USS Almayer AI Core"
+#define FAX_DEPARTMENT_GENERAL_PUBLIC "General Public"
#define FAX_NET_USCM "USCM Encrypted Network"
#define FAX_NET_USCM_HC "USCM High Command Quantum Relay"
@@ -47,12 +55,24 @@ GLOBAL_LIST_EMPTY(all_faxcodes)
// copy of the original fax in paper format, we want the original item (i.e. photo, paper bundle) not be changed as the user will need to eject it.
var/obj/item/paper/fax_paper_copy
- ///Our department
- var/department = "General Public"
+ /// Our department
+ var/department = FAX_DEPARTMENT_GENERAL_PUBLIC
+ /// The name of the machine within the department, if it has one.
+ var/sub_name
+ /// Unique identifier for the fax machine.
+ var/machine_id_tag
+ /// Whether or not the ID tag can be changed by proc.
+ var/fixed_id_tag = FALSE
+ /// The identifying name of the machine within the department, listed when being sent something.
+ var/identity_name
+
+ /// The radio prefix used for radio alerts, if there is one.
+ var/radio_alert_tag = null
- ///Target department
- var/target_department = DEPARTMENT_WY
+ /// Target department
+ var/target_department = FAX_DEPARTMENT_WY
var/target_machine_id = "No ID Selected"
+ var/target_machine = "Undefined"
// list for img and their photo reference to be stored into the admin's cache.
var/list/photo_list = list()
@@ -63,23 +83,25 @@ GLOBAL_LIST_EMPTY(all_faxcodes)
///storer var for cooldown on sending faxes
var/fax_cooldown = 300
COOLDOWN_DECLARE(send_cooldown)
-
- /// Unique identifier for the fax machine.
- var/machine_id_tag
- /// Whether or not the ID tag can be changed by proc.
- var/fixed_id_tag = FALSE
+ /// Whether or not the next fax to be sent is a priority one.
+ var/is_priority_fax = FALSE
+ /// If this machine can send priority faxes.
+ var/can_send_priority = FALSE
+ /// If this machine is sending only to one machine at a time or not.
+ var/single_sending = FALSE
/obj/structure/machinery/faxmachine/Initialize(mapload, ...)
. = ..()
- GLOB.all_faxmachines += src
- update_departments()
generate_id_tag()
+ update_departments()
+ if(!(identity_name in GLOB.fax_network.all_departments[department]))
+ GLOB.fax_network.all_departments[department][identity_name] = src
/obj/structure/machinery/faxmachine/proc/generate_id_tag(force = FALSE)
if(fixed_id_tag && !force)
return FALSE
if(machine_id_tag)
- GLOB.all_faxcodes -= machine_id_tag
+ GLOB.fax_network.all_faxcodes -= machine_id_tag
var/id_tag_prefix
var/id_tag_suffix = "[rand(1000, 9999)][pick(GLOB.alphabet_uppercase)][pick(GLOB.alphabet_uppercase)]"
@@ -114,19 +136,20 @@ GLOBAL_LIST_EMPTY(all_faxcodes)
if(!id_tag_final)
id_tag_final = "[id_tag_prefix]-[id_tag_suffix]"
- if(id_tag_final in GLOB.all_faxcodes)
+ if(id_tag_final in GLOB.fax_network.all_faxcodes)
generate_id_tag()
return FALSE
machine_id_tag = id_tag_final
+ identity_name = sub_name ? "[sub_name], [machine_id_tag]" : machine_id_tag
if(machine_id_tag == network)
return TRUE
- GLOB.all_faxcodes += id_tag_final
+ GLOB.fax_network.all_faxcodes[id_tag_final] = src
return TRUE
/obj/structure/machinery/faxmachine/Destroy()
- GLOB.all_faxmachines -= src
- GLOB.all_faxcodes -= machine_id_tag
+ GLOB.fax_network.all_faxcodes -= machine_id_tag
+ GLOB.fax_network.all_departments[department] -= identity_name
. = ..()
/obj/structure/machinery/faxmachine/initialize_pass_flags(datum/pass_flags_container/PF)
@@ -203,26 +226,27 @@ GLOBAL_LIST_EMPTY(all_faxcodes)
return
/obj/structure/machinery/faxmachine/proc/update_departments()
- if(!(DEPARTMENT_TARGET in GLOB.all_fax_departments))
- GLOB.all_fax_departments += DEPARTMENT_TARGET
- if( !("[department]" in GLOB.all_fax_departments) ) //Initialize departments. This will work with multiple fax machines.
- GLOB.all_fax_departments += department
- if(!(DEPARTMENT_WY in GLOB.all_fax_departments))
- GLOB.all_fax_departments += DEPARTMENT_WY
- if(!(DEPARTMENT_HC in GLOB.all_fax_departments))
- GLOB.all_fax_departments += DEPARTMENT_HC
- if(!(DEPARTMENT_PROVOST in GLOB.all_fax_departments))
- GLOB.all_fax_departments += DEPARTMENT_PROVOST
- if(!(DEPARTMENT_CMB in GLOB.all_fax_departments))
- GLOB.all_fax_departments += DEPARTMENT_CMB
- if(!(DEPARTMENT_PRESS in GLOB.all_fax_departments))
- GLOB.all_fax_departments += DEPARTMENT_PRESS
- if(!(DEPARTMENT_TWE in GLOB.all_fax_departments))
- GLOB.all_fax_departments += DEPARTMENT_TWE
- if(!(DEPARTMENT_UPP in GLOB.all_fax_departments))
- GLOB.all_fax_departments += DEPARTMENT_UPP
- if(!(DEPARTMENT_CLF in GLOB.all_fax_departments))
- GLOB.all_fax_departments += DEPARTMENT_CLF
+ if(!(FAX_DEPARTMENT_SPECIFIC_CODE in GLOB.fax_network.all_departments))
+ GLOB.fax_network.all_departments[FAX_DEPARTMENT_SPECIFIC_CODE] = list()
+ if(!(FAX_DEPARTMENT_WY in GLOB.fax_network.all_departments))
+ GLOB.fax_network.all_departments[FAX_DEPARTMENT_WY] = list()
+ if(!(FAX_DEPARTMENT_HC in GLOB.fax_network.all_departments))
+ GLOB.fax_network.all_departments[FAX_DEPARTMENT_HC] = list()
+ if(!(FAX_DEPARTMENT_PROVOST in GLOB.fax_network.all_departments))
+ GLOB.fax_network.all_departments[FAX_DEPARTMENT_PROVOST] = list()
+ if(!(FAX_DEPARTMENT_CMB in GLOB.fax_network.all_departments))
+ GLOB.fax_network.all_departments[FAX_DEPARTMENT_CMB] = list()
+ if(!(FAX_DEPARTMENT_PRESS in GLOB.fax_network.all_departments))
+ GLOB.fax_network.all_departments[FAX_DEPARTMENT_PRESS] = list()
+ if(!(FAX_DEPARTMENT_TWE in GLOB.fax_network.all_departments))
+ GLOB.fax_network.all_departments[FAX_DEPARTMENT_TWE] = list()
+ if(!(FAX_DEPARTMENT_UPP in GLOB.fax_network.all_departments))
+ GLOB.fax_network.all_departments[FAX_DEPARTMENT_UPP] = list()
+ if(!(FAX_DEPARTMENT_CLF in GLOB.fax_network.all_departments))
+ GLOB.fax_network.all_departments[FAX_DEPARTMENT_CLF] = list()
+ if(!("[department]" in GLOB.fax_network.all_departments)) //Initialize departments. This will work with multiple fax machines.
+ GLOB.fax_network.all_departments[department] = list()
+ GLOB.fax_network.all_departments[department][identity_name] = src
// TGUI SHIT \\
@@ -260,10 +284,13 @@ GLOBAL_LIST_EMPTY(all_faxcodes)
data["authenticated"] = authenticated
data["target_department"] = target_department
- if(target_department == DEPARTMENT_TARGET)
- data["target_department"] = target_machine_id
+ data["target_machine"] = target_machine
+ data["sending_to_specific"] = FALSE
+ if(target_department == FAX_DEPARTMENT_SPECIFIC_CODE)
+ data["target_department"] = "Specific ID - [target_machine_id]"
+ data["sending_to_specific"] = TRUE
- if(target_department in HIGHCOM_DEPARTMENTS)
+ if(target_department in FAX_HIGHCOM_DEPARTMENTS)
data["highcom_dept"] = TRUE
else
data["highcom_dept"] = FALSE
@@ -274,43 +301,78 @@ GLOBAL_LIST_EMPTY(all_faxcodes)
data["nextfaxtime"] = send_cooldown
data["faxcooldown"] = fax_cooldown
+ data["can_send_priority"] = can_send_priority
+ data["is_priority_fax"] = is_priority_fax
+ data["is_single_sending"] = single_sending
+
+
return data
/obj/structure/machinery/faxmachine/ui_act(action, list/params, datum/tgui/ui, datum/ui_state/state)
. = ..()
if(.)
return
+ var/mob/user = ui.user
switch(action)
+ if("toggle_priority")
+ if(!can_send_priority)
+ return
+ is_priority_fax = !is_priority_fax
+ to_chat(user, SPAN_NOTICE("Priority Alert is now [is_priority_fax ? "Enabled" : "Disabled"]."))
+ . = TRUE
+
+ if("toggle_single_send")
+ if(target_department in FAX_HIGHCOM_DEPARTMENTS)
+ single_sending = FALSE
+ return
+ if(target_department == FAX_DEPARTMENT_SPECIFIC_CODE)
+ single_sending = TRUE
+ return
+ single_sending = !single_sending
+ to_chat(user, SPAN_NOTICE("Individual Sending is now [single_sending ? "Enabled" : "Disabled"]."))
+ . = TRUE
+
if("send")
if(!original_fax)
- to_chat(ui.user, SPAN_NOTICE("No paper loaded."))
+ to_chat(user, SPAN_NOTICE("No paper loaded."))
return
+ if(single_sending && (target_machine == "Undefined") && !(target_department == FAX_DEPARTMENT_SPECIFIC_CODE))
+ to_chat(user, SPAN_WARNING("No target machine selected!"))
+ return
+
+ if(single_sending)
+ var/the_target_machine = GLOB.fax_network.all_departments[target_department][target_machine]
+ if(the_target_machine == src)
+ to_chat(user, SPAN_WARNING("You cannot send a fax to your own machine!"))
+ return
+
if(istype(original_fax, /obj/item/paper_bundle))
var/obj/item/paper_bundle/bundle = original_fax
if(bundle.amount > 5)
- to_chat(ui.user, SPAN_NOTICE("\The [src] is jammed!"))
+ to_chat(user, SPAN_NOTICE("\The [src] is jammed!"))
return
copy_fax_paper()
- outgoing_fax_message(ui.user)
+ outgoing_fax_message(user, is_priority_fax)
+ is_priority_fax = FALSE
COOLDOWN_START(src, send_cooldown, fax_cooldown)
- to_chat(ui.user, "Message transmitted successfully.")
+ to_chat(user, "Message transmitted successfully.")
. = TRUE
if("ejectpaper")
if(!original_fax)
- to_chat(ui.user, SPAN_NOTICE("No paper loaded."))
- if(!ishuman(ui.user))
- to_chat(ui.user, SPAN_NOTICE("You can't do that."))
+ to_chat(user, SPAN_NOTICE("No paper loaded."))
+ if(!ishuman(user))
+ to_chat(user, SPAN_NOTICE("You can't do that."))
return
- original_fax.forceMove(ui.user.loc)
- ui.user.put_in_hands(original_fax)
- to_chat(ui.user, SPAN_NOTICE("You take \the [original_fax.name] out of \the [src]."))
+ original_fax.forceMove(user.loc)
+ user.put_in_hands(original_fax)
+ to_chat(user, SPAN_NOTICE("You take the [original_fax.name] out of [src]."))
original_fax = null
fax_paper_copy = null
photo_list = null
@@ -318,31 +380,31 @@ GLOBAL_LIST_EMPTY(all_faxcodes)
if("insertpaper")
var/jammed = FALSE
- var/obj/item/I = ui.user.get_active_hand()
+ var/obj/item/I = user.get_active_hand()
if(istype(I, /obj/item/paper_bundle))
var/obj/item/paper_bundle/bundle = I
if(bundle.amount > 5)
jammed = TRUE
// Repeating code? This is not ideal. Why not put this functionality inside of a proc?
if(istype(I, /obj/item/paper) || istype(I, /obj/item/paper_bundle) || istype(I, /obj/item/photo))
- ui.user.drop_inv_item_to_loc(I, src)
+ user.drop_inv_item_to_loc(I, src)
original_fax = I
if(!jammed)
- to_chat(ui.user, SPAN_NOTICE("You put \the [original_fax.name] into \the [src]."))
+ to_chat(user, SPAN_NOTICE("You put the [original_fax.name] into [src]."))
else
- to_chat(ui.user, SPAN_NOTICE("\The [src] jammed! It can only accept up to five papers at once."))
+ to_chat(user, SPAN_NOTICE("[src] jammed! It can only accept up to five papers at once."))
playsound(src, "sound/machines/terminal_insert_disc.ogg", 50, TRUE)
flick("[initial(icon_state)]send", src)
. = TRUE
if("ejectid")
- if(!scan || !ishuman(ui.user))
- to_chat(ui.user, SPAN_WARNING("You can't do that."))
+ if(!scan || !ishuman(user))
+ to_chat(user, SPAN_WARNING("You can't do that."))
return
- to_chat(ui.user, SPAN_NOTICE("You take \the [scan] out of \the [src]."))
- scan.forceMove(ui.user.loc)
- if(!ui.user.get_active_hand())
- ui.user.put_in_hands(scan)
+ to_chat(user, SPAN_NOTICE("You take [scan] out of [src]."))
+ scan.forceMove(user.loc)
+ if(!user.get_active_hand())
+ user.put_in_hands(scan)
scan = null
else
scan.forceMove(src.loc)
@@ -351,17 +413,33 @@ GLOBAL_LIST_EMPTY(all_faxcodes)
playsound(src, 'sound/machines/terminal_eject.ogg', 15, TRUE)
. = TRUE
- if("select")
+ if("select_dept")
var/last_target_department = target_department
- target_department = tgui_input_list(ui.user, "Which department?", "Choose a department", GLOB.all_fax_departments)
+ target_department = tgui_input_list(user, "Which department?", "Choose a department", GLOB.fax_network.all_departments)
if(!target_department)
target_department = last_target_department
- if(target_department == DEPARTMENT_TARGET)
- var/new_target_machine_id = tgui_input_list(ui.user, "Which machine?", "Choose a machine code", GLOB.all_faxcodes)
+ if(target_department != last_target_department)
+ target_machine = "Undefined"
+ if(target_department in FAX_HIGHCOM_DEPARTMENTS)
+ single_sending = FALSE
+ if(target_department == FAX_DEPARTMENT_SPECIFIC_CODE)
+ var/new_target_machine_id = tgui_input_list(user, "Which machine?", "Choose a machine code", GLOB.fax_network.all_faxcodes)
if(!new_target_machine_id)
target_department = last_target_department
+ else if(new_target_machine_id == machine_id_tag)
+ to_chat(user, SPAN_WARNING("You cannot send a fax to your own machine!"))
+ target_department = last_target_department
else
target_machine_id = new_target_machine_id
+ single_sending = TRUE
+ . = TRUE
+
+ if("select_machine")
+ var/last_target_machine = target_machine
+ target_machine = tgui_input_list(user, "Which machine?", "Choose a machine", GLOB.fax_network.all_departments[target_department])
+ if(!target_machine)
+ target_machine = last_target_machine
+
. = TRUE
if("auth")
@@ -375,7 +453,7 @@ GLOBAL_LIST_EMPTY(all_faxcodes)
authenticated = FALSE
. = TRUE
- add_fingerprint(ui.user)
+ add_fingerprint(user)
/obj/structure/machinery/faxmachine/vv_get_dropdown()
. = ..()
@@ -422,7 +500,7 @@ GLOBAL_LIST_EMPTY(all_faxcodes)
photo_list += list("tmp_photo[content].png" = (faxed_photo.img))
fax_paper_copy.info += ""
-/obj/structure/machinery/faxmachine/proc/outgoing_fax_message(mob/user)
+/obj/structure/machinery/faxmachine/proc/outgoing_fax_message(mob/user, sending_priority)
var/datum/fax/faxcontents = new(fax_paper_copy.info, photo_list, fax_paper_copy.name, target_department, machine_id_tag)
@@ -430,37 +508,37 @@ GLOBAL_LIST_EMPTY(all_faxcodes)
var/scan_department = target_department
var/the_target_department = target_department
- if(department in HIGHCOM_DEPARTMENTS)
+ if(department in FAX_HIGHCOM_DEPARTMENTS)
scan_department = department
- else if(target_department == DEPARTMENT_TARGET)
+ else if(target_department == FAX_DEPARTMENT_SPECIFIC_CODE)
the_target_department = "Fax Machine [target_machine_id]"
var/msg_admin = SPAN_STAFF_IC("[the_target_department]: [key_name(user, 1)] ")
msg_admin += "[CC_MARK(user)] [ADMIN_PP(user)] [ADMIN_VV(user)] [ADMIN_SM(user)] [ADMIN_JMP_USER(user)] "
switch(scan_department)
- if(DEPARTMENT_HC)
+ if(FAX_DEPARTMENT_HC)
GLOB.USCMFaxes.Add("\['[original_fax.name]' from [key_name(usr)], [scan] at [time2text(world.timeofday, "hh:mm:ss")]\] REPLY")
msg_admin += "(RPLY): "
- if(DEPARTMENT_PROVOST)
+ if(FAX_DEPARTMENT_PROVOST)
GLOB.ProvostFaxes.Add("\['[original_fax.name]' from [key_name(usr)], [scan] at [time2text(world.timeofday, "hh:mm:ss")]\] REPLY")
msg_admin += "(RPLY): "
- if(DEPARTMENT_CMB)
+ if(FAX_DEPARTMENT_CMB)
GLOB.CMBFaxes.Add("\['[original_fax.name]' from [key_name(usr)], [scan] at [time2text(world.timeofday, "hh:mm:ss")]\] REPLY")
msg_admin += "(RPLY): "
- if(DEPARTMENT_WY)
+ if(FAX_DEPARTMENT_WY)
GLOB.WYFaxes.Add("\['[original_fax.name]' from [key_name(usr)], [scan] at [time2text(world.timeofday, "hh:mm:ss")]\] REPLY")
msg_admin += "(RPLY): "
- if(DEPARTMENT_PRESS)
+ if(FAX_DEPARTMENT_PRESS)
GLOB.PressFaxes.Add("\['[original_fax.name]' from [key_name(usr)], [scan] at [time2text(world.timeofday, "hh:mm:ss")]\] REPLY")
msg_admin += "(RPLY): "
- if(DEPARTMENT_TWE)
+ if(FAX_DEPARTMENT_TWE)
GLOB.TWEFaxes.Add("\['[original_fax.name]' from [key_name(usr)], [scan] at [time2text(world.timeofday, "hh:mm:ss")]\] REPLY")
msg_admin += "(RPLY): "
- if(DEPARTMENT_UPP)
+ if(FAX_DEPARTMENT_UPP)
GLOB.UPPFaxes.Add("\['[original_fax.name]' from [key_name(usr)], [scan] at [time2text(world.timeofday, "hh:mm:ss")]\] REPLY")
msg_admin += "(RPLY): "
- if(DEPARTMENT_CLF)
+ if(FAX_DEPARTMENT_CLF)
GLOB.CLFFaxes.Add("\['[original_fax.name]' from [key_name(usr)], [scan] at [time2text(world.timeofday, "hh:mm:ss")]\] REPLY")
msg_admin += "(RPLY): "
else
@@ -472,7 +550,7 @@ GLOBAL_LIST_EMPTY(all_faxcodes)
var/msg_ghost = SPAN_NOTICE("[the_target_department]: ")
msg_ghost += "Receiving fax via secure connection ... view message"
- send_fax(faxcontents)
+ send_fax(faxcontents, sending_priority)
announce_fax(msg_admin, msg_ghost)
@@ -500,26 +578,36 @@ GLOBAL_LIST_EMPTY(all_faxcodes)
C << 'sound/effects/incoming-fax.ogg'
-/obj/structure/machinery/faxmachine/proc/send_fax(datum/fax/faxcontents)
- var/list/target_machines = list()
- for(var/obj/structure/machinery/faxmachine/pos_target in GLOB.all_faxmachines)
- if(target_department == DEPARTMENT_TARGET)
- if(pos_target != src && pos_target.machine_id_tag == target_machine_id)
- target_machines += pos_target
- else
- if(pos_target != src && pos_target.department == target_department)
- target_machines += pos_target
+/obj/structure/machinery/faxmachine/proc/send_fax(datum/fax/faxcontents, sending_priority)
+ var/list/receiving_machines = list()
+ if(target_department == FAX_DEPARTMENT_SPECIFIC_CODE)
+ var/the_target_machine = GLOB.fax_network.all_faxcodes[target_machine_id]
+ if(the_target_machine == src)
+ return
+ receiving_machines += the_target_machine
+ else if(!single_sending || (target_department in FAX_HIGHCOM_DEPARTMENTS))
+ for(var/pos_target in GLOB.fax_network.all_departments[target_department])
+ var/obj/structure/machinery/faxmachine/receiver = GLOB.fax_network.all_departments[target_department][pos_target]
+ if(receiver != src)
+ receiving_machines += receiver
+ else
+ var/the_target_machine = GLOB.fax_network.all_departments[target_department][target_machine]
+ if(the_target_machine == src)
+ return
+ receiving_machines += the_target_machine
- for(var/obj/structure/machinery/faxmachine/target in target_machines)
+ var/sent_radio_alert = FALSE
+ for(var/obj/structure/machinery/faxmachine/receiver in receiving_machines)
if(!faxcontents)
return
- if(!(target.inoperable()))
+ if(!(receiver.inoperable()))
- flick("[initial(icon_state)]receive", target)
+ flick("[initial(icon_state)]receive", receiver)
+ playsound(receiver.loc, "sound/machines/fax.ogg", 15)
// give the sprite some time to flick
spawn(30)
- var/obj/item/paper/P = new(target.loc,faxcontents.photo_list)
+ var/obj/item/paper/P = new(receiver.loc,faxcontents.photo_list)
if(!faxcontents.paper_name)
P.name = "faxed message"
else
@@ -564,13 +652,19 @@ GLOBAL_LIST_EMPTY(all_faxcodes)
else
P.stamps += "
This paper has been sent by [machine_id_tag]."
P.overlays += stampoverlay
- playsound(target.loc, "sound/items/polaroid1.ogg", 15, 1)
+ if(sending_priority)
+ playsound(receiver.loc, "sound/machines/twobeep.ogg", 45)
+ receiver.langchat_speech("beeps with a priority message", get_mobs_in_view(GLOB.world_view_size, receiver), GLOB.all_languages, skip_language_check = TRUE, animation_style = LANGCHAT_FAST_POP, additional_styles = list("langchat_small", "emote"))
+ receiver.visible_message("[SPAN_BOLD(receiver)] beeps with a priority message.")
+ if((receiver.radio_alert_tag != null) && !sent_radio_alert)
+ ai_silent_announcement("COMMUNICATIONS REPORT: [single_sending ? "Fax Machine [receiver.machine_id_tag], [receiver.sub_name ? "[receiver.sub_name]" : ""]," : "[receiver.department]"] now receiving priority fax.", "[receiver.radio_alert_tag]")
+ sent_radio_alert = TRUE
qdel(faxcontents)
/obj/structure/machinery/faxmachine/cmb
name = "\improper CMB Incident Command Center Fax Machine"
network = FAX_NET_CMB
- department = DEPARTMENT_CMB
+ department = FAX_DEPARTMENT_CMB
/obj/structure/machinery/faxmachine/corporate
name = "\improper W-Y Corporate Fax Machine"
@@ -580,83 +674,105 @@ GLOBAL_LIST_EMPTY(all_faxcodes)
/obj/structure/machinery/faxmachine/corporate/liaison
department = "W-Y Liaison"
+/obj/structure/machinery/faxmachine/corporate/liaison/almayer
+ department = FAX_DEPARTMENT_ALMAYER
+ sub_name = "W-Y Liaison"
+ radio_alert_tag = ":Y"
+
/obj/structure/machinery/faxmachine/corporate/highcom
- department = DEPARTMENT_WY
- target_department = "W-Y Liaison"
+ department = FAX_DEPARTMENT_WY
+ target_department = FAX_DEPARTMENT_ALMAYER
network = FAX_NET_WY_HC
+ can_send_priority = TRUE
/obj/structure/machinery/faxmachine/uscm
name = "\improper USCM Military Fax Machine"
department = "USCM Local Operations"
network = FAX_NET_USCM
- target_department = DEPARTMENT_HC
+ target_department = FAX_DEPARTMENT_HC
+
+/obj/structure/machinery/faxmachine/uscm/almayer
+ department = FAX_DEPARTMENT_ALMAYER
-/obj/structure/machinery/faxmachine/uscm/command
- department = "CIC"
+/obj/structure/machinery/faxmachine/uscm/almayer/ai_core
+ department = FAX_DEPARTMENT_ALMAYER_AICORE
+ radio_alert_tag = ":+"
-/obj/structure/machinery/faxmachine/uscm/command/capt
- department = "Commanding Officer"
+/obj/structure/machinery/faxmachine/uscm/almayer/command
+ department = FAX_DEPARTMENT_ALMAYER_COMMAND
-/obj/structure/machinery/faxmachine/uscm/command/highcom
- department = DEPARTMENT_HC
- target_department = "Commanding Officer"
+/obj/structure/machinery/faxmachine/uscm/almayer/command/capt
+ sub_name = "Commanding Officer"
+ can_send_priority = TRUE
+
+/obj/structure/machinery/faxmachine/uscm/highcom
+ department = FAX_DEPARTMENT_HC
+ target_department = FAX_DEPARTMENT_ALMAYER_COMMAND
network = FAX_NET_USCM_HC
+ can_send_priority = TRUE
-/obj/structure/machinery/faxmachine/uscm/brig
+/obj/structure/machinery/faxmachine/uscm/almayer/brig
name = "\improper USCM Provost Fax Machine"
- department = "Brig"
- target_department = DEPARTMENT_PROVOST
+ department = FAX_DEPARTMENT_ALMAYER_BRIG
+ target_department = FAX_DEPARTMENT_PROVOST
+ radio_alert_tag = ":P"
-/obj/structure/machinery/faxmachine/uscm/brig/chief
- department = "Chief MP"
+/obj/structure/machinery/faxmachine/uscm/almayer/brig/chief
+ sub_name = "Chief MP"
-/obj/structure/machinery/faxmachine/uscm/brig/provost
- department = DEPARTMENT_PROVOST
- target_department = "Brig"
+/obj/structure/machinery/faxmachine/uscm/provost
+ name = "\improper USCM Provost Fax Machine"
+ department = FAX_DEPARTMENT_PROVOST
+ target_department = FAX_DEPARTMENT_ALMAYER_BRIG
network = FAX_NET_USCM_HC
+ can_send_priority = TRUE
/obj/structure/machinery/faxmachine/upp
name = "\improper UPP Military Fax Machine"
department = "UPP Local Operations"
network = FAX_NET_UPP
- target_department = DEPARTMENT_UPP
+ target_department = FAX_DEPARTMENT_UPP
/obj/structure/machinery/faxmachine/upp/highcom
- department = DEPARTMENT_UPP
+ department = FAX_DEPARTMENT_UPP
network = FAX_NET_UPP_HC
target_department = "UPP Local Operations"
+ can_send_priority = TRUE
/obj/structure/machinery/faxmachine/clf
name = "\improper Hacked General Purpose Fax Machine"
department = "CLF Local Operations"
network = FAX_NET_CLF
- target_department = DEPARTMENT_CLF
+ target_department = FAX_DEPARTMENT_CLF
/obj/structure/machinery/faxmachine/clf/highcom
- department = DEPARTMENT_CLF
+ department = FAX_DEPARTMENT_CLF
network = FAX_NET_CLF_HC
target_department = "CLF Local Operations"
+ can_send_priority = TRUE
/obj/structure/machinery/faxmachine/twe
name = "\improper TWE Military Fax Machine"
department = "TWE Local Operations"
network = FAX_NET_TWE
- target_department = DEPARTMENT_TWE
+ target_department = FAX_DEPARTMENT_TWE
/obj/structure/machinery/faxmachine/twe/highcom
- department = DEPARTMENT_TWE
+ department = FAX_DEPARTMENT_TWE
network = FAX_NET_TWE_HC
target_department = "TWE Local Operations"
+ can_send_priority = TRUE
/obj/structure/machinery/faxmachine/press/highcom
- department = DEPARTMENT_PRESS
+ department = FAX_DEPARTMENT_PRESS
network = FAX_NET_PRESS_HC
- target_department = "General Public"
+ target_department = FAX_DEPARTMENT_GENERAL_PUBLIC
+ can_send_priority = TRUE
/obj/structure/machinery/faxmachine/Initialize(mapload, ...)
. = ..()
- if(mapload && (department in HIGHCOM_DEPARTMENTS))
+ if(mapload && (department in FAX_HIGHCOM_DEPARTMENTS))
for(var/datum/fax/fax as anything in GLOB.fax_contents)
if(fax.department != department)
continue
@@ -682,7 +798,7 @@ GLOBAL_LIST_EMPTY(all_faxcodes)
if(portable_id_tag)
machine_id_tag = portable_id_tag
fixed_id_tag = TRUE
- GLOB.all_faxcodes += machine_id_tag
+ GLOB.fax_network.all_faxcodes[machine_id_tag] = src
///The wearable and deployable part of the fax machine backpack
/obj/item/device/fax_backpack
@@ -780,25 +896,25 @@ GLOBAL_LIST_EMPTY(all_faxcodes)
/obj/structure/machinery/faxmachine/proc/is_department_responder_awake(target_department)
- if(!(target_department in HIGHCOM_DEPARTMENTS))
+ if(!(target_department in FAX_HIGHCOM_DEPARTMENTS))
return FALSE
var/target_job = JOB_FAX_RESPONDER
switch(target_department)
- if(DEPARTMENT_CLF)
+ if(FAX_DEPARTMENT_CLF)
target_job = JOB_FAX_RESPONDER_CLF
- if(DEPARTMENT_CMB)
+ if(FAX_DEPARTMENT_CMB)
target_job = JOB_FAX_RESPONDER_CMB
- if(DEPARTMENT_HC)
+ if(FAX_DEPARTMENT_HC)
target_job = JOB_FAX_RESPONDER_USCM_HC
- if(DEPARTMENT_PRESS)
+ if(FAX_DEPARTMENT_PRESS)
target_job = JOB_FAX_RESPONDER_PRESS
- if(DEPARTMENT_PROVOST)
+ if(FAX_DEPARTMENT_PROVOST)
target_job = JOB_FAX_RESPONDER_USCM_PVST
- if(DEPARTMENT_TWE)
+ if(FAX_DEPARTMENT_TWE)
target_job = JOB_FAX_RESPONDER_TWE
- if(DEPARTMENT_UPP)
+ if(FAX_DEPARTMENT_UPP)
target_job = JOB_FAX_RESPONDER_UPP
- if(DEPARTMENT_WY)
+ if(FAX_DEPARTMENT_WY)
target_job = JOB_FAX_RESPONDER_WY
for(var/mob/living/carbon/human/responder in SSticker.mode.fax_responders)
diff --git a/code/game/objects/items/devices/radio/encryptionkey.dm b/code/game/objects/items/devices/radio/encryptionkey.dm
index 089886db0e56..2cdbe55c8da6 100644
--- a/code/game/objects/items/devices/radio/encryptionkey.dm
+++ b/code/game/objects/items/devices/radio/encryptionkey.dm
@@ -45,12 +45,6 @@
//MARINE ENCRYPTION KEYS
-/obj/item/device/encryptionkey/ai_integrated
- name = "AI Integrated Encryption Key"
- desc = "Integrated encryption key"
- icon_state = "cap_key"
- channels = list(RADIO_CHANNEL_ALMAYER = TRUE, RADIO_CHANNEL_COMMAND = TRUE, RADIO_CHANNEL_MP = TRUE, RADIO_CHANNEL_ENGI = TRUE, RADIO_CHANNEL_MEDSCI = TRUE, RADIO_CHANNEL_REQ = TRUE, SQUAD_MARINE_1 = TRUE, SQUAD_MARINE_2 = TRUE, SQUAD_MARINE_3 = TRUE, SQUAD_MARINE_4 = TRUE, SQUAD_MARINE_5 = TRUE, SQUAD_MARINE_CRYO = TRUE, RADIO_CHANNEL_JTAC = TRUE, RADIO_CHANNEL_INTEL = TRUE)
-
/obj/item/device/encryptionkey/sentry_laptop
name = "Sentry Network Status Encryption Key"
desc = "Automated channel to broadcast sentry gun updates"
@@ -170,8 +164,10 @@
icon_state = "req_key"
channels = list(RADIO_CHANNEL_REQ = TRUE, RADIO_CHANNEL_COMMAND = FALSE)
-/obj/item/device/encryptionkey/mcom/ai //AI only.
- channels = list(RADIO_CHANNEL_COMMAND = TRUE, RADIO_CHANNEL_MP = TRUE, SQUAD_MARINE_1 = TRUE, SQUAD_MARINE_2 = TRUE, SQUAD_MARINE_3 = TRUE, SQUAD_MARINE_4 = TRUE, SQUAD_MARINE_5 = TRUE, SQUAD_MARINE_CRYO = TRUE, RADIO_CHANNEL_ENGI = TRUE, RADIO_CHANNEL_MEDSCI = TRUE, RADIO_CHANNEL_REQ = TRUE, RADIO_CHANNEL_JTAC = TRUE, RADIO_CHANNEL_INTEL = TRUE)
+/obj/item/device/encryptionkey/cmpcom/synth/ai //AI only.
+ name = "AI Integrated Radio Encryption Key"
+ channels = list(RADIO_CHANNEL_COMMAND = TRUE, RADIO_CHANNEL_MP = TRUE, SQUAD_MARINE_1 = TRUE, SQUAD_MARINE_2 = TRUE, SQUAD_MARINE_3 = TRUE, SQUAD_MARINE_4 = TRUE, SQUAD_MARINE_5 = TRUE, SQUAD_MARINE_CRYO = TRUE, RADIO_CHANNEL_ENGI = TRUE, RADIO_CHANNEL_MEDSCI = TRUE, RADIO_CHANNEL_REQ = TRUE, RADIO_CHANNEL_JTAC = TRUE, RADIO_CHANNEL_INTEL = TRUE, RADIO_CHANNEL_WY = TRUE)
+ translate_apollo = TRUE
// MARINE SQUADS
diff --git a/code/game/objects/items/devices/radio/headset.dm b/code/game/objects/items/devices/radio/headset.dm
index e16426f50ec5..5941e26226de 100644
--- a/code/game/objects/items/devices/radio/headset.dm
+++ b/code/game/objects/items/devices/radio/headset.dm
@@ -399,25 +399,6 @@
/obj/item/device/radio/headset/binary
initial_keys = list(/obj/item/device/encryptionkey/binary)
-/obj/item/device/radio/headset/ai_integrated //No need to care about icons, it should be hidden inside the AI anyway.
- name = "AI Subspace Transceiver"
- desc = "Integrated AI radio transceiver."
- icon = 'icons/obj/items/robot_component.dmi'
- icon_state = "radio"
- item_state = "headset"
- item_icons = list(
- WEAR_L_HAND = 'icons/mob/humans/onmob/inhands/equipment/devices_lefthand.dmi',
- WEAR_R_HAND = 'icons/mob/humans/onmob/inhands/equipment/devices_righthand.dmi',
- )
- initial_keys = list(/obj/item/device/encryptionkey/ai_integrated)
- var/myAi = null // Atlantis: Reference back to the AI which has this radio.
- var/disabledAi = 0 // Atlantis: Used to manually disable AI's integrated radio via intellicard menu.
-
-/obj/item/device/radio/headset/ai_integrated/receive_range(freq, level)
- if (disabledAi)
- return -1 //Transceiver Disabled.
- return ..(freq, level, 1)
-
//MARINE HEADSETS
/obj/item/device/radio/headset/almayer
@@ -640,7 +621,7 @@
)
/obj/item/device/radio/headset/almayer/mcom/ai
- initial_keys = list(/obj/item/device/encryptionkey/mcom/ai)
+ initial_keys = list(/obj/item/device/encryptionkey/cmpcom/synth/ai)
volume = RADIO_VOLUME_CRITICAL
/obj/item/device/radio/headset/almayer/marine
diff --git a/code/modules/admin/topic/topic.dm b/code/modules/admin/topic/topic.dm
index 1084de0124ef..d1f3297b8126 100644
--- a/code/modules/admin/topic/topic.dm
+++ b/code/modules/admin/topic/topic.dm
@@ -1270,12 +1270,12 @@
to_chat(H, "You hear something crackle in your headset for a moment before a voice speaks. \"Please stand by for a message from your benefactor. Message as follows, agent. \"[input]\" Message ends.\"")
else if(href_list["UpdateFax"])
- var/obj/structure/machinery/faxmachine/fax = locate(href_list["originfax"])
- fax.update_departments()
+ var/obj/structure/machinery/faxmachine/origin_fax = locate(href_list["originfax"])
+ origin_fax.update_departments()
else if(href_list["PressFaxReply"])
- var/mob/living/carbon/human/H = locate(href_list["PressFaxReply"])
- var/obj/structure/machinery/faxmachine/fax = locate(href_list["originfax"])
+ var/mob/living/carbon/human/target_human = locate(href_list["PressFaxReply"])
+ var/obj/structure/machinery/faxmachine/origin_fax = locate(href_list["originfax"])
var/template_choice = tgui_input_list(usr, "Use which template or roll your own?", "Fax Templates", list("Template", "Custom"))
if(!template_choice) return
@@ -1283,7 +1283,7 @@
var/organization_type = ""
switch(template_choice)
if("Custom")
- var/input = input(src.owner, "Please enter a message to reply to [key_name(H)] via secure connection. NOTE: BBCode does not work, but HTML tags do! Use
for line breaks.", "Outgoing message from Press", "") as message|null
+ var/input = input(src.owner, "Please enter a message to reply to [key_name(target_human)] via secure connection. NOTE: BBCode does not work, but HTML tags do! Use
for line breaks.", "Outgoing message from Press", "") as message|null
if(!input)
return
fax_message = new(input)
@@ -1294,7 +1294,7 @@
var/addressed_to = ""
var/address_option = tgui_input_list(usr, "Address it to the sender or custom?", "Fax Template", list("Sender", "Custom"))
if(address_option == "Sender")
- addressed_to = "[H.real_name]"
+ addressed_to = "[target_human.real_name]"
else if(address_option == "Custom")
addressed_to = input(src.owner, "Enter Addressee Line", "Outgoing message from Press", "") as message|null
if(!addressed_to)
@@ -1313,59 +1313,23 @@
fax_message = new(generate_templated_fax(0, organization_type, subject, addressed_to, message_body, sent_by, "Editor in Chief", organization_type))
show_browser(usr, "[fax_message.data]", "pressfaxpreview", "size=500x400")
- var/send_choice = tgui_input_list(usr, "Send this fax?", "Fax Template", list("Send", "Cancel"))
+ var/send_choice = tgui_input_list(usr, "Send this fax?", "Fax Confirmation", list("Send", "Cancel"))
if(send_choice != "Send")
return
- GLOB.fax_contents += fax_message // save a copy
- var/customname = input(src.owner, "Pick a title for the report", "Title") as text|null
-
- GLOB.PressFaxes.Add("\[view '[customname]' from [key_name(usr)] at [time2text(world.timeofday, "hh:mm:ss")]\]")
-
- var/msg_ghost = SPAN_NOTICE("PRESS REPLY: ")
- msg_ghost += "Transmitting '[customname]' via secure connection ... "
- msg_ghost += "view message"
- announce_fax(msg_ghost = msg_ghost)
-
- for(var/obj/structure/machinery/faxmachine/F in GLOB.machines)
- if(F == fax)
- if(!(F.inoperable()))
-
- // animate! it's alive!
- flick("faxreceive", F)
+ var/is_priority_fax = tgui_alert(usr, "Is this a priority fax?", "Priority Fax?", list("Yes", "No"))
- // give the sprite some time to flick
- spawn(20)
- var/obj/item/paper/P = new /obj/item/paper( F.loc )
- P.name = "[organization_type] - [customname]"
- P.info = fax_message.data
- P.update_icon()
-
- playsound(F.loc, "sound/machines/fax.ogg", 15)
-
- // Stamps
- var/image/stampoverlay = image('icons/obj/items/paper.dmi')
- stampoverlay.icon_state = "paper_stamp-rd"
- if(!P.stamped)
- P.stamped = new
- P.stamped += /obj/item/tool/stamp
- P.overlays += stampoverlay
- P.stamps += "
This paper has been stamped by the Free Press Quantum Relay."
-
- to_chat(src.owner, "Message reply to transmitted successfully.")
- message_admins(SPAN_STAFF_IC("[key_name_admin(src.owner)] replied to a fax message from [key_name_admin(H)]"), 1)
- return
- to_chat(src.owner, "/red Unable to locate fax!")
+ send_admin_fax("Press", fax_message, origin_fax, is_priority_fax, target_human, organization_type)
else if(href_list["USCMFaxReply"])
- var/mob/living/carbon/human/H = locate(href_list["USCMFaxReply"])
- var/obj/structure/machinery/faxmachine/fax = locate(href_list["originfax"])
+ var/mob/living/carbon/human/target_human = locate(href_list["USCMFaxReply"])
+ var/obj/structure/machinery/faxmachine/origin_fax = locate(href_list["originfax"])
var/template_choice = tgui_input_list(usr, "Use which template or roll your own?", "Fax Templates", list("USCM High Command", "USCM Provost General", "Custom"))
if(!template_choice) return
var/datum/fax/fax_message
switch(template_choice)
if("Custom")
- var/input = input(src.owner, "Please enter a message to reply to [key_name(H)] via secure connection. NOTE: BBCode does not work, but HTML tags do! Use
for line breaks.", "Outgoing message from USCM", "") as message|null
+ var/input = input(src.owner, "Please enter a message to reply to [key_name(target_human)] via secure connection. NOTE: BBCode does not work, but HTML tags do! Use
for line breaks.", "Outgoing message from USCM", "") as message|null
if(!input)
return
fax_message = new(input)
@@ -1376,7 +1340,7 @@
var/addressed_to = ""
var/address_option = tgui_input_list(usr, "Address it to the sender or custom?", "Fax Template", list("Sender", "Custom"))
if(address_option == "Sender")
- addressed_to = "[H.real_name]"
+ addressed_to = "[target_human.real_name]"
else if(address_option == "Custom")
addressed_to = input(src.owner, "Enter Addressee Line", "Outgoing message from USCM", "") as message|null
if(!addressed_to)
@@ -1395,60 +1359,23 @@
fax_message = new(generate_templated_fax(0, "USCM CENTRAL COMMAND", subject,addressed_to, message_body,sent_by, sent_title, "United States Colonial Marine Corps"))
show_browser(usr, "[fax_message.data]", "uscmfaxpreview", "size=500x400")
- var/send_choice = tgui_input_list(usr, "Send this fax?", "Fax Template", list("Send", "Cancel"))
+ var/send_choice = tgui_input_list(usr, "Send this fax?", "Fax Confirmation", list("Send", "Cancel"))
if(send_choice != "Send")
return
- GLOB.fax_contents += fax_message // save a copy
+ var/is_priority_fax = tgui_alert(usr, "Is this a priority fax?", "Priority Fax?", list("Yes", "No"))
- var/customname = input(src.owner, "Pick a title for the report", "Title") as text|null
-
- GLOB.USCMFaxes.Add("\[view '[customname]' from [key_name(usr)] at [time2text(world.timeofday, "hh:mm:ss")]\]")
-
- var/msg_ghost = SPAN_NOTICE("USCM FAX REPLY: ")
- msg_ghost += "Transmitting '[customname]' via secure connection ... "
- msg_ghost += "view message"
- announce_fax( ,msg_ghost)
-
- for(var/obj/structure/machinery/faxmachine/F in GLOB.machines)
- if(F == fax)
- if(!(F.inoperable()))
-
- // animate! it's alive!
- flick("faxreceive", F)
-
- // give the sprite some time to flick
- spawn(20)
- var/obj/item/paper/P = new /obj/item/paper( F.loc )
- P.name = "USCM High Command - [customname]"
- P.info = fax_message.data
- P.update_icon()
-
- playsound(F.loc, "sound/machines/fax.ogg", 15)
-
- // Stamps
- var/image/stampoverlay = image('icons/obj/items/paper.dmi')
- stampoverlay.icon_state = "paper_stamp-uscm"
- if(!P.stamped)
- P.stamped = new
- P.stamped += /obj/item/tool/stamp
- P.overlays += stampoverlay
- P.stamps += "
This paper has been stamped by the USCM High Command Quantum Relay."
-
- to_chat(src.owner, "Message reply to transmitted successfully.")
- message_admins(SPAN_STAFF_IC("[key_name_admin(src.owner)] replied to a fax message from [key_name_admin(H)]"), 1)
- return
- to_chat(src.owner, "/red Unable to locate fax!")
+ send_admin_fax(FACTION_MARINE, fax_message, origin_fax, is_priority_fax, target_human)
else if(href_list["WYFaxReply"])
- var/mob/living/carbon/human/H = locate(href_list["WYFaxReply"])
- var/obj/structure/machinery/faxmachine/fax = locate(href_list["originfax"])
+ var/mob/living/carbon/human/target_human = locate(href_list["WYFaxReply"])
+ var/obj/structure/machinery/faxmachine/origin_fax = locate(href_list["originfax"])
var/template_choice = tgui_input_list(usr, "Use the template or roll your own?", "Fax Template", list("Template", "Custom"))
if(!template_choice) return
var/datum/fax/fax_message
switch(template_choice)
if("Custom")
- var/input = input(src.owner, "Please enter a message to reply to [key_name(H)] via secure connection. NOTE: BBCode does not work, but HTML tags do! Use
for line breaks.", "Outgoing message from Weyland-Yutani", "") as message|null
+ var/input = input(src.owner, "Please enter a message to reply to [key_name(target_human)] via secure connection. NOTE: BBCode does not work, but HTML tags do! Use
for line breaks.", "Outgoing message from Weyland-Yutani", "") as message|null
if(!input)
return
fax_message = new(input)
@@ -1459,7 +1386,7 @@
var/addressed_to = ""
var/address_option = tgui_input_list(usr, "Address it to the sender or custom?", "Fax Template", list("Sender", "Custom"))
if(address_option == "Sender")
- addressed_to = "[H.real_name]"
+ addressed_to = "[target_human.real_name]"
else if(address_option == "Custom")
addressed_to = input(src.owner, "Enter Addressee Line", "Outgoing message from Weyland-Yutani", "") as message|null
if(!addressed_to)
@@ -1477,60 +1404,20 @@
var/send_choice = tgui_input_list(usr, "Send this fax?", "Fax Confirmation", list("Send", "Cancel"))
if(send_choice != "Send")
return
- GLOB.fax_contents += fax_message // save a copy
+ var/is_priority_fax = tgui_alert(usr, "Is this a priority fax?", "Priority Fax?", list("Yes", "No"))
- var/customname = input(src.owner, "Pick a title for the report", "Title") as text|null
- if(!customname)
- return
-
- GLOB.WYFaxes.Add("\[view '[customname]' from [key_name(usr)] at [time2text(world.timeofday, "hh:mm:ss")]\]") //Add replies so that mods know what the hell is goin on with the RP
-
- var/msg_ghost = SPAN_NOTICE("WEYLAND-YUTANI FAX REPLY: ")
- msg_ghost += "Transmitting '[customname]' via secure connection ... "
- msg_ghost += "view message"
- announce_fax( ,msg_ghost)
-
-
- for(var/obj/structure/machinery/faxmachine/F in GLOB.machines)
- if(F == fax)
- if(!(F.inoperable()))
-
- // animate! it's alive!
- flick("faxreceive", F)
-
- // give the sprite some time to flick
- spawn(20)
- var/obj/item/paper/P = new /obj/item/paper( F.loc )
- P.name = "Weyland-Yutani - [customname]"
- P.info = fax_message.data
- P.update_icon()
-
- playsound(F.loc, "sound/machines/fax.ogg", 15)
-
- // Stamps
- var/image/stampoverlay = image('icons/obj/items/paper.dmi')
- stampoverlay.icon_state = "paper_stamp-weyyu"
- if(!P.stamped)
- P.stamped = new
- P.stamped += /obj/item/tool/stamp
- P.overlays += stampoverlay
- P.stamps += "
This paper has been stamped and encrypted by the Weyland-Yutani Quantum Relay (tm)."
-
- to_chat(src.owner, "Message reply to transmitted successfully.")
- message_admins(SPAN_STAFF_IC("[key_name_admin(src.owner)] replied to a fax message from [key_name_admin(H)]"), 1)
- return
- to_chat(src.owner, "/red Unable to locate fax!")
+ send_admin_fax(FACTION_WY, fax_message, origin_fax, is_priority_fax, target_human)
else if(href_list["TWEFaxReply"])
- var/mob/living/carbon/human/H = locate(href_list["TWEFaxReply"])
- var/obj/structure/machinery/faxmachine/fax = locate(href_list["originfax"])
+ var/mob/living/carbon/human/target_human = locate(href_list["TWEFaxReply"])
+ var/obj/structure/machinery/faxmachine/origin_fax = locate(href_list["originfax"])
var/template_choice = tgui_input_list(usr, "Use the template or roll your own?", "Fax Template", list("Template", "Custom"))
if(!template_choice) return
var/datum/fax/fax_message
switch(template_choice)
if("Custom")
- var/input = input(src.owner, "Please enter a message to reply to [key_name(H)] via secure connection. NOTE: BBCode does not work, but HTML tags do! Use
for line breaks.", "Outgoing message from TWE", "") as message|null
+ var/input = input(src.owner, "Please enter a message to reply to [key_name(target_human)] via secure connection. NOTE: BBCode does not work, but HTML tags do! Use
for line breaks.", "Outgoing message from TWE", "") as message|null
if(!input)
return
fax_message = new(input)
@@ -1541,7 +1428,7 @@
var/addressed_to = ""
var/address_option = tgui_input_list(usr, "Address it to the sender or custom?", "Fax Template", list("Sender", "Custom"))
if(address_option == "Sender")
- addressed_to = "[H.real_name]"
+ addressed_to = "[target_human.real_name]"
else if(address_option == "Custom")
addressed_to = input(src.owner, "Enter Addressee Line", "Outgoing message from TWE", "") as message|null
if(!addressed_to)
@@ -1559,59 +1446,20 @@
var/send_choice = tgui_input_list(usr, "Send this fax?", "Fax Confirmation", list("Send", "Cancel"))
if(send_choice != "Send")
return
- GLOB.fax_contents += fax_message // save a copy
-
- var/customname = input(src.owner, "Pick a title for the report", "Title") as text|null
- if(!customname)
- return
-
- GLOB.TWEFaxes.Add("\[view '[customname]' from [key_name(usr)] at [time2text(world.timeofday, "hh:mm:ss")]\]") //Add replies so that mods know what the hell is goin on with the RP
-
- var/msg_ghost = SPAN_NOTICE("THREE WORLD EMPIRE FAX REPLY: ")
- msg_ghost += "Transmitting '[customname]' via secure connection ... "
- msg_ghost += "view message"
- announce_fax( ,msg_ghost)
-
- for(var/obj/structure/machinery/faxmachine/F in GLOB.machines)
- if(F == fax)
- if(!(F.inoperable()))
-
- // animate! it's alive!
- flick("faxreceive", F)
-
- // give the sprite some time to flick
- spawn(20)
- var/obj/item/paper/P = new /obj/item/paper( F.loc )
- P.name = "Three World Empire - [customname]"
- P.info = fax_message.data
- P.update_icon()
-
- playsound(F.loc, "sound/machines/fax.ogg", 15)
-
- // Stamps
- var/image/stampoverlay = image('icons/obj/items/paper.dmi')
- stampoverlay.icon_state = "paper_stamp-twe"
- if(!P.stamped)
- P.stamped = new
- P.stamped += /obj/item/tool/stamp
- P.overlays += stampoverlay
- P.stamps += "
This paper has been stamped by the Three World Empire Quantum Relay (tm)."
+ var/is_priority_fax = tgui_alert(usr, "Is this a priority fax?", "Priority Fax?", list("Yes", "No"))
- to_chat(src.owner, "Message reply to transmitted successfully.")
- message_admins(SPAN_STAFF_IC("[key_name_admin(src.owner)] replied to a fax message from [key_name_admin(H)]"), 1)
- return
- to_chat(src.owner, "/red Unable to locate fax!")
+ send_admin_fax(FACTION_TWE, fax_message, origin_fax, is_priority_fax, target_human)
else if(href_list["UPPFaxReply"])
- var/mob/living/carbon/human/H = locate(href_list["UPPFaxReply"])
- var/obj/structure/machinery/faxmachine/fax = locate(href_list["originfax"])
+ var/mob/living/carbon/human/target_human = locate(href_list["UPPFaxReply"])
+ var/obj/structure/machinery/faxmachine/origin_fax = locate(href_list["originfax"])
var/template_choice = tgui_input_list(usr, "Use the template or roll your own?", "Fax Template", list("Template", "Custom"))
if(!template_choice) return
var/datum/fax/fax_message
switch(template_choice)
if("Custom")
- var/input = input(src.owner, "Please enter a message to reply to [key_name(H)] via secure connection. NOTE: BBCode does not work, but HTML tags do! Use
for line breaks.", "Outgoing message from UPP", "") as message|null
+ var/input = input(src.owner, "Please enter a message to reply to [key_name(target_human)] via secure connection. NOTE: BBCode does not work, but HTML tags do! Use
for line breaks.", "Outgoing message from UPP", "") as message|null
if(!input)
return
fax_message = new(input)
@@ -1622,7 +1470,7 @@
var/addressed_to = ""
var/address_option = tgui_input_list(usr, "Address it to the sender or custom?", "Fax Template", list("Sender", "Custom"))
if(address_option == "Sender")
- addressed_to = "[H.real_name]"
+ addressed_to = "[target_human.real_name]"
else if(address_option == "Custom")
addressed_to = input(src.owner, "Enter Addressee Line", "Outgoing message from UPP", "") as message|null
if(!addressed_to)
@@ -1640,59 +1488,20 @@
var/send_choice = tgui_input_list(usr, "Send this fax?", "Fax Confirmation", list("Send", "Cancel"))
if(send_choice != "Send")
return
- GLOB.fax_contents += fax_message // save a copy
-
- var/customname = input(src.owner, "Pick a title for the report", "Title") as text|null
- if(!customname)
- return
-
- GLOB.UPPFaxes.Add("\[view '[customname]' from [key_name(usr)] at [time2text(world.timeofday, "hh:mm:ss")]\]") //Add replies so that mods know what the hell is goin on with the RP
-
- var/msg_ghost = SPAN_NOTICE("UNION OF PROGRESSIVE PEOPLES FAX REPLY: ")
- msg_ghost += "Transmitting '[customname]' via secure connection ... "
- msg_ghost += "view message"
- announce_fax( ,msg_ghost)
-
- for(var/obj/structure/machinery/faxmachine/F in GLOB.machines)
- if(F == fax)
- if(!(F.inoperable()))
-
- // animate! it's alive!
- flick("faxreceive", F)
-
- // give the sprite some time to flick
- spawn(20)
- var/obj/item/paper/P = new /obj/item/paper( F.loc )
- P.name = "Union of Progressive Peoples - [customname]"
- P.info = fax_message.data
- P.update_icon()
-
- playsound(F.loc, "sound/machines/fax.ogg", 15)
-
- // Stamps
- var/image/stampoverlay = image('icons/obj/items/paper.dmi')
- stampoverlay.icon_state = "paper_stamp-upp"
- if(!P.stamped)
- P.stamped = new
- P.stamped += /obj/item/tool/stamp
- P.overlays += stampoverlay
- P.stamps += "
This paper has been stamped by the Union of Progressive Peoples Quantum Relay (tm)."
+ var/is_priority_fax = tgui_alert(usr, "Is this a priority fax?", "Priority Fax?", list("Yes", "No"))
- to_chat(src.owner, "Message reply to transmitted successfully.")
- message_admins(SPAN_STAFF_IC("[key_name_admin(src.owner)] replied to a fax message from [key_name_admin(H)]"), 1)
- return
- to_chat(src.owner, "/red Unable to locate fax!")
+ send_admin_fax(FACTION_UPP, fax_message, origin_fax, is_priority_fax, target_human)
else if(href_list["CLFFaxReply"])
- var/mob/living/carbon/human/H = locate(href_list["CLFFaxReply"])
- var/obj/structure/machinery/faxmachine/fax = locate(href_list["originfax"])
+ var/mob/living/carbon/human/target_human = locate(href_list["CLFFaxReply"])
+ var/obj/structure/machinery/faxmachine/origin_fax = locate(href_list["originfax"])
var/template_choice = tgui_input_list(usr, "Use the template or roll your own?", "Fax Template", list("Template", "Custom"))
if(!template_choice) return
var/datum/fax/fax_message
switch(template_choice)
if("Custom")
- var/input = input(src.owner, "Please enter a message to reply to [key_name(H)] via secure connection. NOTE: BBCode does not work, but HTML tags do! Use
for line breaks.", "Outgoing message from CLF", "") as message|null
+ var/input = input(src.owner, "Please enter a message to reply to [key_name(target_human)] via secure connection. NOTE: BBCode does not work, but HTML tags do! Use
for line breaks.", "Outgoing message from CLF", "") as message|null
if(!input)
return
fax_message = new(input)
@@ -1703,7 +1512,7 @@
var/addressed_to = ""
var/address_option = tgui_input_list(usr, "Address it to the sender or custom?", "Fax Template", list("Sender", "Custom"))
if(address_option == "Sender")
- addressed_to = "[H.real_name]"
+ addressed_to = "[target_human.real_name]"
else if(address_option == "Custom")
addressed_to = input(src.owner, "Enter Addressee Line", "Outgoing message from CLF", "") as message|null
if(!addressed_to)
@@ -1721,59 +1530,20 @@
var/send_choice = tgui_input_list(usr, "Send this fax?", "Fax Confirmation", list("Send", "Cancel"))
if(send_choice != "Send")
return
- GLOB.fax_contents += fax_message // save a copy
-
- var/customname = input(src.owner, "Pick a title for the report", "Title") as text|null
- if(!customname)
- return
-
- GLOB.CLFFaxes.Add("\[view '[customname]' from [key_name(usr)] at [time2text(world.timeofday, "hh:mm:ss")]\]") //Add replies so that mods know what the hell is goin on with the RP
-
- var/msg_ghost = SPAN_NOTICE("COLONIAL LIBERATION FRONT FAX REPLY: ")
- msg_ghost += "Transmitting '[customname]' via secure connection ... "
- msg_ghost += "view message"
- announce_fax( ,msg_ghost)
+ var/is_priority_fax = tgui_alert(usr, "Is this a priority fax?", "Priority Fax?", list("Yes", "No"))
- for(var/obj/structure/machinery/faxmachine/F in GLOB.machines)
- if(F == fax)
- if(!(F.inoperable()))
-
- // animate! it's alive!
- flick("faxreceive", F)
-
- // give the sprite some time to flick
- spawn(20)
- var/obj/item/paper/P = new /obj/item/paper( F.loc )
- P.name = "Colonial Liberation Front - [customname]"
- P.info = fax_message.data
- P.update_icon()
-
- playsound(F.loc, "sound/machines/fax.ogg", 15)
-
- // Stamps
- var/image/stampoverlay = image('icons/obj/items/paper.dmi')
- stampoverlay.icon_state = "paper_stamp-clf"
- if(!P.stamped)
- P.stamped = new
- P.stamped += /obj/item/tool/stamp
- P.overlays += stampoverlay
- P.stamps += "
This paper has been stamped and encrypted by the Colonial Liberation Front Quantum Relay (tm)."
-
- to_chat(src.owner, "Message reply to transmitted successfully.")
- message_admins(SPAN_STAFF_IC("[key_name_admin(src.owner)] replied to a fax message from [key_name_admin(H)]"), 1)
- return
- to_chat(src.owner, "/red Unable to locate fax!")
+ send_admin_fax(FACTION_CLF, fax_message, origin_fax, is_priority_fax, target_human)
else if(href_list["CMBFaxReply"])
- var/mob/living/carbon/human/H = locate(href_list["CMBFaxReply"])
- var/obj/structure/machinery/faxmachine/fax = locate(href_list["originfax"])
+ var/mob/living/carbon/human/target_human = locate(href_list["CMBFaxReply"])
+ var/obj/structure/machinery/faxmachine/origin_fax = locate(href_list["originfax"])
var/template_choice = tgui_input_list(usr, "Use the template or roll your own?", "Fax Template", list("Anchorpoint", "Custom"))
if(!template_choice) return
var/datum/fax/fax_message
switch(template_choice)
if("Custom")
- var/input = input(src.owner, "Please enter a message to reply to [key_name(H)] via secure connection. NOTE: BBCode does not work, but HTML tags do! Use
for line breaks.", "Outgoing message from The Colonial Marshal Bureau", "") as message|null
+ var/input = input(src.owner, "Please enter a message to reply to [key_name(target_human)] via secure connection. NOTE: BBCode does not work, but HTML tags do! Use
for line breaks.", "Outgoing message from The Colonial Marshal Bureau", "") as message|null
if(!input)
return
fax_message = new(input)
@@ -1784,7 +1554,7 @@
var/addressed_to = ""
var/address_option = tgui_input_list(usr, "Address it to the sender or custom?", "Fax Template", list("Sender", "Custom"))
if(address_option == "Sender")
- addressed_to = "[H.real_name]"
+ addressed_to = "[target_human.real_name]"
else if(address_option == "Custom")
addressed_to = input(src.owner, "Enter Addressee Line", "Outgoing message from The Colonial Marshal Bureau", "") as message|null
if(!addressed_to)
@@ -1802,49 +1572,9 @@
var/send_choice = tgui_input_list(usr, "Send this fax?", "Fax Confirmation", list("Send", "Cancel"))
if(send_choice != "Send")
return
- GLOB.fax_contents += fax_message // save a copy
-
- var/customname = input(src.owner, "Pick a title for the report", "Title") as text|null
- if(!customname)
- return
-
- GLOB.CMBFaxes.Add("\[view '[customname]' from [key_name(usr)] at [time2text(world.timeofday, "hh:mm:ss")]\]") //Add replies so that mods know what the hell is goin on with the RP
-
- var/msg_ghost = SPAN_NOTICE("COLONIAL MARSHAL BUREAU FAX REPLY: ")
- msg_ghost += "Transmitting '[customname]' via secure connection ... "
- msg_ghost += "view message"
- announce_fax( ,msg_ghost)
-
-
- for(var/obj/structure/machinery/faxmachine/F in GLOB.machines)
- if(F == fax)
- if(!(F.inoperable()))
-
- // animate! it's alive!
- flick("faxreceive", F)
-
- // give the sprite some time to flick
- spawn(20)
- var/obj/item/paper/P = new /obj/item/paper( F.loc )
- P.name = "Colonial Marshal Bureau - [customname]"
- P.info = fax_message.data
- P.update_icon()
-
- playsound(F.loc, "sound/machines/fax.ogg", 15)
+ var/is_priority_fax = tgui_alert(usr, "Is this a priority fax?", "Priority Fax?", list("Yes", "No"))
- // Stamps
- var/image/stampoverlay = image('icons/obj/items/paper.dmi')
- stampoverlay.icon_state = "paper_stamp-cmb"
- if(!P.stamped)
- P.stamped = new
- P.stamped += /obj/item/tool/stamp
- P.overlays += stampoverlay
- P.stamps += "
This paper has been stamped by The Office of the Colonial Marshals."
-
- to_chat(src.owner, "Message reply to transmitted successfully.")
- message_admins(SPAN_STAFF_IC("[key_name_admin(src.owner)] replied to a fax message from [key_name_admin(H)]"), 1)
- return
- to_chat(src.owner, "/red Unable to locate fax!")
+ send_admin_fax(FACTION_MARSHAL, fax_message, origin_fax, is_priority_fax, target_human)
else if(href_list["customise_paper"])
if(!check_rights(R_MOD))
@@ -2404,3 +2134,106 @@
continue
temp += J.title
return temp
+
+
+
+
+/datum/admins/proc/send_admin_fax(sending_faction, datum/fax/fax_message, obj/structure/machinery/faxmachine/origin_fax, sending_priority, mob/living/carbon/human/target_human, press_organization)
+ GLOB.fax_contents += fax_message // save a copy
+
+ var/customname = input(src.owner, "Pick a title for the report", "Title") as text|null
+ if(!customname)
+ return
+
+ var/reply_log = "\[view '[customname]' from [key_name(usr)] at [time2text(world.timeofday, "hh:mm:ss")]\]" //Add replies so that mods know what the hell is goin on with the RP
+
+ var/faction_ghost_header
+ var/faction_prefix
+ var/fax_stamp_icon
+ var/fax_stamp_print
+ switch(sending_faction)
+ if(FACTION_MARSHAL)
+ GLOB.CMBFaxes.Add(reply_log)
+ faction_ghost_header = "COLONIAL MARSHAL BUREAU FAX REPLY: "
+ faction_prefix = "Colonial Marshal Bureau"
+ fax_stamp_icon = "paper_stamp-cmb"
+ fax_stamp_print = "
This paper has been stamped by [FAX_NET_CMB]."
+ if(FACTION_MARINE)
+ GLOB.USCMFaxes.Add(reply_log)
+ faction_ghost_header = "USCM FAX REPLY: "
+ faction_prefix = "USCM High Command"
+ fax_stamp_icon = "paper_stamp-uscm"
+ fax_stamp_print = "
This paper has been stamped by the [FAX_NET_USCM_HC]."
+ if(FACTION_CLF)
+ GLOB.CLFFaxes.Add(reply_log)
+ faction_ghost_header = "COLONIAL LIBERATION FRONT FAX REPLY: "
+ faction_prefix = "Colonial Liberation Front"
+ fax_stamp_icon = "paper_stamp-clf"
+ fax_stamp_print = "
This paper has been stamped by the [FAX_NET_CLF_HC]."
+ if(FACTION_UPP)
+ GLOB.UPPFaxes.Add(reply_log)
+ faction_ghost_header = "UNION OF PROGRESSIVE PEOPLES FAX REPLY: "
+ faction_prefix = "Union of Progressive Peoples"
+ fax_stamp_icon = "paper_stamp-upp"
+ fax_stamp_print = "
This paper has been stamped by the [FAX_NET_UPP_HC]."
+ if(FACTION_TWE)
+ GLOB.TWEFaxes.Add(reply_log)
+ faction_ghost_header = "THREE WORLD EMPIRE FAX REPLY: "
+ faction_prefix = "Three World Empire"
+ fax_stamp_icon = "paper_stamp-twe"
+ fax_stamp_print = "
This paper has been stamped by the [FAX_NET_TWE_HC]."
+ if(FACTION_WY)
+ GLOB.WYFaxes.Add(reply_log)
+ faction_ghost_header = "WEYLAND-YUTANI FAX REPLY: "
+ faction_prefix = "Weyland-Yutani"
+ fax_stamp_icon = "paper_stamp-weyyu"
+ fax_stamp_print = "
This paper has been stamped by the [FAX_NET_WY_HC]."
+ if("Press")
+ GLOB.PressFaxes.Add(reply_log)
+ faction_ghost_header = "PRESS FAX REPLY: "
+ faction_prefix = press_organization ? press_organization : "Free Press"
+ fax_stamp_icon = "paper_stamp-rd"
+ fax_stamp_print = "
This paper has been stamped by the [FAX_NET_PRESS_HC]."
+
+ var/msg_ghost = SPAN_NOTICE(faction_ghost_header)
+ msg_ghost += "Transmitting '[customname]' via secure connection ... "
+ msg_ghost += "view message"
+ announce_fax( ,msg_ghost)
+
+
+ for(var/obj/structure/machinery/faxmachine/target_fax in GLOB.machines)
+ if(target_fax == origin_fax)
+ if(!(target_fax.inoperable()))
+
+ // animate! it's alive!
+ flick("faxreceive", target_fax)
+
+ // give the sprite some time to flick
+
+ sleep(2 SECONDS)
+ var/obj/item/paper/P = new /obj/item/paper(target_fax.loc)
+ P.name = "[faction_prefix] - [customname]"
+ P.info = fax_message.data
+ P.update_icon()
+
+ playsound(target_fax.loc, "sound/machines/fax.ogg", 15)
+
+ // Stamps
+ var/image/stampoverlay = image('icons/obj/items/paper.dmi')
+ stampoverlay.icon_state = fax_stamp_icon
+ if(!P.stamped)
+ P.stamped = new
+ P.stamped += /obj/item/tool/stamp
+ P.overlays += stampoverlay
+ P.stamps += fax_stamp_print
+ if(sending_priority == "Yes")
+ playsound(target_fax.loc, "sound/machines/twobeep.ogg", 45)
+ target_fax.langchat_speech("beeps with a priority message", get_mobs_in_view(GLOB.world_view_size, target_fax), GLOB.all_languages, skip_language_check = TRUE, animation_style = LANGCHAT_FAST_POP, additional_styles = list("langchat_small", "emote"))
+ target_fax.visible_message("[SPAN_BOLD(target_fax)] beeps with a priority message.")
+ if(target_fax.radio_alert_tag != null)
+ ai_silent_announcement("COMMUNICATIONS REPORT: Fax Machine [target_fax.machine_id_tag], [target_fax.sub_name ? "[target_fax.sub_name]" : ""], now receiving priority fax.", "[target_fax.radio_alert_tag]")
+
+ to_chat(src.owner, "Message reply to transmitted successfully.")
+ message_admins(SPAN_STAFF_IC("[key_name_admin(src.owner)] replied to a fax message from [key_name_admin(target_human)]"), 1)
+ return
+ to_chat(src.owner, SPAN_RED("Unable to locate fax!"))
diff --git a/icons/obj/items/paper.dmi b/icons/obj/items/paper.dmi
index bb24ac6b3377..42ce36cd12b2 100644
Binary files a/icons/obj/items/paper.dmi and b/icons/obj/items/paper.dmi differ
diff --git a/maps/map_files/LV522_Chances_Claim/LV522_Chances_Claim.dmm b/maps/map_files/LV522_Chances_Claim/LV522_Chances_Claim.dmm
index a31a6b6358e9..89541bca8c15 100644
--- a/maps/map_files/LV522_Chances_Claim/LV522_Chances_Claim.dmm
+++ b/maps/map_files/LV522_Chances_Claim/LV522_Chances_Claim.dmm
@@ -22601,7 +22601,7 @@
/area/lv522/indoors/a_block/corpo/glass)
"mhn" = (
/obj/structure/surface/table/almayer,
-/obj/structure/machinery/faxmachine/uscm/brig,
+/obj/structure/machinery/faxmachine/uscm,
/obj/structure/machinery/light{
dir = 1
},
diff --git a/maps/map_files/LV624/standalone/clfship.dmm b/maps/map_files/LV624/standalone/clfship.dmm
index 177b8895c558..d61b13ec68f0 100644
--- a/maps/map_files/LV624/standalone/clfship.dmm
+++ b/maps/map_files/LV624/standalone/clfship.dmm
@@ -1639,7 +1639,7 @@
/area/lv624/lazarus/crashed_ship)
"Yz" = (
/obj/structure/surface/table/reinforced/prison,
-/obj/structure/machinery/faxmachine{
+/obj/structure/machinery/faxmachine/clf{
department = "CLF - Cell 42"
},
/obj/item/paper/prison_station/pirate_note/clfship,
diff --git a/maps/map_files/LV759_Hybrisa_Prospera/LV759_Hybrisa_Prospera.dmm b/maps/map_files/LV759_Hybrisa_Prospera/LV759_Hybrisa_Prospera.dmm
index afef57ab012e..00dd9bcfbdbc 100644
--- a/maps/map_files/LV759_Hybrisa_Prospera/LV759_Hybrisa_Prospera.dmm
+++ b/maps/map_files/LV759_Hybrisa_Prospera/LV759_Hybrisa_Prospera.dmm
@@ -120847,7 +120847,7 @@
/area/lv759/indoors/derelict_ship)
"rnQ" = (
/obj/structure/surface/table/woodentable/fancy,
-/obj/structure/machinery/faxmachine/uscm/brig/chief,
+/obj/structure/machinery/faxmachine,
/turf/open/floor/hybrisa/wood/darkerwood,
/area/lv759/indoors/colonial_marshals/head_office)
"rnS" = (
@@ -154959,7 +154959,7 @@
/obj/structure/machinery/faxmachine/corporate/highcom{
layer = 4
},
-/obj/structure/machinery/faxmachine/uscm/command/highcom{
+/obj/structure/machinery/faxmachine/uscm/highcom{
pixel_y = 10
},
/turf/open/floor/almayer/blackfull/west,
diff --git a/maps/map_files/USS_Almayer/USS_Almayer.dmm b/maps/map_files/USS_Almayer/USS_Almayer.dmm
index 732aec4287c4..abd6f4e9e5c0 100644
--- a/maps/map_files/USS_Almayer/USS_Almayer.dmm
+++ b/maps/map_files/USS_Almayer/USS_Almayer.dmm
@@ -1308,7 +1308,10 @@
/turf/open/floor/plating/almayer/no_build,
/area/almayer/stair_clone/upper)
"aiQ" = (
-/obj/structure/machinery/faxmachine,
+/obj/structure/machinery/faxmachine{
+ sub_name = "Combat Correspondent";
+ department = "USS Almayer"
+ },
/obj/structure/surface/table/almayer,
/obj/structure/machinery/light/small,
/turf/open/floor/almayer/plate,
@@ -3335,7 +3338,10 @@
/area/almayer/command/cic)
"awH" = (
/obj/structure/surface/table/reinforced/almayer_B,
-/obj/structure/machinery/faxmachine/uscm/command,
+/obj/structure/machinery/faxmachine/uscm/almayer/command{
+ sub_name = "CIC";
+ radio_alert_tag = ":V"
+ },
/obj/item/device/megaphone,
/obj/structure/machinery/computer/cameras/almayer_brig{
desc = "Used to access the various cameras in the security brig.";
@@ -9055,7 +9061,9 @@
"blw" = (
/obj/structure/surface/table/almayer,
/obj/item/tool/lighter,
-/obj/structure/machinery/faxmachine/uscm,
+/obj/structure/machinery/faxmachine/uscm/almayer{
+ sub_name = "Conference Room"
+ },
/obj/structure/machinery/light{
dir = 1
},
@@ -20643,10 +20651,11 @@
/obj/item/paper_bin/uscm{
pixel_y = -16
},
-/obj/structure/machinery/faxmachine/uscm{
+/obj/structure/machinery/faxmachine/uscm/almayer{
desc = "The beloved fax machine of the Requisitions department for all your equipment-requesting needs";
- department = "Requisitions";
- gender = "female"
+ sub_name = "Requisitions";
+ gender = "female";
+ radio_alert_tag = ":U"
},
/turf/open/floor/almayer/plate,
/area/almayer/squads/req)
@@ -20963,7 +20972,9 @@
/area/almayer/squads/req)
"eHx" = (
/obj/structure/surface/table/reinforced/almayer_B,
-/obj/structure/machinery/faxmachine/uscm/command,
+/obj/structure/machinery/faxmachine/uscm/almayer/command{
+ sub_name = "Conference Room"
+ },
/turf/open/floor/almayer/bluefull,
/area/almayer/command/cichallway)
"eHy" = (
@@ -24061,8 +24072,8 @@
/area/almayer/command/cichallway)
"gba" = (
/obj/structure/surface/table/reinforced/almayer_B,
-/obj/structure/machinery/faxmachine/uscm/command{
- department = "AI Core";
+/obj/structure/machinery/faxmachine/uscm/almayer/ai_core{
+ sub_name = "AI Core";
pixel_y = 8
},
/obj/structure/transmitter/rotary{
@@ -25967,7 +25978,7 @@
/obj/structure/sign/safety/terminal{
pixel_x = -17
},
-/obj/structure/machinery/faxmachine/corporate/liaison,
+/obj/structure/machinery/faxmachine/corporate/liaison/almayer,
/obj/item/paper/liaison_brief{
pixel_y = 8;
pixel_x = -4
@@ -32869,7 +32880,7 @@
/area/almayer/maint/hull/lower/l_f_s)
"jIT" = (
/obj/structure/surface/table/almayer,
-/obj/structure/machinery/faxmachine/uscm/brig/chief,
+/obj/structure/machinery/faxmachine/uscm/almayer/brig/chief,
/turf/open/floor/wood/ship,
/area/almayer/shipboard/brig/chief_mp_office)
"jIV" = (
@@ -39340,10 +39351,11 @@
/area/almayer/engineering/lower)
"muV" = (
/obj/structure/surface/table/woodentable/fancy,
-/obj/structure/machinery/faxmachine/uscm/command/capt{
+/obj/structure/machinery/faxmachine/uscm/almayer/command/capt{
name = "Commanding Officer's Fax Machine";
pixel_x = -4;
- pixel_y = 3
+ pixel_y = 3;
+ radio_alert_tag = ":P"
},
/obj/structure/machinery/light{
dir = 1
@@ -48013,7 +48025,9 @@
/area/almayer/living/briefing)
"pUD" = (
/obj/structure/surface/table/almayer,
-/obj/structure/machinery/faxmachine/uscm/brig,
+/obj/structure/machinery/faxmachine/uscm/almayer/brig{
+ sub_name = "Processing"
+ },
/obj/structure/machinery/status_display{
pixel_y = 30
},
@@ -48928,7 +48942,10 @@
/area/almayer/shipboard/panic)
"qmP" = (
/obj/structure/surface/table/almayer,
-/obj/structure/machinery/faxmachine/uscm,
+/obj/structure/machinery/faxmachine/uscm/almayer{
+ sub_name = "Intel Office";
+ radio_alert_tag = ":T"
+ },
/turf/open/floor/almayer,
/area/almayer/command/computerlab)
"qmR" = (
@@ -54339,7 +54356,9 @@
/area/almayer/maint/hull/upper/u_a_p)
"stO" = (
/obj/structure/surface/table/almayer,
-/obj/structure/machinery/faxmachine/uscm/brig,
+/obj/structure/machinery/faxmachine/uscm/almayer/brig{
+ sub_name = "Permanent Confinement"
+ },
/obj/structure/machinery/camera/autoname/almayer{
dir = 1;
name = "ship-grade camera"
@@ -63006,8 +63025,8 @@
/obj/structure/sign/prop3{
pixel_x = -32
},
-/obj/structure/machinery/faxmachine/uscm{
- department = "SEA"
+/obj/structure/machinery/faxmachine/uscm/almayer{
+ sub_name = "SEA"
},
/turf/open/floor/strata/faux_metal,
/area/almayer/shipboard/sea_office)
@@ -66253,9 +66272,9 @@
density = 0;
pixel_y = 16
},
-/obj/structure/machinery/faxmachine/uscm/command{
+/obj/structure/machinery/faxmachine/uscm/almayer/ai_core{
density = 0;
- department = "AI Core";
+ sub_name = "Reception";
pixel_y = 32
},
/turf/open/floor/almayer/aicore/no_build,
diff --git a/maps/templates/Chinook.dmm b/maps/templates/Chinook.dmm
index 98a8e8bb3f91..39ecd0350b26 100644
--- a/maps/templates/Chinook.dmm
+++ b/maps/templates/Chinook.dmm
@@ -3442,7 +3442,7 @@
/obj/structure/sign/prop2{
pixel_y = 30
},
-/obj/structure/machinery/faxmachine/uscm/command/highcom{
+/obj/structure/machinery/faxmachine/uscm/highcom{
name = "Chinook Fax Machine";
department = "Chinook 91 GSO Station";
pixel_y = 5
diff --git a/maps/templates/lazy_templates/fax_responder_base.dmm b/maps/templates/lazy_templates/fax_responder_base.dmm
index 44b88044d63d..6ff5058a5919 100644
--- a/maps/templates/lazy_templates/fax_responder_base.dmm
+++ b/maps/templates/lazy_templates/fax_responder_base.dmm
@@ -111,7 +111,7 @@
/area/adminlevel/ert_station/fax_response_station)
"ov" = (
/obj/structure/surface/table/woodentable/fancy,
-/obj/structure/machinery/faxmachine/uscm/command/highcom{
+/obj/structure/machinery/faxmachine/uscm/highcom{
pixel_y = 8
},
/turf/open/floor/wood/ship,
@@ -558,7 +558,7 @@
/area/adminlevel/ert_station/fax_response_station)
"UB" = (
/obj/structure/surface/table/woodentable/fancy,
-/obj/structure/machinery/faxmachine/uscm/brig/provost{
+/obj/structure/machinery/faxmachine/uscm/provost{
pixel_y = 8
},
/turf/open/floor/wood/ship,
diff --git a/maps/templates/lazy_templates/twe_ert_station.dmm b/maps/templates/lazy_templates/twe_ert_station.dmm
index f48712f7bd59..26a5563bee06 100644
--- a/maps/templates/lazy_templates/twe_ert_station.dmm
+++ b/maps/templates/lazy_templates/twe_ert_station.dmm
@@ -2008,7 +2008,7 @@
"VA" = (
/obj/structure/surface/table/almayer,
/obj/effect/decal/cleanable/dirt,
-/obj/structure/machinery/faxmachine/uscm/brig,
+/obj/structure/machinery/faxmachine/uscm,
/turf/open/floor/almayer/plate,
/area/adminlevel/ert_station/royal_marines_station)
"VG" = (
diff --git a/tgui/packages/tgui/interfaces/FaxMachine.jsx b/tgui/packages/tgui/interfaces/FaxMachine.jsx
index 8cb881a5da00..93784d08cadf 100644
--- a/tgui/packages/tgui/interfaces/FaxMachine.jsx
+++ b/tgui/packages/tgui/interfaces/FaxMachine.jsx
@@ -16,8 +16,8 @@ export const FaxMachine = () => {
const { act, data } = useBackend();
const { idcard } = data;
const body = idcard ? : ;
- const windowWidth = idcard ? 600 : 400;
- const windowHeight = idcard ? 340 : 215;
+ const windowWidth = idcard ? 800 : 400;
+ const windowHeight = idcard ? 440 : 215;
return (
@@ -33,6 +33,7 @@ const FaxMain = (props) => {
<>
+
The machine identification is {machine_id_tag}.
@@ -87,16 +88,16 @@ const FaxSelect = (props) => {
const { act, data } = useBackend();
const {
paper,
- paper_name,
authenticated,
target_department,
- worldtime,
- nextfaxtime,
- faxcooldown,
+ can_send_priority,
+ is_priority_fax,
+ is_single_sending,
+ target_machine,
+ highcom_dept,
+ sending_to_specific,
} = data;
- const timeLeft = nextfaxtime - worldtime;
-
return (
@@ -104,7 +105,8 @@ const FaxSelect = (props) => {
@@ -114,7 +116,68 @@ const FaxSelect = (props) => {
{'Currently sending to : ' + target_department + '.'}
+
+
+
+
+
+
+
+
+
+
+
+
+ );
+};
+
+const ConfirmSend = (props) => {
+ const { act, data } = useBackend();
+ const {
+ paper,
+ paper_name,
+ authenticated,
+ worldtime,
+ nextfaxtime,
+ can_send_priority,
+ is_priority_fax,
+ } = data;
+
+ const timeLeft = nextfaxtime - worldtime;
+
+ return (
+
@@ -143,6 +206,18 @@ const FaxSelect = (props) => {
)}
+ {!!can_send_priority && (
+
+
+ )}
);