Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
21 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 19 additions & 13 deletions _maps/map_files/generic/CentCom_oculis.dmm
Original file line number Diff line number Diff line change
Expand Up @@ -11664,7 +11664,10 @@
dir = 6
},
/obj/structure/table/wood,
/obj/machinery/fax/auto_name,
/obj/machinery/fax/admin/castor{
dir = 1;
fax_id = "castor_psych"
},
/turf/open/floor/wood,
/area/centcom/castor/psychologist)
"hFu" = (
Expand Down Expand Up @@ -12700,7 +12703,7 @@
/obj/effect/turf_decal/trimline/blue/filled/line{
dir = 1
},
/obj/machinery/fax/admin,
/obj/machinery/fax/admin/nanotrasen,
/turf/open/floor/iron/dark,
/area/centcom/castor/control)
"iMJ" = (
Expand Down Expand Up @@ -13111,9 +13114,9 @@
/area/centcom/interlink)
"jfO" = (
/obj/structure/table/wood,
/obj/machinery/fax/auto_name{
/obj/machinery/fax/admin/castor{
dir = 1;
name = "Sectorial Internal Affairs Administrator's Office's Fax Machine"
fax_id = "castor_SIAA"
},
/turf/open/floor/wood,
/area/centcom/castor/sectorial_internal_affairs_administrator)
Expand Down Expand Up @@ -15133,9 +15136,9 @@
/area/centcom/holding/cafe)
"lim" = (
/obj/structure/table/wood/fancy/green,
/obj/machinery/fax/auto_name{
/obj/machinery/fax/admin/castor{
dir = 1;
name = "Sectorial Personnel Administrator's Office's Fax Machine"
fax_id = "castor_SPA"
},
/turf/open/floor/carpet/green{
initial_gas_mix = "o2=21.65;n2=80.7;TEMP=287.53"
Expand Down Expand Up @@ -21152,7 +21155,10 @@
/turf/open/floor/iron/dark/pattern_1,
/area/centcom/central_command_areas/hallway)
"qKa" = (
/obj/machinery/fax/auto_name,
/obj/machinery/fax/admin/castor{
dir = 1;
fax_id = "castor_intern"
},
/obj/structure/table/reinforced/plastitaniumglass,
/turf/open/floor/carpet/black,
/area/centcom/castor/intern_office)
Expand Down Expand Up @@ -23638,9 +23644,9 @@
dir = 6
},
/obj/structure/sign/flag/nanotrasen/directional/east,
/obj/machinery/fax/auto_name{
/obj/machinery/fax/admin/castor{
dir = 1;
name = "Sectorial Security Administrator's Office's Fax Machine"
fax_id = "castor_SSA"
},
/turf/open/floor/carpet/royalblack,
/area/centcom/castor/sectorial_security_administrator)
Expand Down Expand Up @@ -26158,9 +26164,9 @@
/obj/effect/turf_decal/siding/thinplating_new/light{
dir = 1
},
/obj/machinery/fax/auto_name{
/obj/machinery/fax/admin/castor{
dir = 1;
name = "Sectorial Medical Administrator's Office's Fax Machine"
fax_id = "castor_SMA"
},
/turf/open/floor/carpet/cyan,
/area/centcom/castor/sectorial_medical_administrator)
Expand Down Expand Up @@ -26448,9 +26454,9 @@
/area/centcom/interlink)
"vKx" = (
/obj/structure/table/reinforced,
/obj/machinery/fax/auto_name{
/obj/machinery/fax/admin/castor{
dir = 1;
name = "Sectorial Engineering Administrator's Office's Fax Machine"
fax_id = "castor_SEA"
},
/turf/open/floor/iron/dark/smooth_large,
/area/centcom/castor/sectorial_engineering_administrator)
Expand Down
4 changes: 2 additions & 2 deletions code/modules/admin/admin_fax_panel.dm

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please undo this change.

Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@ ADMIN_VERB(fax_panel, R_ADMIN, "Fax Panel", "View and respond to faxes sent to S
/datum/fax_panel_interface/New()
//Get all faxes, and save them to our list.
for(var/obj/machinery/fax/fax as anything in SSmachines.get_machines_by_type_and_subtypes(/obj/machinery/fax))
if(istype(fax, /obj/machinery/fax/admin))
continue
// if(istype(fax, /obj/machinery/fax/admin)) // OCULIS EDIT REMOVAL - may as well be able to send to admin faxes in case that's relevant, right?
// continue // OCULIS EDIT REMOVAL
available_faxes += WEAKREF(fax)

//Get all stamps
Expand Down
25 changes: 22 additions & 3 deletions code/modules/paperwork/fax.dm

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please use modular files instead of editing the TG ones for this.

Original file line number Diff line number Diff line change
Expand Up @@ -114,10 +114,10 @@ GLOBAL_VAR_INIT(fax_autoprinting, FALSE)
syndicate_network = TRUE
return ..()

/obj/machinery/fax/admin
/obj/machinery/fax/admin/nanotrasen // OCULIS EDIT, ORIGINAL: /obj/machinery/fax/admin
name = "Sectorial Command Fax Machine"

/obj/machinery/fax/admin/Initialize(mapload)
/obj/machinery/fax/admin/nanotrasen/Initialize(mapload) // OCULIS EDIT, ORIGINAL: /obj/machinery/fax/admin/Initialize(mapload)
if (!fax_name)
fax_name = "[GLOB.nt_fax_department]"
if(!fax_id)
Expand All @@ -126,6 +126,15 @@ GLOBAL_VAR_INIT(fax_autoprinting, FALSE)
visible_to_network = FALSE
return ..()

// OCULIS EDIT ADDITION START
/obj/machinery/fax/admin
name = "Admin Fax Machine"

/obj/machinery/fax/admin/Initialize(mapload)
visible_to_network = FALSE
return ..()
// OCULIS EDIT ADDITION END

/obj/machinery/fax/Initialize(mapload)
. = ..()
if (!fax_id)
Expand Down Expand Up @@ -361,9 +370,19 @@ GLOBAL_VAR_INIT(fax_autoprinting, FALSE)

history_add("Send", params["name"])

// OCULIS ADDITION START
var/notice_text = "[icon2html(src.icon, GLOB.admins)]<b><font color=green>FAX REQUEST: </font>[ADMIN_FULLMONTY(usr)]:</b> [span_linkify("sent a fax message from [fax_name]/[fax_id][ADMIN_FLW(src)] to [html_encode(params["name"])]")] [ADMIN_SHOW_PAPER(fax_paper)] [ADMIN_PRINT_FAX(fax_paper, fax_name, params["id"])]"
// Find the machine if it exists so we can give the admins a FLW to it
for(var/obj/machinery/fax/admin/FAX as anything in SSmachines.get_machines_by_type_and_subtypes(/obj/machinery/fax/admin))
if(FAX.fax_id != params["id"])
continue
notice_text += " [ADMIN_FLW(FAX)]"
break
// OCULIS ADDITION END

GLOB.requests.fax_request(usr.client, "sent a fax message from [fax_name]/[fax_id] to [params["name"]]", list("paper" = fax_paper, "destination_id" = params["id"], "sender_name" = fax_name))
to_chat(GLOB.admins,
span_adminnotice("[icon2html(src.icon, GLOB.admins)]<b><font color=green>FAX REQUEST: </font>[ADMIN_FULLMONTY(usr)]:</b> [span_linkify("sent a fax message from [fax_name]/[fax_id][ADMIN_FLW(src)] to [html_encode(params["name"])]")] [ADMIN_SHOW_PAPER(fax_paper)] [ADMIN_PRINT_FAX(fax_paper, fax_name, params["id"])]"),
span_adminnotice(notice_text), // OCULIS EDIT, ORIGINAL: span_adminnotice("[icon2html(src.icon, GLOB.admins)]<b><font color=green>FAX REQUEST: </font>[ADMIN_FULLMONTY(usr)]:</b> [span_linkify("sent a fax message from [fax_name]/[fax_id][ADMIN_FLW(src)] to [html_encode(params["name"])]")] [ADMIN_SHOW_PAPER(fax_paper)] [ADMIN_PRINT_FAX(fax_paper, fax_name, params["id"])]"),
type = MESSAGE_TYPE_PRAYER,
confidential = TRUE)
for(var/client/staff as anything in GLOB.admins)
Expand Down
21 changes: 20 additions & 1 deletion code/modules/requests/request_manager.dm

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Admins can already follow faxes via the fax menu.

Original file line number Diff line number Diff line change
Expand Up @@ -239,13 +239,19 @@ GLOBAL_DATUM_INIT(requests, /datum/request_manager, new)
if (request.req_type != REQUEST_FAX)
to_chat(usr, "Request doesn't have a paper to print.", confidential = TRUE)
return TRUE
var/fax_machine_found = FALSE // OCULIS EDIT ADDITION
for(var/obj/machinery/fax/admin/FAX as anything in SSmachines.get_machines_by_type_and_subtypes(/obj/machinery/fax/admin))
if(FAX.fax_id != request.additional_information["destination_id"])
continue
fax_machine_found = TRUE // OCULIS EDIT ADDITION
var/obj/item/paper/request_message = request.additional_information["paper"]
var/sender_name = request.additional_information["sender_name"]
FAX.receive(request_message, sender_name)
return TRUE
// OCULIS EDIT ADDITION START
if(!fax_machine_found)
to_chat(usr, "Fax machine doesn't exist.", confidential = TRUE)
// OCULIS EDIT ADDITION END
return TRUE // OCULIS EDIT - decreased indentation by one tab from original
if ("play")
if(request.req_type != REQUEST_INTERNET_SOUND)
to_chat(usr, "Request doesn't have a sound to play.", confidential = TRUE)
Expand All @@ -261,6 +267,19 @@ GLOBAL_DATUM_INIT(requests, /datum/request_manager, new)
web_sound(usr, request.message)
// OCULIS EDIT ADDITION END
return TRUE
// OCULIS ADDITION START: fax_flw
if("fax_flw")
var/fax_machine_found = FALSE
for(var/obj/machinery/fax/admin/FAX as anything in SSmachines.get_machines_by_type_and_subtypes(/obj/machinery/fax/admin))
if(FAX.fax_id != request.additional_information["destination_id"])
continue
fax_machine_found = TRUE
usr.client.admin_follow(FAX)
break
if(!fax_machine_found)
to_chat(usr, "Fax machine doesn't exist.", confidential = TRUE)
return TRUE
// OCULIS ADDITION END: fax_flw

/datum/request_manager/ui_data(mob/user)
var/list/data = list()
Expand Down
25 changes: 25 additions & 0 deletions modular_oculis/master_files/code/modules/paperwork/fax.dm

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The castor fax machines do not need their own special network. Surely there's a better way to do this?

Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
/obj/machinery/fax/Initialize(mapload)
special_networks += list(
castor_psych = list(fax_name = "Castor Psychologist's Office", fax_id = "castor_psych", color = "green", emag_needed = FALSE),
castor_intern = list(fax_name = "Castor Intern's Office", fax_id = "castor_intern", color = "green", emag_needed = FALSE),
castor_SC = list(fax_name = "Sectorial Commander's Office", fax_id = "castor_SC", color = "green", emag_needed = FALSE),
castor_SPA = list(fax_name = "Sectorial Personnel Administrator's Office", fax_id = "castor_SPA", color = "green", emag_needed = FALSE),
castor_SSA = list(fax_name = "Sectorial Security Administrator's Office", fax_id = "castor_SSA", color = "green", emag_needed = FALSE),
castor_SRA = list(fax_name = "Sectorial Research Administrator's Office", fax_id = "castor_SRA", color = "green", emag_needed = FALSE),
castor_SMA = list(fax_name = "Sectorial Medical Administrator's Office", fax_id = "castor_SMA", color = "green", emag_needed = FALSE),
castor_SLA = list(fax_name = "Sectorial Logistics Administrator's Office", fax_id = "castor_SLA", color = "green", emag_needed = FALSE),
castor_SEA = list(fax_name = "Sectorial Engineering Administrator's Office", fax_id = "castor_SEA", color = "green", emag_needed = FALSE),
castor_SIAA = list(fax_name = "Sectorial Internal Affairs Administrator's Office", fax_id = "castor_SIAA", color = "green", emag_needed = FALSE),
)
return ..()

// Separate from the /admin type, to not collide with the conficting init. Requires a fax_id specified when mapping!
Comment thread
Shroopy marked this conversation as resolved.
/obj/machinery/fax/admin/castor
name = "Castor Fax Machine"

/obj/machinery/fax/admin/castor/Initialize(mapload)
. = ..()
if(!special_networks[fax_id])
return
fax_name = special_networks[fax_id]["fax_name"]
name = "[fax_name]'s Fax Machine"
1 change: 1 addition & 0 deletions tgstation.dme
Original file line number Diff line number Diff line change
Expand Up @@ -10202,6 +10202,7 @@
#include "modular_oculis\master_files\code\modules\mob\living\navigation.dm"
#include "modular_oculis\master_files\code\modules\mob\living\basic\lavaland\raptor\_raptor.dm"
#include "modular_oculis\master_files\code\modules\mocking\client.dm"
#include "modular_oculis\master_files\code\modules\paperwork\fax.dm"
#include "modular_oculis\master_files\code\modules\projectiles\gun.dm"
#include "modular_oculis\master_files\code\modules\projectiles\projectile_speed.dm"
#include "modular_oculis\master_files\code\modules\projectiles\boxes_magazines\ammo_boxes.dm"
Expand Down
5 changes: 5 additions & 0 deletions tgui/packages/tgui/interfaces/RequestManager.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -170,6 +170,11 @@ const RequestControls = (props) => {
<Button onClick={() => act('print', { id: request.id })}>
PRINT
</Button>
{/* OCULIS EDIT ADDITION START */}
<Button onClick={() => act('fax_flw', { id: request.id })}>
FAX FLW
</Button>
{/* OCULIS EDIT ADDITION END */}
</>
)}
{request.req_type === 'request_internet_sound' && (
Expand Down
Loading