[build_path_icon(D.build_path)]
[D.name]"
if(D.build_type)
- l += "Lathe Types:"
- if(D.build_type & IMPRINTER) l += "Circuit Imprinter"
- if(D.build_type & PROTOLATHE) l += "Protolathe"
- if(D.build_type & AUTOLATHE) l += "Autolathe"
- if(D.build_type & MECHFAB) l += "Exosuit Fabricator"
- if(D.build_type & BIOGENERATOR) l += "Biogenerator"
- if(D.build_type & LIMBGROWER) l += "Limbgrower"
- if(D.build_type & SMELTER) l += "Smelter"
+ var/lathes = ""
+ if(D.build_type & IMPRINTER)
+ lathes += "
[build_path_icon(/obj/machinery/rnd/circuit_imprinter)]"
+ if (linked_imprinter && D.id in stored_research.researched_designs)
+ l += "
Imprint"
+ if(D.build_type & PROTOLATHE)
+ lathes += "
[build_path_icon(/obj/machinery/rnd/protolathe)]"
+ if (linked_lathe && D.id in stored_research.researched_designs)
+ l += "
Construct"
+ if(D.build_type & AUTOLATHE)
+ lathes += "
[build_path_icon(/obj/machinery/autolathe)]"
+ if(D.build_type & MECHFAB)
+ lathes += "
[build_path_icon(/obj/machinery/mecha_part_fabricator)]"
+ if(D.build_type & BIOGENERATOR)
+ lathes += "
[build_path_icon(/obj/machinery/biogenerator)]"
+ if(D.build_type & LIMBGROWER)
+ lathes += "
[build_path_icon(/obj/machinery/limbgrower)]"
+ if(D.build_type & SMELTER)
+ lathes += "
[build_path_icon(/obj/machinery/mineral/processing_unit)]"
+ l += "Lathe types:"
+ l += lathes
l += "Required Materials:"
var/all_mats = D.materials + D.reagents_list
for(var/M in all_mats)
l += "* [CallMaterialName(M)] x [all_mats[M]]"
+ l += "Unlocked by:"
+ for (var/node in D.unlocked_by)
+ l += ui_techweb_single_node(node)
l += "[RDSCREEN_NOBREAK]
"
return l
diff --git a/code/modules/research/techweb/__techweb_helpers.dm b/code/modules/research/techweb/__techweb_helpers.dm
index adfa5c78d02..af4fe7480b6 100644
--- a/code/modules/research/techweb/__techweb_helpers.dm
+++ b/code/modules/research/techweb/__techweb_helpers.dm
@@ -130,6 +130,9 @@
CHECK_TICK
/proc/calculate_techweb_nodes()
+ for(var/design_id in SSresearch.techweb_designs)
+ var/datum/design/D = SSresearch.techweb_designs[design_id]
+ D.unlocked_by.Cut()
for(var/node_id in SSresearch.techweb_nodes)
var/datum/techweb_node/node = SSresearch.techweb_nodes[node_id]
node.prerequisites = list()
@@ -138,7 +141,9 @@
for(var/i in node.prereq_ids)
node.prerequisites[i] = SSresearch.techweb_nodes[i]
for(var/i in node.design_ids)
- node.designs[i] = SSresearch.techweb_designs[i]
+ var/datum/design/D = SSresearch.techweb_designs[i]
+ node.designs[i] = D
+ D.unlocked_by += node
if(node.hidden)
SSresearch.techweb_nodes_hidden[node.id] = node
CHECK_TICK