Merge pull request #4486 from Citadel-Station-13/RnD

Techwebs update 1: Departmental lathes/imprinters can now link to research consoles
This commit is contained in:
LetterJay
2017-12-21 13:05:39 -06:00
committed by GitHub
4 changed files with 22 additions and 14 deletions
@@ -4,10 +4,8 @@
icon_state = "circuit_imprinter"
container_type = OPENCONTAINER
circuit = /obj/item/circuitboard/machine/circuit_imprinter/department
console_link = FALSE
requires_console = FALSE
var/list/allowed_department_flags = DEPARTMENTAL_FLAG_ALL
var/list/datum/design/cached_designs
var/list/datum/design/matching_designs
var/department_tag = "Unidentified" //used for material distribution among other things.
@@ -4,10 +4,8 @@
icon_state = "protolathe"
container_type = OPENCONTAINER
circuit = /obj/item/circuitboard/machine/protolathe/department
console_link = FALSE
requires_console = FALSE
var/list/allowed_department_flags = DEPARTMENTAL_FLAG_ALL
var/list/datum/design/cached_designs
var/list/datum/design/matching_designs
var/department_tag = "Unidentified" //used for material distribution among other things.
+20 -9
View File
@@ -150,11 +150,9 @@ doesn't have toxins access.
return FALSE
var/price = TN.get_price(stored_research)
if(stored_research.research_points >= price)
investigate_log("[key_name_admin(user)] researched [id]([price]) on techweb id [stored_research.id].")
investigate_log("[key_name(user)] researched [id]([price]) on techweb id [stored_research.id].", INVESTIGATE_RESEARCH)
if(stored_research == SSresearch.science_tech)
if(stored_research.researched_nodes.len < 30)
SSblackbox.record_feedback("tally", "science_techweb_unlock_first_thirty", 1, "[id]")
SSblackbox.record_feedback("tally", "science_techweb_unlock", 1, "[id]")
SSblackbox.record_feedback("associative", "science_techweb_unlock", 1, list("id" = "[id]", "price" = "[price]", "time" = "[SQLtime()]"))
if(stored_research.research_node(SSresearch.techweb_nodes[id]))
say("Sucessfully researched [TN.display_name].")
var/logname = "Unknown"
@@ -231,11 +229,16 @@ doesn't have toxins access.
var/list/l = list()
if(research_control)
l += "<H2><a href='?src=[REF(src)];switch_screen=[RDSCREEN_TECHWEB]'>Technology</a>"
l += "<hr><a href='?src=[REF(src)];switch_screen=[RDSCREEN_DESIGNDISK]'>Design Disk</a>"
l += "<hr><a href='?src=[REF(src)];switch_screen=[RDSCREEN_TECHDISK]'>Tech Disk</a>"
l += "<hr><a href='?src=[REF(src)];switch_screen=[RDSCREEN_DECONSTRUCT]'>Deconstructive Analyzer</a>"
l += "<hr><a href='?src=[REF(src)];switch_screen=[RDSCREEN_PROTOLATHE]'>Protolathe</a>"
l += "<hr><a href='?src=[REF(src)];switch_screen=[RDSCREEN_IMPRINTER]'>Circuit Imprinter</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>"
if(linked_destroy)
l += "<hr><a href='?src=[REF(src)];switch_screen=[RDSCREEN_DECONSTRUCT]'>Deconstructive Analyzer</a>"
if(linked_lathe)
l += "<hr><a href='?src=[REF(src)];switch_screen=[RDSCREEN_PROTOLATHE]'>Protolathe</a>"
if(linked_imprinter)
l += "<hr><a href='?src=[REF(src)];switch_screen=[RDSCREEN_IMPRINTER]'>Circuit Imprinter</a>"
l += "<hr><a href='?src=[REF(src)];switch_screen=[RDSCREEN_SETTINGS]'>Settings</a></H2>"
return l
@@ -278,6 +281,8 @@ doesn't have toxins access.
var/datum/design/D = stored_research.researched_designs[v]
if(!(selected_category in D.category)|| !(D.build_type & PROTOLATHE))
continue
if(!(D.departmental_flags & linked_lathe.allowed_department_flags))
continue
var/temp_material
var/c = 50
var/t
@@ -328,6 +333,8 @@ doesn't have toxins access.
l += ui_protolathe_header()
var/coeff = linked_lathe.efficiency_coeff
for(var/datum/design/D in matching_designs)
if(!(D.departmental_flags & linked_lathe.allowed_department_flags))
continue
var/temp_material
var/c = 50
var/t
@@ -416,6 +423,8 @@ doesn't have toxins access.
var/datum/design/D = stored_research.researched_designs[v]
if(!(selected_category in D.category) || !(D.build_type & IMPRINTER))
continue
if(!(D.departmental_flags & linked_imprinter.allowed_department_flags))
continue
var/temp_materials
var/check_materials = TRUE
@@ -443,6 +452,8 @@ doesn't have toxins access.
var/coeff = linked_imprinter.efficiency_coeff
for(var/datum/design/D in matching_designs)
if(!(D.departmental_flags & linked_imprinter.allowed_department_flags))
continue
var/temp_materials
var/check_materials = TRUE
var/all_materials = D.materials + D.reagents_list
+2 -1
View File
@@ -15,7 +15,8 @@
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