Skip to content

Commit

Permalink
faxpansion
Browse files Browse the repository at this point in the history
  • Loading branch information
ItsVyzo committed Jan 20, 2024
1 parent c37fcc5 commit 3ae48df
Show file tree
Hide file tree
Showing 4 changed files with 78 additions and 3 deletions.
3 changes: 3 additions & 0 deletions code/_globalvars/global_lists.dm
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@ GLOBAL_LIST_EMPTY(WYFaxes) //Departmental faxes
GLOBAL_LIST_EMPTY(USCMFaxes)
GLOBAL_LIST_EMPTY(ProvostFaxes)
GLOBAL_LIST_EMPTY(CMBFaxes)
GLOBAL_LIST_EMPTY(UPPFaxes)
GLOBAL_LIST_EMPTY(TWEFaxes)
GLOBAL_LIST_EMPTY(CLFFaxes)
GLOBAL_LIST_EMPTY(GeneralFaxes) //Inter-machine faxes
GLOBAL_LIST_EMPTY(fax_contents) //List of fax contents to maintain it even if source paper is deleted

Expand Down
48 changes: 47 additions & 1 deletion code/game/machinery/fax_machine.dm
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,10 @@ GLOBAL_LIST_EMPTY(alldepartments)
#define DEPARTMENT_CMB "CMB Incident Command Center, Local Operations"
#define DEPARTMENT_PROVOST "USCM Provost Office"
#define DEPARTMENT_PRESS "Various Press Organizations"
#define HIGHCOM_DEPARTMENTS list(DEPARTMENT_WY, DEPARTMENT_HC, DEPARTMENT_CMB, DEPARTMENT_PROVOST, DEPARTMENT_PRESS)
#define DEPARTMENT_TWE "Three World Empire"
#define DEPARTMENT_UPP "Union of Progress Peoples"
#define DEPARTMENT_CLF "Colonial Liberation Front"
#define HIGHCOM_DEPARTMENTS list(DEPARTMENT_WY, DEPARTMENT_HC, DEPARTMENT_CMB, DEPARTMENT_PROVOST, DEPARTMENT_PRESS, DEPARTMENT_TWE, DEPARTMENT_UPP, DEPARTMENT_CLF)

/obj/structure/machinery/faxmachine // why not fax_machine?
name = "\improper General Purpose Fax Machine"
Expand Down Expand Up @@ -138,6 +141,13 @@ GLOBAL_LIST_EMPTY(alldepartments)
GLOB.alldepartments += DEPARTMENT_CMB
if(!(DEPARTMENT_PRESS in GLOB.alldepartments))
GLOB.alldepartments += DEPARTMENT_PRESS
if(!(DEPARTMENT_TWE in GLOB.alldepartments))
GLOB.alldepartments += DEPARTMENT_TWE
if(!(DEPARTMENT_UPP in GLOB.alldepartments))
GLOB.alldepartments += DEPARTMENT_UPP
if(!(DEPARTMENT_CLF in GLOB.alldepartments))
GLOB.alldepartments += DEPARTMENT_CLF

// TGUI SHIT \\
/obj/structure/machinery/faxmachine/tgui_interact(mob/user, datum/tgui/ui)
Expand Down Expand Up @@ -280,6 +290,9 @@ GLOBAL_LIST_EMPTY(alldepartments)
. += "<option value='?_src_=admin_holder;[HrefToken(forceGlobal = TRUE)];CLFaxReply=\ref[usr];originfax=\ref[src]'>Send CL fax message</option>"
. += "<option value='?_src_=admin_holder;[HrefToken(forceGlobal = TRUE)];CMBFaxReply=\ref[usr];originfax=\ref[src]'>Send CMB fax message</option>"
. += "<option value='?_src_=admin_holder;[HrefToken(forceGlobal = TRUE)];PressFaxReply=\ref[usr];originfax=\ref[src]'>Send Press fax message</option>"
. += "<option value='?_src_=admin_holder;[HrefToken(forceGlobal = TRUE)];UPPFaxReply=\ref[usr];originfax=\ref[src]'>Send UPP fax message</option>"
. += "<option value='?_src_=admin_holder;[HrefToken(forceGlobal = TRUE)];CLFFaxReply=\ref[usr];originfax=\ref[src]'>Send CLF fax message</option>"
. += "<option value='?_src_=admin_holder;[HrefToken(forceGlobal = TRUE)];TWEFaxReply=\ref[usr];originfax=\ref[src]'>Send TWE fax message</option>"

// converting whatever type the fax is into a single paper with all the information on it.
/obj/structure/machinery/faxmachine/proc/copy_fax_paper(mob/living/user)
Expand Down Expand Up @@ -344,6 +357,15 @@ GLOBAL_LIST_EMPTY(alldepartments)
if(DEPARTMENT_PRESS)
GLOB.PressFaxes.Add("<a href='?FaxView=\ref[faxcontents]'>\['[original_fax.name]' from [key_name(usr)], [scan] at [time2text(world.timeofday, "hh:mm:ss")]\]</a> <a href='?_src_=admin_holder;[HrefToken(forceGlobal = TRUE)];PressFaxReply=\ref[user];originfax=\ref[src]'>REPLY</a>")
msg_admin += "(<a href='?_src_=admin_holder;[HrefToken(forceGlobal = TRUE)];PressFaxReply=\ref[user];originfax=\ref[src]'>RPLY</a>)</b>: "
if(DEPARTMENT_TWE)
GLOB.TWEFaxes.Add("<a href='?FaxView=\ref[faxcontents]'>\['[original_fax.name]' from [key_name(usr)], [scan] at [time2text(world.timeofday, "hh:mm:ss")]\]</a> <a href='?_src_=admin_holder;[HrefToken(forceGlobal = TRUE)];TWEFaxReply=\ref[user];originfax=\ref[src]'>REPLY</a>")
msg_admin += "(<a href='?_src_=admin_holder;[HrefToken(forceGlobal = TRUE)];TWEFaxReply=\ref[user];originfax=\ref[src]'>RPLY</a>)</b>: "
if(DEPARTMENT_UPP)
GLOB.UPPFaxes.Add("<a href='?FaxView=\ref[faxcontents]'>\['[original_fax.name]' from [key_name(usr)], [scan] at [time2text(world.timeofday, "hh:mm:ss")]\]</a> <a href='?_src_=admin_holder;[HrefToken(forceGlobal = TRUE)];UPPFaxReply=\ref[user];originfax=\ref[src]'>REPLY</a>")
msg_admin += "(<a href='?_src_=admin_holder;[HrefToken(forceGlobal = TRUE)];UPPFaxReply=\ref[user];originfax=\ref[src]'>RPLY</a>)</b>: "
if(DEPARTMENT_CLF)
GLOB.CLFFaxes.Add("<a href='?FaxView=\ref[faxcontents]'>\['[original_fax.name]' from [key_name(usr)], [scan] at [time2text(world.timeofday, "hh:mm:ss")]\]</a> <a href='?_src_=admin_holder;[HrefToken(forceGlobal = TRUE)];CLFFaxReply=\ref[user];originfax=\ref[src]'>REPLY</a>")
msg_admin += "(<a href='?_src_=admin_holder;[HrefToken(forceGlobal = TRUE)];CLFFaxReply=\ref[user];originfax=\ref[src]'>RPLY</a>)</b>: "
else
GLOB.GeneralFaxes.Add("<a href='?FaxView=\ref[faxcontents]'>\['[original_fax.name]' from [key_name(usr)], [scan] at [time2text(world.timeofday, "hh:mm:ss")]\]</a> <a href='?_src_=admin_holder;[HrefToken(forceGlobal = TRUE)];CLFaxReply=\ref[user];originfax=\ref[src]'>REPLY</a>")
msg_admin += "(<a href='?_src_=admin_holder;[HrefToken(forceGlobal = TRUE)];USCMFaxReply=\ref[user];originfax=\ref[src]'>RPLY</a>)</b>: "
Expand Down Expand Up @@ -416,6 +438,30 @@ GLOBAL_LIST_EMPTY(alldepartments)
P.stamped += /obj/item/tool/stamp
P.overlays += stampoverlay
P.stamps += "<HR><i>This paper has been stamped and encrypted by the Weyland-Yutani Quantum Relay (tm).</i>"
if("TWE Royal Marines Commando Quantum Relay")
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 += "<HR><i>This paper has been stamped by the TWE Royal Marines Commando Quantum Relay.</i>"
if("UPP High Kommand Quantum Relay")
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 += "<HR><i>This paper has been stamped by the UPP High Kommand Quantum Relay.</i>"
if("CLF Gureilla Command Quantum Relay")
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 += "<HR><i>This paper has been stamped and encrypted by the CLF Gureilla Command Quantum Relay.</i>"

playsound(F.loc, "sound/items/polaroid1.ogg", 15, 1)
qdel(faxcontents)
Expand Down
30 changes: 28 additions & 2 deletions code/modules/admin/tabs/event_tab.dm
Original file line number Diff line number Diff line change
Expand Up @@ -322,7 +322,7 @@
if(!admin_holder)
return

var/list/options = list("Weyland-Yutani", "High Command", "Provost", "Press", "CMB", "Other", "Cancel")
var/list/options = list("Weyland-Yutani", "High Command", "Provost", "Press", "CMB", "UPP", "TWE", "CLF", "Other", "Cancel")
var/answer = tgui_input_list(src, "Which kind of faxes would you like to see?", "Faxes", options)
switch(answer)
if("Weyland-Yutani")
Expand All @@ -334,6 +334,7 @@

body += "<br><br></body>"
show_browser(src, body, "Faxes to Weyland-Yutani", "wyfaxviewer", "size=300x600")

if("High Command")
var/body = "<body>"

Expand All @@ -343,6 +344,7 @@

body += "<br><br></body>"
show_browser(src, body, "Faxes to High Command", "uscmfaxviewer", "size=300x600")

if("Provost")
var/body = "<body>"

Expand All @@ -363,7 +365,7 @@
body += "<br><br></body>"
show_browser(src, body, "Faxes to Press organizations", "otherfaxviewer", "size=300x600")

if("CMB")
if("Colonial Marshal Bureau")
var/body = "<body>"

for(var/text in GLOB.CMBFaxes)
Expand All @@ -373,6 +375,30 @@
body += "<br><br></body>"
show_browser(src, body, "Faxes to the Colonial Marshal Bureau", "cmbfaxviewer", "size=300x600")

if("Union of Progressive Peoples")
var/body = "<body>"

for(var/text in GLOB.UPPFaxes)
body += text
body += "<br><br>"

body += "<br><br></body>"
show_browser(src, body, "Faxes to the Union of Progressive Peoples", "uppfaxviewer", "size=300x600")

for(var/text in GLOB.TWEFaxes)
body += text
body += "<br><br>"

body += "<br><br></body>"
show_browser(src, body, "Faxes to the Three World Empire", "twefaxviewer", "size=300x600")

for(var/text in GLOB.CLFFaxes)
body += text
body += "<br><br>"

body += "<br><br></body>"
show_browser(src, body, "Faxes to the Colonial Liberation Front", "clffaxviewer", "size=300x600")

if("Other")
var/body = "<body>"

Expand Down
Binary file modified icons/obj/items/paper.dmi
Binary file not shown.

0 comments on commit 3ae48df

Please sign in to comment.