mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-11 10:43:20 +00:00
R&D console refactor, formatting and output format improvements
This commit is contained in:
@@ -50,9 +50,6 @@ won't update every console in existence) but it's more of a hassle to do. Also,
|
|||||||
|
|
||||||
req_access = list(access_research) //Data and setting manipulation requires scientist access.
|
req_access = list(access_research) //Data and setting manipulation requires scientist access.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/obj/machinery/computer/rdconsole/proc/CallTechName(var/ID) //A simple helper proc to find the name of a tech with a given ID.
|
/obj/machinery/computer/rdconsole/proc/CallTechName(var/ID) //A simple helper proc to find the name of a tech with a given ID.
|
||||||
var/datum/tech/check_tech
|
var/datum/tech/check_tech
|
||||||
var/return_name = null
|
var/return_name = null
|
||||||
@@ -125,7 +122,6 @@ won't update every console in existence) but it's more of a hassle to do. Also,
|
|||||||
C.files.AddDesign2Known(D)
|
C.files.AddDesign2Known(D)
|
||||||
C.files.RefreshResearch()
|
C.files.RefreshResearch()
|
||||||
|
|
||||||
|
|
||||||
/obj/machinery/computer/rdconsole/New()
|
/obj/machinery/computer/rdconsole/New()
|
||||||
..()
|
..()
|
||||||
files = new /datum/research(src) //Setup the research data holder.
|
files = new /datum/research(src) //Setup the research data holder.
|
||||||
@@ -440,7 +436,7 @@ won't update every console in existence) but it's more of a hassle to do. Also,
|
|||||||
linked_lathe.reagents.clear_reagents()
|
linked_lathe.reagents.clear_reagents()
|
||||||
|
|
||||||
else if(href_list["lathe_ejectsheet"] && linked_lathe) //Causes the protolathe to eject a sheet of material
|
else if(href_list["lathe_ejectsheet"] && linked_lathe) //Causes the protolathe to eject a sheet of material
|
||||||
var/desired_num_sheets = text2num(href_list["lathe_ejectsheet_amt"])
|
var/desired_num_sheets = text2num(href_list["amount"])
|
||||||
var/res_amount, type
|
var/res_amount, type
|
||||||
switch(href_list["lathe_ejectsheet"])
|
switch(href_list["lathe_ejectsheet"])
|
||||||
if("metal")
|
if("metal")
|
||||||
@@ -474,7 +470,7 @@ won't update every console in existence) but it's more of a hassle to do. Also,
|
|||||||
else
|
else
|
||||||
del sheet
|
del sheet
|
||||||
else if(href_list["imprinter_ejectsheet"] && linked_imprinter) //Causes the protolathe to eject a sheet of material
|
else if(href_list["imprinter_ejectsheet"] && linked_imprinter) //Causes the protolathe to eject a sheet of material
|
||||||
var/desired_num_sheets = text2num(href_list["imprinter_ejectsheet_amt"])
|
var/desired_num_sheets = text2num(href_list["amount"])
|
||||||
var/res_amount, type
|
var/res_amount, type
|
||||||
switch(href_list["imprinter_ejectsheet"])
|
switch(href_list["imprinter_ejectsheet"])
|
||||||
if("glass")
|
if("glass")
|
||||||
@@ -576,22 +572,37 @@ won't update every console in existence) but it's more of a hassle to do. Also,
|
|||||||
|
|
||||||
if(1.0) //Main Menu
|
if(1.0) //Main Menu
|
||||||
dat += "Main Menu:<BR><BR>"
|
dat += "Main Menu:<BR><BR>"
|
||||||
dat += "<A href='?src=\ref[src];menu=1.1'>Current Research Levels</A><BR>"
|
dat += "Loaded disk: "
|
||||||
if(t_disk) dat += "<A href='?src=\ref[src];menu=1.2'>Disk Operations</A><BR>"
|
dat += (t_disk || d_disk) ? (t_disk ? "technology storage disk" : "design storage disk") : "none"
|
||||||
else if(d_disk) dat += "<A href='?src=\ref[src];menu=1.4'>Disk Operations</A><BR>"
|
dat += "<HR><UL>"
|
||||||
else dat += "(Please Insert Disk)<BR>"
|
dat += "<LI><A href='?src=\ref[src];menu=1.1'>Current Research Levels</A>"
|
||||||
if(linked_destroy != null) dat += "<A href='?src=\ref[src];menu=2.2'>Destructive Analyzer Menu</A><BR>"
|
if(t_disk)
|
||||||
if(linked_lathe != null) dat += "<A href='?src=\ref[src];menu=3.1'>Protolathe Construction Menu</A><BR>"
|
dat += "<LI><A href='?src=\ref[src];menu=1.2'>Disk Operations</A>"
|
||||||
if(linked_imprinter != null) dat += "<A href='?src=\ref[src];menu=4.1'>Circuit Construction Menu</A><BR>"
|
else if(d_disk)
|
||||||
dat += "<A href='?src=\ref[src];menu=1.6'>Settings</A>"
|
dat += "<LI><A href='?src=\ref[src];menu=1.4'>Disk Operations</A>"
|
||||||
|
else
|
||||||
|
dat += "<LI>Disk Operations"
|
||||||
|
if(linked_destroy)
|
||||||
|
dat += "<LI><A href='?src=\ref[src];menu=2.2'>Destructive Analyzer Menu</A>"
|
||||||
|
if(linked_lathe)
|
||||||
|
dat += "<LI><A href='?src=\ref[src];menu=3.1'>Protolathe Construction Menu</A>"
|
||||||
|
if(linked_imprinter)
|
||||||
|
dat += "<LI><A href='?src=\ref[src];menu=4.1'>Circuit Construction Menu</A>"
|
||||||
|
dat += "<LI><A href='?src=\ref[src];menu=1.6'>Settings</A>"
|
||||||
|
dat += "</UL>"
|
||||||
|
|
||||||
if(1.1) //Research viewer
|
if(1.1) //Research viewer
|
||||||
|
dat += "<A href='?src=\ref[src];menu=1.0'>Main Menu</A><HR>"
|
||||||
dat += "Current Research Levels:<BR><BR>"
|
dat += "Current Research Levels:<BR><BR>"
|
||||||
|
dat += "<UL>"
|
||||||
for(var/datum/tech/T in files.known_tech)
|
for(var/datum/tech/T in files.known_tech)
|
||||||
dat += "[T.name]<BR>"
|
dat += "<LI>"
|
||||||
dat += "* Level: [T.level]<BR>"
|
dat += "[T.name]"
|
||||||
dat += "* Summary: [T.desc]<HR>"
|
dat += "<UL>"
|
||||||
dat += "<A href='?src=\ref[src];menu=1.0'>Main Menu</A>"
|
dat += "<LI>Level: [T.level]</LI>"
|
||||||
|
dat += "<LI>Summary: [T.desc]</LI>"
|
||||||
|
dat += "</UL></LI>"
|
||||||
|
dat += "</UL>"
|
||||||
|
|
||||||
if(1.2) //Technology Disk Menu
|
if(1.2) //Technology Disk Menu
|
||||||
|
|
||||||
@@ -614,9 +625,11 @@ won't update every console in existence) but it's more of a hassle to do. Also,
|
|||||||
dat += "<BR><A href='?src=\ref[src];menu=1.0'>Main Menu</A> || "
|
dat += "<BR><A href='?src=\ref[src];menu=1.0'>Main Menu</A> || "
|
||||||
dat += "<A href='?src=\ref[src];menu=1.2'>Return to Disk Operations</A><HR>"
|
dat += "<A href='?src=\ref[src];menu=1.2'>Return to Disk Operations</A><HR>"
|
||||||
dat += "Load Technology to Disk:<BR><BR>"
|
dat += "Load Technology to Disk:<BR><BR>"
|
||||||
|
dat += "<UL>"
|
||||||
for(var/datum/tech/T in files.known_tech)
|
for(var/datum/tech/T in files.known_tech)
|
||||||
dat += "[T.name] "
|
dat += "<LI>[T.name] "
|
||||||
dat += "<A href='?src=\ref[src];copy_tech=1;copy_tech_ID=[T.id]'>(Copy to Disk)</A><BR>"
|
dat += "\[<A href='?src=\ref[src];copy_tech=1;copy_tech_ID=[T.id]'>copy to disk</A>\]"
|
||||||
|
dat += "</UL>"
|
||||||
|
|
||||||
if(1.4) //Design Disk menu.
|
if(1.4) //Design Disk menu.
|
||||||
dat += "<A href='?src=\ref[src];menu=1.0'>Main Menu</A><HR>"
|
dat += "<A href='?src=\ref[src];menu=1.0'>Main Menu</A><HR>"
|
||||||
@@ -644,13 +657,16 @@ won't update every console in existence) but it's more of a hassle to do. Also,
|
|||||||
dat += "<A href='?src=\ref[src];menu=1.0'>Main Menu</A> || "
|
dat += "<A href='?src=\ref[src];menu=1.0'>Main Menu</A> || "
|
||||||
dat += "<A href='?src=\ref[src];menu=1.4'>Return to Disk Operations</A><HR>"
|
dat += "<A href='?src=\ref[src];menu=1.4'>Return to Disk Operations</A><HR>"
|
||||||
dat += "Load Design to Disk:<BR><BR>"
|
dat += "Load Design to Disk:<BR><BR>"
|
||||||
|
dat += "<UL>"
|
||||||
for(var/datum/design/D in files.known_designs)
|
for(var/datum/design/D in files.known_designs)
|
||||||
dat += "[D.name] "
|
if(D.build_path)
|
||||||
dat += "<A href='?src=\ref[src];copy_design=1;copy_design_ID=[D.id]'>(Copy to Disk)</A><BR>"
|
dat += "<LI>[D.name] "
|
||||||
|
dat += "<A href='?src=\ref[src];copy_design=1;copy_design_ID=[D.id]'>\[copy to disk\]</A>"
|
||||||
|
dat += "</UL>"
|
||||||
|
|
||||||
if(1.6) //R&D console settings
|
if(1.6) //R&D console settings
|
||||||
dat += "<A href='?src=\ref[src];menu=1.0'>Main Menu</A><HR>"
|
dat += "<A href='?src=\ref[src];menu=1.0'>Main Menu</A><HR>"
|
||||||
dat += "R&D Console Setting:<BR><BR>"
|
dat += "R&D Console Setting:<HR>"
|
||||||
if(sync)
|
if(sync)
|
||||||
dat += "<A href='?src=\ref[src];sync=1'>Sync Database with Network</A><BR>"
|
dat += "<A href='?src=\ref[src];sync=1'>Sync Database with Network</A><BR>"
|
||||||
dat += "<A href='?src=\ref[src];togglesync=1'>Disconnect from Research Network</A><BR>"
|
dat += "<A href='?src=\ref[src];togglesync=1'>Disconnect from Research Network</A><BR>"
|
||||||
@@ -662,40 +678,44 @@ won't update every console in existence) but it's more of a hassle to do. Also,
|
|||||||
|
|
||||||
if(1.7) //R&D device linkage
|
if(1.7) //R&D device linkage
|
||||||
dat += "<A href='?src=\ref[src];menu=1.0'>Main Menu</A> || "
|
dat += "<A href='?src=\ref[src];menu=1.0'>Main Menu</A> || "
|
||||||
dat += "<A href='?src=\ref[src];menu=1.6'>Settings Menu</A><HR> "
|
dat += "<A href='?src=\ref[src];menu=1.6'>Settings Menu</A><HR>"
|
||||||
dat += "R&D Console Device Linkage Menu:<BR><BR>"
|
dat += "R&D Console Device Linkage Menu:<BR><BR>"
|
||||||
dat += "<A href='?src=\ref[src];find_device=1'>Re-sync with Nearby Devices</A><BR>"
|
dat += "<A href='?src=\ref[src];find_device=1'>Re-sync with Nearby Devices</A><HR>"
|
||||||
dat += "Linked Devices:<BR>"
|
dat += "Linked Devices:"
|
||||||
|
dat += "<UL>"
|
||||||
if(linked_destroy)
|
if(linked_destroy)
|
||||||
dat += "* Destructive Analyzer <A href='?src=\ref[src];disconnect=destroy'>(Disconnect)</A><BR>"
|
dat += "<LI>Destructive Analyzer <A href='?src=\ref[src];disconnect=destroy'>(Disconnect)</A></LI>"
|
||||||
else
|
else
|
||||||
dat += "* (No Destructive Analyzer Linked)<BR>"
|
dat += "<LI>(No Destructive Analyzer Linked)</LI>"
|
||||||
if(linked_lathe)
|
if(linked_lathe)
|
||||||
dat += "* Protolathe <A href='?src=\ref[src];disconnect=lathe'>(Disconnect)</A><BR>"
|
dat += "<LI>Protolathe <A href='?src=\ref[src];disconnect=lathe'>(Disconnect)</A></LI>"
|
||||||
else
|
else
|
||||||
dat += "* (No Protolathe Linked)<BR>"
|
dat += "<LI>(No Protolathe Linked)</LI>"
|
||||||
if(linked_imprinter)
|
if(linked_imprinter)
|
||||||
dat += "* Circuit Imprinter <A href='?src=\ref[src];disconnect=imprinter'>(Disconnect)</A><BR>"
|
dat += "<LI>Circuit Imprinter <A href='?src=\ref[src];disconnect=imprinter'>(Disconnect)</A></LI>"
|
||||||
else
|
else
|
||||||
dat += "* (No Circuit Imprinter Linked)<BR>"
|
dat += "<LI>(No Circuit Imprinter Linked)</LI>"
|
||||||
|
dat += "</UL>"
|
||||||
|
|
||||||
////////////////////DESTRUCTIVE ANALYZER SCREENS////////////////////////////
|
////////////////////DESTRUCTIVE ANALYZER SCREENS////////////////////////////
|
||||||
if(2.0)
|
if(2.0)
|
||||||
|
dat += "<A href='?src=\ref[src];menu=1.0'>Main Menu</A><HR>"
|
||||||
dat += "NO DESTRUCTIVE ANALYZER LINKED TO CONSOLE<BR><BR>"
|
dat += "NO DESTRUCTIVE ANALYZER LINKED TO CONSOLE<BR><BR>"
|
||||||
dat += "<A href='?src=\ref[src];menu=1.0'>Main Menu</A>"
|
|
||||||
|
|
||||||
if(2.1)
|
if(2.1)
|
||||||
|
dat += "<A href='?src=\ref[src];menu=1.0'>Main Menu</A><HR>"
|
||||||
dat += "No Item Loaded. Standing-by...<BR><HR>"
|
dat += "No Item Loaded. Standing-by...<BR><HR>"
|
||||||
dat += "<A href='?src=\ref[src];menu=1.0'>Main Menu</A>"
|
|
||||||
|
|
||||||
if(2.2)
|
if(2.2)
|
||||||
dat += "<A href='?src=\ref[src];menu=1.0'>Main Menu</A><HR>"
|
dat += "<A href='?src=\ref[src];menu=1.0'>Main Menu</A><HR>"
|
||||||
dat += "Deconstruction Menu<HR>"
|
dat += "Deconstruction Menu<HR>"
|
||||||
dat += "Name: [linked_destroy.loaded_item.name]<BR>"
|
dat += "Name: [linked_destroy.loaded_item.name]<BR>"
|
||||||
dat += "Origin Tech:<BR>"
|
dat += "Origin Tech:"
|
||||||
|
dat += "<UL>"
|
||||||
var/list/temp_tech = linked_destroy.ConvertReqString2List(linked_destroy.loaded_item.origin_tech)
|
var/list/temp_tech = linked_destroy.ConvertReqString2List(linked_destroy.loaded_item.origin_tech)
|
||||||
for(var/T in temp_tech)
|
for(var/T in temp_tech)
|
||||||
dat += "* [CallTechName(T)] [temp_tech[T]]<BR>"
|
dat += "<LI>[CallTechName(T)] [temp_tech[T]]</LI>"
|
||||||
|
dat += "</UL>"
|
||||||
dat += "<HR><A href='?src=\ref[src];deconstruct=1'>Deconstruct Item</A> || "
|
dat += "<HR><A href='?src=\ref[src];deconstruct=1'>Deconstruct Item</A> || "
|
||||||
dat += "<A href='?src=\ref[src];eject_item=1'>Eject Item</A> || "
|
dat += "<A href='?src=\ref[src];eject_item=1'>Eject Item</A> || "
|
||||||
|
|
||||||
@@ -711,13 +731,14 @@ won't update every console in existence) but it's more of a hassle to do. Also,
|
|||||||
dat += "Protolathe Menu:<BR><BR>"
|
dat += "Protolathe Menu:<BR><BR>"
|
||||||
dat += "<B>Material Amount:</B> [linked_lathe.TotalMaterials()] cm<sup>3</sup> (MAX: [linked_lathe.max_material_storage])<BR>"
|
dat += "<B>Material Amount:</B> [linked_lathe.TotalMaterials()] cm<sup>3</sup> (MAX: [linked_lathe.max_material_storage])<BR>"
|
||||||
dat += "<B>Chemical Volume:</B> [linked_lathe.reagents.total_volume] (MAX: [linked_lathe.reagents.maximum_volume])<HR>"
|
dat += "<B>Chemical Volume:</B> [linked_lathe.reagents.total_volume] (MAX: [linked_lathe.reagents.maximum_volume])<HR>"
|
||||||
|
dat += "<UL>"
|
||||||
for(var/datum/design/D in files.known_designs)
|
for(var/datum/design/D in files.known_designs)
|
||||||
if(!(D.build_type & PROTOLATHE))
|
if(!D.build_path || !(D.build_type & PROTOLATHE))
|
||||||
continue
|
continue
|
||||||
var/temp_dat = "[D.name]"
|
var/temp_dat
|
||||||
var/check_materials = 1
|
var/check_materials = 1
|
||||||
for(var/M in D.materials)
|
for(var/M in D.materials)
|
||||||
temp_dat += " [D.materials[M]] [CallMaterialName(M)]"
|
temp_dat += ", [D.materials[M]] [CallMaterialName(M)]"
|
||||||
if(copytext(M, 1, 2) == "$")
|
if(copytext(M, 1, 2) == "$")
|
||||||
switch(M)
|
switch(M)
|
||||||
if("$glass")
|
if("$glass")
|
||||||
@@ -736,64 +757,52 @@ won't update every console in existence) but it's more of a hassle to do. Also,
|
|||||||
if(D.materials[M] > linked_lathe.diamond_amount) check_materials = 0
|
if(D.materials[M] > linked_lathe.diamond_amount) check_materials = 0
|
||||||
else if (!linked_lathe.reagents.has_reagent(M, D.materials[M]))
|
else if (!linked_lathe.reagents.has_reagent(M, D.materials[M]))
|
||||||
check_materials = 0
|
check_materials = 0
|
||||||
|
if(temp_dat)
|
||||||
|
temp_dat = " \[[copytext(temp_dat,3)]\]"
|
||||||
if (check_materials)
|
if (check_materials)
|
||||||
dat += "* <A href='?src=\ref[src];build=[D.id]'>[temp_dat]</A><BR>"
|
dat += "<LI><B><A href='?src=\ref[src];build=[D.id]'>[D.name]</A></B>[temp_dat]</LI>"
|
||||||
else
|
else
|
||||||
dat += "* [temp_dat]<BR>"
|
dat += "<LI><B>[D.name]</B>[temp_dat]</LI>"
|
||||||
|
dat += "</UL>"
|
||||||
|
|
||||||
if(3.2) //Protolathe Material Storage Sub-menu
|
if(3.2) //Protolathe Material Storage Sub-menu
|
||||||
dat += "<A href='?src=\ref[src];menu=1.0'>Main Menu</A> || "
|
dat += "<A href='?src=\ref[src];menu=1.0'>Main Menu</A> || "
|
||||||
dat += "<A href='?src=\ref[src];menu=3.1'>Protolathe Menu</A><HR>"
|
dat += "<A href='?src=\ref[src];menu=3.1'>Protolathe Menu</A><HR>"
|
||||||
dat += "Material Storage<BR><HR>"
|
dat += "Material Storage<BR><HR>"
|
||||||
//Metal
|
dat += "<UL>"
|
||||||
dat += "* [linked_lathe.m_amount] cm<sup>3</sup> of Metal || "
|
for(var/M in list("metal", "glass", "gold", "silver", "phoron", "uranium", "diamond"))
|
||||||
dat += "Eject: "
|
var/amount
|
||||||
if(linked_lathe.m_amount >= 3750) dat += "<A href='?src=\ref[src];lathe_ejectsheet=metal;lathe_ejectsheet_amt=1'>(1 Sheet)</A> "
|
var/sheetsize = 2000
|
||||||
if(linked_lathe.m_amount >= 18750) dat += "<A href='?src=\ref[src];lathe_ejectsheet=metal;lathe_ejectsheet_amt=5'>(5 Sheets)</A> "
|
switch(M)
|
||||||
if(linked_lathe.m_amount >= 3750) dat += "<A href='?src=\ref[src];lathe_ejectsheet=metal;lathe_ejectsheet_amt=50'>(Max Sheets)</A>"
|
if("metal")
|
||||||
dat += "<BR>"
|
amount = linked_lathe.m_amount
|
||||||
//Glass
|
sheetsize = 3750
|
||||||
dat += "* [linked_lathe.g_amount] cm<sup>3</sup> of Glass || "
|
if("glass")
|
||||||
dat += "Eject: "
|
amount = linked_lathe.g_amount
|
||||||
if(linked_lathe.g_amount >= 3750) dat += "<A href='?src=\ref[src];lathe_ejectsheet=glass;lathe_ejectsheet_amt=1'>(1 Sheet)</A> "
|
sheetsize = 3750
|
||||||
if(linked_lathe.g_amount >= 18750) dat += "<A href='?src=\ref[src];lathe_ejectsheet=glass;lathe_ejectsheet_amt=5'>(5 Sheets)</A> "
|
if("gold")
|
||||||
if(linked_lathe.g_amount >= 3750) dat += "<A href='?src=\ref[src];lathe_ejectsheet=glass;lathe_ejectsheet_amt=50'>(Max Sheets)</A>"
|
amount = linked_lathe.gold_amount
|
||||||
dat += "<BR>"
|
if("silver")
|
||||||
//Gold
|
amount = linked_lathe.silver_amount
|
||||||
dat += "* [linked_lathe.gold_amount] cm<sup>3</sup> of Gold || "
|
if("phoron")
|
||||||
dat += "Eject: "
|
amount = linked_lathe.phoron_amount
|
||||||
if(linked_lathe.gold_amount >= 2000) dat += "<A href='?src=\ref[src];lathe_ejectsheet=gold;lathe_ejectsheet_amt=1'>(1 Sheet)</A> "
|
if("uranium")
|
||||||
if(linked_lathe.gold_amount >= 10000) dat += "<A href='?src=\ref[src];lathe_ejectsheet=gold;lathe_ejectsheet_amt=5'>(5 Sheets)</A> "
|
amount = linked_lathe.uranium_amount
|
||||||
if(linked_lathe.gold_amount >= 2000) dat += "<A href='?src=\ref[src];lathe_ejectsheet=gold;lathe_ejectsheet_amt=50'>(Max Sheets)</A>"
|
if("diamond")
|
||||||
dat += "<BR>"
|
amount = linked_lathe.diamond_amount
|
||||||
//Silver
|
else
|
||||||
dat += "* [linked_lathe.silver_amount] cm<sup>3</sup> of Silver || "
|
continue
|
||||||
dat += "Eject: "
|
dat += "<LI><B>[capitalize(M)]</B>: [amount] cm<sup>3</sup>"
|
||||||
if(linked_lathe.silver_amount >= 2000) dat += "<A href='?src=\ref[src];lathe_ejectsheet=silver;lathe_ejectsheet_amt=1'>(1 Sheet)</A> "
|
if(amount >= sheetsize)
|
||||||
if(linked_lathe.silver_amount >= 10000) dat += "<A href='?src=\ref[src];lathe_ejectsheet=silver;lathe_ejectsheet_amt=5'>(5 Sheets)</A> "
|
dat += " || Eject "
|
||||||
if(linked_lathe.silver_amount >= 2000) dat += "<A href='?src=\ref[src];lathe_ejectsheet=silver;lathe_ejectsheet_amt=50'>(Max Sheets)</A>"
|
for (var/C in list(1,3,5,10,15,20,25,30,40))
|
||||||
dat += "<BR>"
|
if(amount < C * sheetsize)
|
||||||
//Phoron
|
break
|
||||||
dat += "* [linked_lathe.phoron_amount] cm<sup>3</sup> of Solid Phoron || "
|
dat += "[C > 1 ? ", " : ""]<A href='?src=\ref[src];lathe_ejectsheet=[M];amount=[C]'>[C]</A> "
|
||||||
dat += "Eject: "
|
|
||||||
if(linked_lathe.phoron_amount >= 2000) dat += "<A href='?src=\ref[src];lathe_ejectsheet=phoron;lathe_ejectsheet_amt=1'>(1 Sheet)</A> "
|
dat += " or <A href='?src=\ref[src];lathe_ejectsheet=[M];amount=50'>max</A> sheets"
|
||||||
if(linked_lathe.phoron_amount >= 10000) dat += "<A href='?src=\ref[src];lathe_ejectsheet=phoron;lathe_ejectsheet_amt=5'>(5 Sheets)</A> "
|
dat += "</LI>"
|
||||||
if(linked_lathe.phoron_amount >= 2000) dat += "<A href='?src=\ref[src];lathe_ejectsheet=phoronlathe_ejectsheet_amt=50'>(Max Sheets)</A>"
|
dat += "</UL>"
|
||||||
dat += "<BR>"
|
|
||||||
//Uranium
|
|
||||||
dat += "* [linked_lathe.uranium_amount] cm<sup>3</sup> of Uranium || "
|
|
||||||
dat += "Eject: "
|
|
||||||
if(linked_lathe.uranium_amount >= 2000) dat += "<A href='?src=\ref[src];lathe_ejectsheet=uranium;lathe_ejectsheet_amt=1'>(1 Sheet)</A> "
|
|
||||||
if(linked_lathe.uranium_amount >= 10000) dat += "<A href='?src=\ref[src];lathe_ejectsheet=uranium;lathe_ejectsheet_amt=5'>(5 Sheets)</A> "
|
|
||||||
if(linked_lathe.uranium_amount >= 2000) dat += "<A href='?src=\ref[src];lathe_ejectsheet=uranium;lathe_ejectsheet_amt=50'>(Max Sheets)</A>"
|
|
||||||
dat += "<BR>"
|
|
||||||
//Diamond
|
|
||||||
dat += "* [linked_lathe.diamond_amount] cm<sup>3</sup> of Diamond || "
|
|
||||||
dat += "Eject: "
|
|
||||||
if(linked_lathe.diamond_amount >= 2000) dat += "<A href='?src=\ref[src];lathe_ejectsheet=diamond;lathe_ejectsheet_amt=1'>(1 Sheet)</A> "
|
|
||||||
if(linked_lathe.diamond_amount >= 10000) dat += "<A href='?src=\ref[src];lathe_ejectsheet=diamond;lathe_ejectsheet_amt=5'>(5 Sheets)</A> "
|
|
||||||
if(linked_lathe.diamond_amount >= 2000) dat += "<A href='?src=\ref[src];lathe_ejectsheet=diamond;lathe_ejectsheet_amt=50'>(Max Sheets)</A>"
|
|
||||||
dat += "<BR>"
|
|
||||||
|
|
||||||
if(3.3) //Protolathe Chemical Storage Submenu
|
if(3.3) //Protolathe Chemical Storage Submenu
|
||||||
dat += "<A href='?src=\ref[src];menu=1.0'>Main Menu</A> || "
|
dat += "<A href='?src=\ref[src];menu=1.0'>Main Menu</A> || "
|
||||||
@@ -816,14 +825,14 @@ won't update every console in existence) but it's more of a hassle to do. Also,
|
|||||||
dat += "Circuit Imprinter Menu:<BR><BR>"
|
dat += "Circuit Imprinter Menu:<BR><BR>"
|
||||||
dat += "Material Amount: [linked_imprinter.TotalMaterials()] cm<sup>3</sup><BR>"
|
dat += "Material Amount: [linked_imprinter.TotalMaterials()] cm<sup>3</sup><BR>"
|
||||||
dat += "Chemical Volume: [linked_imprinter.reagents.total_volume]<HR>"
|
dat += "Chemical Volume: [linked_imprinter.reagents.total_volume]<HR>"
|
||||||
|
dat += "<UL>"
|
||||||
for(var/datum/design/D in files.known_designs)
|
for(var/datum/design/D in files.known_designs)
|
||||||
if(!(D.build_type & IMPRINTER))
|
if(!D.build_path || !(D.build_type & IMPRINTER))
|
||||||
continue
|
continue
|
||||||
var/temp_dat = "[D.name]"
|
var/temp_dat
|
||||||
var/check_materials = 1
|
var/check_materials = 1
|
||||||
for(var/M in D.materials)
|
for(var/M in D.materials)
|
||||||
temp_dat += " [D.materials[M]] [CallMaterialName(M)]"
|
temp_dat += ", [D.materials[M]] [CallMaterialName(M)]"
|
||||||
if(copytext(M, 1, 2) == "$")
|
if(copytext(M, 1, 2) == "$")
|
||||||
switch(M)
|
switch(M)
|
||||||
if("$glass")
|
if("$glass")
|
||||||
@@ -836,10 +845,13 @@ won't update every console in existence) but it's more of a hassle to do. Also,
|
|||||||
if(D.materials[M] > linked_imprinter.uranium_amount) check_materials = 0
|
if(D.materials[M] > linked_imprinter.uranium_amount) check_materials = 0
|
||||||
else if (!linked_imprinter.reagents.has_reagent(M, D.materials[M]))
|
else if (!linked_imprinter.reagents.has_reagent(M, D.materials[M]))
|
||||||
check_materials = 0
|
check_materials = 0
|
||||||
|
if(temp_dat)
|
||||||
|
temp_dat = " \[[copytext(temp_dat,3)]\]"
|
||||||
if (check_materials)
|
if (check_materials)
|
||||||
dat += "* <A href='?src=\ref[src];imprint=[D.id]'>[temp_dat]</A><BR>"
|
dat += "<LI><B><A href='?src=\ref[src];imprint=[D.id]'>[D.name]</A></B>[temp_dat]</LI>"
|
||||||
else
|
else
|
||||||
dat += "* [temp_dat]<BR>"
|
dat += "<LI><B>[D.name]</B>[temp_dat]</LI>"
|
||||||
|
dat += "</UL>"
|
||||||
|
|
||||||
if(4.2)
|
if(4.2)
|
||||||
dat += "<A href='?src=\ref[src];menu=1.0'>Main Menu</A> || "
|
dat += "<A href='?src=\ref[src];menu=1.0'>Main Menu</A> || "
|
||||||
@@ -854,35 +866,34 @@ won't update every console in existence) but it's more of a hassle to do. Also,
|
|||||||
dat += "<A href='?src=\ref[src];menu=1.0'>Main Menu</A> || "
|
dat += "<A href='?src=\ref[src];menu=1.0'>Main Menu</A> || "
|
||||||
dat += "<A href='?src=\ref[src];menu=4.1'>Circuit Imprinter Menu</A><HR>"
|
dat += "<A href='?src=\ref[src];menu=4.1'>Circuit Imprinter Menu</A><HR>"
|
||||||
dat += "Material Storage<BR><HR>"
|
dat += "Material Storage<BR><HR>"
|
||||||
//Glass
|
dat += "<UL>"
|
||||||
dat += "* [linked_imprinter.g_amount] cm<sup>3</sup> of Glass || "
|
for(var/M in list("glass", "gold", "diamond", "uranium"))
|
||||||
dat += "Eject: "
|
var/amount
|
||||||
if(linked_imprinter.g_amount >= 3750) dat += "<A href='?src=\ref[src];imprinter_ejectsheet=glass;imprinter_ejectsheet_amt=1'>(1 Sheet)</A> "
|
var/sheetsize = 2000
|
||||||
if(linked_imprinter.g_amount >= 18750) dat += "<A href='?src=\ref[src];imprinter_ejectsheet=glass;imprinter_ejectsheet_amt=5'>(5 Sheets)</A> "
|
switch(M)
|
||||||
if(linked_imprinter.g_amount >= 3750) dat += "<A href='?src=\ref[src];imprinter_ejectsheet=glass;imprinter_ejectsheet_amt=50'>(Max Sheets)</A>"
|
if("glass")
|
||||||
dat += "<BR>"
|
amount = linked_imprinter.g_amount
|
||||||
//Gold
|
sheetsize = 3750
|
||||||
dat += "* [linked_imprinter.gold_amount] cm<sup>3</sup> of Gold || "
|
if("gold")
|
||||||
dat += "Eject: "
|
amount = linked_imprinter.gold_amount
|
||||||
if(linked_imprinter.gold_amount >= 2000) dat += "<A href='?src=\ref[src];imprinter_ejectsheet=gold;imprinter_ejectsheet_amt=1'>(1 Sheet)</A> "
|
if("diamond")
|
||||||
if(linked_imprinter.gold_amount >= 10000) dat += "<A href='?src=\ref[src];imprinter_ejectsheet=gold;imprinter_ejectsheet_amt=5'>(5 Sheets)</A> "
|
amount = linked_imprinter.diamond_amount
|
||||||
if(linked_imprinter.gold_amount >= 2000) dat += "<A href='?src=\ref[src];imprinter_ejectsheet=gold;imprinter_ejectsheet_amt=50'>(Max Sheets)</A>"
|
if("uranium")
|
||||||
dat += "<BR>"
|
amount = linked_imprinter.uranium_amount
|
||||||
//Diamond
|
dat += "<LI><B>[capitalize(M)]</B>: [amount] cm<sup>3</sup>"
|
||||||
dat += "* [linked_imprinter.diamond_amount] cm<sup>3</sup> of Diamond || "
|
if(amount >= sheetsize)
|
||||||
dat += "Eject: "
|
dat += " || Eject: "
|
||||||
if(linked_imprinter.diamond_amount >= 2000) dat += "<A href='?src=\ref[src];imprinter_ejectsheet=diamond;imprinter_ejectsheet_amt=1'>(1 Sheet)</A> "
|
for (var/C in list(1,3,5,10,15,20,25,30,40))
|
||||||
if(linked_imprinter.diamond_amount >= 10000) dat += "<A href='?src=\ref[src];imprinter_ejectsheet=diamond;imprinter_ejectsheet_amt=5'>(5 Sheets)</A> "
|
if(amount < C * sheetsize)
|
||||||
if(linked_imprinter.diamond_amount >= 2000) dat += "<A href='?src=\ref[src];imprinter_ejectsheet=diamond;imprinter_ejectsheet_amt=50'>(Max Sheets)</A>"
|
break
|
||||||
dat += "<BR>"
|
dat += "[C > 1 ? ", " : ""]<A href='?src=\ref[src];imprinter_ejectsheet=[M];amount=[C]'>[C]</A> "
|
||||||
//Uranium
|
|
||||||
dat += "* [linked_imprinter.uranium_amount] cm<sup>3</sup> of Uranium || "
|
|
||||||
dat += "Eject: "
|
|
||||||
if(linked_imprinter.uranium_amount >= 2000) dat += "<A href='?src=\ref[src];imprinter_ejectsheet=uranium;imprinter_ejectsheet_amt=1'>(1 Sheet)</A> "
|
|
||||||
if(linked_imprinter.uranium_amount >= 10000) dat += "<A href='?src=\ref[src];imprinter_ejectsheet=uranium;imprinter_ejectsheet_amt=5'>(5 Sheets)</A> "
|
|
||||||
if(linked_imprinter.uranium_amount >= 2000) dat += "<A href='?src=\ref[src];imprinter_ejectsheet=uranium;imprinter_ejectsheet_amt=50'>(Max Sheets)</A>"
|
|
||||||
|
|
||||||
user << browse("<TITLE>Research and Development Console</TITLE><HR>[dat]", "window=rdconsole;size=575x400")
|
dat += " or <A href='?src=\ref[src];imprinter_ejectsheet=[M];amount=50'>max</A> sheets"
|
||||||
|
dat += "</LI>"
|
||||||
|
dat += "</UL>"
|
||||||
|
|
||||||
|
|
||||||
|
user << browse("<TITLE>Research and Development Console</TITLE><HR>[dat]", "window=rdconsole;size=850x600")
|
||||||
onclose(user, "rdconsole")
|
onclose(user, "rdconsole")
|
||||||
|
|
||||||
/obj/machinery/computer/rdconsole/robotics
|
/obj/machinery/computer/rdconsole/robotics
|
||||||
|
|||||||
Reference in New Issue
Block a user