mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-30 00:29:02 +01:00
[MIRROR] Experi-Sci: Techweb nodes may now require you to perform "scientific" experiments (#3614)
* Experi-Sci: Techweb nodes may now require you to perform "scientific" experiments * Update all_nodes.dm Co-authored-by: Qustinnus <Floydje123@hotmail.com> Co-authored-by: Gandalf2k15 <jzo123@hotmail.com>
This commit is contained in:
co-authored by
Qustinnus
Gandalf2k15
parent
e9896f3cf5
commit
e5ff997ef8
@@ -0,0 +1,9 @@
|
||||
/datum/design/experi_scanner
|
||||
name = "Experimental Scanner"
|
||||
desc = "Experimental scanning unit used for performing scanning experiments."
|
||||
id = "experi_scanner"
|
||||
build_type = PROTOLATHE
|
||||
materials = list(/datum/material/glass = 500, /datum/material/iron = 500)
|
||||
build_path = /obj/item/experi_scanner
|
||||
category = list("Equipment")
|
||||
departmental_flags = DEPARTMENTAL_FLAG_SCIENCE
|
||||
@@ -312,6 +312,22 @@
|
||||
build_path = /obj/item/circuitboard/machine/dnascanner
|
||||
category = list("Research Machinery")
|
||||
|
||||
/datum/design/board/destructive_scanner
|
||||
name = "Machine Design (Destructive Scanner Board)"
|
||||
desc = "The circuit board for an experimental destructive scanner."
|
||||
id = "destructive_scanner"
|
||||
build_path = /obj/item/circuitboard/machine/destructive_scanner
|
||||
category = list("Research Machinery")
|
||||
departmental_flags = DEPARTMENTAL_FLAG_SCIENCE
|
||||
|
||||
/datum/design/board/doppler_array
|
||||
name = "Machine Design (Tachyon-Doppler Research Array Board)"
|
||||
desc = "The circuit board for a tachyon-doppler research array"
|
||||
id = "doppler_array"
|
||||
build_path = /obj/item/circuitboard/machine/doppler_array
|
||||
category = list("Research Machinery")
|
||||
departmental_flags = DEPARTMENTAL_FLAG_SCIENCE
|
||||
|
||||
/datum/design/board/microwave
|
||||
name = "Machine Design (Microwave Board)"
|
||||
desc = "The circuit board for a microwave."
|
||||
|
||||
@@ -25,20 +25,6 @@
|
||||
program_type = /datum/nanite_program/viral
|
||||
category = list("Utility Nanites")
|
||||
|
||||
/datum/design/nanites/research
|
||||
name = "Distributed Computing"
|
||||
desc = "The nanites aid the research servers by performing a portion of its calculations, increasing research point generation."
|
||||
id = "research_nanites"
|
||||
program_type = /datum/nanite_program/research
|
||||
category = list("Utility Nanites")
|
||||
|
||||
/datum/design/nanites/researchplus
|
||||
name = "Neural Network"
|
||||
desc = "The nanites link the host's brains together forming a neural research network, that becomes more efficient with the amount of total hosts. Can be overloaded to increase research output."
|
||||
id = "researchplus_nanites"
|
||||
program_type = /datum/nanite_program/researchplus
|
||||
category = list("Utility Nanites")
|
||||
|
||||
/datum/design/nanites/monitoring
|
||||
name = "Monitoring"
|
||||
desc = "The nanites monitor the host's vitals and location, sending them to the suit sensor network."
|
||||
|
||||
@@ -111,11 +111,7 @@ Note: Must be placed within 3 tiles of the R&D Console
|
||||
return FALSE
|
||||
if(QDELETED(loaded_item) || QDELETED(src))
|
||||
return FALSE
|
||||
var/loaded_type = loaded_item.type
|
||||
if(destroy_item(loaded_item))
|
||||
stored_research.add_point_list(point_value)
|
||||
stored_research.deconstructed_items[loaded_type] = point_value
|
||||
|
||||
destroy_item(loaded_item)
|
||||
return TRUE
|
||||
|
||||
/obj/machinery/rnd/destructive_analyzer/proc/unload_item()
|
||||
|
||||
@@ -464,10 +464,6 @@
|
||||
visible_message("<span class='notice'>[src] scans the [exp_on], revealing its true nature!</span>")
|
||||
playsound(src, 'sound/effects/supermatter.ogg', 50, 3, -1)
|
||||
var/obj/item/relic/R = loaded_item
|
||||
if (!R.revealed)
|
||||
var/points = rand(3500,3750) // discovery reward
|
||||
new /obj/item/research_notes(drop_location(src), points, "experimentation")
|
||||
visible_message("<span class='notice'> This discovery netted [points] points for research.</span>")
|
||||
R.reveal()
|
||||
investigate_log("Experimentor has revealed a relic with <span class='danger'>[R.realProc]</span> effect.", INVESTIGATE_EXPERIMENTOR)
|
||||
ejectItem()
|
||||
|
||||
@@ -154,53 +154,6 @@
|
||||
/datum/nanite_program/metabolic_synthesis/active_effect()
|
||||
host_mob.adjust_nutrition(-0.5)
|
||||
|
||||
/datum/nanite_program/research
|
||||
name = "Distributed Computing"
|
||||
desc = "The nanites aid the research servers by performing a portion of its calculations, increasing research point generation."
|
||||
use_rate = 0.2
|
||||
rogue_types = list(/datum/nanite_program/toxic)
|
||||
|
||||
/datum/nanite_program/research/active_effect()
|
||||
if(!iscarbon(host_mob))
|
||||
return
|
||||
var/points = 1
|
||||
if(!host_mob.client) //less brainpower
|
||||
points *= 0.25
|
||||
SSresearch.science_tech.add_point_list(list(TECHWEB_POINT_TYPE_GENERIC = points))
|
||||
|
||||
/datum/nanite_program/researchplus
|
||||
name = "Neural Network"
|
||||
desc = "The nanites link the host's brains together forming a neural research network, that becomes more efficient with the amount of total hosts."
|
||||
use_rate = 0.3
|
||||
rogue_types = list(/datum/nanite_program/brain_decay)
|
||||
|
||||
/datum/nanite_program/researchplus/enable_passive_effect()
|
||||
. = ..()
|
||||
if(!iscarbon(host_mob))
|
||||
return
|
||||
if(host_mob.client)
|
||||
SSnanites.neural_network_count++
|
||||
else
|
||||
SSnanites.neural_network_count += 0.25
|
||||
|
||||
/datum/nanite_program/researchplus/disable_passive_effect()
|
||||
. = ..()
|
||||
if(!iscarbon(host_mob))
|
||||
return
|
||||
if(host_mob.client)
|
||||
SSnanites.neural_network_count--
|
||||
else
|
||||
SSnanites.neural_network_count -= 0.25
|
||||
|
||||
/datum/nanite_program/researchplus/active_effect()
|
||||
if(!iscarbon(host_mob))
|
||||
return
|
||||
var/mob/living/carbon/C = host_mob
|
||||
var/points = round(SSnanites.neural_network_count / 12, 0.1)
|
||||
if(!C.client) //less brainpower
|
||||
points *= 0.25
|
||||
SSresearch.science_tech.add_point_list(list(TECHWEB_POINT_TYPE_GENERIC = points))
|
||||
|
||||
/datum/nanite_program/access
|
||||
name = "Subdermal ID"
|
||||
desc = "The nanites store the host's ID access rights in a subdermal magnetic strip. Updates when triggered, copying the host's current access."
|
||||
|
||||
+260
-423
@@ -1,3 +1,5 @@
|
||||
#define RND_TECH_DISK "tech"
|
||||
#define RND_DESIGN_DISK "design"
|
||||
|
||||
/*
|
||||
Research and Development (R&D) Console
|
||||
@@ -19,34 +21,25 @@ Nothing else in the console has ID requirements.
|
||||
desc = "A console used to interface with R&D tools."
|
||||
icon_screen = "rdcomp"
|
||||
icon_keyboard = "rd_key"
|
||||
var/datum/techweb/stored_research //Reference to global science techweb.
|
||||
var/obj/item/disk/tech_disk/t_disk //Stores the technology disk.
|
||||
var/obj/item/disk/design_disk/d_disk //Stores the design disk.
|
||||
circuit = /obj/item/circuitboard/computer/rdconsole
|
||||
|
||||
req_access = list(ACCESS_RND) //lA AND SETTING MANIPULATION REQUIRES SCIENTIST ACCESS.
|
||||
|
||||
//UI VARS
|
||||
var/screen = RDSCREEN_MENU
|
||||
var/back = RDSCREEN_MENU
|
||||
req_access = list(ACCESS_RND) // Locking and unlocking the console requires science access
|
||||
/// Reference to global science techweb
|
||||
var/datum/techweb/stored_research
|
||||
/// The stored technology disk, if present
|
||||
var/obj/item/disk/tech_disk/t_disk
|
||||
/// The stored design disk, if present
|
||||
var/obj/item/disk/design_disk/d_disk
|
||||
/// Determines if the console is locked, and consequently if actions can be performed with it
|
||||
var/locked = FALSE
|
||||
var/tdisk_uple = FALSE
|
||||
var/ddisk_uple = FALSE
|
||||
var/datum/selected_node_id
|
||||
var/datum/selected_design_id
|
||||
var/selected_category
|
||||
var/disk_slot_selected
|
||||
var/searchstring = ""
|
||||
var/searchtype = ""
|
||||
var/ui_mode = RDCONSOLE_UI_MODE_NORMAL
|
||||
|
||||
var/research_control = TRUE
|
||||
/// Used for compressing data sent to the UI via static_data as payload size is of concern
|
||||
var/id_cache = list()
|
||||
/// Sequence var for the id cache
|
||||
var/id_cache_seq = 1
|
||||
|
||||
/proc/CallMaterialName(ID)
|
||||
if (istype(ID, /datum/material))
|
||||
var/datum/material/material = ID
|
||||
return material.name
|
||||
|
||||
else if(GLOB.chemical_reagents_list[ID])
|
||||
var/datum/reagent/reagent = GLOB.chemical_reagents_list[ID]
|
||||
return reagent.name
|
||||
@@ -69,12 +62,6 @@ Nothing else in the console has ID requirements.
|
||||
return ..()
|
||||
|
||||
/obj/machinery/computer/rdconsole/attackby(obj/item/D, mob/user, params)
|
||||
if(istype(D, /obj/item/research_notes))
|
||||
var/obj/item/research_notes/R = D
|
||||
SSresearch.science_tech.add_point_list(list(TECHWEB_POINT_TYPE_GENERIC = R.value))
|
||||
playsound(src,'sound/machines/copier.ogg', 100, TRUE)
|
||||
qdel(R)
|
||||
return TRUE
|
||||
//Loading a disk into it.
|
||||
if(istype(D, /obj/item/disk))
|
||||
if(istype(D, /obj/item/disk/tech_disk))
|
||||
@@ -147,417 +134,267 @@ Nothing else in the console has ID requirements.
|
||||
locked = FALSE
|
||||
return ..()
|
||||
|
||||
/obj/machinery/computer/rdconsole/proc/list_categories(list/categories, menu_num as num)
|
||||
if(!categories)
|
||||
return
|
||||
/obj/machinery/computer/rdconsole/ui_interact(mob/user, datum/tgui/ui = null)
|
||||
ui = SStgui.try_update_ui(user, src, ui)
|
||||
if (!ui)
|
||||
ui = new(user, src, "Techweb")
|
||||
ui.open()
|
||||
|
||||
var/line_length = 1
|
||||
var/list/l = "<table style='width:100%' align='center'><tr>"
|
||||
/obj/machinery/computer/rdconsole/ui_assets(mob/user)
|
||||
return list(
|
||||
get_asset_datum(/datum/asset/spritesheet/research_designs)
|
||||
)
|
||||
|
||||
for(var/C in categories)
|
||||
if(line_length > 2)
|
||||
l += "</tr><tr>"
|
||||
line_length = 1
|
||||
// heavy data from this proc should be moved to static data when possible
|
||||
/obj/machinery/computer/rdconsole/ui_data(mob/user)
|
||||
. = list(
|
||||
"nodes" = list(),
|
||||
"experiments" = list(),
|
||||
"researched_designs" = stored_research.researched_designs,
|
||||
"points" = stored_research.research_points,
|
||||
"points_last_tick" = stored_research.last_bitcoins,
|
||||
"web_org" = stored_research.organization,
|
||||
"sec_protocols" = !(obj_flags & EMAGGED),
|
||||
"t_disk" = null,
|
||||
"d_disk" = null,
|
||||
"locked" = locked
|
||||
)
|
||||
|
||||
l += "<td><A href='?src=[REF(src)];category=[C];switch_screen=[menu_num]'>[C]</A></td>"
|
||||
line_length++
|
||||
|
||||
l += "</tr></table></div>"
|
||||
return l
|
||||
|
||||
/obj/machinery/computer/rdconsole/proc/ui_header()
|
||||
var/list/l = list()
|
||||
var/datum/asset/spritesheet/sheet = get_asset_datum(/datum/asset/spritesheet/research_designs)
|
||||
l += "[sheet.css_tag()][RDSCREEN_NOBREAK]"
|
||||
l += "<div class='statusDisplay'><b>[stored_research.organization] Research and Development Network</b>"
|
||||
l += "Available points: <BR>[techweb_point_display_rdconsole(stored_research.research_points, stored_research.last_bitcoins)]"
|
||||
l += "Security protocols: [obj_flags & EMAGGED ? "<font color='red'>Disabled</font>" : "<font color='green'>Enabled</font>"]"
|
||||
l += "<a href='?src=[REF(src)];switch_screen=[RDSCREEN_MENU]'>Main Menu</a> | <a href='?src=[REF(src)];switch_screen=[back]'>Back</a></div>[RDSCREEN_NOBREAK]"
|
||||
l += "[ui_mode == 1? "<span class='linkOn'>Normal View</span>" : "<a href='?src=[REF(src)];ui_mode=1'>Normal View</a>"] | [ui_mode == 2? "<span class='linkOn'>Expert View</span>" : "<a href='?src=[REF(src)];ui_mode=2'>Expert View</a>"] | [ui_mode == 3? "<span class='linkOn'>List View</span>" : "<a href='?src=[REF(src)];ui_mode=3'>List View</a>"]"
|
||||
return l
|
||||
|
||||
/obj/machinery/computer/rdconsole/proc/ui_main_menu()
|
||||
var/list/l = list()
|
||||
if(research_control)
|
||||
l += "<H2><a href='?src=[REF(src)];switch_screen=[RDSCREEN_TECHWEB]'>Technology</a>"
|
||||
if(d_disk)
|
||||
l += "<hr><a href='?src=[REF(src)];switch_screen=[RDSCREEN_DESIGNDISK]'>Design Disk</a>"
|
||||
if(t_disk)
|
||||
l += "<hr><a href='?src=[REF(src)];switch_screen=[RDSCREEN_TECHDISK]'>Tech Disk</a>"
|
||||
l += "<hr><a href='?src=[REF(src)];switch_screen=[RDSCREEN_SETTINGS]'>Settings</a></H2>"
|
||||
return l
|
||||
|
||||
/obj/machinery/computer/rdconsole/proc/ui_locked()
|
||||
return list("<h3><a href='?src=[REF(src)];switch_screen=[RDSCREEN_MENU];unlock_console=1'>SYSTEM LOCKED</a></h3></br>")
|
||||
|
||||
/obj/machinery/computer/rdconsole/proc/ui_settings()
|
||||
var/list/l = list()
|
||||
l += "<div class='statusDisplay'><h3>R&D Console Settings:</h3>"
|
||||
l += "<A href='?src=[REF(src)];lock_console=1'>Lock Console</A></div>"
|
||||
return l
|
||||
|
||||
/obj/machinery/computer/rdconsole/proc/ui_techdisk() //Legacy code
|
||||
RDSCREEN_UI_TDISK_CHECK
|
||||
var/list/l = list()
|
||||
l += "<div class='statusDisplay'>Disk Operations: <A href='?src=[REF(src)];clear_tech=0'>Clear Disk</A>"
|
||||
l += "<A href='?src=[REF(src)];eject_tech=1'>Eject Disk</A>"
|
||||
l += "<A href='?src=[REF(src)];updt_tech=0'>Upload All</A>"
|
||||
l += "<A href='?src=[REF(src)];copy_tech=1'>Load Technology to Disk</A></div>"
|
||||
l += "<div class='statusDisplay'><h3>Stored Technology Nodes:</h3>"
|
||||
for(var/i in t_disk.stored_research.researched_nodes)
|
||||
var/datum/techweb_node/N = SSresearch.techweb_node_by_id(i)
|
||||
l += "<A href='?src=[REF(src)];view_node=[i];back_screen=[screen]'>[N.display_name]</A>"
|
||||
l += "</div>"
|
||||
return l
|
||||
|
||||
/obj/machinery/computer/rdconsole/proc/ui_designdisk() //Legacy code
|
||||
RDSCREEN_UI_DDISK_CHECK
|
||||
var/list/l = list()
|
||||
l += "Disk Operations: <A href='?src=[REF(src)];clear_design=0'>Clear Disk</A><A href='?src=[REF(src)];updt_design=0'>Upload All</A><A href='?src=[REF(src)];eject_design=1'>Eject Disk</A>"
|
||||
for(var/i in 1 to d_disk.max_blueprints)
|
||||
l += "<div class='statusDisplay'>"
|
||||
if(d_disk.blueprints[i])
|
||||
var/datum/design/D = d_disk.blueprints[i]
|
||||
l += "<A href='?src=[REF(src)];view_design=[D.id]'>[D.name]</A>"
|
||||
l += "Operations: <A href='?src=[REF(src)];updt_design=[i]'>Upload to database</A> <A href='?src=[REF(src)];clear_design=[i]'>Clear Slot</A>"
|
||||
else
|
||||
l += "Empty Slot Operations: <A href='?src=[REF(src)];switch_screen=[RDSCREEN_DESIGNDISK_UPLOAD];disk_slot=[i]'>Load Design to Slot</A>"
|
||||
l += "</div>"
|
||||
return l
|
||||
|
||||
/obj/machinery/computer/rdconsole/proc/ui_designdisk_upload() //Legacy code
|
||||
RDSCREEN_UI_DDISK_CHECK
|
||||
var/list/l = list()
|
||||
l += "<A href='?src=[REF(src)];switch_screen=[RDSCREEN_DESIGNDISK];back_screen=[screen]'>Return to Disk Operations</A><div class='statusDisplay'>"
|
||||
l += "<h3>Load Design to Disk:</h3>"
|
||||
for(var/v in stored_research.researched_designs)
|
||||
var/datum/design/D = SSresearch.techweb_design_by_id(v)
|
||||
l += "[D.name] "
|
||||
l += "<A href='?src=[REF(src)];copy_design=[disk_slot_selected];copy_design_ID=[D.id]'>Copy to Disk</A>"
|
||||
l += "</div>"
|
||||
return l
|
||||
|
||||
/obj/machinery/computer/rdconsole/proc/ui_techweb()
|
||||
var/list/l = list()
|
||||
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 = SSresearch.techweb_node_by_id(node_)
|
||||
var/tier = stored_research.tiers[node.id]
|
||||
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 += "<table><tr><th align='left'>Researched</th><th align='left'>Available</th><th align='left'>Future</th></tr><tr>[RDSCREEN_NOBREAK]"
|
||||
if(max_tier)
|
||||
for(var/tier in 0 to max_tier)
|
||||
l += "<td valign='top'>[RDSCREEN_NOBREAK]"
|
||||
l += columns["[tier]"]
|
||||
l += "</td>[RDSCREEN_NOBREAK]"
|
||||
l += "</tr></table>[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 += SSresearch.techweb_node_by_id(v)
|
||||
for(var/v in stored_research.available_nodes)
|
||||
if(stored_research.researched_nodes[v] || stored_research.hidden_nodes[v])
|
||||
continue
|
||||
avail += SSresearch.techweb_node_by_id(v)
|
||||
for(var/v in stored_research.visible_nodes)
|
||||
if(stored_research.available_nodes[v])
|
||||
continue
|
||||
unavail += SSresearch.techweb_node_by_id(v)
|
||||
l += "<h2>Technology Nodes:</h2>[RDSCREEN_NOBREAK]"
|
||||
l += "<div><h3>Available for Research:</h3>"
|
||||
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.can_afford(N.get_price(stored_research)))
|
||||
var/research_href = not_unlocked? (has_points? "<A href='?src=[REF(src)];research_node=[N.id]'>Research</A>" : "<span class='linkOff bad'>Not Enough Points</span>") : null
|
||||
l += "<A href='?src=[REF(src)];view_node=[N.id];back_screen=[screen]'>[N.display_name]</A>[research_href]"
|
||||
l += "</div><div><h3>Locked Nodes:</h3>"
|
||||
for(var/datum/techweb_node/N in unavail)
|
||||
l += "<A href='?src=[REF(src)];view_node=[N.id];back_screen=[screen]'>[N.display_name]</A>"
|
||||
l += "</div><div><h3>Researched Nodes:</h3>"
|
||||
for(var/datum/techweb_node/N in res)
|
||||
l += "<A href='?src=[REF(src)];view_node=[N.id];back_screen=[screen]'>[N.display_name]</A>"
|
||||
l += "</div>[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/display_name = node.display_name
|
||||
if (selflink)
|
||||
display_name = "<A href='?src=[REF(src)];view_node=[node.id];back_screen=[screen]'>[display_name]</A>"
|
||||
l += "<div class='statusDisplay technode'><b>[display_name]</b> [RDSCREEN_NOBREAK]"
|
||||
if(minimal)
|
||||
l += "<br>[node.description]"
|
||||
else
|
||||
if(stored_research.researched_nodes[node.id])
|
||||
l += "<span class='linkOff'>Researched</span>"
|
||||
else if(stored_research.available_nodes[node.id])
|
||||
if(stored_research.can_afford(node.get_price(stored_research)))
|
||||
l += "<BR><A href='?src=[REF(src)];research_node=[node.id]'>[node.price_display(stored_research)]</A>"
|
||||
if (t_disk)
|
||||
.["t_disk"] = list (
|
||||
"stored_research" = t_disk.stored_research.researched_nodes
|
||||
)
|
||||
if (d_disk)
|
||||
.["d_disk"] = list (
|
||||
"max_blueprints" = d_disk.max_blueprints,
|
||||
"blueprints" = list()
|
||||
)
|
||||
for (var/i in 1 to d_disk.max_blueprints)
|
||||
if (d_disk.blueprints[i])
|
||||
var/datum/design/D = d_disk.blueprints[i]
|
||||
.["d_disk"]["blueprints"] += D.id
|
||||
else
|
||||
l += "<BR><span class='linkOff'>[node.price_display(stored_research)]</span>" // gray - too expensive
|
||||
else
|
||||
l += "<BR><span class='linkOff bad'>[node.price_display(stored_research)]</span>" // red - missing prereqs
|
||||
if(ui_mode == RDCONSOLE_UI_MODE_NORMAL)
|
||||
l += "[node.description]"
|
||||
for(var/i in node.design_ids)
|
||||
var/datum/design/D = SSresearch.techweb_design_by_id(i)
|
||||
l += "<span data-tooltip='[D.name]' onclick='location=\"?src=[REF(src)];view_design=[i];back_screen=[screen]\"'>[D.icon_html(usr)]</span>[RDSCREEN_NOBREAK]"
|
||||
l += "</div>[RDSCREEN_NOBREAK]"
|
||||
return l
|
||||
.["d_disk"]["blueprints"] += null
|
||||
|
||||
/obj/machinery/computer/rdconsole/proc/ui_techweb_nodeview()
|
||||
var/datum/techweb_node/selected_node = SSresearch.techweb_node_by_id(selected_node_id)
|
||||
RDSCREEN_UI_SNODE_CHECK
|
||||
var/list/l = list()
|
||||
if(stored_research.hidden_nodes[selected_node.id])
|
||||
l += "<div><h3>ERROR: RESEARCH NODE UNKNOWN.</h3></div>"
|
||||
|
||||
// Serialize all nodes to display
|
||||
for(var/v in stored_research.tiers)
|
||||
var/datum/techweb_node/n = SSresearch.techweb_node_by_id(v)
|
||||
|
||||
// Ensure node is supposed to be visible
|
||||
if (stored_research.hidden_nodes[v])
|
||||
continue
|
||||
|
||||
.["nodes"] += list(list(
|
||||
"id" = n.id,
|
||||
"can_unlock" = stored_research.can_unlock_node(n),
|
||||
"tier" = stored_research.tiers[n.id]
|
||||
))
|
||||
|
||||
// Get experiments and serialize them
|
||||
var/list/exp_to_process = stored_research.available_experiments.Copy()
|
||||
for (var/e in stored_research.completed_experiments)
|
||||
exp_to_process += stored_research.completed_experiments[e]
|
||||
for (var/e in exp_to_process)
|
||||
var/datum/experiment/ex = e
|
||||
.["experiments"][ex.type] = list(
|
||||
"name" = ex.name,
|
||||
"description" = ex.description,
|
||||
"tag" = ex.exp_tag,
|
||||
"progress" = ex.check_progress(),
|
||||
"completed" = ex.completed,
|
||||
"performance_hint" = ex.performance_hint
|
||||
)
|
||||
|
||||
/**
|
||||
* Compresses an ID to an integer representation using the id_cache, used for deduplication
|
||||
* in sent JSON payloads
|
||||
*
|
||||
* Arguments:
|
||||
* * id - the ID to compress
|
||||
*/
|
||||
/obj/machinery/computer/rdconsole/proc/compress_id(id)
|
||||
if (!id_cache[id])
|
||||
id_cache[id] = id_cache_seq
|
||||
id_cache_seq += 1
|
||||
return id_cache[id]
|
||||
|
||||
/obj/machinery/computer/rdconsole/ui_static_data(mob/user)
|
||||
. = list(
|
||||
"static_data" = list()
|
||||
)
|
||||
|
||||
// Build node cache...
|
||||
// Note this looks a bit ugly but its to reduce the size of the JSON payload
|
||||
// by the greatest amount that we can, as larger JSON payloads result in
|
||||
// hanging when the user opens the UI
|
||||
var/node_cache = list()
|
||||
for (var/node_id in SSresearch.techweb_nodes)
|
||||
var/datum/techweb_node/node = SSresearch.techweb_nodes[node_id] || SSresearch.error_node
|
||||
var/compressed_id = "[compress_id(node.id)]"
|
||||
node_cache[compressed_id] = list(
|
||||
"name" = node.display_name,
|
||||
"description" = node.description
|
||||
)
|
||||
if (LAZYLEN(node.research_costs))
|
||||
node_cache[compressed_id]["costs"] = list()
|
||||
for (var/node_cost in node.research_costs)
|
||||
node_cache[compressed_id]["costs"]["[compress_id(node_cost)]"] = node.research_costs[node_cost]
|
||||
if (LAZYLEN(node.prereq_ids))
|
||||
node_cache[compressed_id]["prereq_ids"] = list()
|
||||
for (var/prerequisite_node in node.prereq_ids)
|
||||
node_cache[compressed_id]["prereq_ids"] += compress_id(prerequisite_node)
|
||||
if (LAZYLEN(node.design_ids))
|
||||
node_cache[compressed_id]["design_ids"] = list()
|
||||
for (var/unlocked_design in node.design_ids)
|
||||
node_cache[compressed_id]["design_ids"] += compress_id(unlocked_design)
|
||||
if (LAZYLEN(node.unlock_ids))
|
||||
node_cache[compressed_id]["unlock_ids"] = list()
|
||||
for (var/unlocked_node in node.unlock_ids)
|
||||
node_cache[compressed_id]["unlock_ids"] += compress_id(unlocked_node)
|
||||
if (LAZYLEN(node.required_experiments))
|
||||
node_cache[compressed_id]["required_experiments"] = node.required_experiments
|
||||
if (LAZYLEN(node.discount_experiments))
|
||||
node_cache[compressed_id]["discount_experiments"] = node.discount_experiments
|
||||
|
||||
// Build design cache
|
||||
var/design_cache = list()
|
||||
var/datum/asset/spritesheet/research_designs/spritesheet = get_asset_datum(/datum/asset/spritesheet/research_designs)
|
||||
var/size32x32 = "[spritesheet.name]32x32"
|
||||
for (var/design_id in SSresearch.techweb_designs)
|
||||
var/datum/design/design = SSresearch.techweb_designs[design_id] || SSresearch.error_design
|
||||
var/compressed_id = "[compress_id(design.id)]"
|
||||
var/size = spritesheet.icon_size_id(design.id)
|
||||
design_cache[compressed_id] = list(
|
||||
design.name,
|
||||
"[size == size32x32 ? "" : "[size] "][design.id]"
|
||||
)
|
||||
|
||||
// Ensure id cache is included for decompression
|
||||
var/flat_id_cache = list()
|
||||
for (var/id in id_cache)
|
||||
flat_id_cache += id
|
||||
|
||||
.["static_data"] = list(
|
||||
"node_cache" = node_cache,
|
||||
"design_cache" = design_cache,
|
||||
"id_cache" = flat_id_cache
|
||||
)
|
||||
|
||||
/obj/machinery/computer/rdconsole/ui_act(action, list/params)
|
||||
. = ..()
|
||||
if (.)
|
||||
return
|
||||
|
||||
l += "<table><tr>[RDSCREEN_NOBREAK]"
|
||||
if (length(selected_node.prereq_ids))
|
||||
l += "<th align='left'>Requires</th>[RDSCREEN_NOBREAK]"
|
||||
l += "<th align='left'>Current Node</th>[RDSCREEN_NOBREAK]"
|
||||
if (length(selected_node.unlock_ids))
|
||||
l += "<th align='left'>Unlocks</th>[RDSCREEN_NOBREAK]"
|
||||
|
||||
l += "</tr><tr>[RDSCREEN_NOBREAK]"
|
||||
if (length(selected_node.prereq_ids))
|
||||
l += "<td valign='top'>[RDSCREEN_NOBREAK]"
|
||||
for (var/i in selected_node.prereq_ids)
|
||||
l += ui_techweb_single_node(SSresearch.techweb_node_by_id(i))
|
||||
l += "</td>[RDSCREEN_NOBREAK]"
|
||||
l += "<td valign='top'>[RDSCREEN_NOBREAK]"
|
||||
l += ui_techweb_single_node(selected_node, selflink=FALSE)
|
||||
l += "</td>[RDSCREEN_NOBREAK]"
|
||||
if (length(selected_node.unlock_ids))
|
||||
l += "<td valign='top'>[RDSCREEN_NOBREAK]"
|
||||
for (var/i in selected_node.unlock_ids)
|
||||
l += ui_techweb_single_node(SSresearch.techweb_node_by_id(i))
|
||||
l += "</td>[RDSCREEN_NOBREAK]"
|
||||
|
||||
l += "</tr></table>[RDSCREEN_NOBREAK]"
|
||||
return l
|
||||
|
||||
/obj/machinery/computer/rdconsole/proc/ui_techweb_designview() //Legacy code
|
||||
var/datum/design/selected_design = SSresearch.techweb_design_by_id(selected_design_id)
|
||||
RDSCREEN_UI_SDESIGN_CHECK
|
||||
var/list/l = list()
|
||||
l += "<div><table><tr><td>[selected_design.icon_html(usr)]</td><td><b>[selected_design.name]</b></td></tr></table>[RDSCREEN_NOBREAK]"
|
||||
if(selected_design.build_type)
|
||||
var/lathes = list()
|
||||
if(selected_design.build_type & IMPRINTER)
|
||||
lathes += "<span data-tooltip='Circuit Imprinter'>[machine_icon(/obj/machinery/rnd/production/circuit_imprinter)]</span>[RDSCREEN_NOBREAK]"
|
||||
if(selected_design.build_type & PROTOLATHE)
|
||||
lathes += "<span data-tooltip='Protolathe'>[machine_icon(/obj/machinery/rnd/production/protolathe)]</span>[RDSCREEN_NOBREAK]"
|
||||
if(selected_design.build_type & AUTOLATHE)
|
||||
lathes += "<span data-tooltip='Autolathe'>[machine_icon(/obj/machinery/autolathe)]</span>[RDSCREEN_NOBREAK]"
|
||||
if(selected_design.build_type & MECHFAB)
|
||||
lathes += "<span data-tooltip='Exosuit Fabricator'>[machine_icon(/obj/machinery/mecha_part_fabricator)]</span>[RDSCREEN_NOBREAK]"
|
||||
if(selected_design.build_type & BIOGENERATOR)
|
||||
lathes += "<span data-tooltip='Biogenerator'>[machine_icon(/obj/machinery/biogenerator)]</span>[RDSCREEN_NOBREAK]"
|
||||
if(selected_design.build_type & LIMBGROWER)
|
||||
lathes += "<span data-tooltip='Limbgrower'>[machine_icon(/obj/machinery/limbgrower)]</span>[RDSCREEN_NOBREAK]"
|
||||
if(selected_design.build_type & SMELTER)
|
||||
lathes += "<span data-tooltip='Smelter'>[machine_icon(/obj/machinery/mineral/processing_unit)]</span>[RDSCREEN_NOBREAK]"
|
||||
l += "Construction types:"
|
||||
l += lathes
|
||||
l += ""
|
||||
l += "Required materials:"
|
||||
var/all_mats = selected_design.materials + selected_design.reagents_list
|
||||
for(var/M in all_mats)
|
||||
l += "* [CallMaterialName(M)] x [all_mats[M]]"
|
||||
l += "Unlocked by:"
|
||||
for (var/i in selected_design.unlocked_by)
|
||||
l += ui_techweb_single_node(SSresearch.techweb_node_by_id(i))
|
||||
l += "[RDSCREEN_NOBREAK]</div>"
|
||||
return l
|
||||
|
||||
//Fuck TGUI.
|
||||
/obj/machinery/computer/rdconsole/proc/generate_ui()
|
||||
var/list/ui = list()
|
||||
ui += ui_header()
|
||||
if(locked)
|
||||
ui += ui_locked()
|
||||
else
|
||||
switch(screen)
|
||||
if(RDSCREEN_MENU)
|
||||
ui += ui_main_menu()
|
||||
if(RDSCREEN_TECHWEB)
|
||||
ui += ui_techweb()
|
||||
if(RDSCREEN_TECHWEB_NODEVIEW)
|
||||
ui += ui_techweb_nodeview()
|
||||
if(RDSCREEN_TECHWEB_DESIGNVIEW)
|
||||
ui += ui_techweb_designview()
|
||||
if(RDSCREEN_DESIGNDISK)
|
||||
ui += ui_designdisk()
|
||||
if(RDSCREEN_DESIGNDISK_UPLOAD)
|
||||
ui += ui_designdisk_upload()
|
||||
if(RDSCREEN_TECHDISK)
|
||||
ui += ui_techdisk()
|
||||
if(RDSCREEN_SETTINGS)
|
||||
ui += ui_settings()
|
||||
|
||||
for(var/i in 1 to length(ui))
|
||||
if(!findtextEx(ui[i], RDSCREEN_NOBREAK))
|
||||
ui[i] += "<br>"
|
||||
. = ui.Join("")
|
||||
return replacetextEx(., RDSCREEN_NOBREAK, "")
|
||||
|
||||
/obj/machinery/computer/rdconsole/Topic(raw, ls)
|
||||
if(..())
|
||||
return
|
||||
add_fingerprint(usr)
|
||||
usr.set_machine(src)
|
||||
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(obj_flags & EMAGGED)
|
||||
to_chat(usr, "<span class='boldwarning'>Security protocol error: Unable to lock.</span>")
|
||||
return
|
||||
if(allowed(usr))
|
||||
lock_console(usr)
|
||||
else
|
||||
to_chat(usr, "<span class='boldwarning'>Unauthorized Access.</span>")
|
||||
if(ls["unlock_console"])
|
||||
if(allowed(usr))
|
||||
unlock_console(usr)
|
||||
else
|
||||
to_chat(usr, "<span class='boldwarning'>Unauthorized Access.</span>")
|
||||
if(ls["back_screen"])
|
||||
back = text2num(ls["back_screen"])
|
||||
if(ls["category"])
|
||||
selected_category = ls["category"]
|
||||
if(ls["eject_design"]) //Eject the design disk.
|
||||
eject_disk("design")
|
||||
screen = RDSCREEN_MENU
|
||||
say("Ejecting Design Disk")
|
||||
if(ls["eject_tech"]) //Eject the technology disk.
|
||||
eject_disk("tech")
|
||||
screen = RDSCREEN_MENU
|
||||
say("Ejecting Technology Disk")
|
||||
if(ls["disk_slot"])
|
||||
disk_slot_selected = text2num(ls["disk_slot"])
|
||||
if(ls["research_node"])
|
||||
if(!research_control)
|
||||
return //honestly should call them out for href exploiting :^)
|
||||
if(!SSresearch.science_tech.available_nodes[ls["research_node"]])
|
||||
return //Nope!
|
||||
research_node(ls["research_node"], usr)
|
||||
if(ls["clear_tech"]) //Erase la on the technology disk.
|
||||
if(QDELETED(t_disk))
|
||||
say("No Technology Disk Inserted!")
|
||||
return
|
||||
qdel(t_disk.stored_research)
|
||||
t_disk.stored_research = new
|
||||
say("Wiping technology disk.")
|
||||
if(ls["copy_tech"]) //Copy some technology la from the research holder to the disk.
|
||||
if(QDELETED(t_disk))
|
||||
say("No Technology Disk Inserted!")
|
||||
return
|
||||
stored_research.copy_research_to(t_disk.stored_research)
|
||||
screen = RDSCREEN_TECHDISK
|
||||
say("Downloading to technology disk.")
|
||||
if(ls["clear_design"]) //Erases la on the design disk.
|
||||
if(QDELETED(d_disk))
|
||||
say("No Design Disk Inserted!")
|
||||
return
|
||||
var/n = text2num(ls["clear_design"])
|
||||
if(!n)
|
||||
for(var/i in 1 to d_disk.max_blueprints)
|
||||
d_disk.blueprints[i] = null
|
||||
say("Wiping design disk.")
|
||||
else
|
||||
|
||||
// Check if the console is locked to block any actions occuring
|
||||
if (locked && action != "toggleLock")
|
||||
say("Console is locked, cannot perform further actions.")
|
||||
return TRUE
|
||||
|
||||
switch (action)
|
||||
if ("toggleLock")
|
||||
if(obj_flags & EMAGGED)
|
||||
to_chat(usr, "<span class='boldwarning'>Security protocol error: Unable to access locking protocols.</span>")
|
||||
return TRUE
|
||||
if(allowed(usr))
|
||||
locked = !locked
|
||||
else
|
||||
to_chat(usr, "<span class='boldwarning'>Unauthorized Access.</span>")
|
||||
return TRUE
|
||||
if ("researchNode")
|
||||
if(!SSresearch.science_tech.available_nodes[params["node_id"]])
|
||||
return TRUE
|
||||
research_node(params["node_id"], usr)
|
||||
return TRUE
|
||||
if ("ejectDisk")
|
||||
eject_disk(params["type"])
|
||||
return TRUE
|
||||
if ("writeDesign")
|
||||
if(QDELETED(d_disk))
|
||||
say("No Design Disk Inserted!")
|
||||
return TRUE
|
||||
var/slot = text2num(params["slot"])
|
||||
var/datum/design/design = SSresearch.techweb_design_by_id(params["selectedDesign"])
|
||||
if(design)
|
||||
var/autolathe_friendly = TRUE
|
||||
if(design.reagents_list.len)
|
||||
autolathe_friendly = FALSE
|
||||
design.category -= "Imported"
|
||||
else
|
||||
for(var/material in design.materials)
|
||||
if( !(material in list(/datum/material/iron, /datum/material/glass)))
|
||||
autolathe_friendly = FALSE
|
||||
design.category -= "Imported"
|
||||
|
||||
if(design.build_type & (AUTOLATHE|PROTOLATHE)) // Specifically excludes circuit imprinter and mechfab
|
||||
design.build_type = autolathe_friendly ? (design.build_type | AUTOLATHE) : design.build_type
|
||||
design.category |= "Imported"
|
||||
d_disk.blueprints[slot] = design
|
||||
return TRUE
|
||||
if ("uploadDesignSlot")
|
||||
if(QDELETED(d_disk))
|
||||
say("No design disk found.")
|
||||
return TRUE
|
||||
var/n = text2num(params["slot"])
|
||||
stored_research.add_design(d_disk.blueprints[n], TRUE)
|
||||
return TRUE
|
||||
if ("clearDesignSlot")
|
||||
if(QDELETED(d_disk))
|
||||
say("No design disk inserted!")
|
||||
return TRUE
|
||||
var/n = text2num(params["slot"])
|
||||
var/datum/design/D = d_disk.blueprints[n]
|
||||
say("Wiping design [D.name] from design disk.")
|
||||
d_disk.blueprints[n] = null
|
||||
if(ls["updt_tech"]) //Uple the research holder with information from the technology disk.
|
||||
if(QDELETED(t_disk))
|
||||
say("No Technology Disk Inserted!")
|
||||
return
|
||||
say("Uploading technology disk.")
|
||||
t_disk.stored_research.copy_research_to(stored_research)
|
||||
if(ls["copy_design"]) //Copy design from the research holder to the design disk.
|
||||
if(QDELETED(d_disk))
|
||||
say("No Design Disk Inserted!")
|
||||
return
|
||||
var/slot = text2num(ls["copy_design"])
|
||||
var/datum/design/D = SSresearch.techweb_design_by_id(ls["copy_design_ID"])
|
||||
if(D)
|
||||
var/autolathe_friendly = TRUE
|
||||
if(D.reagents_list.len)
|
||||
autolathe_friendly = FALSE
|
||||
D.category -= "Imported"
|
||||
else
|
||||
for(var/x in D.materials)
|
||||
if( !(x in list(/datum/material/iron, /datum/material/glass)))
|
||||
autolathe_friendly = FALSE
|
||||
D.category -= "Imported"
|
||||
|
||||
if(D.build_type & (AUTOLATHE|PROTOLATHE)) // Specifically excludes circuit imprinter and mechfab
|
||||
D.build_type = autolathe_friendly ? (D.build_type | AUTOLATHE) : D.build_type
|
||||
D.category |= "Imported"
|
||||
d_disk.blueprints[slot] = D
|
||||
screen = RDSCREEN_DESIGNDISK
|
||||
if(ls["view_node"])
|
||||
selected_node_id = ls["view_node"]
|
||||
screen = RDSCREEN_TECHWEB_NODEVIEW
|
||||
if(ls["view_design"])
|
||||
selected_design_id = ls["view_design"]
|
||||
screen = RDSCREEN_TECHWEB_DESIGNVIEW
|
||||
if(ls["updt_design"]) //Uploads a design from disk to the techweb.
|
||||
if(QDELETED(d_disk))
|
||||
say("No design disk found.")
|
||||
return
|
||||
var/n = text2num(ls["updt_design"])
|
||||
if(!n)
|
||||
for(var/D in d_disk.blueprints)
|
||||
if(D)
|
||||
stored_research.add_design(D, TRUE)
|
||||
else
|
||||
stored_research.add_design(d_disk.blueprints[n], TRUE)
|
||||
|
||||
updateUsrDialog()
|
||||
|
||||
/obj/machinery/computer/rdconsole/ui_interact(mob/user)
|
||||
. = ..()
|
||||
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()
|
||||
|
||||
/obj/machinery/computer/rdconsole/proc/tdisk_uple_complete()
|
||||
tdisk_uple = FALSE
|
||||
updateUsrDialog()
|
||||
|
||||
/obj/machinery/computer/rdconsole/proc/ddisk_uple_complete()
|
||||
ddisk_uple = FALSE
|
||||
updateUsrDialog()
|
||||
return TRUE
|
||||
if ("eraseDisk")
|
||||
if (params["type"] == RND_DESIGN_DISK)
|
||||
if(QDELETED(d_disk))
|
||||
say("No design disk inserted!")
|
||||
return TRUE
|
||||
say("Wiping design disk.")
|
||||
for(var/i in 1 to d_disk.max_blueprints)
|
||||
d_disk.blueprints[i] = null
|
||||
if (params["type"] == RND_TECH_DISK)
|
||||
if(QDELETED(t_disk))
|
||||
say("No tech disk inserted!")
|
||||
return TRUE
|
||||
qdel(t_disk.stored_research)
|
||||
t_disk.stored_research = new
|
||||
say("Wiping technology disk.")
|
||||
return TRUE
|
||||
if ("uploadDisk")
|
||||
if (params["type"] == RND_DESIGN_DISK)
|
||||
if(QDELETED(d_disk))
|
||||
say("No design disk inserted!")
|
||||
return TRUE
|
||||
for(var/D in d_disk.blueprints)
|
||||
if(D)
|
||||
stored_research.add_design(D, TRUE)
|
||||
if (params["type"] == RND_TECH_DISK)
|
||||
if (QDELETED(t_disk))
|
||||
say("No tech disk inserted!")
|
||||
return TRUE
|
||||
say("Uploading technology disk.")
|
||||
t_disk.stored_research.copy_research_to(stored_research)
|
||||
return TRUE
|
||||
if ("loadTech")
|
||||
if(QDELETED(t_disk))
|
||||
say("No tech disk inserted!")
|
||||
return
|
||||
stored_research.copy_research_to(t_disk.stored_research)
|
||||
say("Downloading to technology disk.")
|
||||
return TRUE
|
||||
|
||||
/obj/machinery/computer/rdconsole/proc/eject_disk(type)
|
||||
if(type == "design")
|
||||
if(type == RND_DESIGN_DISK && d_disk)
|
||||
d_disk.forceMove(get_turf(src))
|
||||
d_disk = null
|
||||
if(type == "tech")
|
||||
if(type == RND_TECH_DISK && t_disk)
|
||||
t_disk.forceMove(get_turf(src))
|
||||
t_disk = null
|
||||
|
||||
/obj/machinery/computer/rdconsole/proc/lock_console(mob/user)
|
||||
locked = TRUE
|
||||
|
||||
/obj/machinery/computer/rdconsole/proc/unlock_console(mob/user)
|
||||
locked = FALSE
|
||||
#undef RND_TECH_DISK
|
||||
#undef RND_DESIGN_DISK
|
||||
|
||||
@@ -40,66 +40,3 @@
|
||||
/obj/item/disk/tech_disk/spaceloot/Initialize()
|
||||
. = ..()
|
||||
stored_research = new /datum/techweb/bepis(remove_tech = FALSE)
|
||||
|
||||
/obj/item/research_notes
|
||||
name = "research notes"
|
||||
desc = "Valuable scientific data. Use it in a research console to scan it."
|
||||
icon = 'icons/obj/bureaucracy.dmi'
|
||||
icon_state = "paper"
|
||||
inhand_icon_state = "paper"
|
||||
w_class = WEIGHT_CLASS_SMALL
|
||||
///research points it holds
|
||||
var/value = 69
|
||||
///origin of the research
|
||||
var/origin_type = "debug"
|
||||
///if it ws merged with different origins to apply a bonus
|
||||
var/mixed = FALSE
|
||||
|
||||
/obj/item/research_notes/Initialize(mapload, _value, _origin_type)
|
||||
. = ..()
|
||||
if(_value)
|
||||
value = _value
|
||||
if(_origin_type)
|
||||
origin_type = _origin_type
|
||||
change_vol()
|
||||
|
||||
/obj/item/research_notes/examine(mob/user)
|
||||
. = ..()
|
||||
. += "<span class='notice'>It is worth [value] research points.</span>"
|
||||
|
||||
/// proc that changes name and icon depending on value
|
||||
/obj/item/research_notes/proc/change_vol()
|
||||
if(value >= 10000)
|
||||
name = "revolutionary discovery in the field of [origin_type]"
|
||||
icon_state = "docs_verified"
|
||||
return
|
||||
else if(value >= 2500)
|
||||
name = "essay about [origin_type]"
|
||||
icon_state = "paper_words"
|
||||
return
|
||||
else if(value >= 100)
|
||||
name = "notes of [origin_type]"
|
||||
icon_state = "paperslip_words"
|
||||
return
|
||||
else
|
||||
name = "fragmentary data of [origin_type]"
|
||||
icon_state = "scrap"
|
||||
return
|
||||
|
||||
///proc when you slap research notes into another one, it applies a bonus if they are of different origin (only applied once)
|
||||
/obj/item/research_notes/proc/merge(obj/item/research_notes/new_paper)
|
||||
var/bonus = min(value , new_paper.value)
|
||||
value = value + new_paper.value
|
||||
if(origin_type != new_paper.origin_type && !mixed)
|
||||
value += bonus * 0.3
|
||||
origin_type = "[origin_type] and [new_paper.origin_type]"
|
||||
mixed = TRUE
|
||||
change_vol()
|
||||
qdel(new_paper)
|
||||
|
||||
/obj/item/research_notes/attackby(obj/item/I, mob/user, params)
|
||||
. = ..()
|
||||
if(istype(I, /obj/item/research_notes))
|
||||
var/obj/item/research_notes/R = I
|
||||
merge(R)
|
||||
return TRUE
|
||||
|
||||
@@ -69,12 +69,6 @@
|
||||
research_disabled = !research_disabled
|
||||
refresh_working()
|
||||
|
||||
/obj/machinery/rnd/server/proc/mine()
|
||||
. = base_mining_income
|
||||
var/penalty = max((get_env_temp() - temp_tolerance_high), 0) * temp_penalty_coefficient
|
||||
current_temp = get_env_temp()
|
||||
. = max(. - penalty, 0)
|
||||
|
||||
/obj/machinery/rnd/server/proc/get_env_temp()
|
||||
var/turf/open/L = loc
|
||||
if(isturf(L))
|
||||
|
||||
@@ -1,27 +1,47 @@
|
||||
|
||||
//Used \n[\s]*origin_tech[\s]*=[\s]*"[\S]+" to delete all origin techs.
|
||||
//Or \n[\s]*origin_tech[\s]*=[\s]list\([A-Z_\s=0-9,]*\)
|
||||
//Used \n[\s]*req_tech[\s]*=[\s]*list\(["a-z\s=0-9,]*\) to delete all req_techs.
|
||||
|
||||
//Techweb datums are meant to store unlocked research, being able to be stored on research consoles, servers, and disks. They are NOT global.
|
||||
/**
|
||||
* # Techweb
|
||||
*
|
||||
* A datum representing a research techweb
|
||||
*
|
||||
* Techweb datums are meant to store unlocked research, being able to be stored
|
||||
* on research consoles, servers, and disks. They are NOT global.
|
||||
*/
|
||||
/datum/techweb
|
||||
var/list/researched_nodes = list() //Already unlocked and all designs are now available. Assoc list, id = TRUE
|
||||
var/list/visible_nodes = list() //Visible nodes, doesn't mean it can be researched. Assoc list, id = TRUE
|
||||
var/list/available_nodes = list() //Nodes that can immediately be researched, all reqs met. assoc list, id = TRUE
|
||||
var/list/researched_designs = list() //Designs that are available for use. Assoc list, id = TRUE
|
||||
var/list/custom_designs = list() //Custom inserted designs like from disks that should survive recalculation.
|
||||
var/list/boosted_nodes = list() //Already boosted nodes that can't be boosted again. node id = path of boost object.
|
||||
var/list/hidden_nodes = list() //Hidden nodes. id = TRUE. Used for unhiding nodes when requirements are met by removing the entry of the node.
|
||||
var/list/deconstructed_items = list() //items already deconstructed for a generic point boost. path = list(point_type = points)
|
||||
var/list/research_points = list() //Available research points. type = number
|
||||
/// Already unlocked and all designs are now available. Assoc list, id = TRUE
|
||||
var/list/researched_nodes = list()
|
||||
/// Visible nodes, doesn't mean it can be researched. Assoc list, id = TRUE
|
||||
var/list/visible_nodes = list()
|
||||
/// Nodes that can immediately be researched, all reqs met. assoc list, id = TRUE
|
||||
var/list/available_nodes = list()
|
||||
/// Designs that are available for use. Assoc list, id = TRUE
|
||||
var/list/researched_designs = list()
|
||||
/// Custom inserted designs like from disks that should survive recalculation.
|
||||
var/list/custom_designs = list()
|
||||
/// Already boosted nodes that can't be boosted again. node id = path of boost object.
|
||||
var/list/boosted_nodes = list()
|
||||
/// Hidden nodes. id = TRUE. Used for unhiding nodes when requirements are met by removing the entry of the node.
|
||||
var/list/hidden_nodes = list()
|
||||
/// Items already deconstructed for a generic point boost, path = list(point_type = points)
|
||||
var/list/deconstructed_items = list()
|
||||
/// Available research points, type = number
|
||||
var/list/research_points = list()
|
||||
var/list/obj/machinery/computer/rdconsole/consoles_accessing = list()
|
||||
var/id = "generic"
|
||||
var/list/research_logs = list() //IC logs.
|
||||
/// IC logs
|
||||
var/list/research_logs = list()
|
||||
var/largest_bomb_value = 0
|
||||
var/organization = "Third-Party" //Organization name, used for display.
|
||||
var/list/last_bitcoins = list() //Current per-second production, used for display only.
|
||||
var/list/discovered_mutations = list() //Mutations discovered by genetics, this way they are shared and cant be destroyed by destroying a single console
|
||||
var/list/tiers = list() //Assoc list, id = number, 1 is available, 2 is all reqs are 1, so on
|
||||
/// Organization name, used for display
|
||||
var/organization = "Third-Party"
|
||||
/// Current per-second production, used for display only.
|
||||
var/list/last_bitcoins = list()
|
||||
/// Mutations discovered by genetics, this way they are shared and cant be destroyed by destroying a single console
|
||||
var/list/discovered_mutations = list()
|
||||
/// Assoc list, id = number, 1 is available, 2 is all reqs are 1, so on
|
||||
var/list/tiers = list()
|
||||
/// Available experiments
|
||||
var/list/available_experiments = list()
|
||||
/// Completed experiments
|
||||
var/list/completed_experiments = list()
|
||||
|
||||
/datum/techweb/New()
|
||||
SSresearch.techwebs += src
|
||||
@@ -206,6 +226,69 @@
|
||||
return FALSE
|
||||
return TRUE
|
||||
|
||||
/**
|
||||
* Checks if all experiments have been completed for a given node on this techweb
|
||||
*
|
||||
* Arguments:
|
||||
* * node - the node to check
|
||||
*/
|
||||
/datum/techweb/proc/have_experiments_for_node(datum/techweb_node/node)
|
||||
. = TRUE
|
||||
for (var/experiment_type in node.required_experiments)
|
||||
if (!completed_experiments[experiment_type])
|
||||
return FALSE
|
||||
|
||||
/**
|
||||
* Checks if a node can be unlocked on this techweb, having the required points and experiments
|
||||
*
|
||||
* Arguments:
|
||||
* * node - the node to check
|
||||
*/
|
||||
/datum/techweb/proc/can_unlock_node(datum/techweb_node/node)
|
||||
return can_afford(node.get_price(src)) && have_experiments_for_node(node)
|
||||
|
||||
/**
|
||||
* Adds an experiment to this techweb by its type, ensures that no duplicates are added.
|
||||
*
|
||||
* Arguments:
|
||||
* * experiment_type - the type of the experiment to add
|
||||
*/
|
||||
/datum/techweb/proc/add_experiment(experiment_type)
|
||||
. = TRUE
|
||||
// check active experiments for experiment of this type
|
||||
for (var/available_experiment in available_experiments)
|
||||
var/datum/experiment/experiment = available_experiment
|
||||
if (experiment.type == experiment_type)
|
||||
return FALSE
|
||||
// check completed experiments for experiments of this type
|
||||
for (var/completed_experiment in completed_experiments)
|
||||
var/datum/experiment/experiment = completed_experiment
|
||||
if (experiment == experiment_type)
|
||||
return FALSE
|
||||
available_experiments += new experiment_type()
|
||||
|
||||
/**
|
||||
* Adds a list of experiments to this techweb by their types, ensures that no duplicates are added.
|
||||
*
|
||||
* Arguments:
|
||||
* * experiment_list - the list of types of experiments to add
|
||||
*/
|
||||
/datum/techweb/proc/add_experiments(list/experiment_list)
|
||||
. = TRUE
|
||||
for (var/experiment_type in experiment_list)
|
||||
var/datum/experiment/experiment = experiment_type
|
||||
. = . && add_experiment(experiment)
|
||||
|
||||
/**
|
||||
* Notifies the techweb that an experiment has been completed, updating internal state of the techweb to reflect this.
|
||||
*
|
||||
* Arguments:
|
||||
* * completed_experiment - the experiment which was completed
|
||||
*/
|
||||
/datum/techweb/proc/complete_experiment(datum/experiment/completed_experiment)
|
||||
available_experiments -= completed_experiment
|
||||
completed_experiments[completed_experiment.type] = completed_experiment
|
||||
|
||||
/datum/techweb/proc/printout_points()
|
||||
return techweb_point_display_generic(research_points)
|
||||
|
||||
@@ -217,21 +300,25 @@
|
||||
return FALSE
|
||||
update_node_status(node)
|
||||
if(!force)
|
||||
if(!available_nodes[node.id] || (auto_adjust_cost && (!can_afford(node.get_price(src)))))
|
||||
if(!available_nodes[node.id] || (auto_adjust_cost && (!can_afford(node.get_price(src)))) || !have_experiments_for_node(node))
|
||||
return FALSE
|
||||
if(auto_adjust_cost)
|
||||
remove_point_list(node.get_price(src))
|
||||
researched_nodes[node.id] = TRUE //Add to our researched list
|
||||
for(var/id in node.unlock_ids)
|
||||
visible_nodes[id] = TRUE
|
||||
update_node_status(SSresearch.techweb_node_by_id(id))
|
||||
var/datum/techweb_node/unlocked_node = SSresearch.techweb_node_by_id(id)
|
||||
if (unlocked_node.required_experiments.len > 0)
|
||||
add_experiments(unlocked_node.required_experiments)
|
||||
if (unlocked_node.discount_experiments.len > 0)
|
||||
add_experiments(unlocked_node.discount_experiments)
|
||||
update_node_status(unlocked_node)
|
||||
for(var/id in node.design_ids)
|
||||
add_design_by_id(id)
|
||||
update_node_status(node)
|
||||
if(get_that_dosh)
|
||||
var/datum/bank_account/D = SSeconomy.get_dep_account(ACCOUNT_SCI)
|
||||
if(D)
|
||||
D.adjust_money(SSeconomy.techweb_bounty)
|
||||
var/datum/bank_account/science_department_bank_account = SSeconomy.get_dep_account(ACCOUNT_SCI)
|
||||
science_department_bank_account?.adjust_money(SSeconomy.techweb_bounty)
|
||||
return TRUE
|
||||
|
||||
/datum/techweb/science/research_node(datum/techweb_node/node, force = FALSE, auto_adjust_cost = TRUE, get_that_dosh = TRUE) //When something is researched, triggers the proc for this techweb only
|
||||
|
||||
@@ -1,21 +1,41 @@
|
||||
|
||||
//Techweb nodes are GLOBAL, there should only be one instance of them in the game. Persistant changes should never be made to them in-game.
|
||||
//USE SSRESEARCH PROCS TO OBTAIN REFERENCES. DO NOT REFERENCE OUTSIDE OF SSRESEARCH OR YOU WILL FUCK UP GC.
|
||||
|
||||
/**
|
||||
* # Techweb Node
|
||||
*
|
||||
* A datum representing a researchable node in the techweb.
|
||||
*
|
||||
* Techweb nodes are GLOBAL, there should only be one instance of them in the game. Persistant
|
||||
* changes should never be made to them in-game. USE SSRESEARCH PROCS TO OBTAIN REFERENCES.
|
||||
* DO NOT REFERENCE OUTSIDE OF SSRESEARCH OR YOU WILL FUCK UP GC.
|
||||
*/
|
||||
/datum/techweb_node
|
||||
/// Internal ID of the node
|
||||
var/id
|
||||
/// The name of the node as it is shown on UIs
|
||||
var/display_name = "Errored Node"
|
||||
/// A description of the node to show on UIs
|
||||
var/description = "Why are you seeing this?"
|
||||
var/hidden = FALSE //Whether it starts off hidden.
|
||||
var/experimental = FALSE //If the tech can be randomly granted by the BEPIS as a reward. Meant to be fully given in tech disks, not researched.
|
||||
var/starting_node = FALSE //Whether it's available without any research.
|
||||
/// Whether it starts off hidden
|
||||
var/hidden = FALSE
|
||||
/// If the tech can be randomly generated by the BEPIS as a reward. MEant to be fully given in tech disks, not researched
|
||||
var/experimental = FALSE
|
||||
/// Whether it's available without any research
|
||||
var/starting_node = FALSE
|
||||
var/list/prereq_ids = list()
|
||||
var/list/design_ids = list()
|
||||
var/list/unlock_ids = list() //CALCULATED FROM OTHER NODE'S PREREQUISITES. Assoc list id = TRUE.
|
||||
var/list/boost_item_paths = list() //Associative list, path = list(point type = point_value).
|
||||
var/autounlock_by_boost = TRUE //boosting this will autounlock this node.
|
||||
var/list/research_costs = list() //Point cost to research. type = amount
|
||||
var/category = "Misc" //Category
|
||||
/// CALCULATED FROM OTHER NODE'S PREREQUISITIES. Associated list id = TRUE
|
||||
var/list/unlock_ids = list()
|
||||
/// Associative list, path = list(point type = point_value)
|
||||
var/list/boost_item_paths = list()
|
||||
/// Boosting this will autounlock this node
|
||||
var/autounlock_by_boost = TRUE
|
||||
/// The points cost to research the node, type = amount
|
||||
var/list/research_costs = list()
|
||||
/// The category of the node
|
||||
var/category = "Misc"
|
||||
/// The list of experiments required to research the node
|
||||
var/list/required_experiments = list()
|
||||
/// If completed, these experiments give a specific point amount discount to the node.area
|
||||
var/list/discount_experiments = list()
|
||||
|
||||
/datum/techweb_node/error_node
|
||||
id = "ERROR"
|
||||
@@ -48,6 +68,7 @@
|
||||
VARSET_TO_LIST(., autounlock_by_boost)
|
||||
VARSET_TO_LIST(., research_costs)
|
||||
VARSET_TO_LIST(., category)
|
||||
VARSET_TO_LIST(., required_experiments)
|
||||
|
||||
/datum/techweb_node/deserialize_list(list/input, list/options)
|
||||
if(!input["id"])
|
||||
@@ -63,6 +84,7 @@
|
||||
VARSET_FROM_LIST(input, autounlock_by_boost)
|
||||
VARSET_FROM_LIST(input, research_costs)
|
||||
VARSET_FROM_LIST(input, category)
|
||||
VARSET_FROM_LIST(input, required_experiments)
|
||||
Initialize()
|
||||
return src
|
||||
|
||||
@@ -83,10 +105,14 @@
|
||||
if(host)
|
||||
var/list/actual_costs = research_costs
|
||||
if(host.boosted_nodes[id])
|
||||
var/list/L = host.boosted_nodes[id]
|
||||
for(var/i in L)
|
||||
if(actual_costs[i])
|
||||
actual_costs[i] -= L[i]
|
||||
var/list/boostlist = host.boosted_nodes[id]
|
||||
for(var/booster in boostlist)
|
||||
if(actual_costs[booster])
|
||||
actual_costs[booster] -= boostlist[booster]
|
||||
for(var/cost_type in actual_costs)
|
||||
for(var/experiment_type in discount_experiments)
|
||||
if(host.completed_experiments[experiment_type]) //do we have this discount_experiment unlocked?
|
||||
actual_costs[cost_type] -= discount_experiments[experiment_type]
|
||||
return actual_costs
|
||||
else
|
||||
return research_costs
|
||||
|
||||
@@ -10,9 +10,9 @@
|
||||
// Default research tech, prevents bricking
|
||||
design_ids = list("basic_matter_bin", "basic_cell", "basic_scanning", "basic_capacitor", "basic_micro_laser", "micro_mani", "basic_electrolite", "c-reader", "desttagger", "salestagger", "handlabel", "packagewrap",
|
||||
"destructive_analyzer", "circuit_imprinter", "experimentor", "rdconsole", "bepis", "design_disk", "tech_disk", "rdserver", "rdservercontrol", "mechfab",
|
||||
"paystand", "space_heater", "bucket", "sec_rshot", "sec_beanbag_slug", "sec_Islug", "sec_dart", "sec_38", "rglass", "plasteel",
|
||||
"paystand", "space_heater", "bucket", "sec_rshot", "sec_beanbag_slug", "sec_Islug", "sec_dart", "sec_38", "rglass", "plasteel", "experi_scanner", "destructive_scanner", "doppler_array",
|
||||
"plastitanium", "plasmaglass", "plasmareinforcedglass", "titaniumglass", "plastitaniumglass", "plastic_knife", "plastic_fork", "plastic_spoon", "conveyor_belt", "conveyor_switch",
|
||||
"b6mm","b6mm_rubber","b9mm","b9mm_rubber","b10mm","b10mm_rubber","b12mm","b12mm_rubber") //SKYRAT EDIT CHANGE - SEC_HAUL
|
||||
"b6mm","b6mm_rubber","b9mm","b9mm_rubber","b10mm","b10mm_rubber","b12mm","b12mm_rubber") //SKYRAT EDIT ADDITION - SEC_HAUL
|
||||
|
||||
/datum/techweb_node/mmi
|
||||
id = "mmi"
|
||||
@@ -63,6 +63,7 @@
|
||||
"dropper", "defibmountdefault", "surgical_tape", "portable_chem_mixer") //SKYRAT EDIT ADDITION: added "surgical_drapes"
|
||||
|
||||
/////////////////////////Biotech/////////////////////////
|
||||
|
||||
/datum/techweb_node/biotech
|
||||
id = "biotech"
|
||||
display_name = "Biological Technology"
|
||||
@@ -70,6 +71,7 @@
|
||||
prereq_ids = list("base")
|
||||
design_ids = list("chem_heater", "chem_master", "chem_dispenser", "pandemic", "defibrillator", "defibmount", "operating", "soda_dispenser", "beer_dispenser", "healthanalyzer", "medigel","genescanner", "med_spray_bottle", "chem_pack", "blood_pack", "medical_kiosk", "crewpinpointerprox", "medipen_refiller", "biopsy_tool", "plumbing_rcd_sci")
|
||||
research_costs = list(TECHWEB_POINT_TYPE_GENERIC = 2500)
|
||||
required_experiments = list(/datum/experiment/scanning/points/slime/calibration)
|
||||
|
||||
/datum/techweb_node/adv_biotech
|
||||
id = "adv_biotech"
|
||||
@@ -77,7 +79,9 @@
|
||||
description = "Advanced Biotechnology"
|
||||
prereq_ids = list("biotech")
|
||||
design_ids = list("piercesyringe", "crewpinpointer", "smoke_machine", "plasmarefiller", "limbgrower", "meta_beaker", "healthanalyzer_advanced", "harvester", "holobarrier_med", "detective_scanner", "defibrillator_compact", "ph_meter")
|
||||
research_costs = list(TECHWEB_POINT_TYPE_GENERIC = 2500)
|
||||
research_costs = list(TECHWEB_POINT_TYPE_GENERIC = 5000)
|
||||
required_experiments = list(/datum/experiment/scanning/points/slime/easy)
|
||||
discount_experiments = list(/datum/experiment/scanning/random/material/meat = 4000) //Big discount to reinforce doing it.
|
||||
|
||||
/datum/techweb_node/bio_process
|
||||
id = "bio_process"
|
||||
@@ -85,9 +89,11 @@
|
||||
description = "From slimes to kitchens."
|
||||
prereq_ids = list("biotech")
|
||||
design_ids = list("smartfridge", "gibber", "deepfryer", "monkey_recycler", "processor", "gibber", "microwave", "reagentgrinder", "dish_drive", "fat_sucker", "griddle")
|
||||
research_costs = list(TECHWEB_POINT_TYPE_GENERIC = 2500)
|
||||
research_costs = list(TECHWEB_POINT_TYPE_GENERIC = 4000)
|
||||
discount_experiments = list(/datum/experiment/scanning/random/cytology = 3000) //Big discount to reinforce doing it.
|
||||
|
||||
/////////////////////////Advanced Surgery/////////////////////////
|
||||
|
||||
/datum/techweb_node/imp_wt_surgery
|
||||
id = "imp_wt_surgery"
|
||||
display_name = "Improved Wound-Tending Surgery"
|
||||
@@ -122,6 +128,7 @@
|
||||
research_costs = list(TECHWEB_POINT_TYPE_GENERIC = 10000)
|
||||
|
||||
/////////////////////////data theory tech/////////////////////////
|
||||
|
||||
/datum/techweb_node/datatheory //Computer science
|
||||
id = "datatheory"
|
||||
display_name = "Data Theory"
|
||||
@@ -132,6 +139,7 @@
|
||||
|
||||
|
||||
/////////////////////////engineering tech/////////////////////////
|
||||
|
||||
/datum/techweb_node/engineering
|
||||
id = "engineering"
|
||||
display_name = "Industrial Engineering"
|
||||
@@ -141,7 +149,8 @@
|
||||
"atmosalerts", "atmos_control", "recycler", "autolathe", "high_micro_laser", "nano_mani", "mesons", "welding_goggles", "thermomachine", "rad_collector", "tesla_coil", "grounding_rod",
|
||||
"apc_control", "cell_charger", "power control", "airlock_board", "firelock_board", "airalarm_electronics", "firealarm_electronics", "cell_charger", "stack_console", "stack_machine",
|
||||
"oxygen_tank", "plasma_tank", "emergency_oxygen", "emergency_oxygen_engi", "plasmaman_tank_belt", "electrolyzer", "adv_electrolite", "pneumatic_seal")
|
||||
research_costs = list(TECHWEB_POINT_TYPE_GENERIC = 7500)
|
||||
research_costs = list(TECHWEB_POINT_TYPE_GENERIC = 12500)
|
||||
discount_experiments = list(/datum/experiment/scanning/random/material/easy = 7500)
|
||||
|
||||
/datum/techweb_node/adv_engi
|
||||
id = "adv_engi"
|
||||
@@ -152,7 +161,8 @@
|
||||
//"HFR_waste_output", "HFR_moderator_input", "HFR_corner", "HFR_interface") //ORIGINAL
|
||||
design_ids = list("engine_goggles", "tray_goggles_prescription", "engine_goggles_prescription", "mesons_prescription", "magboots", "forcefield_projector", "weldingmask", "rcd_loaded", "rpd_loaded", "sheetifier", "HFR_core", "HFR_fuel_input",
|
||||
"HFR_waste_output", "HFR_moderator_input", "HFR_corner", "HFR_interface") //SKYRAT EDIT CHANGE - HUDS
|
||||
research_costs = list(TECHWEB_POINT_TYPE_GENERIC = 2500)
|
||||
research_costs = list(TECHWEB_POINT_TYPE_GENERIC = 5000)
|
||||
discount_experiments = list(/datum/experiment/scanning/random/material/medium/one = 4000)
|
||||
|
||||
/datum/techweb_node/anomaly
|
||||
id = "anomaly_research"
|
||||
@@ -381,7 +391,8 @@
|
||||
description = "For the slackers on the station."
|
||||
prereq_ids = list("comptech")
|
||||
design_ids = list("arcade_battle", "arcade_orion", "slotmachine")
|
||||
research_costs = list(TECHWEB_POINT_TYPE_GENERIC = 1000)
|
||||
research_costs = list(TECHWEB_POINT_TYPE_GENERIC = 3250)
|
||||
discount_experiments = list(/datum/experiment/physical/arcade_winner = 3000)
|
||||
|
||||
/datum/techweb_node/comp_recordkeeping
|
||||
id = "comp_recordkeeping"
|
||||
@@ -499,7 +510,8 @@
|
||||
prereq_ids = list("basic_mining", "adv_engi", "adv_power", "adv_plasma")
|
||||
//design_ids = list("drill_diamond", "jackhammer", "hypermod", "plasmacutter_adv") - ORIGINAL
|
||||
design_ids = list("drill_diamond", "jackhammer", "hypermod", "plasmacutter_adv", "ripleyupgradef") //SKYRAT EDIT CHANGE - MKF
|
||||
research_costs = list(TECHWEB_POINT_TYPE_GENERIC = 2500)
|
||||
research_costs = list(TECHWEB_POINT_TYPE_GENERIC = 7500)
|
||||
discount_experiments = list(/datum/experiment/scanning/random/material/hard/one = 5000)
|
||||
|
||||
/datum/techweb_node/janitor
|
||||
id = "janitor"
|
||||
@@ -507,7 +519,8 @@
|
||||
description = "Clean things better, faster, stronger, and harder!"
|
||||
prereq_ids = list("adv_engi")
|
||||
design_ids = list("holobarrier_jani", "advmop", "buffer", "blutrash", "light_replacer", "spraybottle", "beartrap", "paint_remover")
|
||||
research_costs = list(TECHWEB_POINT_TYPE_GENERIC = 2500)
|
||||
research_costs = list(TECHWEB_POINT_TYPE_GENERIC = 4000)
|
||||
discount_experiments = list(/datum/experiment/scanning/random/janitor_trash = 3000) //75% discount for scanning some trash, seems fair right?
|
||||
|
||||
/datum/techweb_node/botany
|
||||
id = "botany"
|
||||
@@ -523,7 +536,8 @@
|
||||
description = "Highly advanced tools."
|
||||
design_ids = list("exwelder", "jawsoflife", "handdrill", "laserscalpel", "mechanicalpinches", "searingtool", "gene_shears")
|
||||
prereq_ids = list("adv_engi")
|
||||
research_costs = list(TECHWEB_POINT_TYPE_GENERIC = 2500)
|
||||
research_costs = list(TECHWEB_POINT_TYPE_GENERIC = 7500)
|
||||
discount_experiments = list(/datum/experiment/scanning/random/material/hard/one = 5000)
|
||||
|
||||
/datum/techweb_node/sec_basic
|
||||
id = "sec_basic"
|
||||
@@ -547,7 +561,8 @@
|
||||
description = "Unlocks new RCD designs."
|
||||
design_ids = list("rcd_upgrade_silo_link")
|
||||
prereq_ids = list("rcd_upgrade", "bluespace_travel")
|
||||
research_costs = list(TECHWEB_POINT_TYPE_GENERIC = 5000)
|
||||
research_costs = list(TECHWEB_POINT_TYPE_GENERIC = 10000)
|
||||
discount_experiments = list(/datum/experiment/scanning/random/material/hard/two = 5000)
|
||||
|
||||
/////////////////////////weaponry tech/////////////////////////
|
||||
/datum/techweb_node/weaponry
|
||||
@@ -557,6 +572,7 @@
|
||||
prereq_ids = list("engineering")
|
||||
design_ids = list("pin_testing", "tele_shield")
|
||||
research_costs = list(TECHWEB_POINT_TYPE_GENERIC = 10000)
|
||||
required_experiments = list(/datum/experiment/explosion/calibration)
|
||||
|
||||
/datum/techweb_node/adv_weaponry
|
||||
id = "adv_weaponry"
|
||||
@@ -565,6 +581,7 @@
|
||||
prereq_ids = list("adv_engi", "weaponry")
|
||||
design_ids = list("pin_loyalty")
|
||||
research_costs = list(TECHWEB_POINT_TYPE_GENERIC = 10000)
|
||||
required_experiments = list(/datum/experiment/explosion/medium)
|
||||
|
||||
/datum/techweb_node/electric_weapons
|
||||
id = "electronic_weapons"
|
||||
@@ -605,6 +622,7 @@
|
||||
prereq_ids = list("adv_weaponry")
|
||||
design_ids = list("large_Grenade", "pyro_Grenade", "adv_Grenade")
|
||||
research_costs = list(TECHWEB_POINT_TYPE_GENERIC = 2500)
|
||||
required_experiments = list(/datum/experiment/explosion/maxcap)
|
||||
|
||||
/datum/techweb_node/ballistic_weapons
|
||||
id = "ballistic_weapons"
|
||||
@@ -637,7 +655,8 @@
|
||||
description = "For when you just aren't Gundam enough."
|
||||
prereq_ids = list("adv_robotics")
|
||||
design_ids = list("mech_repair_droid")
|
||||
research_costs = list(TECHWEB_POINT_TYPE_GENERIC = 2500)
|
||||
research_costs = list(TECHWEB_POINT_TYPE_GENERIC = 7500)
|
||||
discount_experiments = list(/datum/experiment/scanning/random/material/medium/three = 5000)
|
||||
|
||||
/datum/techweb_node/odysseus
|
||||
id = "mecha_odysseus"
|
||||
@@ -827,7 +846,7 @@
|
||||
prereq_ids = list("datatheory")
|
||||
design_ids = list("nanite_disk","nanite_remote","nanite_comm_remote","nanite_scanner",\
|
||||
"nanite_chamber","public_nanite_chamber","nanite_chamber_control","nanite_programmer","nanite_program_hub","nanite_cloud_control",\
|
||||
"relay_nanites", "monitoring_nanites", "research_nanites" ,"researchplus_nanites", "access_nanites", "repairing_nanites","sensor_nanite_volume", "repeater_nanites", "relay_repeater_nanites","debugging_nanites")
|
||||
"relay_nanites", "monitoring_nanites", "access_nanites", "repairing_nanites","sensor_nanite_volume", "repeater_nanites", "relay_repeater_nanites","debugging_nanites")
|
||||
research_costs = list(TECHWEB_POINT_TYPE_GENERIC = 1000)
|
||||
|
||||
/datum/techweb_node/nanite_smart
|
||||
@@ -941,6 +960,7 @@
|
||||
/obj/item/cautery/alien, /obj/item/surgicaldrill/alien, /obj/item/screwdriver/abductor, /obj/item/wrench/abductor, /obj/item/crowbar/abductor, /obj/item/multitool/abductor,
|
||||
/obj/item/weldingtool/abductor, /obj/item/wirecutters/abductor, /obj/item/circuitboard/machine/abductor, /obj/item/melee/baton/abductor, /obj/item/abductor, /obj/item/gun/energy/shrink_ray)
|
||||
research_costs = list(TECHWEB_POINT_TYPE_GENERIC = 2500)
|
||||
required_experiments = list(/datum/experiment/scanning/points/slime/hard)
|
||||
hidden = TRUE
|
||||
|
||||
/datum/techweb_node/alien_engi
|
||||
|
||||
@@ -99,6 +99,7 @@
|
||||
for(var/created_thing in resulting_atoms)
|
||||
for(var/x in 1 to resulting_atoms[created_thing])
|
||||
var/atom/thing = new created_thing(get_turf(vat))
|
||||
ADD_TRAIT(thing, TRAIT_VATGROWN, "vatgrowing")
|
||||
vat.visible_message("<span class='nicegreen'>[thing] pops out of [vat]!</span>")
|
||||
|
||||
QDEL_NULL(vat.biological_sample) //Kill off the sample, we're done
|
||||
|
||||
@@ -165,28 +165,6 @@
|
||||
current_potion = O
|
||||
to_chat(user, "<span class='notice'>You load [O] in the console's potion slot[replaced ? ", replacing the one that was there before" : ""].</span>")
|
||||
return
|
||||
else if(istype(O, /obj/item/slime_extract))
|
||||
var/obj/item/slime_extract/E = O
|
||||
if(!SSresearch.slime_already_researched[E.type])
|
||||
if(!E.research)
|
||||
playsound(src, 'sound/machines/buzz-sigh.ogg', 50, 3, -1)
|
||||
visible_message("<span class='notice'>[src] buzzes and displays a message: Invalid extract! (You shouldn't be seeing this. If you are, tell someone.)</span>")
|
||||
return
|
||||
if(E.Uses <= 0)
|
||||
playsound(src, 'sound/machines/buzz-sigh.ogg', 50, 3, -1)
|
||||
visible_message("<span class='notice'>[src] buzzes and displays a message: Extract consumed - no research available.</span>")
|
||||
return
|
||||
else
|
||||
playsound(src, 'sound/machines/ping.ogg', 50, 3, -1)
|
||||
visible_message("<span class='notice'>You insert [E] into a slot on the [src]. It pings and prints out some research notes worth [E.research] points!</span>")
|
||||
new /obj/item/research_notes(drop_location(), E.research, "xenobiology")
|
||||
SSresearch.slime_already_researched[E.type] = TRUE
|
||||
qdel(O)
|
||||
return
|
||||
else
|
||||
visible_message("<span class='notice'>[src] buzzes and displays a message: Slime extract already researched!</span>")
|
||||
playsound(src, 'sound/machines/buzz-sigh.ogg', 50, 3, -1)
|
||||
return
|
||||
..()
|
||||
|
||||
/obj/machinery/computer/camera_advanced/xenobio/multitool_act(mob/living/user, obj/item/multitool/I)
|
||||
|
||||
@@ -16,8 +16,6 @@
|
||||
var/effectmod ///Which type of crossbred
|
||||
var/list/activate_reagents = list() ///Reagents required for activation
|
||||
var/recurring = FALSE
|
||||
/// Research point value for slime cores. These are defines stored in [code/__DEFINES/research.dm] - the actual values are updated there.
|
||||
var/research
|
||||
|
||||
/obj/item/slime_extract/examine(mob/user)
|
||||
. = ..()
|
||||
@@ -94,7 +92,6 @@
|
||||
icon_state = "grey slime extract"
|
||||
effectmod = "reproductive"
|
||||
activate_reagents = list(/datum/reagent/blood,/datum/reagent/toxin/plasma,/datum/reagent/water)
|
||||
research = SLIME_RESEARCH_TIER_0
|
||||
|
||||
/obj/item/slime_extract/grey/activate(mob/living/carbon/human/user, datum/species/jelly/luminescent/species, activation_type)
|
||||
switch(activation_type)
|
||||
@@ -120,7 +117,8 @@
|
||||
icon_state = "gold slime extract"
|
||||
effectmod = "symbiont"
|
||||
activate_reagents = list(/datum/reagent/blood,/datum/reagent/toxin/plasma,/datum/reagent/water)
|
||||
research = SLIME_RESEARCH_TIER_4
|
||||
|
||||
|
||||
|
||||
/obj/item/slime_extract/gold/activate(mob/living/carbon/human/user, datum/species/jelly/luminescent/species, activation_type)
|
||||
switch(activation_type)
|
||||
@@ -150,7 +148,8 @@
|
||||
icon_state = "silver slime extract"
|
||||
effectmod = "consuming"
|
||||
activate_reagents = list(/datum/reagent/toxin/plasma,/datum/reagent/water)
|
||||
research = SLIME_RESEARCH_TIER_2
|
||||
|
||||
|
||||
|
||||
/obj/item/slime_extract/silver/activate(mob/living/carbon/human/user, datum/species/jelly/luminescent/species, activation_type)
|
||||
switch(activation_type)
|
||||
@@ -176,7 +175,6 @@
|
||||
icon_state = "metal slime extract"
|
||||
effectmod = "industrial"
|
||||
activate_reagents = list(/datum/reagent/toxin/plasma,/datum/reagent/water)
|
||||
research = SLIME_RESEARCH_TIER_1
|
||||
|
||||
/obj/item/slime_extract/metal/activate(mob/living/carbon/human/user, datum/species/jelly/luminescent/species, activation_type)
|
||||
switch(activation_type)
|
||||
@@ -201,7 +199,6 @@
|
||||
icon_state = "purple slime extract"
|
||||
effectmod = "regenerative"
|
||||
activate_reagents = list(/datum/reagent/blood,/datum/reagent/toxin/plasma)
|
||||
research = SLIME_RESEARCH_TIER_1
|
||||
|
||||
/obj/item/slime_extract/purple/activate(mob/living/carbon/human/user, datum/species/jelly/luminescent/species, activation_type)
|
||||
switch(activation_type)
|
||||
@@ -221,7 +218,6 @@
|
||||
icon_state = "dark purple slime extract"
|
||||
effectmod = "self-sustaining"
|
||||
activate_reagents = list(/datum/reagent/toxin/plasma)
|
||||
research = SLIME_RESEARCH_TIER_2
|
||||
|
||||
/obj/item/slime_extract/darkpurple/activate(mob/living/carbon/human/user, datum/species/jelly/luminescent/species, activation_type)
|
||||
switch(activation_type)
|
||||
@@ -245,7 +241,6 @@
|
||||
icon_state = "orange slime extract"
|
||||
effectmod = "burning"
|
||||
activate_reagents = list(/datum/reagent/blood,/datum/reagent/toxin/plasma,/datum/reagent/water)
|
||||
research = SLIME_RESEARCH_TIER_1
|
||||
|
||||
/obj/item/slime_extract/orange/activate(mob/living/carbon/human/user, datum/species/jelly/luminescent/species, activation_type)
|
||||
switch(activation_type)
|
||||
@@ -266,7 +261,6 @@
|
||||
icon_state = "yellow slime extract"
|
||||
effectmod = "charged"
|
||||
activate_reagents = list(/datum/reagent/blood,/datum/reagent/water)
|
||||
research = SLIME_RESEARCH_TIER_2
|
||||
|
||||
/obj/item/slime_extract/yellow/activate(mob/living/carbon/human/user, datum/species/jelly/luminescent/species, activation_type)
|
||||
switch(activation_type)
|
||||
@@ -290,7 +284,6 @@
|
||||
icon_state = "red slime extract"
|
||||
effectmod = "sanguine"
|
||||
activate_reagents = list(/datum/reagent/blood,/datum/reagent/toxin/plasma,/datum/reagent/water)
|
||||
research = SLIME_RESEARCH_TIER_4
|
||||
|
||||
/obj/item/slime_extract/red/activate(mob/living/carbon/human/user, datum/species/jelly/luminescent/species, activation_type)
|
||||
switch(activation_type)
|
||||
@@ -311,7 +304,6 @@
|
||||
icon_state = "blue slime extract"
|
||||
effectmod = "stabilized"
|
||||
activate_reagents = list(/datum/reagent/blood,/datum/reagent/toxin/plasma,/datum/reagent/water)
|
||||
research = SLIME_RESEARCH_TIER_1
|
||||
|
||||
/obj/item/slime_extract/blue/activate(mob/living/carbon/human/user, datum/species/jelly/luminescent/species, activation_type)
|
||||
switch(activation_type)
|
||||
@@ -332,7 +324,6 @@
|
||||
icon_state = "dark blue slime extract"
|
||||
effectmod = "chilling"
|
||||
activate_reagents = list(/datum/reagent/toxin/plasma,/datum/reagent/water)
|
||||
research = SLIME_RESEARCH_TIER_2
|
||||
|
||||
/obj/item/slime_extract/darkblue/activate(mob/living/carbon/human/user, datum/species/jelly/luminescent/species, activation_type)
|
||||
switch(activation_type)
|
||||
@@ -356,7 +347,6 @@
|
||||
icon_state = "pink slime extract"
|
||||
effectmod = "gentle"
|
||||
activate_reagents = list(/datum/reagent/blood,/datum/reagent/toxin/plasma)
|
||||
research = SLIME_RESEARCH_TIER_4
|
||||
|
||||
/obj/item/slime_extract/pink/activate(mob/living/carbon/human/user, datum/species/jelly/luminescent/species, activation_type)
|
||||
switch(activation_type)
|
||||
@@ -385,7 +375,6 @@
|
||||
icon_state = "green slime extract"
|
||||
effectmod = "mutative"
|
||||
activate_reagents = list(/datum/reagent/blood,/datum/reagent/toxin/plasma,/datum/reagent/uranium/radium)
|
||||
research = SLIME_RESEARCH_TIER_4
|
||||
|
||||
/obj/item/slime_extract/green/activate(mob/living/carbon/human/user, datum/species/jelly/luminescent/species, activation_type)
|
||||
switch(activation_type)
|
||||
@@ -410,7 +399,6 @@
|
||||
icon_state = "light pink slime extract"
|
||||
effectmod = "loyal"
|
||||
activate_reagents = list(/datum/reagent/toxin/plasma)
|
||||
research = SLIME_RESEARCH_TIER_5
|
||||
|
||||
/obj/item/slime_extract/lightpink/activate(mob/living/carbon/human/user, datum/species/jelly/luminescent/species, activation_type)
|
||||
switch(activation_type)
|
||||
@@ -435,7 +423,6 @@
|
||||
icon_state = "black slime extract"
|
||||
effectmod = "transformative"
|
||||
activate_reagents = list(/datum/reagent/toxin/plasma)
|
||||
research = SLIME_RESEARCH_TIER_5
|
||||
|
||||
/obj/item/slime_extract/black/activate(mob/living/carbon/human/user, datum/species/jelly/luminescent/species, activation_type)
|
||||
switch(activation_type)
|
||||
@@ -457,7 +444,6 @@
|
||||
icon_state = "oil slime extract"
|
||||
effectmod = "detonating"
|
||||
activate_reagents = list(/datum/reagent/blood,/datum/reagent/toxin/plasma)
|
||||
research = SLIME_RESEARCH_TIER_5
|
||||
|
||||
/obj/item/slime_extract/oil/activate(mob/living/carbon/human/user, datum/species/jelly/luminescent/species, activation_type)
|
||||
switch(activation_type)
|
||||
@@ -481,7 +467,6 @@
|
||||
icon_state = "adamantine slime extract"
|
||||
effectmod = "crystalline"
|
||||
activate_reagents = list(/datum/reagent/toxin/plasma)
|
||||
research = SLIME_RESEARCH_TIER_5
|
||||
|
||||
/obj/item/slime_extract/adamantine/activate(mob/living/carbon/human/user, datum/species/jelly/luminescent/species, activation_type)
|
||||
switch(activation_type)
|
||||
@@ -515,7 +500,6 @@
|
||||
var/teleport_x = 0
|
||||
var/teleport_y = 0
|
||||
var/teleport_z = 0
|
||||
research = SLIME_RESEARCH_TIER_3
|
||||
|
||||
/obj/item/slime_extract/bluespace/activate(mob/living/carbon/human/user, datum/species/jelly/luminescent/species, activation_type)
|
||||
switch(activation_type)
|
||||
@@ -548,7 +532,6 @@
|
||||
icon_state = "pyrite slime extract"
|
||||
effectmod = "prismatic"
|
||||
activate_reagents = list(/datum/reagent/blood,/datum/reagent/toxin/plasma)
|
||||
research = SLIME_RESEARCH_TIER_3
|
||||
|
||||
/obj/item/slime_extract/pyrite/activate(mob/living/carbon/human/user, datum/species/jelly/luminescent/species, activation_type)
|
||||
switch(activation_type)
|
||||
@@ -576,7 +559,6 @@
|
||||
icon_state = "cerulean slime extract"
|
||||
effectmod = "recurring"
|
||||
activate_reagents = list(/datum/reagent/blood,/datum/reagent/toxin/plasma)
|
||||
research = SLIME_RESEARCH_TIER_3
|
||||
|
||||
/obj/item/slime_extract/cerulean/activate(mob/living/carbon/human/user, datum/species/jelly/luminescent/species, activation_type)
|
||||
switch(activation_type)
|
||||
@@ -597,7 +579,6 @@
|
||||
icon_state = "sepia slime extract"
|
||||
effectmod = "lengthened"
|
||||
activate_reagents = list(/datum/reagent/blood,/datum/reagent/toxin/plasma,/datum/reagent/water)
|
||||
research = SLIME_RESEARCH_TIER_3
|
||||
|
||||
/obj/item/slime_extract/sepia/activate(mob/living/carbon/human/user, datum/species/jelly/luminescent/species, activation_type)
|
||||
switch(activation_type)
|
||||
@@ -620,7 +601,6 @@
|
||||
icon_state = "rainbow slime extract"
|
||||
effectmod = "hyperchromatic"
|
||||
activate_reagents = list(/datum/reagent/blood,/datum/reagent/toxin/plasma,"lesser plasma",/datum/reagent/toxin/slimejelly,"holy water and uranium") //Curse this snowflake reagent list.
|
||||
research = SLIME_RESEARCH_TIER_RAINBOW
|
||||
|
||||
/obj/item/slime_extract/rainbow/activate(mob/living/carbon/human/user, datum/species/jelly/luminescent/species, activation_type)
|
||||
switch(activation_type)
|
||||
|
||||
Reference in New Issue
Block a user