[host_research.organization] [department_tag] Department Lathe"
+ l += "
[stored_research.organization] [department_tag] Department Lathe"
l += "Security protocols: [(obj_flags & EMAGGED)? "
Disabled" : "
Enabled"]"
if (materials.mat_container)
l += "
Material Amount: [materials.format_amount()]"
@@ -298,7 +285,7 @@
search(ls["to_search"])
screen = RESEARCH_FABRICATOR_SCREEN_SEARCH
if(ls["sync_research"])
- update_research()
+ update_designs()
say("Synchronizing research with host technology database.")
if(ls["category"])
selected_category = ls["category"]
diff --git a/code/modules/research/machinery/circuit_imprinter.dm b/code/modules/research/machinery/circuit_imprinter.dm
index 948dad61db9..d147330fb02 100644
--- a/code/modules/research/machinery/circuit_imprinter.dm
+++ b/code/modules/research/machinery/circuit_imprinter.dm
@@ -19,10 +19,6 @@
production_animation = "circuit_imprinter_ani"
allowed_buildtypes = IMPRINTER
-/obj/machinery/rnd/production/circuit_imprinter/disconnect_console()
- linked_console.linked_imprinter = null
- ..()
-
/obj/machinery/rnd/production/circuit_imprinter/calculate_efficiency()
. = ..()
var/total_rating = 0
diff --git a/code/modules/research/machinery/departmental_circuit_imprinter.dm b/code/modules/research/machinery/departmental_circuit_imprinter.dm
index a243e9fbbb2..69c04d16a01 100644
--- a/code/modules/research/machinery/departmental_circuit_imprinter.dm
+++ b/code/modules/research/machinery/departmental_circuit_imprinter.dm
@@ -3,8 +3,6 @@
desc = "A special circuit imprinter with a built in interface meant for departmental usage, with built in ExoSync receivers allowing it to print designs researched that match its ROM-encoded department type."
icon_state = "circuit_imprinter"
circuit = /obj/item/circuitboard/machine/circuit_imprinter/department
- requires_console = FALSE
- consoleless_interface = TRUE
/obj/machinery/rnd/production/circuit_imprinter/department/science
name = "department circuit imprinter (Science)"
diff --git a/code/modules/research/machinery/departmental_protolathe.dm b/code/modules/research/machinery/departmental_protolathe.dm
index dd038ce3d80..dcd691eb4c8 100644
--- a/code/modules/research/machinery/departmental_protolathe.dm
+++ b/code/modules/research/machinery/departmental_protolathe.dm
@@ -3,8 +3,6 @@
desc = "A special protolathe with a built in interface meant for departmental usage, with built in ExoSync receivers allowing it to print designs researched that match its ROM-encoded department type."
icon_state = "protolathe"
circuit = /obj/item/circuitboard/machine/protolathe/department
- requires_console = FALSE
- consoleless_interface = TRUE
/obj/machinery/rnd/production/protolathe/department/engineering
name = "department protolathe (Engineering)"
diff --git a/code/modules/research/machinery/protolathe.dm b/code/modules/research/machinery/protolathe.dm
index 684f27ccadf..773284d0ef5 100644
--- a/code/modules/research/machinery/protolathe.dm
+++ b/code/modules/research/machinery/protolathe.dm
@@ -19,7 +19,3 @@
)
production_animation = "protolathe_n"
allowed_buildtypes = PROTOLATHE
-
-/obj/machinery/rnd/production/protolathe/disconnect_console()
- linked_console.linked_lathe = null
- ..()
diff --git a/code/modules/research/machinery/techfab.dm b/code/modules/research/machinery/techfab.dm
index 885f27c2cb5..68a57bf54ef 100644
--- a/code/modules/research/machinery/techfab.dm
+++ b/code/modules/research/machinery/techfab.dm
@@ -30,6 +30,4 @@
)
console_link = FALSE
production_animation = "protolathe_n"
- requires_console = FALSE
- consoleless_interface = TRUE
allowed_buildtypes = PROTOLATHE | IMPRINTER
diff --git a/code/modules/research/rdconsole.dm b/code/modules/research/rdconsole.dm
index 5408ace8beb..37c368dab55 100644
--- a/code/modules/research/rdconsole.dm
+++ b/code/modules/research/rdconsole.dm
@@ -24,10 +24,6 @@ Nothing else in the console has ID requirements.
var/obj/item/disk/design_disk/d_disk //Stores the design disk.
circuit = /obj/item/circuitboard/computer/rdconsole
- var/obj/machinery/rnd/destructive_analyzer/linked_destroy //Linked Destructive Analyzer
- var/obj/machinery/rnd/production/protolathe/linked_lathe //Linked Protolathe
- var/obj/machinery/rnd/production/circuit_imprinter/linked_imprinter //Linked Circuit Imprinter
-
req_access = list(ACCESS_RND) //lA AND SETTING MANIPULATION REQUIRES SCIENTIST ACCESS.
//UI VARS
@@ -39,7 +35,6 @@ Nothing else in the console has ID requirements.
var/datum/selected_node_id
var/datum/selected_design_id
var/selected_category
- var/list/matching_design_ids
var/disk_slot_selected
var/searchstring = ""
var/searchtype = ""
@@ -47,10 +42,6 @@ Nothing else in the console has ID requirements.
var/research_control = TRUE
-/obj/machinery/computer/rdconsole/production
- circuit = /obj/item/circuitboard/computer/rdconsole/production
- research_control = FALSE
-
/proc/CallMaterialName(ID)
if (istype(ID, /datum/material))
var/datum/material/material = ID
@@ -61,55 +52,20 @@ Nothing else in the console has ID requirements.
return reagent.name
return ID
-/obj/machinery/computer/rdconsole/proc/SyncRDevices() //Makes sure it is properly sync'ed up with the devices attached to it (if any).
- for(var/obj/machinery/rnd/D in oview(3,src))
- if(D.linked_console != null || D.disabled || D.panel_open)
- continue
- if(istype(D, /obj/machinery/rnd/destructive_analyzer))
- if(linked_destroy == null)
- linked_destroy = D
- D.linked_console = src
- else if(istype(D, /obj/machinery/rnd/production/protolathe))
- if(linked_lathe == null)
- var/obj/machinery/rnd/production/protolathe/P = D
- if(!P.console_link)
- continue
- linked_lathe = D
- D.linked_console = src
- else if(istype(D, /obj/machinery/rnd/production/circuit_imprinter))
- if(linked_imprinter == null)
- var/obj/machinery/rnd/production/circuit_imprinter/C = D
- if(!C.console_link)
- continue
- linked_imprinter = D
- D.linked_console = src
-
/obj/machinery/computer/rdconsole/Initialize()
. = ..()
stored_research = SSresearch.science_tech
stored_research.consoles_accessing[src] = TRUE
- matching_design_ids = list()
- SyncRDevices()
/obj/machinery/computer/rdconsole/Destroy()
if(stored_research)
stored_research.consoles_accessing -= src
- if(linked_destroy)
- linked_destroy.linked_console = null
- linked_destroy = null
- if(linked_lathe)
- linked_lathe.linked_console = null
- linked_lathe = null
- if(linked_imprinter)
- linked_imprinter.linked_console = null
- linked_imprinter = null
if(t_disk)
t_disk.forceMove(get_turf(src))
t_disk = null
if(d_disk)
d_disk.forceMove(get_turf(src))
d_disk = null
- matching_design_ids = null
return ..()
/obj/machinery/computer/rdconsole/attackby(obj/item/D, mob/user, params)
@@ -141,8 +97,8 @@ Nothing else in the console has ID requirements.
to_chat(user, "
Machine cannot accept disks in that format.")
return
to_chat(user, "
You insert [D] into \the [src]!")
- else if(!(linked_destroy && linked_destroy.busy) && !(linked_lathe && linked_lathe.busy) && !(linked_imprinter && linked_imprinter.busy))
- . = ..()
+ return
+ return ..()
/obj/machinery/computer/rdconsole/proc/research_node(id, mob/user)
if(!stored_research.available_nodes[id] || stored_research.researched_nodes[id])
@@ -183,18 +139,6 @@ Nothing else in the console has ID requirements.
say("Not enough research points...")
return FALSE
-/obj/machinery/computer/rdconsole/on_deconstruction()
- if(linked_destroy)
- linked_destroy.linked_console = null
- linked_destroy = null
- if(linked_lathe)
- linked_lathe.linked_console = null
- linked_lathe = null
- if(linked_imprinter)
- linked_imprinter.linked_console = null
- linked_imprinter = null
- ..()
-
/obj/machinery/computer/rdconsole/emag_act(mob/user)
if(!(obj_flags & EMAGGED))
to_chat(user, "
You disable the security protocols[locked? " and unlock the console":""].")
@@ -203,12 +147,6 @@ Nothing else in the console has ID requirements.
locked = FALSE
return ..()
-/obj/machinery/computer/rdconsole/multitool_act(mob/user, obj/item/multitool/I)
- . = ..()
- var/lathe = linked_lathe && linked_lathe.multitool_act(user, I)
- var/print = linked_imprinter && linked_imprinter.multitool_act(user, I)
- return lathe || print || .
-
/obj/machinery/computer/rdconsole/proc/list_categories(list/categories, menu_num as num)
if(!categories)
return
@@ -246,12 +184,6 @@ Nothing else in the console has ID requirements.
l += "
Design Disk"
if(t_disk)
l += "
Tech Disk"
- if(linked_destroy)
- l += "
Destructive Analyzer"
- if(linked_lathe)
- l += "
Protolathe"
- if(linked_imprinter)
- l += "
Circuit Imprinter"
l += "
Settings"
return l
@@ -261,281 +193,9 @@ Nothing else in the console has ID requirements.
/obj/machinery/computer/rdconsole/proc/ui_settings()
var/list/l = list()
l += "
"
return l
-/obj/machinery/computer/rdconsole/proc/ui_device_linking()
- var/list/l = list()
- l += "
Settings Menu"
- l += "
R&D Console Device Linkage Menu:
"
- l += "
Re-sync with Nearby Devices"
- l += "
Linked Devices:
"
- l += linked_destroy? "* Destructive Analyzer
Disconnect" : "* No Destructive Analyzer Linked"
- l += linked_lathe? "* Protolathe
Disconnect" : "* No Protolathe Linked"
- l += linked_imprinter? "* Circuit Imprinter
Disconnect" : "* No Circuit Imprinter Linked"
- l += "
"
- return l
-
-/obj/machinery/computer/rdconsole/proc/ui_protolathe_header()
- var/list/l = list()
- l += "
"
- return l
-
-/obj/machinery/computer/rdconsole/proc/ui_protolathe_category_view() //Legacy code
- RDSCREEN_UI_LATHE_CHECK
- var/list/l = list()
- l += ui_protolathe_header()
- l += "
Browsing [selected_category]:
"
- for(var/v in stored_research.researched_designs)
- var/datum/design/D = SSresearch.techweb_design_by_id(v)
- if(!(selected_category in D.category)|| !(D.build_type & PROTOLATHE))
- continue
- if(!(isnull(linked_lathe.allowed_department_flags) || (D.departmental_flags & linked_lathe.allowed_department_flags)))
- continue
- var/temp_material
- var/c = 50
- var/coeff = linked_lathe.efficiency_coeff
- if(!linked_lathe.efficient_with(D.build_path))
- coeff = 1
-
- var/all_materials = D.materials + D.reagents_list
- for(var/M in all_materials)
- var/t = linked_lathe.check_mat(D, M)
- temp_material += " | "
- if (t < 1)
- temp_material += "
[all_materials[M]/coeff] [CallMaterialName(M)]"
- else
- temp_material += " [all_materials[M]/coeff] [CallMaterialName(M)]"
- c = min(c,t)
-
- if (c >= 1)
- l += "
[D.name][RDSCREEN_NOBREAK]"
- if(c >= 5)
- l += "
x5[RDSCREEN_NOBREAK]"
- if(c >= 10)
- l += "
x10[RDSCREEN_NOBREAK]"
- l += "[temp_material][RDSCREEN_NOBREAK]"
- else
- l += "
[D.name][temp_material][RDSCREEN_NOBREAK]"
- l += ""
- l += "
"
- return l
-
-/obj/machinery/computer/rdconsole/proc/ui_protolathe() //Legacy code
- RDSCREEN_UI_LATHE_CHECK
- var/list/l = list()
- l += ui_protolathe_header()
-
- l += "
"
-
- l += list_categories(linked_lathe.categories, RDSCREEN_PROTOLATHE_CATEGORY_VIEW)
-
- return l
-
-/obj/machinery/computer/rdconsole/proc/ui_protolathe_search() //Legacy code
- RDSCREEN_UI_LATHE_CHECK
- var/list/l = list()
- l += ui_protolathe_header()
- for(var/id in matching_design_ids)
- var/datum/design/D = SSresearch.techweb_design_by_id(id)
- if(!(isnull(linked_lathe.allowed_department_flags) || (D.departmental_flags & linked_lathe.allowed_department_flags)))
- continue
- var/temp_material
- var/c = 50
- var/all_materials = D.materials + D.reagents_list
- var/coeff = linked_lathe.efficiency_coeff
- if(!linked_lathe.efficient_with(D.build_path))
- coeff = 1
- for(var/M in all_materials)
- var/t = linked_lathe.check_mat(D, M)
- temp_material += " | "
- if (t < 1)
- temp_material += "
[all_materials[M]/coeff] [CallMaterialName(M)]"
- else
- temp_material += " [all_materials[M]/coeff] [CallMaterialName(M)]"
- c = min(c,t)
-
- if (c >= 1)
- l += "
[D.name][RDSCREEN_NOBREAK]"
- if(c >= 5)
- l += "
x5[RDSCREEN_NOBREAK]"
- if(c >= 10)
- l += "
x10[RDSCREEN_NOBREAK]"
- l += "[temp_material][RDSCREEN_NOBREAK]"
- else
- l += "
[D.name][temp_material][RDSCREEN_NOBREAK]"
- l += ""
- l += "
"
- return l
-
-/obj/machinery/computer/rdconsole/proc/ui_protolathe_materials() //Legacy code
- RDSCREEN_UI_LATHE_CHECK
- var/datum/component/material_container/mat_container = linked_lathe.materials.mat_container
- if (!mat_container)
- screen = RDSCREEN_PROTOLATHE
- return ui_protolathe()
- var/list/l = list()
- l += ui_protolathe_header()
- l += "
Material Storage:
"
- for(var/mat_id in mat_container.materials)
- var/datum/material/M = mat_id
- var/amount = mat_container.materials[mat_id]
- var/ref = REF(M)
- l += "* [amount] of [M.name]: "
- if(amount >= MINERAL_MATERIAL_AMOUNT) l += "
Eject [RDSCREEN_NOBREAK]"
- if(amount >= MINERAL_MATERIAL_AMOUNT*5) l += "
5x [RDSCREEN_NOBREAK]"
- if(amount >= MINERAL_MATERIAL_AMOUNT) l += "
All[RDSCREEN_NOBREAK]"
- l += ""
- l += "
[RDSCREEN_NOBREAK]"
- return l
-
-/obj/machinery/computer/rdconsole/proc/ui_protolathe_chemicals() //Legacy code
- RDSCREEN_UI_LATHE_CHECK
- var/list/l = list()
- l += ui_protolathe_header()
- l += "
"
- return l
-
-/obj/machinery/computer/rdconsole/proc/ui_circuit_header() //Legacy Code
- var/list/l = list()
- l += "
"
- return l
-
-/obj/machinery/computer/rdconsole/proc/ui_circuit() //Legacy code
- RDSCREEN_UI_IMPRINTER_CHECK
- var/list/l = list()
- l += ui_circuit_header()
- l += "
Circuit Imprinter Menu:
"
-
- l += "
"
-
- l += list_categories(linked_imprinter.categories, RDSCREEN_IMPRINTER_CATEGORY_VIEW)
- return l
-
-/obj/machinery/computer/rdconsole/proc/ui_circuit_category_view() //Legacy code
- RDSCREEN_UI_IMPRINTER_CHECK
- var/list/l = list()
- l += ui_circuit_header()
- l += "
Browsing [selected_category]:
"
-
- for(var/v in stored_research.researched_designs)
- var/datum/design/D = SSresearch.techweb_design_by_id(v)
- if(!(selected_category in D.category) || !(D.build_type & IMPRINTER))
- continue
- if(!(isnull(linked_imprinter.allowed_department_flags) || (D.departmental_flags & linked_imprinter.allowed_department_flags)))
- continue
- var/temp_materials
- var/check_materials = TRUE
-
- var/all_materials = D.materials + D.reagents_list
- var/coeff = linked_imprinter.efficiency_coeff
- if(!linked_imprinter.efficient_with(D.build_path))
- coeff = 1
-
- for(var/M in all_materials)
- temp_materials += " | "
- if (!linked_imprinter.check_mat(D, M))
- check_materials = FALSE
- temp_materials += "
[all_materials[M]/coeff] [CallMaterialName(M)]"
- else
- temp_materials += " [all_materials[M]/coeff] [CallMaterialName(M)]"
- if (check_materials)
- l += "
[D.name][temp_materials]"
- else
- l += "
[D.name][temp_materials]"
- l += "
"
- return l
-
-/obj/machinery/computer/rdconsole/proc/ui_circuit_search() //Legacy code
- RDSCREEN_UI_IMPRINTER_CHECK
- var/list/l = list()
- l += ui_circuit_header()
- l += "
Search results:
"
-
- for(var/id in matching_design_ids)
- var/datum/design/D = SSresearch.techweb_design_by_id(id)
- if(!(isnull(linked_imprinter.allowed_department_flags) || (D.departmental_flags & linked_imprinter.allowed_department_flags)))
- continue
- var/temp_materials
- var/check_materials = TRUE
- var/all_materials = D.materials + D.reagents_list
- var/coeff = linked_imprinter.efficiency_coeff
- if(!linked_imprinter.efficient_with(D.build_path))
- coeff = 1
- for(var/M in all_materials)
- temp_materials += " | "
- if (!linked_imprinter.check_mat(D, M))
- check_materials = FALSE
- temp_materials += "
[all_materials[M]/coeff] [CallMaterialName(M)]"
- else
- temp_materials += " [all_materials[M]/coeff] [CallMaterialName(M)]"
- if (check_materials)
- l += "
[D.name][temp_materials]"
- else
- l += "
[D.name][temp_materials]"
- l += "
"
- return l
-
-/obj/machinery/computer/rdconsole/proc/ui_circuit_chemicals() //legacy code
- RDSCREEN_UI_IMPRINTER_CHECK
- var/list/l = list()
- l += ui_circuit_header()
- l += "
Disposal All Chemicals in Storage"
- l += "
Chemical Storage:
"
- for(var/datum/reagent/R in linked_imprinter.reagents.reagent_list)
- l += "[R.name]: [R.volume]"
- l += "
Purge"
- return l
-
-/obj/machinery/computer/rdconsole/proc/ui_circuit_materials() //Legacy code!
- RDSCREEN_UI_IMPRINTER_CHECK
- var/datum/component/material_container/mat_container = linked_imprinter.materials.mat_container
- if (!mat_container)
- screen = RDSCREEN_IMPRINTER
- return ui_circuit()
- var/list/l = list()
- l += ui_circuit_header()
- l += "
Material Storage:"
- for(var/mat_id in mat_container.materials)
- var/datum/material/M = mat_id
- var/amount = mat_container.materials[mat_id]
- var/ref = REF(M)
- l += "* [amount] of [M.name]: "
- if(amount >= MINERAL_MATERIAL_AMOUNT) l += "
Eject [RDSCREEN_NOBREAK]"
- if(amount >= MINERAL_MATERIAL_AMOUNT*5) l += "
5x [RDSCREEN_NOBREAK]"
- if(amount >= MINERAL_MATERIAL_AMOUNT) l += "
All[RDSCREEN_NOBREAK]"
- l += ""
- l += "
[RDSCREEN_NOBREAK]"
- return l
-
/obj/machinery/computer/rdconsole/proc/ui_techdisk() //Legacy code
RDSCREEN_UI_TDISK_CHECK
var/list/l = list()
@@ -577,77 +237,6 @@ Nothing else in the console has ID requirements.
l += "
"
return l
-/obj/machinery/computer/rdconsole/proc/ui_deconstruct() //Legacy code
- RDSCREEN_UI_DECONSTRUCT_CHECK
- var/list/l = list()
- if(!linked_destroy.loaded_item)
- l += "
No item loaded. Standing-by...
"
- else
- l += "
[RDSCREEN_NOBREAK]"
- l += "
| [icon2html(linked_destroy.loaded_item, usr)] | [linked_destroy.loaded_item.name] Eject |
[RDSCREEN_NOBREAK]"
- l += "Select a node to boost by deconstructing this item. This item can boost:"
-
- var/anything = FALSE
- var/list/boostable_nodes = techweb_item_boost_check(linked_destroy.loaded_item)
- for(var/id in boostable_nodes)
- anything = TRUE
- var/list/worth = boostable_nodes[id]
- var/datum/techweb_node/N = SSresearch.techweb_node_by_id(id)
-
- l += "
[RDSCREEN_NOBREAK]"
- if (stored_research.researched_nodes[N.id]) // already researched
- l += "
[N.display_name]"
- l += "This node has already been researched."
- else if(!length(worth)) // reveal only
- if (stored_research.hidden_nodes[N.id])
- l += "
[N.display_name]"
- l += "This node will be revealed."
- else
- l += "
[N.display_name]"
- l += "This node has already been revealed."
- else // boost by the difference
- var/list/differences = list()
- var/list/already_boosted = stored_research.boosted_nodes[N.id]
- for(var/i in worth)
- var/already_boosted_amount = already_boosted? stored_research.boosted_nodes[N.id][i] : 0
- var/amt = min(worth[i], N.research_costs[i]) - already_boosted_amount
- if(amt > 0)
- differences[i] = amt
- if (length(differences))
- l += "
[N.display_name]"
- l += "This node will be boosted with the following:
[techweb_point_display_generic(differences)]"
- else
- l += "
[N.display_name]"
- l += "This node has already been boosted."
- l += "
[RDSCREEN_NOBREAK]"
-
- // point deconstruction and material reclamation use the same ID to prevent accidentally missing the points
- var/list/point_values = techweb_item_point_check(linked_destroy.loaded_item)
- if(point_values)
- anything = TRUE
- l += "
[RDSCREEN_NOBREAK]"
- if (stored_research.deconstructed_items[linked_destroy.loaded_item.type])
- l += "
Point Deconstruction"
- l += "This item's points have already been claimed."
- else
- l += "
Point Deconstruction"
- l += "This item is worth:
[techweb_point_display_generic(point_values)]!"
- l += "
[RDSCREEN_NOBREAK]"
-
- if(!(linked_destroy.loaded_item.resistance_flags & INDESTRUCTIBLE))
- var/list/materials = linked_destroy.loaded_item.custom_materials
- l += "
[RDSCREEN_NOBREAK]"
- anything = TRUE
-
- if (!anything)
- l += "Nothing!"
-
- l += "
"
- return l
-
/obj/machinery/computer/rdconsole/proc/ui_techweb()
var/list/l = list()
if(ui_mode != RDCONSOLE_UI_MODE_LIST)
@@ -770,12 +359,8 @@ Nothing else in the console has ID requirements.
var/lathes = list()
if(selected_design.build_type & IMPRINTER)
lathes += "
[machine_icon(/obj/machinery/rnd/production/circuit_imprinter)][RDSCREEN_NOBREAK]"
- if (linked_imprinter && stored_research.researched_designs[selected_design.id])
- l += "
Imprint"
if(selected_design.build_type & PROTOLATHE)
lathes += "
[machine_icon(/obj/machinery/rnd/production/protolathe)][RDSCREEN_NOBREAK]"
- if (linked_lathe && stored_research.researched_designs[selected_design.id])
- l += "
Construct"
if(selected_design.build_type & AUTOLATHE)
lathes += "
[machine_icon(/obj/machinery/autolathe)][RDSCREEN_NOBREAK]"
if(selected_design.build_type & MECHFAB)
@@ -821,32 +406,8 @@ Nothing else in the console has ID requirements.
ui += ui_designdisk_upload()
if(RDSCREEN_TECHDISK)
ui += ui_techdisk()
- if(RDSCREEN_DECONSTRUCT)
- ui += ui_deconstruct()
- if(RDSCREEN_PROTOLATHE)
- ui += ui_protolathe()
- if(RDSCREEN_PROTOLATHE_CATEGORY_VIEW)
- ui += ui_protolathe_category_view()
- if(RDSCREEN_PROTOLATHE_MATERIALS)
- ui += ui_protolathe_materials()
- if(RDSCREEN_PROTOLATHE_CHEMICALS)
- ui += ui_protolathe_chemicals()
- if(RDSCREEN_PROTOLATHE_SEARCH)
- ui += ui_protolathe_search()
- if(RDSCREEN_IMPRINTER)
- ui += ui_circuit()
- if(RDSCREEN_IMPRINTER_CATEGORY_VIEW)
- ui += ui_circuit_category_view()
- if(RDSCREEN_IMPRINTER_MATERIALS)
- ui += ui_circuit_materials()
- if(RDSCREEN_IMPRINTER_CHEMICALS)
- ui += ui_circuit_chemicals()
- if(RDSCREEN_IMPRINTER_SEARCH)
- ui += ui_circuit_search()
if(RDSCREEN_SETTINGS)
ui += ui_settings()
- if(RDSCREEN_DEVICE_LINKING)
- ui += ui_device_linking()
for(var/i in 1 to length(ui))
if(!findtextEx(ui[i], RDSCREEN_NOBREAK))
@@ -877,49 +438,10 @@ Nothing else in the console has ID requirements.
unlock_console(usr)
else
to_chat(usr, "
Unauthorized Access.")
- if(ls["find_device"])
- SyncRDevices()
- say("Resynced with nearby devices.")
if(ls["back_screen"])
back = text2num(ls["back_screen"])
- if(ls["build"]) //Causes the Protolathe to build something.
- if(QDELETED(linked_lathe))
- say("No Protolathe Linked!")
- return
- if(linked_lathe.busy)
- say("Warning: Protolathe busy!")
- else
- linked_lathe.user_try_print_id(ls["build"], ls["amount"])
- if(ls["imprint"])
- if(QDELETED(linked_imprinter))
- say("No Circuit Imprinter Linked!")
- return
- if(linked_imprinter.busy)
- say("Warning: Imprinter busy!")
- else
- linked_imprinter.user_try_print_id(ls["imprint"])
if(ls["category"])
selected_category = ls["category"]
- if(ls["disconnect"]) //The R&D console disconnects with a specific device.
- switch(ls["disconnect"])
- if("destroy")
- if(QDELETED(linked_destroy))
- say("No Destructive Analyzer Linked!")
- return
- linked_destroy.linked_console = null
- linked_destroy = null
- if("lathe")
- if(QDELETED(linked_lathe))
- say("No Protolathe Linked!")
- return
- linked_lathe.linked_console = null
- linked_lathe = null
- if("imprinter")
- if(QDELETED(linked_imprinter))
- say("No Circuit Imprinter Linked!")
- return
- linked_imprinter.linked_console = null
- linked_imprinter = null
if(ls["eject_design"]) //Eject the design disk.
eject_disk("design")
screen = RDSCREEN_MENU
@@ -928,52 +450,6 @@ Nothing else in the console has ID requirements.
eject_disk("tech")
screen = RDSCREEN_MENU
say("Ejecting Technology Disk")
- if(ls["deconstruct"])
- if(QDELETED(linked_destroy))
- say("No Destructive Analyzer Linked!")
- return
- if(!linked_destroy.user_try_decon_id(ls["deconstruct"], usr))
- say("Destructive analysis failed!")
- //Protolathe Materials
- if(ls["disposeP"]) //Causes the protolathe to dispose of a single reagent (all of it)
- if(QDELETED(linked_lathe))
- say("No Protolathe Linked!")
- return
- linked_lathe.reagents.del_reagent(ls["disposeP"])
- if(ls["disposeallP"]) //Causes the protolathe to dispose of all it's reagents.
- if(QDELETED(linked_lathe))
- say("No Protolathe Linked!")
- return
- linked_lathe.reagents.clear_reagents()
- if(ls["ejectsheet"]) //Causes the protolathe to eject a sheet of material
- if(QDELETED(linked_lathe))
- say("No Protolathe Linked!")
- return
- if(!linked_lathe.materials.mat_container)
- say("No material storage linked to protolathe!")
- return
- var/datum/material/M = locate(ls["ejectsheet"]) in linked_lathe.materials.mat_container.materials
- linked_lathe.eject_sheets(M, ls["eject_amt"])
- //Circuit Imprinter Materials
- if(ls["disposeI"]) //Causes the circuit imprinter to dispose of a single reagent (all of it)
- if(QDELETED(linked_imprinter))
- say("No Circuit Imprinter Linked!")
- return
- linked_imprinter.reagents.del_reagent(ls["disposeI"])
- if(ls["disposeallI"]) //Causes the circuit imprinter to dispose of all it's reagents.
- if(QDELETED(linked_imprinter))
- say("No Circuit Imprinter Linked!")
- return
- linked_imprinter.reagents.clear_reagents()
- if(ls["imprinter_ejectsheet"]) //Causes the imprinter to eject a sheet of material
- if(QDELETED(linked_imprinter))
- say("No Circuit Imprinter Linked!")
- return
- if(!linked_imprinter.materials.mat_container)
- say("No material storage linked to circuit imprinter!")
- return
- var/datum/material/M = locate(ls["imprinter_ejectsheet"]) in linked_imprinter.materials.mat_container.materials
- linked_imprinter.eject_sheets(M, ls["eject_amt"])
if(ls["disk_slot"])
disk_slot_selected = text2num(ls["disk_slot"])
if(ls["research_node"])
@@ -1009,14 +485,6 @@ Nothing else in the console has ID requirements.
var/datum/design/D = d_disk.blueprints[n]
say("Wiping design [D.name] from design disk.")
d_disk.blueprints[n] = null
- if(ls["search"]) //Search for designs with name matching pattern
- searchstring = ls["to_search"]
- searchtype = ls["type"]
- rescan_views()
- if(searchtype == "proto")
- screen = RDSCREEN_PROTOLATHE_SEARCH
- else
- screen = RDSCREEN_IMPRINTER_SEARCH
if(ls["updt_tech"]) //Uple the research holder with information from the technology disk.
if(QDELETED(t_disk))
say("No Technology Disk Inserted!")
@@ -1045,15 +513,6 @@ Nothing else in the console has ID requirements.
D.category |= "Imported"
d_disk.blueprints[slot] = D
screen = RDSCREEN_DESIGNDISK
- if(ls["eject_item"]) //Eject the item inside the destructive analyzer.
- if(QDELETED(linked_destroy))
- say("No Destructive Analyzer Linked!")
- return
- if(linked_destroy.busy)
- to_chat(usr, "
The destructive analyzer is busy at the moment.")
- else if(linked_destroy.loaded_item)
- linked_destroy.unload_item()
- screen = RDSCREEN_MENU
if(ls["view_node"])
selected_node_id = ls["view_node"]
screen = RDSCREEN_TECHWEB_NODEVIEW
@@ -1097,59 +556,8 @@ Nothing else in the console has ID requirements.
t_disk.forceMove(get_turf(src))
t_disk = null
-/obj/machinery/computer/rdconsole/proc/rescan_views()
- var/compare
- matching_design_ids.Cut()
- if(searchtype == "proto")
- compare = PROTOLATHE
- else if(searchtype == "imprint")
- compare = IMPRINTER
- for(var/v in stored_research.researched_designs)
- var/datum/design/D = SSresearch.techweb_design_by_id(v)
- if(!(D.build_type & compare))
- continue
- if(findtext(D.name,searchstring))
- matching_design_ids.Add(D.id)
-
-/obj/machinery/computer/rdconsole/proc/check_canprint(datum/design/D, buildtype)
- var/amount = 50
- if(buildtype == IMPRINTER)
- if(QDELETED(linked_imprinter))
- return FALSE
- for(var/M in D.materials + D.reagents_list)
- amount = min(amount, linked_imprinter.check_mat(D, M))
- if(amount < 1)
- return FALSE
- else if(buildtype == PROTOLATHE)
- if(QDELETED(linked_lathe))
- return FALSE
- for(var/M in D.materials + D.reagents_list)
- amount = min(amount, linked_lathe.check_mat(D, M))
- if(amount < 1)
- return FALSE
- else
- return FALSE
- return amount
-
/obj/machinery/computer/rdconsole/proc/lock_console(mob/user)
locked = TRUE
/obj/machinery/computer/rdconsole/proc/unlock_console(mob/user)
locked = FALSE
-
-/obj/machinery/computer/rdconsole/robotics
- name = "Robotics R&D Console"
- req_access = null
- req_access_txt = "29"
-
-/obj/machinery/computer/rdconsole/robotics/Initialize()
- . = ..()
- if(circuit)
- circuit.name = "R&D Console - Robotics (Computer Board)"
- circuit.build_path = /obj/machinery/computer/rdconsole/robotics
-
-/obj/machinery/computer/rdconsole/core
- name = "Core R&D Console"
-
-/obj/machinery/computer/rdconsole/experiment
- name = "E.X.P.E.R.I-MENTOR R&D Console"
diff --git a/code/modules/research/rdmachines.dm b/code/modules/research/rdmachines.dm
index 113d40b03f0..c8e4eb942b1 100644
--- a/code/modules/research/rdmachines.dm
+++ b/code/modules/research/rdmachines.dm
@@ -10,19 +10,21 @@
var/busy = FALSE
var/hacked = FALSE
var/console_link = TRUE //allow console link.
- var/requires_console = TRUE
var/disabled = FALSE
- var/obj/machinery/computer/rdconsole/linked_console
var/obj/item/loaded_item = null //the item loaded inside the machine (currently only used by experimentor and destructive analyzer)
+ /// Ref to global science techweb.
+ var/datum/techweb/stored_research
/obj/machinery/rnd/proc/reset_busy()
busy = FALSE
/obj/machinery/rnd/Initialize()
. = ..()
+ stored_research = SSresearch.science_tech
wires = new /datum/wires/rnd(src)
/obj/machinery/rnd/Destroy()
+ stored_research = null
QDEL_NULL(wires)
return ..()
@@ -39,8 +41,6 @@
/obj/machinery/rnd/attackby(obj/item/O, mob/user, params)
if (default_deconstruction_screwdriver(user, "[initial(icon_state)]_t", initial(icon_state), O))
- if(linked_console)
- disconnect_console()
return
if(default_deconstruction_crowbar(O))
return
@@ -54,10 +54,6 @@
else
return ..()
-//to disconnect the machine from the r&d console it's linked to
-/obj/machinery/rnd/proc/disconnect_console()
- linked_console = null
-
//proc used to handle inserting items or reagents into rnd machines
/obj/machinery/rnd/proc/Insert_Item(obj/item/I, mob/user)
return
@@ -70,9 +66,6 @@
if(disabled)
to_chat(user, "
The insertion belts of [src] won't engage!")
return FALSE
- if(requires_console && !linked_console)
- to_chat(user, "
[src] must be linked to an R&D console first!")
- return FALSE
if(busy)
to_chat(user, "
[src] is busy right now.")
return FALSE
diff --git a/code/modules/research/server.dm b/code/modules/research/server.dm
index e6b71d7658f..d98fb0333d5 100644
--- a/code/modules/research/server.dm
+++ b/code/modules/research/server.dm
@@ -3,7 +3,6 @@
desc = "A computer system running a deep neural network that processes arbitrary information to produce data useable in the development of new technologies. In layman's terms, it makes research points."
icon = 'icons/obj/machines/research.dmi'
icon_state = "RD-server-on"
- var/datum/techweb/stored_research
var/heat_health = 100
//Code for point mining here.
var/working = TRUE //temperature should break it.
@@ -23,7 +22,6 @@
. = ..()
name += " [num2hex(rand(1,65535), -1)]" //gives us a random four-digit hex number as part of the name. Y'know, for fluff.
SSresearch.servers |= src
- stored_research = SSresearch.science_tech
var/obj/item/circuitboard/machine/B = new /obj/item/circuitboard/machine/rdserver(null)
B.apply_default_parts(src)
current_temp = get_env_temp()
diff --git a/code/modules/research/techweb/_techweb.dm b/code/modules/research/techweb/_techweb.dm
index 765da01887b..13210982656 100644
--- a/code/modules/research/techweb/_techweb.dm
+++ b/code/modules/research/techweb/_techweb.dm
@@ -87,7 +87,6 @@
CHECK_TICK
for(var/v in consoles_accessing)
var/obj/machinery/computer/rdconsole/V = v
- V.rescan_views()
V.updateUsrDialog()
/datum/techweb/proc/add_point_list(list/pointlist)
@@ -309,7 +308,6 @@
if(autoupdate_consoles)
for(var/v in consoles_accessing)
var/obj/machinery/computer/rdconsole/V = v
- V.rescan_views()
V.updateUsrDialog()
//Laggy procs to do specific checks, just in case. Don't use them if you can just use the vars that already store all this!
diff --git a/code/modules/vehicles/mecha/mech_fabricator.dm b/code/modules/vehicles/mecha/mech_fabricator.dm
index 1de7c6fedcc..9689dc2e6fc 100644
--- a/code/modules/vehicles/mecha/mech_fabricator.dm
+++ b/code/modules/vehicles/mecha/mech_fabricator.dm
@@ -34,8 +34,8 @@
/// Coefficient for the efficiency of material usage in item building. Based on the installed parts.
var/component_coeff = 1
- /// Copy of the currently synced techweb.
- var/datum/techweb/specialized/autounlocking/exofab/stored_research
+ /// Reference to the techweb.
+ var/datum/techweb/stored_research
/// Whether the Exofab links to the ore silo on init. Special derelict or maintanance variants should set this to FALSE.
var/link_on_init = TRUE
@@ -63,7 +63,7 @@
)
/obj/machinery/mecha_part_fabricator/Initialize(mapload)
- stored_research = new
+ stored_research = SSresearch.science_tech
rmat = AddComponent(/datum/component/remote_materials, "mechfab", mapload && link_on_init)
RefreshParts() //Recalculating local material sizes if the fab isn't linked
return ..()
@@ -419,21 +419,6 @@
queued_parts += list(part)
return queued_parts
-/**
- * Syncs machine with R&D servers.
- *
- * Requires an R&D Console visible within 7 tiles. Copies techweb research. Updates tgui's state data.
- */
-/obj/machinery/mecha_part_fabricator/proc/sync()
- for(var/obj/machinery/computer/rdconsole/RDC in orange(7,src))
- RDC.stored_research.copy_research_to(stored_research)
- update_static_data(usr)
- say("Successfully synchronized with R&D server.")
- return
-
- say("Unable to connect to local R&D server.")
- return
-
/**
* Calculates the coefficient-modified resource cost of a single material component of a design's recipe.
*
@@ -537,8 +522,9 @@
switch(action)
if("sync_rnd")
- // Sync with R&D Servers
- sync()
+ // Syncronises designs on interface with R&D techweb.
+ update_static_data(usr)
+ say("Successfully synchronized with R&D server.")
return
if("add_queue_set")
// Add all parts of a set to queue