From a82d0e13cea8710586400a9babaee9de4d2e2688 Mon Sep 17 00:00:00 2001 From: kevinz000 <2003111+kevinz000@users.noreply.github.com> Date: Fri, 22 Dec 2017 00:02:48 -0800 Subject: [PATCH] Fixes RND --- code/__DEFINES/misc.dm | 10 +- code/__DEFINES/research.dm | 6 + code/modules/research/circuitprinter.dm | 14 +- .../departmental_circuit_imprinter.dm | 3 +- code/modules/research/departmental_lathe.dm | 3 +- code/modules/research/designs.dm | 38 ++ .../research/designs/AI_module_designs.dm | 4 +- .../research/designs/autolathe_designs.dm | 8 - code/modules/research/destructive_analyzer.dm | 24 +- code/modules/research/protolathe.dm | 16 +- code/modules/research/rdconsole.dm | 292 ++++++++----- code/modules/research/rdmachines.dm | 29 +- code/modules/research/stock_parts.dm | 1 - .../research/techweb/__techweb_helpers.dm | 7 +- code/modules/research/techweb/_techweb.dm | 34 +- .../modules/research/techweb/_techweb_node.dm | 6 +- code/modules/research/techweb/all_nodes.dm | 411 +++++++++--------- .../research/xenobiology/xenobiology.dm | 2 +- html/browser/techwebs.css | 20 + tgstation.dme | 2 +- 20 files changed, 556 insertions(+), 374 deletions(-) create mode 100644 html/browser/techwebs.css diff --git a/code/__DEFINES/misc.dm b/code/__DEFINES/misc.dm index b5d07646d7..d112222816 100644 --- a/code/__DEFINES/misc.dm +++ b/code/__DEFINES/misc.dm @@ -334,9 +334,9 @@ GLOBAL_LIST_INIT(ghost_others_options, list(GHOST_OTHERS_SIMPLE, GHOST_OTHERS_DE #endif #endif - // Consider these images/atoms as part of the UI/HUD +// Consider these images/atoms as part of the UI/HUD #define APPEARANCE_UI_IGNORE_ALPHA RESET_COLOR|RESET_TRANSFORM|NO_CLIENT_COLOR|RESET_ALPHA|PIXEL_SCALE -#define APPEARANCE_UI RESET_COLOR|RESET_TRANSFORM|NO_CLIENT_COLOR +#define APPEARANCE_UI RESET_COLOR|RESET_TRANSFORM|NO_CLIENT_COLOR|PIXEL_SCALE //Just space #define SPACE_ICON_STATE "[((x + y) ^ ~(x * y) + z) % 25]" @@ -444,6 +444,7 @@ GLOBAL_LIST_INIT(ghost_others_options, list(GHOST_OTHERS_SIMPLE, GHOST_OTHERS_DE #define GIBTONITE_ACTIVE 1 #define GIBTONITE_STABLE 2 #define GIBTONITE_DETONATE 3 + //for obj explosion block calculation #define EXPLOSION_BLOCK_PROC -1 @@ -452,8 +453,6 @@ GLOBAL_LIST_INIT(ghost_others_options, list(GHOST_OTHERS_SIMPLE, GHOST_OTHERS_DE #define BEAT_SLOW 2 #define BEAT_NONE 0 -#define BEAT_CHANNEL 150 - //http://www.byond.com/docs/ref/info.html#/atom/var/mouse_opacity #define MOUSE_OPACITY_TRANSPARENT 0 #define MOUSE_OPACITY_ICON 1 @@ -484,9 +483,6 @@ GLOBAL_LIST_INIT(ghost_others_options, list(GHOST_OTHERS_SIMPLE, GHOST_OTHERS_DE #define SYRINGE_DRAW 0 #define SYRINGE_INJECT 1 -#define RESEARCH_MATERIAL_RECLAMATION_ID "0" - - //gold slime core spawning #define NO_SPAWN 0 #define HOSTILE_SPAWN 1 diff --git a/code/__DEFINES/research.dm b/code/__DEFINES/research.dm index 14e6798528..bb2e232886 100644 --- a/code/__DEFINES/research.dm +++ b/code/__DEFINES/research.dm @@ -1,4 +1,8 @@ +#define RDCONSOLE_UI_MODE_NORMAL 1 +#define RDCONSOLE_UI_MODE_EXPERT 2 +#define RDCONSOLE_UI_MODE_LIST 3 + //RDSCREEN screens #define RDSCREEN_MENU 0 #define RDSCREEN_TECHDISK 1 @@ -59,3 +63,5 @@ //#define DEPARTMENTAL_FLAG_MINING 128 #define DESIGN_ID_IGNORE "IGNORE_THIS_DESIGN" + +#define RESEARCH_MATERIAL_RECLAMATION_ID "__materials" diff --git a/code/modules/research/circuitprinter.dm b/code/modules/research/circuitprinter.dm index 26fa304209..207b610a8c 100644 --- a/code/modules/research/circuitprinter.dm +++ b/code/modules/research/circuitprinter.dm @@ -12,8 +12,6 @@ using metal and glass, it uses glass and reagents (usually sulfuric acis). circuit = /obj/item/circuitboard/machine/circuit_imprinter var/efficiency_coeff - var/console_link = TRUE //can this link to a console? - var/requires_console = TRUE var/datum/component/material_container/materials //Store for hyper speed! @@ -32,11 +30,11 @@ using metal and glass, it uses glass and reagents (usually sulfuric acis). ) /obj/machinery/rnd/circuit_imprinter/Initialize() - var/datum/component/material_container/materials materials = AddComponent(/datum/component/material_container, list(MAT_GLASS, MAT_GOLD, MAT_DIAMOND, MAT_METAL, MAT_BLUESPACE), 0, FALSE, list(/obj/item/stack, /obj/item/ore/bluespace_crystal), CALLBACK(src, .proc/is_insertion_ready), CALLBACK(src, .proc/AfterMaterialInsert)) materials.precise_insertion = TRUE create_reagents(0) + RefreshParts() return ..() /obj/machinery/rnd/circuit_imprinter/RefreshParts() @@ -119,11 +117,9 @@ using metal and glass, it uses glass and reagents (usually sulfuric acis). return TRUE /obj/machinery/rnd/circuit_imprinter/proc/do_print(path, list/matlist, notify_admins) - if(notify_admins) - if(usr) - usr.investigate_log("built [path] at a circuit imprinter.", INVESTIGATE_RESEARCH) - var/turf/T = get_turf(usr) - message_admins("[key_name(usr)][ADMIN_JMP(T)] has built [path] at a circuit imprinter at [COORD(usr)]") + if(notify_admins && usr) + investigate_log("[key_name(usr)] built [path] at a circuit imprinter.", INVESTIGATE_RESEARCH) + message_admins("[ADMIN_LOOKUPFLW(usr)] has built [path] at a circuit imprinter.") var/obj/item/I = new path(get_turf(src)) I.materials = matlist.Copy() - SSblackbox.record_feedback("nested_tally", "circuit_printed", 1, list("[type]", "[path]")) + SSblackbox.record_feedback("nested tally", "circuit_printed", 1, list("[type]", "[path]")) diff --git a/code/modules/research/departmental_circuit_imprinter.dm b/code/modules/research/departmental_circuit_imprinter.dm index 7b06aaa839..06e7c531b8 100644 --- a/code/modules/research/departmental_circuit_imprinter.dm +++ b/code/modules/research/departmental_circuit_imprinter.dm @@ -143,8 +143,7 @@ /obj/machinery/rnd/circuit_imprinter/department/proc/ui_header() var/list/l = list() - l += "

Nanotrasen Department Circuit Imprinter: [department_tag]

[RDSCREEN_NOBREAK]" - l += "
Connected Technology database: [host_research == SSresearch.science_tech? "Nanotrasen" : "Third Party"]" + l += "
[host_research.organization] [department_tag] Department Circuit Imprinter" l += "Security protocols: [emagged? "Disabled" : "Enabled"]" l += "Material Amount: [materials.total_amount] / [materials.max_amount]" l += "Chemical volume: [reagents.total_volume] / [reagents.maximum_volume]" diff --git a/code/modules/research/departmental_lathe.dm b/code/modules/research/departmental_lathe.dm index 4e8d33a3a3..dc3c8ad66f 100644 --- a/code/modules/research/departmental_lathe.dm +++ b/code/modules/research/departmental_lathe.dm @@ -186,8 +186,7 @@ /obj/machinery/rnd/protolathe/department/proc/ui_header() var/list/l = list() - l += "

Nanotrasen Department Lathe: [department_tag]

[RDSCREEN_NOBREAK]" - l += "
Connected Technology database: [host_research == SSresearch.science_tech? "Nanotrasen" : "Third Party"]" + l += "
[host_research.organization] [department_tag] Department Lathe" l += "Security protocols: [emagged? "Disabled" : "Enabled"]" l += "Material Amount: [materials.total_amount] / [materials.max_amount]" l += "Chemical volume: [reagents.total_volume] / [reagents.maximum_volume]" diff --git a/code/modules/research/designs.dm b/code/modules/research/designs.dm index e16aadb7cd..0af1650d42 100644 --- a/code/modules/research/designs.dm +++ b/code/modules/research/designs.dm @@ -43,11 +43,49 @@ other types of metals and chemistry for reagents). var/lathe_time_factor = 1 //How many times faster than normal is this to build on the protolathe var/dangerous_construction = FALSE //notify and log for admin investigations if this is printed. var/departmental_flags = ALL //bitflags for deplathes. + var/list/datum/techweb_node/unlocked_by = list() + var/icon_cache /datum/design/Destroy() CRASH("DESIGN DATUMS SHOULD NOT EVER BE DESTROYED AS THEY ARE ONLY MEANT TO BE IN A GLOBAL LIST AND REFERENCED FOR US.") return ..() +/datum/design/proc/icon_html(client/user) + if (!icon_cache) + // construct the icon and slap it into the resource cache + var/atom/item = build_path + if (!ispath(item, /atom)) + // biogenerator outputs to beakers by default + if (build_type & BIOGENERATOR) + item = /obj/item/reagent_containers/glass/beaker/large + else + return // shouldn't happen, but just in case + + // circuit boards become their resulting machines or computers + if (ispath(item, /obj/item/circuitboard)) + var/obj/item/circuitboard/C = item + var/machine = initial(C.build_path) + if (machine) + item = machine + var/icon_file = initial(item.icon) + var/icon/I = icon(icon_file, initial(item.icon_state), SOUTH) + + // computers (and snowflakes) get their screen and keyboard sprites + if (ispath(item, /obj/machinery/computer) || ispath(item, /obj/machinery/power/solar_control)) + var/obj/machinery/computer/C = item + var/screen = initial(C.icon_screen) + var/keyboard = initial(C.icon_keyboard) + if (screen) + I.Blend(icon(icon_file, screen, SOUTH), ICON_OVERLAY) + if (keyboard) + I.Blend(icon(icon_file, keyboard, SOUTH), ICON_OVERLAY) + + // based on icon2html + icon_cache = "[generate_asset_name(I)].png" + register_asset(icon_cache, I) + send_asset(user, icon_cache, FALSE) + return "" + //////////////////////////////////////// //Disks for transporting design datums// //////////////////////////////////////// diff --git a/code/modules/research/designs/AI_module_designs.dm b/code/modules/research/designs/AI_module_designs.dm index 13ddd2582f..eb92bb3737 100644 --- a/code/modules/research/designs/AI_module_designs.dm +++ b/code/modules/research/designs/AI_module_designs.dm @@ -20,8 +20,8 @@ departmental_flags = DEPARTMENTAL_FLAG_SCIENCE /datum/design/board/onehuman_module - name = "Module Design (OneCrew)" - desc = "Allows for the construction of a OneCrew AI Module." + name = "Module Design (OneHuman)" + desc = "Allows for the construction of a OneHuman AI Module." id = "onehuman_module" materials = list(MAT_GLASS = 1000, MAT_DIAMOND = 100) build_path = /obj/item/aiModule/zeroth/oneHuman diff --git a/code/modules/research/designs/autolathe_designs.dm b/code/modules/research/designs/autolathe_designs.dm index ff2ccc938f..8542660343 100644 --- a/code/modules/research/designs/autolathe_designs.dm +++ b/code/modules/research/designs/autolathe_designs.dm @@ -600,14 +600,6 @@ build_path = /obj/item/device/electropack category = list("hacked", "Tools") -/datum/design/shock_collar - name = "Shock Collar" - id = "shock_collar" - build_type = AUTOLATHE - materials = list(MAT_METAL = 5000, MAT_GLASS = 2000) - build_path = /obj/item/device/electropack/shockcollar - category = list("hacked", "Security") - /datum/design/large_welding_tool name = "Industrial Welding Tool" id = "large_welding_tool" diff --git a/code/modules/research/destructive_analyzer.dm b/code/modules/research/destructive_analyzer.dm index e3caef247c..05acb20f0e 100644 --- a/code/modules/research/destructive_analyzer.dm +++ b/code/modules/research/destructive_analyzer.dm @@ -44,6 +44,8 @@ Note: Must be placed within 3 tiles of the R&D Console to_chat(user, "You add the [O.name] to the [src.name]!") flick("d_analyzer_la", src) addtimer(CALLBACK(src, .proc/finish_loading), 10) + if (linked_console) + linked_console.updateUsrDialog() /obj/machinery/rnd/destructive_analyzer/proc/finish_loading() update_icon() @@ -93,30 +95,35 @@ Note: Must be placed within 3 tiles of the R&D Console /obj/machinery/rnd/destructive_analyzer/proc/user_try_decon_id(id, mob/user) if(!istype(loaded_item) || !istype(linked_console)) return FALSE - if(id && !(id == RESEARCH_MATERIAL_RECLAMATION_ID)) + + if (id && id != RESEARCH_MATERIAL_RECLAMATION_ID) var/datum/techweb_node/TN = get_techweb_node_by_id(id) if(!istype(TN)) return FALSE - var/list/pos1 = techweb_item_boost_check(loaded_item) - if(isnull(pos1[id])) + var/list/can_boost = techweb_item_boost_check(loaded_item) + if(isnull(can_boost[id])) return FALSE var/dpath = loaded_item.type - if(isnull(TN.boost_item_paths[dpath])) + var/worth = TN.boost_item_paths[dpath] + if(isnull(worth)) return FALSE - var/dboost = TN.boost_item_paths[dpath] - var/choice = input("Are you sure you want to destroy [loaded_item.name] for a boost of [dboost? 0 : dboost] in node [TN.display_name]") in list("Proceed", "Cancel") + var/difference = min(worth, TN.research_cost) - linked_console.stored_research.boosted_nodes[TN.id] + if(worth && difference <= 0) + return FALSE + var/choice = input("Are you sure you want to destroy [loaded_item] to [!worth ? "reveal [TN.display_name]" : "boost [TN.display_name] by [difference] point\s"]?") in list("Proceed", "Cancel") if(choice == "Cancel") return FALSE if(QDELETED(loaded_item) || QDELETED(linked_console) || !user.Adjacent(linked_console) || QDELETED(src)) return FALSE - SSblackbox.record_feedback("nested_tally", "item_deconstructed", 1, list("[TN.id]", "[loaded_item.type]")) + SSblackbox.record_feedback("nested tally", "item_deconstructed", 1, list("[TN.id]", "[loaded_item.type]")) if(destroy_item(loaded_item)) linked_console.stored_research.boost_with_path(SSresearch.techweb_nodes[TN.id], dpath) + else var/point_value = techweb_item_point_check(loaded_item) if(linked_console.stored_research.deconstructed_items[loaded_item.type]) point_value = 0 - var/choice = input("Are you sure you want to destroy [loaded_item.name] for [point_value? "[point_value] points" : "material reclaimation"]?") in list("Proceed", "Cancel") + var/choice = input("Are you sure you want to destroy [loaded_item] for [point_value ? "[point_value] research points" : "material reclamation"]?") in list("Proceed", "Cancel") if(choice == "Cancel") return FALSE if(QDELETED(loaded_item) || QDELETED(linked_console) || !user.Adjacent(linked_console) || QDELETED(src)) @@ -133,4 +140,5 @@ Note: Must be placed within 3 tiles of the R&D Console return FALSE loaded_item.forceMove(get_turf(src)) loaded_item = null + update_icon() return TRUE diff --git a/code/modules/research/protolathe.dm b/code/modules/research/protolathe.dm index cbd0fa9f27..1dc32e6dde 100644 --- a/code/modules/research/protolathe.dm +++ b/code/modules/research/protolathe.dm @@ -15,8 +15,6 @@ Note: Must be placed west/left of and R&D console to function. circuit = /obj/item/circuitboard/machine/protolathe var/efficiency_coeff - var/console_link = TRUE //allow console link. - var/requires_console = TRUE var/list/categories = list( "Power Designs", "Medical Designs", @@ -31,7 +29,7 @@ Note: Must be placed west/left of and R&D console to function. "Computer Parts" ) - var/datum/component/material_container/materials + var/datum/component/material_container/materials //Store for hyper speed! /obj/machinery/rnd/protolathe/Initialize() create_reagents(0) @@ -39,6 +37,7 @@ Note: Must be placed west/left of and R&D console to function. list(MAT_METAL, MAT_GLASS, MAT_SILVER, MAT_GOLD, MAT_DIAMOND, MAT_PLASMA, MAT_URANIUM, MAT_BANANIUM, MAT_TITANIUM, MAT_BLUESPACE), 0, FALSE, list(/obj/item/stack, /obj/item/ore/bluespace_crystal), CALLBACK(src, .proc/is_insertion_ready), CALLBACK(src, .proc/AfterMaterialInsert)) materials.precise_insertion = TRUE + RefreshParts() return ..() /obj/machinery/rnd/protolathe/RefreshParts() @@ -75,6 +74,7 @@ Note: Must be placed west/left of and R&D console to function. materials.retrieve_all() ..() + /obj/machinery/rnd/protolathe/disconnect_console() linked_console.linked_lathe = null ..() @@ -124,13 +124,11 @@ Note: Must be placed west/left of and R&D console to function. return TRUE /obj/machinery/rnd/protolathe/proc/do_print(path, amount, list/matlist, notify_admins) - if(notify_admins) - if(usr) - usr.investigate_log("built [amount] of [path] at a protolathe.", INVESTIGATE_RESEARCH) - var/turf/T = get_turf(usr) - message_admins("[key_name(usr)][ADMIN_JMP(T)] has built [amount] of [path] at a protolathe at [COORD(usr)]") + if(notify_admins && usr) + investigate_log("[key_name(usr)] built [amount] of [path] at a protolathe.", INVESTIGATE_RESEARCH) + message_admins("[ADMIN_LOOKUPFLW(usr)] has built [amount] of [path] at a protolathe") for(var/i in 1 to amount) var/obj/item/I = new path(get_turf(src)) if(!istype(I, /obj/item/stack/sheet) && !istype(I, /obj/item/ore/bluespace_crystal)) I.materials = matlist.Copy() - SSblackbox.record_feedback("nested_tally", "item_printed", amount, list("[type]", "[path]")) \ No newline at end of file + SSblackbox.record_feedback("nested tally", "item_printed", amount, list("[type]", "[path]")) diff --git a/code/modules/research/rdconsole.dm b/code/modules/research/rdconsole.dm index 0c468b184a..0b9453a62d 100644 --- a/code/modules/research/rdconsole.dm +++ b/code/modules/research/rdconsole.dm @@ -45,6 +45,7 @@ doesn't have toxins access. var/disk_slot_selected var/searchstring = "" var/searchtype = "" + var/ui_mode = RDCONSOLE_UI_MODE_NORMAL var/research_control = TRUE @@ -216,13 +217,11 @@ doesn't have toxins access. /obj/machinery/computer/rdconsole/proc/ui_header() var/list/l = list() - l += "

Nanotrasen Research and Development

[RDSCREEN_NOBREAK]" - l += "
Connected Technology database: [stored_research == SSresearch.science_tech? "Nanotrasen" : "Third Party"]" - l += "Available Points: [stored_research.research_points]" + l += "
[stored_research.organization] Research and Development Network" + l += "Available points: [round(stored_research.research_points)] (+[round(stored_research.last_bitcoins * 60)] / minute)" l += "Security protocols: [emagged? "Disabled" : "Enabled"]" - l += "Design Disk: [d_disk? "Loaded" : "Not Loaded"] | \ - Technology Disk: [t_disk? "Loaded" : "Not Loaded"]" l += "Main Menu | Back
[RDSCREEN_NOBREAK]" + l += "[ui_mode == 1? "Normal View" : "Normal View"] | [ui_mode == 2? "Expert View" : "Expert View"] | [ui_mode == 3? "List View" : "List View"]" return l /obj/machinery/computer/rdconsole/proc/ui_main_menu() @@ -234,7 +233,7 @@ doesn't have toxins access. if(t_disk) l += "
Tech Disk" if(linked_destroy) - l += "
Deconstructive Analyzer" + l += "
Destructive Analyzer" if(linked_lathe) l += "
Protolathe" if(linked_imprinter) @@ -540,122 +539,214 @@ doesn't have toxins access. RDSCREEN_UI_DECONSTRUCT_CHECK var/list/l = list() if(!linked_destroy.loaded_item) - l += "
No Item Loaded. Standing-by...
" + l += "
No item loaded. Standing-by...
" else - l += "

Deconstruction Menu

" - l += "Eject Item" - l += "Name: [linked_destroy.loaded_item.name]" - l += "Select a node to boost by deconstructing this item." - l += "This item is able to boost:" - var/list/listin = techweb_item_boost_check(linked_destroy.loaded_item) - for(var/node_id in listin) - var/datum/techweb_node/N = get_techweb_node_by_id(node_id) - var/worth = listin[N.id] - if(!stored_research.researched_nodes[N.id] && !stored_research.boosted_nodes[N.id]) - l += "[N.display_name]: [worth] points" - 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/worth = boostable_nodes[id] + var/datum/techweb_node/N = get_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 (worth == 0) // 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/difference = min(worth, N.research_cost) - stored_research.boosted_nodes[N.id] + if (difference > 0) + l += "[N.display_name]" + l += "This node will be boosted by [difference] points." + 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/point_value = techweb_item_point_check(linked_destroy.loaded_item) - if(point_value && isnull(stored_research.deconstructed_items[linked_destroy.loaded_item.type])) - l += "Generic Point Deconstruction - [point_value] points" - l += "Material Reclaimation Deconstruction" + if(point_value) + anything = TRUE + l += "
[RDSCREEN_NOBREAK]" + if (stored_research.deconstructed_items[linked_destroy.loaded_item.type]) + l += "Point Deconstruction" + l += "This item's [point_value] point\s have already been claimed." + else + l += "Point Deconstruction" + l += "This item is worth [point_value] point\s!" + l += "
[RDSCREEN_NOBREAK]" + + var/list/materials = linked_destroy.loaded_item.materials + if (materials.len) + l += "
Material Reclamation" + for (var/M in materials) + l += "* [CallMaterialName(M)] x [materials[M]]" + l += "
[RDSCREEN_NOBREAK]" + anything = TRUE + + if (!anything) + l += "Nothing!" + l += "
" return l -/obj/machinery/computer/rdconsole/proc/ui_techweb() //Legacy code. +/obj/machinery/computer/rdconsole/proc/ui_techweb() var/list/l = list() - var/list/avail = list() //This could probably be optimized a bit later. - var/list/unavail = list() - var/list/res = list() - for(var/v in stored_research.researched_nodes) - res += stored_research.researched_nodes[v] - for(var/v in stored_research.available_nodes) - if(stored_research.researched_nodes[v]) - continue - avail += stored_research.available_nodes[v] - for(var/v in stored_research.visible_nodes) - if(stored_research.available_nodes[v]) - continue - unavail += stored_research.visible_nodes[v] - l += "

Technology Nodes:

[RDSCREEN_NOBREAK]" - l += "

Available for Research:

" - for(var/datum/techweb_node/N in avail) - var/not_unlocked = (stored_research.available_nodes[N.id] && !stored_research.researched_nodes[N.id]) - var/has_points = (stored_research.research_points >= N.get_price(stored_research)) - var/research_href = not_unlocked? (has_points? "Research" : "Not Enough Points") : null - l += "[N.display_name][research_href]" - l += "

Locked Nodes:

" - for(var/datum/techweb_node/N in unavail) - l += "[N.display_name]" - l += "

Researched Nodes:

" - for(var/datum/techweb_node/N in res) - l += "[N.display_name]" + if(ui_mode != RDCONSOLE_UI_MODE_LIST) + var/list/columns = list() + var/max_tier = 0 + for (var/node_ in stored_research.tiers) + var/datum/techweb_node/node = node_ + var/tier = stored_research.tiers[node] + LAZYINITLIST(columns["[tier]"]) // String hackery to make the numbers associative + columns["[tier]"] += ui_techweb_single_node(node, minimal=(tier != 1)) + max_tier = max(max_tier, tier) + + l += "[RDSCREEN_NOBREAK]" + for(var/tier in 0 to max_tier) + l += "[RDSCREEN_NOBREAK]" + l += "
ResearchedAvailableFuture
[RDSCREEN_NOBREAK]" + l += columns["[tier]"] + l += "
[RDSCREEN_NOBREAK]" + else + var/list/avail = list() //This could probably be optimized a bit later. + var/list/unavail = list() + var/list/res = list() + for(var/v in stored_research.researched_nodes) + res += stored_research.researched_nodes[v] + for(var/v in stored_research.available_nodes) + if(stored_research.researched_nodes[v]) + continue + avail += stored_research.available_nodes[v] + for(var/v in stored_research.visible_nodes) + if(stored_research.available_nodes[v]) + continue + unavail += stored_research.visible_nodes[v] + l += "

Technology Nodes:

[RDSCREEN_NOBREAK]" + l += "

Available for Research:

" + for(var/datum/techweb_node/N in avail) + var/not_unlocked = (stored_research.available_nodes[N.id] && !stored_research.researched_nodes[N.id]) + var/has_points = (stored_research.research_points >= N.get_price(stored_research)) + var/research_href = not_unlocked? (has_points? "Research" : "Not Enough Points") : null + l += "[N.display_name][research_href]" + l += "

Locked Nodes:

" + for(var/datum/techweb_node/N in unavail) + l += "[N.display_name]" + l += "

Researched Nodes:

" + for(var/datum/techweb_node/N in res) + l += "[N.display_name]" + l += "
[RDSCREEN_NOBREAK]" + return l + +/obj/machinery/computer/rdconsole/proc/machine_icon(atom/item) + return icon2html(initial(item.icon), usr, initial(item.icon_state), SOUTH) + +/obj/machinery/computer/rdconsole/proc/ui_techweb_single_node(datum/techweb_node/node, selflink=TRUE, minimal=FALSE) + var/list/l = list() + if (stored_research.hidden_nodes[node.id]) + return l + var/price = node.get_price(stored_research) + var/display_name = node.display_name + if (selflink) + display_name = "[display_name]" + l += "
[display_name] [RDSCREEN_NOBREAK]" + if(minimal) + l += "
[node.description]" + else + if(stored_research.researched_nodes[node.id]) + l += "Researched" + else if(stored_research.available_nodes[node.id]) + if(stored_research.research_points >= price) + l += "[price]" + else + l += "[price]" // gray - too expensive + else + l += "[price]" // red - missing prereqs + if(ui_mode == RDCONSOLE_UI_MODE_NORMAL) + l += "[node.description]" + for(var/i in node.designs) + var/datum/design/D = node.designs[i] + l += "[D.icon_html(usr)][RDSCREEN_NOBREAK]" l += "
[RDSCREEN_NOBREAK]" return l -/obj/machinery/computer/rdconsole/proc/ui_techweb_nodeview() //Legacy code +/obj/machinery/computer/rdconsole/proc/ui_techweb_nodeview() RDSCREEN_UI_SNODE_CHECK var/list/l = list() if(stored_research.hidden_nodes[selected_node.id]) l += "

ERROR: RESEARCH NODE UNKNOWN.

" - l += "

[selected_node.display_name]

" - l += "Description: [selected_node.description]" - l += "Status: [stored_research.researched_nodes[selected_node.id]? "Researched" : "Locked"]" - l += "Point Cost: [selected_node.get_price(stored_research)].
[RDSCREEN_NOBREAK]" - if(stored_research.researched_nodes[selected_node.id]) - l += "

Already Researched

[RDSCREEN_NOBREAK]" - else if(stored_research.available_nodes[selected_node.id]) - if(stored_research.research_points >= selected_node.get_price(stored_research)) - l += "

Research

[RDSCREEN_NOBREAK]" - else - l += "

Not Enough Points

[RDSCREEN_NOBREAK]" - else if(stored_research.visible_nodes[selected_node.id]) - l += "

Prerequisites not met!

[RDSCREEN_NOBREAK]" - else - l += "

ERROR

[RDSCREEN_NOBREAK]" - l += "

Designs:

[RDSCREEN_NOBREAK]" - for(var/i in selected_node.designs) - var/datum/design/D = selected_node.designs[i] - l += "[D.name]" - l += "

Prerequisites:

[RDSCREEN_NOBREAK]" - for(var/i in selected_node.prerequisites) - var/datum/techweb_node/prereq = selected_node.prerequisites[i] - var/sc = stored_research.researched_nodes[prereq.id] - var/begin - var/end - if(sc) - begin = "" - end = "" - else - begin = "" - end = "" - l += "[begin][prereq.display_name][end]" - l += "

Unlocks:

[RDSCREEN_NOBREAK]" - for(var/i in selected_node.unlocks) - var/datum/techweb_node/unlock = selected_node.unlocks[i] - l += "[unlock.display_name]" + return - l += "
[RDSCREEN_NOBREAK]" + l += "[RDSCREEN_NOBREAK]" + if (length(selected_node.prerequisites)) + l += "[RDSCREEN_NOBREAK]" + l += "[RDSCREEN_NOBREAK]" + if (length(selected_node.unlocks)) + l += "[RDSCREEN_NOBREAK]" + + l += "[RDSCREEN_NOBREAK]" + if (length(selected_node.prerequisites)) + l += "[RDSCREEN_NOBREAK]" + l += "[RDSCREEN_NOBREAK]" + if (length(selected_node.unlocks)) + l += "[RDSCREEN_NOBREAK]" + + l += "
RequiresCurrent NodeUnlocks
[RDSCREEN_NOBREAK]" + for (var/i in selected_node.prerequisites) + l += ui_techweb_single_node(selected_node.prerequisites[i]) + l += "[RDSCREEN_NOBREAK]" + l += ui_techweb_single_node(selected_node, selflink=FALSE) + l += "[RDSCREEN_NOBREAK]" + for (var/i in selected_node.unlocks) + l += ui_techweb_single_node(selected_node.unlocks[i]) + l += "
[RDSCREEN_NOBREAK]" return l /obj/machinery/computer/rdconsole/proc/ui_techweb_designview() //Legacy code RDSCREEN_UI_SDESIGN_CHECK var/list/l = list() var/datum/design/D = selected_design - l += "
Name: [D.name]" + l += "
[D.icon_html(usr)][D.name]
[RDSCREEN_NOBREAK]" 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" - l += "Required Materials:" + var/lathes = list() + if(D.build_type & IMPRINTER) + lathes += "[machine_icon(/obj/machinery/rnd/circuit_imprinter)][RDSCREEN_NOBREAK]" + if (linked_imprinter && D.id in stored_research.researched_designs) + l += "Imprint" + if(D.build_type & PROTOLATHE) + lathes += "[machine_icon(/obj/machinery/rnd/protolathe)][RDSCREEN_NOBREAK]" + if (linked_lathe && D.id in stored_research.researched_designs) + l += "Construct" + if(D.build_type & AUTOLATHE) + lathes += "[machine_icon(/obj/machinery/autolathe)][RDSCREEN_NOBREAK]" + if(D.build_type & MECHFAB) + lathes += "[machine_icon(/obj/machinery/mecha_part_fabricator)][RDSCREEN_NOBREAK]" + if(D.build_type & BIOGENERATOR) + lathes += "[machine_icon(/obj/machinery/biogenerator)][RDSCREEN_NOBREAK]" + if(D.build_type & LIMBGROWER) + lathes += "[machine_icon(/obj/machinery/limbgrower)][RDSCREEN_NOBREAK]" + if(D.build_type & SMELTER) + lathes += "[machine_icon(/obj/machinery/mineral/processing_unit)][RDSCREEN_NOBREAK]" + l += "Construction types:" + l += lathes + l += "" + 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 @@ -721,6 +812,8 @@ doesn't have toxins access. if(ls["switch_screen"]) back = screen screen = text2num(ls["switch_screen"]) + if(ls["ui_mode"]) + ui_mode = text2num(ls["ui_mode"]) if(ls["lock_console"]) if(allowed(usr)) lock_console(usr) @@ -873,7 +966,8 @@ doesn't have toxins access. /obj/machinery/computer/rdconsole/interact(mob/user) user.set_machine(src) - var/datum/browser/popup = new(user, "rndconsole", name, 460, 550) + var/datum/browser/popup = new(user, "rndconsole", name, 900, 600) + popup.add_stylesheet("techwebs", 'html/browser/techwebs.css') popup.set_content(generate_ui()) popup.open() diff --git a/code/modules/research/rdmachines.dm b/code/modules/research/rdmachines.dm index 663d3fc806..eea79f77e6 100644 --- a/code/modules/research/rdmachines.dm +++ b/code/modules/research/rdmachines.dm @@ -1,5 +1,4 @@ - //All devices that link into the R&D console fall into thise type for easy identification and some shared procs. @@ -11,12 +10,14 @@ use_power = IDLE_POWER_USE var/busy = FALSE var/hacked = FALSE + var/console_link = TRUE //allow console link. + var/requires_console = TRUE var/disabled = FALSE var/shocked = 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) var/allowed_department_flags = ALL - + /obj/machinery/rnd/proc/reset_busy() busy = FALSE @@ -79,28 +80,26 @@ /obj/machinery/rnd/proc/is_insertion_ready(mob/user) if(panel_open) to_chat(user, "You can't load [src] while it's opened!") - return - if (disabled) - return - if (!linked_console) // Try to auto-connect to new RnD consoles nearby. - if(!linked_console) - to_chat(user, "[src] must be linked to an R&D console first!") - return - if (busy) + return FALSE + if(disabled) + 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 + return FALSE if(stat & BROKEN) to_chat(user, "[src] is broken.") - return + return FALSE if(stat & NOPOWER) to_chat(user, "[src] has no power.") - return + return FALSE if(loaded_item) to_chat(user, "[src] is already loaded.") - return + return FALSE return TRUE - //we eject the loaded item when deconstructing the machine /obj/machinery/rnd/on_deconstruction() if(loaded_item) diff --git a/code/modules/research/stock_parts.dm b/code/modules/research/stock_parts.dm index af1dc853d8..0e2e788b8f 100644 --- a/code/modules/research/stock_parts.dm +++ b/code/modules/research/stock_parts.dm @@ -82,7 +82,6 @@ If you create T5+ please take a pass at gene_modder.dm [L40]. Max_values MUST fi //Rating 1 - /obj/item/stock_parts/capacitor name = "capacitor" desc = "A basic capacitor used in the construction of a variety of devices." diff --git a/code/modules/research/techweb/__techweb_helpers.dm b/code/modules/research/techweb/__techweb_helpers.dm index adfa5c78d0..af4fe7480b 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 diff --git a/code/modules/research/techweb/_techweb.dm b/code/modules/research/techweb/_techweb.dm index 74ace7e4c2..d59dea55d3 100644 --- a/code/modules/research/techweb/_techweb.dm +++ b/code/modules/research/techweb/_techweb.dm @@ -17,6 +17,9 @@ var/id = "generic" var/list/research_logs = list() //IC logs. var/max_bomb_value = 0 + var/organization = "Third-Party" //Organization name, used for display. + var/last_bitcoins = 0 //Current per-second production, used for display only. + var/list/tiers = list() //Assoc list, datum = number, 1 is available, 2 is all reqs are 1, so on /datum/techweb/New() for(var/i in SSresearch.techweb_nodes_starting) @@ -28,6 +31,7 @@ /datum/techweb/admin research_points = INFINITY //KEKKLES. id = "ADMIN" + organization = "CentCom" /datum/techweb/admin/New() //All unlocked. . = ..() @@ -38,6 +42,7 @@ /datum/techweb/science //Global science techweb for RND consoles. id = "SCIENCE" + organization = "Nanotrasen" /datum/techweb/Destroy() researched_nodes = null @@ -148,15 +153,31 @@ recalculate_nodes(TRUE) //Fully rebuild the tree. /datum/techweb/proc/boost_with_path(datum/techweb_node/N, itempath) - if(!istype(N)||!ispath(itempath)) + if(!istype(N) || !ispath(itempath)) return FALSE - var/boost = N.boost_item_paths[itempath] - if(!boosted_nodes[N]) - boosted_nodes[N] = boost - if(N.autounlock_by_boost) - hidden_nodes -= N.id + boosted_nodes[N] = max(boosted_nodes[N], N.boost_item_paths[itempath]) + if(N.autounlock_by_boost) + hidden_nodes -= N.id return TRUE +/datum/techweb/proc/update_tiers(datum/techweb_node/base) + var/list/current = list(base) + while (current.len) + var/list/next = list() + for (var/node_ in current) + var/datum/techweb_node/node = node_ + var/tier = 0 + if (!researched_nodes[node.id]) // researched is tier 0 + for (var/id in node.prereq_ids) + var/prereq_tier = tiers[node.prerequisites[id]] + tier = max(tier, prereq_tier + 1) + + if (tier != tiers[node]) + tiers[node] = tier + for (var/id in node.unlocks) + next += node.unlocks[id] + current = next + /datum/techweb/proc/update_node_status(datum/techweb_node/node, autoupdate_consoles = TRUE) var/researched = FALSE var/available = FALSE @@ -185,6 +206,7 @@ else if(visible) visible_nodes[node.id] = node + update_tiers(node) if(autoupdate_consoles) for(var/v in consoles_accessing) var/obj/machinery/computer/rdconsole/V = v diff --git a/code/modules/research/techweb/_techweb_node.dm b/code/modules/research/techweb/_techweb_node.dm index 75faf07bf1..3ec6c4cf9d 100644 --- a/code/modules/research/techweb/_techweb_node.dm +++ b/code/modules/research/techweb/_techweb_node.dm @@ -23,8 +23,6 @@ actual_cost = research_cost /datum/techweb_node/proc/get_price(datum/techweb/host) - if(!host) - return actual_cost - var/discount = boost_item_paths[host.boosted_nodes[src]] - actual_cost = research_cost - discount + if(host) + actual_cost = research_cost - host.boosted_nodes[src] return actual_cost diff --git a/code/modules/research/techweb/all_nodes.dm b/code/modules/research/techweb/all_nodes.dm index 96b252854b..ba43a1c24b 100644 --- a/code/modules/research/techweb/all_nodes.dm +++ b/code/modules/research/techweb/all_nodes.dm @@ -1,6 +1,6 @@ //Current rate: 132500 research points in 90 minutes -//Current cargo price: 250000 points for fullmaxed R&D. +//Current cargo price: 280000 points for fullmaxed R&D. //Base Node /datum/techweb_node/base @@ -9,7 +9,7 @@ display_name = "Basic Research Technology" description = "NT default research technologies." design_ids = list("basic_matter_bin", "basic_cell", "basic_scanning", "basic_capacitor", "basic_micro_laser", "micro_mani", - "destructive_analyzer", "protolathe", "circuit_imprinter", "experimentor", "rdconsole", "design_disk", "tech_disk", "rdserver", "rdservercontrol", "mechfab", + "destructive_analyzer", "circuit_imprinter", "experimentor", "rdconsole", "design_disk", "tech_disk", "rdserver", "rdservercontrol", "mechfab", "space_heater") //Default research tech, prevents bricking /////////////////////////Biotech///////////////////////// @@ -18,7 +18,7 @@ display_name = "Biological Technology" description = "What makes us tick." //the MC, silly! prereq_ids = list("base") - design_ids = list("mass_spectrometer", "chem_heater", "chem_master", "chem_dispenser", "sleeper", "pandemic") + design_ids = list("chem_heater", "chem_master", "chem_dispenser", "sleeper", "pandemic") research_cost = 2500 export_price = 10000 @@ -27,7 +27,16 @@ display_name = "Advanced Biotechnology" description = "Advanced Biotechnology" prereq_ids = list("biotech") - design_ids = list("piercesyringe", "adv_mass_spectrometer", "plasmarefiller", "limbgrower") + design_ids = list("piercesyringe", "plasmarefiller", "limbgrower") + research_cost = 2500 + export_price = 10000 + +/datum/techweb_node/bio_process + id = "bio_process" + display_name = "Biological Processing" + description = "From slimes to kitchens." + prereq_ids = list("biotech") + design_ids = list("smartfridge", "gibber", "deepfryer", "monkey_recycler", "processor", "gibber", "microwave") research_cost = 2500 export_price = 10000 @@ -52,8 +61,8 @@ /////////////////////////engineering tech///////////////////////// /datum/techweb_node/engineering id = "engineering" - description = "Modern Engineering Technology." display_name = "Industrial Engineering" + description = "A refresher course on modern engineering technology." prereq_ids = list("base") design_ids = list("solarcontrol", "recharger", "powermonitor", "rped", "pacman", "adv_capacitor", "adv_scanning", "emitter", "high_cell", "adv_matter_bin", "atmosalerts", "atmos_control", "recycler", "autolathe", "high_micro_laser", "nano_mani", "weldingmask", "mesons", "thermomachine", "tesla_coil", "grounding_rod", "apc_control") @@ -62,13 +71,31 @@ /datum/techweb_node/adv_engi id = "adv_engi" - description = "Advanced Engineering research" display_name = "Advanced Engineering" + description = "Pushing the boundaries of physics, one chainsaw-fist at a time." prereq_ids = list("engineering", "emp_basic") design_ids = list("engine_goggles", "diagnostic_hud", "magboots") research_cost = 2500 export_price = 10000 +/datum/techweb_node/high_efficiency + id = "high_efficiency" + display_name = "High Efficiency Parts" + description = "Finely-tooled manufacturing techniques allowing for picometer-perfect precision levels." + prereq_ids = list("engineering", "datatheory") + design_ids = list("pico_mani", "super_matter_bin") + research_cost = 2500 + export_price = 10000 + +/datum/techweb_node/adv_power + id = "adv_power" + display_name = "Advanced Power Manipulation" + description = "How to get more zap." + prereq_ids = list("engineering") + design_ids = list("smes", "super_cell", "hyper_cell", "super_capacitor", "superpacman", "mrspacman", "power_turbine", "power_turbine_console", "power_compressor") + research_cost = 2500 + export_price = 10000 + /////////////////////////Bluespace tech///////////////////////// /datum/techweb_node/bluespace_basic //Bluespace-memery id = "bluespace_basic" @@ -89,6 +116,26 @@ research_cost = 2500 export_price = 10000 +/datum/techweb_node/practical_bluespace + id = "practical_bluespace" + display_name = "Applied Bluespace Research" + description = "Using bluespace to make things faster and better." + prereq_ids = list("bluespace_basic", "engineering") + design_ids = list("bs_rped","minerbag_holding", "telesci_gps", "bluespacebeaker", "bluespacesyringe", "bluespacebodybag", "phasic_scanning") + research_cost = 2500 + export_price = 10000 + + +/datum/techweb_node/bluespace_power + id = "bluespace_power" + display_name = "Bluespace Power Technology" + description = "Even more powerful.. power!" + prereq_ids = list("adv_power", "adv_bluespace") + design_ids = list("bluespace_cell", "quadratic_capacitor") + research_cost = 2500 + export_price = 10000 + + /////////////////////////plasma tech///////////////////////// /datum/techweb_node/basic_plasma id = "basic_plasma" @@ -127,112 +174,6 @@ research_cost = 2500 export_price = 10000 -/////////////////////////EMP tech///////////////////////// -/datum/techweb_node/emp_basic //EMP tech for some reason - id = "emp_basic" - display_name = "Electromagnetic Theory" - description = "Study into usage of frequencies in the electromagnetic spectrum." - prereq_ids = list("base") - design_ids = list("holosign", "inducer", "tray_goggles", "holopad") - research_cost = 2500 - export_price = 10000 - -/datum/techweb_node/emp_adv - id = "emp_adv" - display_name = "Advanced Electromagnetic Theory" - prereq_ids = list("emp_basic") - design_ids = list("ultra_micro_laser") - research_cost = 2500 - export_price = 10000 - -/datum/techweb_node/emp_super - id = "emp_super" - display_name = "Quantum Electromagnetic Technology" //bs - description = "Even better electromagnetic technology" - prereq_ids = list("emp_adv") - design_ids = list("quadultra_micro_laser") - research_cost = 2500 - export_price = 10000 - -/////////////////////////Clown tech///////////////////////// -/datum/techweb_node/clown - id = "clown" - display_name = "Clown Technology" - description = "Honk?!" - prereq_ids = list("base") - design_ids = list("air_horn", "honker_main", "honker_peri", "honker_targ", "honk_chassis", "honk_head", "honk_torso", "honk_left_arm", "honk_right_arm", - "honk_left_leg", "honk_right_leg", "mech_banana_mortar", "mech_mousetrap_mortar", "mech_honker", "mech_punching_face", "implant_trombone") - research_cost = 2500 - export_price = 10000 - -////////////////////////Computer tech//////////////////////// -/datum/techweb_node/comptech - id = "comptech" - display_name = "Computer Consoles" - description = "Computers and how they work." - prereq_ids = list("datatheory") - design_ids = list("cargo", "cargorequest", "stockexchange", "libraryconsole", "aifixer", "mining", "crewconsole", "comconsole", "idcardconsole", "operating", "seccamera") - research_cost = 2500 - export_price = 10000 - -/datum/techweb_node/computer_hardware_basic //Modular computers are shitty and nearly useless so until someone makes them actually useful this can be easy to get. - id = "computer_hardware_basic" - display_name = "Computer Hardware" - description = "How computer hardware are made." - prereq_ids = list("comptech") - research_cost = 2500 - export_price = 10000 - design_ids = list("hdd_basic", "hdd_advanced", "hdd_super", "hdd_cluster", "ssd_small", "ssd_micro", "netcard_basic", "netcard_advanced", "netcard_wired", - "portadrive_basic", "portadrive_advanced", "portadrive_super", "cardslot", "aislot", "miniprinter", "APClink", "bat_control", "bat_normal", "bat_advanced", - "bat_super", "bat_micro", "bat_nano", "cpu_normal", "pcpu_normal", "cpu_small", "pcpu_small") - -/datum/techweb_node/computer_board_gaming - id = "computer_board_gaming" - display_name = "Arcade Games" - description = "For the slackers on the station." - prereq_ids = list("comptech") - design_ids = list("arcade_battle", "arcade_orion", "slotmachine") - research_cost = 2500 - export_price = 10000 - -/datum/techweb_node/comp_recordkeeping - id = "comp_recordkeeping" - display_name = "Computerized Recordkeeping" - description = "Organized record databases and how they're used." - prereq_ids = list("comptech") - design_ids = list("secdata", "med_data", "prisonmanage", "vendor", "automated_announcement") - research_cost = 2500 - export_price = 10000 - -/datum/techweb_node/telecomms - id = "telecomms" - display_name = "Telecommunications Technology" - description = "Subspace transmission technology for near-instant communications devices." - prereq_ids = list("comptech", "bluespace_basic") - research_cost = 2500 - export_price = 10000 - design_ids = list("s-receiver", "s-bus", "s-broadcaster", "s-processor", "s-hub", "s-server", "s-relay", "comm_monitor", "comm_server", - "s-ansible", "s-filter", "s-amplifier", "ntnet_relay", "s-treatment", "s-analyzer", "s-crystal", "s-transmitter") - -/datum/techweb_node/integrated_HUDs - id = "integrated_HUDs" - display_name = "Integrated HUDs" - description = "The usefulness of computerized records, projected straight onto your eyepiece!" - prereq_ids = list("comp_recordkeeping", "emp_basic") - design_ids = list("health_hud", "security_hud", "diagnostic_hud", "scigoggles") - research_cost = 2500 - export_price = 10000 - -/datum/techweb_node/NVGtech - id = "NVGtech" - display_name = "Night Vision Technology" - description = "Allows seeing in the dark without actual light!" - prereq_ids = list("integrated_HUDs", "adv_engi", "emp_adv") - design_ids = list("health_hud_night", "security_hud_night", "diagnostic_hud_night", "night_visision_goggles", "nvgmesons") - research_cost = 2500 - export_price = 10000 - -////////////////////////AI & Cyborg tech//////////////////////// /datum/techweb_node/neural_programming id = "neural_programming" display_name = "Neural Programming" @@ -281,7 +222,7 @@ /datum/techweb_node/cyborg_upg_med id = "cyborg_upg_med" display_name = "Cyborg Upgrades: Medical" - description = "Medical upgrades for cyborgs" + description = "Medical upgrades for cyborgs." prereq_ids = list("adv_biotech", "cyborg") design_ids = list("borg_upgrade_defibrillator", "borg_upgrade_piercinghypospray", "borg_upgrade_highstrengthsynthesiser", "borg_upgrade_expandedsynthesiser") research_cost = 2500 @@ -291,7 +232,7 @@ id = "cyborg_upg_combat" display_name = "Cyborg Upgrades: Combat" description = "Military grade upgrades for cyborgs." - prereq_ids = list("adv_robotics", "adv_engi") + prereq_ids = list("adv_robotics", "adv_engi" , "weaponry") design_ids = list("borg_upgrade_vtec", "borg_upgrade_disablercooler") research_cost = 2500 export_price = 10000 @@ -307,6 +248,112 @@ research_cost = 2500 export_price = 10000 +/////////////////////////EMP tech///////////////////////// +/datum/techweb_node/emp_basic //EMP tech for some reason + id = "emp_basic" + display_name = "Electromagnetic Theory" + description = "Study into usage of frequencies in the electromagnetic spectrum." + prereq_ids = list("base") + design_ids = list("holosign", "inducer", "tray_goggles", "holopad") + research_cost = 2500 + export_price = 10000 + +/datum/techweb_node/emp_adv + id = "emp_adv" + display_name = "Advanced Electromagnetic Theory" + description = "Determining whether reversing the polarity will actually help in a given situation." + prereq_ids = list("emp_basic") + design_ids = list("ultra_micro_laser") + research_cost = 2500 + export_price = 10000 + +/datum/techweb_node/emp_super + id = "emp_super" + display_name = "Quantum Electromagnetic Technology" //bs + description = "Even better electromagnetic technology." + prereq_ids = list("emp_adv") + design_ids = list("quadultra_micro_laser") + research_cost = 2500 + export_price = 10000 + +/////////////////////////Clown tech///////////////////////// +/datum/techweb_node/clown + id = "clown" + display_name = "Clown Technology" + description = "Honk?!" + prereq_ids = list("base") + design_ids = list("air_horn", "honker_main", "honker_peri", "honker_targ", "honk_chassis", "honk_head", "honk_torso", "honk_left_arm", "honk_right_arm", + "honk_left_leg", "honk_right_leg", "mech_banana_mortar", "mech_mousetrap_mortar", "mech_honker", "mech_punching_face", "implant_trombone") + research_cost = 2500 + export_price = 10000 + +////////////////////////Computer tech//////////////////////// +/datum/techweb_node/comptech + id = "comptech" + display_name = "Computer Consoles" + description = "Computers and how they work." + prereq_ids = list("datatheory") + design_ids = list("cargo", "cargorequest", "stockexchange", "libraryconsole", "aifixer", "mining", "crewconsole", "comconsole", "idcardconsole", "operating", "seccamera") + research_cost = 2500 + export_price = 10000 + +/datum/techweb_node/computer_hardware_basic //Modular computers are shitty and nearly useless so until someone makes them actually useful this can be easy to get. + id = "computer_hardware_basic" + display_name = "Computer Hardware" + description = "How computer hardware are made." + prereq_ids = list("comptech") + research_cost = 2500 + export_price = 10000 + design_ids = list("hdd_basic", "hdd_advanced", "hdd_super", "hdd_cluster", "ssd_small", "ssd_micro", "netcard_basic", "netcard_advanced", "netcard_wired", + "portadrive_basic", "portadrive_advanced", "portadrive_super", "cardslot", "aislot", "miniprinter", "APClink", "bat_control", "bat_normal", "bat_advanced", + "bat_super", "bat_micro", "bat_nano", "cpu_normal", "pcpu_normal", "cpu_small", "pcpu_small") + +/datum/techweb_node/computer_board_gaming + id = "computer_board_gaming" + display_name = "Arcade Games" + description = "For the slackers on the station." + prereq_ids = list("comptech") + design_ids = list("arcade_battle", "arcade_orion", "slotmachine") + research_cost = 1000 + export_price = 10000 + +/datum/techweb_node/comp_recordkeeping + id = "comp_recordkeeping" + display_name = "Computerized Recordkeeping" + description = "Organized record databases and how they're used." + prereq_ids = list("comptech") + design_ids = list("secdata", "med_data", "prisonmanage", "vendor", "automated_announcement") + research_cost = 2500 + export_price = 10000 + +/datum/techweb_node/telecomms + id = "telecomms" + display_name = "Telecommunications Technology" + description = "Subspace transmission technology for near-instant communications devices." + prereq_ids = list("comptech", "bluespace_basic") + research_cost = 2500 + export_price = 10000 + design_ids = list("s-receiver", "s-bus", "s-broadcaster", "s-processor", "s-hub", "s-server", "s-relay", "comm_monitor", "comm_server", + "s-ansible", "s-filter", "s-amplifier", "ntnet_relay", "s-treatment", "s-analyzer", "s-crystal", "s-transmitter") + +/datum/techweb_node/integrated_HUDs + id = "integrated_HUDs" + display_name = "Integrated HUDs" + description = "The usefulness of computerized records, projected straight onto your eyepiece!" + prereq_ids = list("comp_recordkeeping", "emp_basic") + design_ids = list("health_hud", "security_hud", "diagnostic_hud", "scigoggles") + research_cost = 2500 + export_price = 10000 + +/datum/techweb_node/NVGtech + id = "NVGtech" + display_name = "Night Vision Technology" + description = "Allows seeing in the dark without actual light!" + prereq_ids = list("integrated_HUDs", "adv_engi", "emp_adv") + design_ids = list("health_hud_night", "security_hud_night", "diagnostic_hud_night", "night_visision_goggles", "nvgmesons") + research_cost = 2500 + export_price = 10000 + ////////////////////////Medical//////////////////////// /datum/techweb_node/cloning id = "cloning" @@ -323,7 +370,7 @@ description = "Smart freezing of objects to preserve them!" prereq_ids = list("adv_engi", "emp_basic", "biotech") design_ids = list("splitbeaker", "noreactsyringe", "cryotube", "cryo_Grenade") - research_cost = 2500 + research_cost = 2000 export_price = 10000 /datum/techweb_node/subdermal_implants @@ -357,7 +404,7 @@ id = "adv_cyber_implants" display_name = "Advanced Cybernetic Implants" description = "Upgraded and more powerful cybernetic implants." - prereq_ids = list("neural_programming", "cyber_implants") + prereq_ids = list("neural_programming", "cyber_implants","integrated_HUDs") design_ids = list("ci-toolset", "ci-surgery", "ci-reviver") research_cost = 2500 export_price = 10000 @@ -366,40 +413,11 @@ id = "combat_cyber_implants" display_name = "Combat Cybernetic Implants" description = "Military grade combat implants to improve performance." - prereq_ids = list("adv_cyber_implants") //Needs way more reqs. + prereq_ids = list("adv_cyber_implants","weaponry","NVGtech","high_efficiency") design_ids = list("ci-xray", "ci-thermals", "ci-antidrop", "ci-antistun", "ci-thrusters") research_cost = 2500 export_price = 10000 -////////////////////////generic biotech//////////////////////// -/datum/techweb_node/bio_process - id = "bio_process" - display_name = "Biological Processing" - description = "From slimes to kitchens." - prereq_ids = list("biotech") - design_ids = list("smartfridge", "gibber", "deepfryer", "monkey_recycler", "processor", "gibber", "microwave") - research_cost = 2500 - export_price = 10000 - -////////////////////////generic engineering//////////////////////// -/datum/techweb_node/high_efficiency - id = "high_efficiency" - display_name = "High Efficiency Parts" - description = "High Efficiency Parts" - prereq_ids = list("engineering", "datatheory") - design_ids = list("pico_mani", "super_matter_bin") - research_cost = 2500 - export_price = 10000 - -/datum/techweb_node/adv_power - id = "adv_power" - display_name = "Advanced Power Manipulation" - description = "How to get more zap." - prereq_ids = list("engineering") - design_ids = list("smes", "super_cell", "hyper_cell", "super_capacitor", "superpacman", "mrspacman", "power_turbine", "power_turbine_console", "power_compressor") - research_cost = 2500 - export_price = 10000 - ////////////////////////Tools//////////////////////// /datum/techweb_node/basic_mining id = "basic_mining" @@ -419,15 +437,6 @@ research_cost = 2500 export_price = 10000 -/datum/techweb_node/practical_bluespace - id = "practical_bluespace" - display_name = "Applied Bluespace Research" - description = "Using bluespace to make things faster and better." - prereq_ids = list("bluespace_basic", "engineering") - design_ids = list("bs_rped","minerbag_holding", "telesci_gps", "bluespacebeaker", "bluespacesyringe", "bluespacebodybag", "phasic_scanning") - research_cost = 2500 - export_price = 10000 - /datum/techweb_node/janitor id = "janitor" display_name = "Advanced Sanitation Technology" @@ -455,22 +464,13 @@ research_cost = 2500 export_price = 10000 -/datum/techweb_node/exp_equipment - id = "exp_equipment" +/datum/techweb_node/exp_flight + id = "exp_flight" display_name = "Experimental Flight Equipment" description = "Highly advanced construction tools." design_ids = list("flightshoes", "flightpack", "flightsuit") - prereq_ids = list("adv_engi") - research_cost = 2500 - export_price = 10000 - -/datum/techweb_node/bluespace_power - id = "bluespace_power" - display_name = "Bluespace Power Technology" - description = "Even more powerful.. power!" - prereq_ids = list("adv_power", "adv_bluespace") - design_ids = list("bluespace_cell", "quadratic_capacitor") - research_cost = 2500 + prereq_ids = list("adv_engi","integrated_HUDs", "adv_power" , "high_efficiency") + research_cost = 5000 export_price = 10000 /////////////////////////weaponry tech///////////////////////// @@ -496,7 +496,7 @@ id = "electronic_weapons" display_name = "Electric Weapons" description = "Weapons using electric technology" - prereq_ids = list("weaponry", "adv_power") + prereq_ids = list("weaponry", "adv_power" , "emp_basic") design_ids = list("stunrevolver", "stunshell", "tele_shield") research_cost = 2500 export_price = 10000 @@ -506,7 +506,7 @@ display_name = "Radioactive Weaponry" description = "Weapons using radioactive technology." prereq_ids = list("adv_engi", "adv_weaponry") - design_ids = list("nuclear_gun", "decloner") + design_ids = list("nuclear_gun") research_cost = 2500 export_price = 10000 @@ -586,8 +586,8 @@ /datum/techweb_node/adv_mecha id = "adv_mecha" - display_name = "Mechanical Exosuits" - description = "Mechanized exosuits that are several magnitudes stronger and more powerful than the average human." + display_name = "Advanced Exosuits" + description = "For when you just aren't Gundam enough." prereq_ids = list("adv_robotics", "mecha") design_ids = list("mech_repair_droid") research_cost = 2500 @@ -627,7 +627,7 @@ id = "mecha_phazon" display_name = "EXOSUIT: Phazon" description = "Phazon exosuit designs" - prereq_ids = list("adv_mecha", "weaponry") + prereq_ids = list("adv_mecha", "weaponry" , "adv_bluespace") design_ids = list("phazon_chassis", "phazon_torso", "phazon_head", "phazon_left_arm", "phazon_right_arm", "phazon_left_leg", "phazon_right_leg", "phazon_main", "phazon_peri", "phazon_targ", "phazon_armor") research_cost = 2500 @@ -637,7 +637,7 @@ id = "mech_tools" display_name = "Basic Exosuit Equipment" description = "Various tools fit for basic mech units" - prereq_ids = list("mecha", "engineering") + prereq_ids = list("mecha") design_ids = list("mech_drill", "mech_mscanner", "mech_extinguisher", "mech_cable_layer") research_cost = 2500 export_price = 10000 @@ -646,7 +646,7 @@ id = "adv_mecha_tools" display_name = "Advanced Exosuit Equipment" description = "Tools for high level mech suits" - prereq_ids = list("adv_mecha", "mech_tools", "adv_engi") + prereq_ids = list("adv_mecha", "mech_tools") design_ids = list("mech_rcd") research_cost = 2500 export_price = 10000 @@ -662,9 +662,9 @@ /datum/techweb_node/mech_modules id = "adv_mecha_modules" - display_name = "Basic Exosuit Modules" + display_name = "Simple Exosuit Modules" description = "An advanced piece of mech weaponry" - prereq_ids = list("adv_mecha", "adv_power") + prereq_ids = list("adv_mecha", "bluespace_power") design_ids = list("mech_energy_relay", "mech_ccw_armor", "mech_proj_armor", "mech_generator_nuclear") research_cost = 2500 export_price = 10000 @@ -779,7 +779,7 @@ /datum/techweb_node/mech_lmg id = "mech_lmg" - display_name = "Exosuit Weapon (PBT \"Pacifier\" Mounted Taser)" + display_name = "Exosuit Weapon (\"Ultra AC 2\" LMG)" description = "An advanced piece of mech weaponry" prereq_ids = list("adv_mecha", "adv_weaponry", "ballistic_weapons") design_ids = list("mech_lmg") @@ -800,12 +800,12 @@ id = "alientech" display_name = "Alien Technology" description = "Things used by the greys." - prereq_ids = list("base") + prereq_ids = list("biotech","engineering") boost_item_paths = list(/obj/item/gun/energy/alien = 0, /obj/item/scalpel/alien = 0, /obj/item/hemostat/alien = 0, /obj/item/retractor/alien = 0, /obj/item/circular_saw/alien = 0, /obj/item/cautery/alien = 0, /obj/item/surgicaldrill/alien = 0, /obj/item/screwdriver/abductor = 0, /obj/item/wrench/abductor = 0, /obj/item/crowbar/abductor = 0, /obj/item/device/multitool/abductor = 0, /obj/item/weldingtool/abductor = 0, /obj/item/wirecutters/abductor = 0, /obj/item/circuitboard/machine/abductor = 0, /obj/item/abductor_baton = 0, /obj/item/device/abductor = 0) - research_cost = 2500 - export_price = 10000 + research_cost = 5000 + export_price = 20000 hidden = TRUE design_ids = list("alienalloy") @@ -813,13 +813,13 @@ id = "alien_bio" display_name = "Alien Biological Tools" description = "Advanced biological tools." - prereq_ids = list("alientech", "biotech") + prereq_ids = list("alientech", "adv_biotech") design_ids = list("alien_scalpel", "alien_hemostat", "alien_retractor", "alien_saw", "alien_drill", "alien_cautery") boost_item_paths = list(/obj/item/gun/energy/alien = 0, /obj/item/scalpel/alien = 0, /obj/item/hemostat/alien = 0, /obj/item/retractor/alien = 0, /obj/item/circular_saw/alien = 0, /obj/item/cautery/alien = 0, /obj/item/surgicaldrill/alien = 0, /obj/item/screwdriver/abductor = 0, /obj/item/wrench/abductor = 0, /obj/item/crowbar/abductor = 0, /obj/item/device/multitool/abductor = 0, /obj/item/weldingtool/abductor = 0, /obj/item/wirecutters/abductor = 0, /obj/item/circuitboard/machine/abductor = 0, /obj/item/abductor_baton = 0, /obj/item/device/abductor = 0) research_cost = 2500 - export_price = 10000 + export_price = 20000 hidden = TRUE /datum/techweb_node/alien_engi @@ -831,9 +831,38 @@ /obj/item/weldingtool/abductor = 0, /obj/item/wirecutters/abductor = 0, /obj/item/circuitboard/machine/abductor = 0, /obj/item/abductor_baton = 0, /obj/item/device/abductor = 0) design_ids = list("alien_wrench", "alien_wirecutters", "alien_screwdriver", "alien_crowbar", "alien_welder", "alien_multitool") research_cost = 2500 + export_price = 20000 + hidden = TRUE + +/datum/techweb_node/syndicate_basic + id = "syndicate_basic" + display_name = "Illegal Technology" + description = "Dangerous research used to create dangerous objects." + prereq_ids = list("adv_engi", "adv_weaponry", "explosive_weapons") + design_ids = list("decloner", "borg_syndicate_module", "suppressor", "largecrossbow") + research_cost = 10000 export_price = 10000 hidden = TRUE +/datum/techweb_node/syndicate_basic/New() //Crappy way of making syndicate gear decon supported until there's another way. + . = ..() + boost_item_paths = list() + for(var/cat in GLOB.uplink_items) + var/list/l = cat + for(var/i in l) + var/datum/uplink_item/UI = i + boost_item_paths[UI.item] = 0 //allows deconning to unlock. + +//HELPERS +/proc/total_techweb_exports() + var/list/datum/techweb_node/processing = list() + for(var/i in subtypesof(/datum/techweb_node)) + processing += new i + . = 0 + for(var/i in processing) + var/datum/techweb_node/TN = i + . += TN.export_price + /proc/total_techweb_points() var/list/datum/techweb_node/processing = list() for(var/i in subtypesof(/datum/techweb_node)) @@ -842,19 +871,3 @@ for(var/i in processing) var/datum/techweb_node/TN = i . += TN.research_cost - -/* -/datum/design/borg_syndicate_module - name = "Cyborg Upgrade (Illegal Modules)" - id = "borg_syndicate_module" - construction_time = 120 - -/datum/design/suppressor - name = "Universal Suppressor" - id = "suppressor" - -/datum/design/largecrossbow - name = "Energy Crossbow" - id = "largecrossbow" - build_path = /obj/item/gun/energy/kinetic_accelerator/crossbow/large -*/ \ No newline at end of file diff --git a/code/modules/research/xenobiology/xenobiology.dm b/code/modules/research/xenobiology/xenobiology.dm index 061bb0bdda..8e2ce4b7a0 100644 --- a/code/modules/research/xenobiology/xenobiology.dm +++ b/code/modules/research/xenobiology/xenobiology.dm @@ -472,7 +472,7 @@ desc = "A golem's head." resistance_flags = LAVA_PROOF | FIRE_PROOF | UNACIDABLE | ACID_PROOF flags_1 = ABSTRACT_1 | NODROP_1 - + /obj/item/stack/tile/bluespace name = "bluespace floor tile" singular_name = "floor tile" diff --git a/html/browser/techwebs.css b/html/browser/techwebs.css new file mode 100644 index 0000000000..889196cc28 --- /dev/null +++ b/html/browser/techwebs.css @@ -0,0 +1,20 @@ +[data-tooltip] { + position: relative; +} + +[data-tooltip]:hover::before { + position: absolute; + z-index: 1; + top: 100%; + padding: 0 4px; + margin-top: 1px; + border: 1px solid #40628a; + background: black; + color: white; + content: attr(data-tooltip); + min-width: 160px; +} + +.technode { + width: 256px; +} diff --git a/tgstation.dme b/tgstation.dme index 139d4d00e3..aadf2bf1b8 100755 --- a/tgstation.dme +++ b/tgstation.dme @@ -346,9 +346,9 @@ #include "code\datums\components\caltrop.dm" #include "code\datums\components\chasm.dm" #include "code\datums\components\decal.dm" -#include "code\datums\components\knockoff.dm" #include "code\datums\components\infective.dm" #include "code\datums\components\jousting.dm" +#include "code\datums\components\knockoff.dm" #include "code\datums\components\material_container.dm" #include "code\datums\components\ntnet_interface.dm" #include "code\datums\components\paintable.dm"