"
dat += list_categories(linked_lathe.categories, 3.15)
//Grouping designs by categories, to improve readability
if(3.15)
dat += "
Browsing [selected_category]:
"
dat += "
Material Amount: [linked_lathe.materials.total_amount] / [linked_lathe.materials.max_amount]
"
dat += "
Chemical Volume: [linked_lathe.reagents.total_volume] / [linked_lathe.reagents.maximum_volume]
"
var/coeff = linked_lathe.efficiency_coeff
for(var/datum/design/D in files.known_designs)
if(!(selected_category in D.category)|| !(D.build_type & PROTOLATHE))
continue
var/temp_material
var/c = 50
var/t
for(var/M in D.materials)
t = linked_lathe.check_mat(D, M)
temp_material += " | "
if (t < 1)
temp_material += "
[D.materials[M]/coeff] [CallMaterialName(M)]"
else
temp_material += " [D.materials[M]/coeff] [CallMaterialName(M)]"
c = min(c,t)
for(var/R in D.reagents)
t = linked_lathe.check_mat(D, R)
temp_material += " | "
if (t < 1)
temp_material += "
[D.reagents[R]/coeff] [CallMaterialName(R)]"
else
temp_material += " [D.reagents[R]/coeff] [CallMaterialName(R)]"
c = min(c,t)
if (c >= 1)
dat += "
[D.name]"
if(c >= 5)
dat += "
x5"
if(c >= 10)
dat += "
x10"
dat += "[temp_material]"
else
dat += "
[D.name][temp_material]"
if(D.locked)
dat += " |
LOCKED"
dat += "
"
dat += "
Search results:
"
dat += "
Material Amount: [linked_lathe.materials.total_amount] / [linked_lathe.materials.max_amount]
"
dat += "
Chemical Volume: [linked_lathe.reagents.total_volume] / [linked_lathe.reagents.maximum_volume]
"
var/coeff = linked_lathe.efficiency_coeff
for(var/datum/design/D in matching_designs)
var/temp_material
var/c = 50
var/t
for(var/M in D.materials)
t = linked_lathe.check_mat(D, M)
temp_material += " | "
if (t < 1)
temp_material += "
[D.materials[M]/coeff] [CallMaterialName(M)]"
else
temp_material += " [D.materials[M]/coeff] [CallMaterialName(M)]"
c = min(c,t)
for(var/R in D.reagents)
t = linked_lathe.check_mat(D, R)
temp_material += " | "
if (t < 1)
temp_material += "
[D.reagents[R]/coeff] [CallMaterialName(R)]"
else
temp_material += " [D.reagents[R]/coeff] [CallMaterialName(R)]"
c = min(c,t)
if (c >= 1)
dat += "
[D.name]"
if(c >= 5)
dat += "
x5"
if(c >= 10)
dat += "
x10"
dat += "[temp_material]"
else
dat += "
[D.name][temp_material]"
dat += "
"
dat += "
"
dat += "
Material Storage:
"
//Metal
var/m_amount = linked_lathe.materials.amount(MAT_METAL)
dat += "* [m_amount] of Metal, [round(m_amount / MINERAL_MATERIAL_AMOUNT,0.1)] sheets: "
if(m_amount >= MINERAL_MATERIAL_AMOUNT)
dat += "
Eject "
dat += "
C "
if(m_amount >= MINERAL_MATERIAL_AMOUNT*5) dat += "
5x "
if(m_amount >= MINERAL_MATERIAL_AMOUNT) dat += "
All"
dat += "
"
//Glass
var/g_amount = linked_lathe.materials.amount(MAT_GLASS)
dat += "* [g_amount] of Glass, [round(g_amount / MINERAL_MATERIAL_AMOUNT,0.1)] sheets: "
if(g_amount >= MINERAL_MATERIAL_AMOUNT)
dat += "
Eject "
dat += "
C "
if(g_amount >= MINERAL_MATERIAL_AMOUNT*5) dat += "
5x "
if(g_amount >= MINERAL_MATERIAL_AMOUNT) dat += "
All"
dat += "
"
//Gold
var/gold_amount = linked_lathe.materials.amount(MAT_GOLD)
dat += "* [gold_amount] of Gold, [round(gold_amount / MINERAL_MATERIAL_AMOUNT,0.1)] sheets: "
if(gold_amount >= MINERAL_MATERIAL_AMOUNT)
dat += "
Eject "
dat += "
C "
if(gold_amount >= MINERAL_MATERIAL_AMOUNT*5) dat += "
5x "
if(gold_amount >= MINERAL_MATERIAL_AMOUNT) dat += "
All"
dat += "
"
//Silver
var/silver_amount = linked_lathe.materials.amount(MAT_SILVER)
dat += "* [silver_amount] of Silver, [round(silver_amount / MINERAL_MATERIAL_AMOUNT,0.1)] sheets: "
if(silver_amount >= MINERAL_MATERIAL_AMOUNT)
dat += "
Eject "
dat += "
C "
if(silver_amount >= MINERAL_MATERIAL_AMOUNT*5) dat += "
5x "
if(silver_amount >= MINERAL_MATERIAL_AMOUNT) dat += "
All"
dat += "
"
//Plasma
var/plasma_amount = linked_lathe.materials.amount(MAT_PLASMA)
dat += "* [plasma_amount] of Solid Plasma, [round(plasma_amount / MINERAL_MATERIAL_AMOUNT,0.1)] sheets: "
if(plasma_amount >= MINERAL_MATERIAL_AMOUNT)
dat += "
Eject "
dat += "
C "
if(plasma_amount >= MINERAL_MATERIAL_AMOUNT*5) dat += "
5x "
if(plasma_amount >= MINERAL_MATERIAL_AMOUNT) dat += "
All"
dat += "
"
//Uranium
var/uranium_amount = linked_lathe.materials.amount(MAT_URANIUM)
dat += "* [uranium_amount] of Uranium, [round(uranium_amount / MINERAL_MATERIAL_AMOUNT,0.1)] sheets: "
if(uranium_amount >= MINERAL_MATERIAL_AMOUNT)
dat += "
Eject "
dat += "
C "
if(uranium_amount >= MINERAL_MATERIAL_AMOUNT*5) dat += "
5x "
if(uranium_amount >= MINERAL_MATERIAL_AMOUNT) dat += "
All"
dat += "
"
//Diamond
var/diamond_amount = linked_lathe.materials.amount(MAT_DIAMOND)
dat += "* [diamond_amount] of Diamond, [round(diamond_amount / MINERAL_MATERIAL_AMOUNT,0.1)] sheets: "
if(diamond_amount >= MINERAL_MATERIAL_AMOUNT)
dat += "
Eject "
dat += "
C "
if(diamond_amount >= MINERAL_MATERIAL_AMOUNT*5) dat += "
5x "
if(diamond_amount >= MINERAL_MATERIAL_AMOUNT) dat += "
All"
dat += "
"
//Bananium
var/bananium_amount = linked_lathe.materials.amount(MAT_BANANIUM)
dat += "* [bananium_amount] of Bananium, [round(bananium_amount / MINERAL_MATERIAL_AMOUNT,0.1)] sheets: "
if(bananium_amount >= MINERAL_MATERIAL_AMOUNT)
dat += "
Eject "
dat += "
C "
if(bananium_amount >= MINERAL_MATERIAL_AMOUNT*5) dat += "
5x "
if(bananium_amount >= MINERAL_MATERIAL_AMOUNT) dat += "
All"
dat += "
"
dat += "
Chemical Storage:
"
for(var/datum/reagent/R in linked_lathe.reagents.reagent_list)
dat += "[R.name]: [R.volume]"
dat += "
Purge"
///////////////////CIRCUIT IMPRINTER SCREENS////////////////////
if(4.0)
dat += "
Main Menu
"
dat += "
NO CIRCUIT IMPRINTER LINKED TO CONSOLE
"
if(4.1)
dat += "
Main Menu"
dat += "
Material Storage"
dat += "
Chemical Storage"
dat += "
Circuit Imprinter Menu:
"
dat += "Material Amount: [linked_imprinter.TotalMaterials()]
"
dat += "Chemical Volume: [linked_imprinter.reagents.total_volume]
"
dat += "
"
dat += list_categories(linked_imprinter.categories, 4.15)
if(4.15)
dat += "
Main Menu"
dat += "
Circuit Imprinter Menu"
dat += "
Browsing [selected_category]:
"
dat += "Material Amount: [linked_imprinter.TotalMaterials()]
"
dat += "Chemical Volume: [linked_imprinter.reagents.total_volume]
"
var/coeff = linked_imprinter.efficiency_coeff
for(var/datum/design/D in files.known_designs)
if(!(selected_category in D.category) || !(D.build_type & IMPRINTER))
continue
var/temp_materials
var/check_materials = 1
for(var/M in D.materials)
temp_materials += " | "
if (!linked_imprinter.check_mat(D, M))
check_materials = 0
temp_materials += "
[D.materials[M]/coeff] [CallMaterialName(M)]"
else
temp_materials += " [D.materials[M]/coeff] [CallMaterialName(M)]"
if (check_materials)
dat += "
[D.name][temp_materials]
"
else
dat += "
[D.name][temp_materials]
"
if(D.locked)
dat += " |
LOCKED"
dat += "
"
if(4.17)
dat += "
Main Menu"
dat += "
Circuit Imprinter Menu"
dat += "
Search results:
"
dat += "Material Amount: [linked_imprinter.TotalMaterials()]
"
dat += "Chemical Volume: [linked_imprinter.reagents.total_volume]
"
var/coeff = linked_imprinter.efficiency_coeff
for(var/datum/design/D in matching_designs)
var/temp_materials
var/check_materials = 1
for(var/M in D.materials)
temp_materials += " | "
if (!linked_imprinter.check_mat(D, M))
check_materials = 0
temp_materials += "
[D.materials[M]/coeff] [CallMaterialName(M)]"
else
temp_materials += " [D.materials[M]/coeff] [CallMaterialName(M)]"
if (check_materials)
dat += "
[D.name][temp_materials]
"
else
dat += "
[D.name][temp_materials]
"
dat += "
"
if(4.2)
dat += "
Main Menu"
dat += "
Imprinter Menu"
dat += "
Disposal All Chemicals in Storage"
dat += "
Chemical Storage:
"
for(var/datum/reagent/R in linked_imprinter.reagents.reagent_list)
dat += "[R.name]: [R.volume]"
dat += "
Purge"
if(4.3)
dat += "
Main Menu"
dat += "
Circuit Imprinter Menu"
dat += "
Material Storage:
"
//Glass
dat += "* [linked_imprinter.g_amount] glass, [round(linked_imprinter.g_amount / MINERAL_MATERIAL_AMOUNT,0.1)] sheets: "
if(linked_imprinter.g_amount >= MINERAL_MATERIAL_AMOUNT)
dat += "
Eject "
dat += "
C "
if(linked_imprinter.g_amount >= MINERAL_MATERIAL_AMOUNT*5) dat += "
5x "
if(linked_imprinter.g_amount >= MINERAL_MATERIAL_AMOUNT) dat += "
All"
dat += "
"
//Gold
dat += "* [linked_imprinter.gold_amount] gold, [round(linked_imprinter.gold_amount / MINERAL_MATERIAL_AMOUNT,0.1)] sheets: "
if(linked_imprinter.gold_amount >= MINERAL_MATERIAL_AMOUNT)
dat += "
Eject "
dat += "
C "
if(linked_imprinter.gold_amount >= MINERAL_MATERIAL_AMOUNT*5) dat += "
5x "
if(linked_imprinter.gold_amount >= MINERAL_MATERIAL_AMOUNT) dat += "
All"
dat += "
"
//Diamond
dat += "* [linked_imprinter.diamond_amount] diamond, [round(linked_imprinter.diamond_amount / MINERAL_MATERIAL_AMOUNT,0.1)] sheets: "
if(linked_imprinter.diamond_amount >= MINERAL_MATERIAL_AMOUNT)
dat += "
Eject "
dat += "
C "
if(linked_imprinter.diamond_amount >= MINERAL_MATERIAL_AMOUNT*5) dat += "
5x "
if(linked_imprinter.diamond_amount >= MINERAL_MATERIAL_AMOUNT) dat += "
All"
dat += "
"
var/datum/browser/popup = new(user, "rndconsole", name, 700, 550)
popup.set_content(dat)
popup.open()
return
//helper proc, which return a table containing categories
/obj/machinery/computer/rdconsole/proc/list_categories(var/list/categories, var/menu_num as num)
if(!categories)
return
var/line_length = 1
var/dat = "
"
for(var/C in categories)
if(line_length > 2)
dat += "
"
line_length = 1
dat += "| [C] | "
line_length++
dat += "
"
return dat
/obj/machinery/computer/rdconsole/core
name = "core R&D console"
desc = "A console used to interface with R&D tools."
id = 1
/obj/machinery/computer/rdconsole/robotics
name = "robotics R&D console"
desc = "A console used to interface with R&D tools."
id = 2
req_access = list(access_robotics)
circuit = /obj/item/weapon/circuitboard/rdconsole/robotics
/obj/machinery/computer/rdconsole/experiment
name = "\improper E.X.P.E.R.I-MENTOR R&D console"
desc = "A console used to interface with R&D tools."
id = 3
circuit = /obj/item/weapon/circuitboard/rdconsole/experiment
/obj/machinery/computer/rdconsole/mechanics
name = "mechanics R&D console"
desc = "A console used to interface with R&D tools."
id = 4
req_access = list(access_mechanic)
circuit = /obj/item/weapon/circuitboard/rdconsole/mechanics
/obj/machinery/computer/rdconsole/public
name = "public R&D console"
desc = "A console used to interface with R&D tools."
id = 5
req_access = list()
circuit = /obj/item/weapon/circuitboard/rdconsole/public