diff --git a/code/modules/research/circuitprinter.dm b/code/modules/research/circuitprinter.dm index 7dca5f808c..8e4c6193b5 100644 --- a/code/modules/research/circuitprinter.dm +++ b/code/modules/research/circuitprinter.dm @@ -21,7 +21,7 @@ using metal and glass, it uses glass and reagents (usually sulphuric acid). idle_power_usage = 30 active_power_usage = 2500 - + machine_name = "circuit imprinter" machine_desc = "Creates circuit boards by etching raw sheets of material with sulphuric acid. Part of an R&D network." @@ -146,14 +146,14 @@ using metal and glass, it uses glass and reagents (usually sulphuric acid). return queue.Cut(index, index + 1) -/obj/machinery/r_n_d/circuit_imprinter/proc/canBuild(var/datum/design/D) +/obj/machinery/r_n_d/circuit_imprinter/proc/canBuild(datum/design/D, amount = 1) for(var/M in D.materials) - if(materials[M] <= D.materials[M] * mat_efficiency) - return 0 + if(materials[M] <= D.materials[M] * mat_efficiency * amount) + return FALSE for(var/C in D.chemicals) - if(!reagents.has_reagent(C, D.chemicals[C] * mat_efficiency)) - return 0 - return 1 + if(!reagents.has_reagent(C, D.chemicals[C] * mat_efficiency * amount)) + return FALSE + return TRUE /obj/machinery/r_n_d/circuit_imprinter/proc/build(var/datum/design/D) var/power = active_power_usage diff --git a/code/modules/research/protolathe.dm b/code/modules/research/protolathe.dm index b8b6ab2588..64faae8c6d 100644 --- a/code/modules/research/protolathe.dm +++ b/code/modules/research/protolathe.dm @@ -145,14 +145,14 @@ return queue.Cut(index, index + 1) -/obj/machinery/r_n_d/protolathe/proc/canBuild(var/datum/design/D) +/obj/machinery/r_n_d/protolathe/proc/canBuild(datum/design/D, amount = 1) for(var/M in D.materials) - if(materials[M] < D.materials[M]) - return 0 + if(materials[M] < D.materials[M] * mat_efficiency * amount) + return FALSE for(var/C in D.chemicals) - if(!reagents.has_reagent(C, D.chemicals[C])) - return 0 - return 1 + if(!reagents.has_reagent(C, D.chemicals[C] * mat_efficiency * amount)) + return FALSE + return TRUE /obj/machinery/r_n_d/protolathe/proc/build(var/datum/design/D) var/power = active_power_usage diff --git a/code/modules/research/rdconsole.dm b/code/modules/research/rdconsole.dm index 695f78ad3d..c22c106d74 100644 --- a/code/modules/research/rdconsole.dm +++ b/code/modules/research/rdconsole.dm @@ -321,7 +321,9 @@ won't update every console in existence) but it's more of a hassle to do. Also, being_built = D break if(being_built) - linked_lathe.addToQueue(being_built) + var/amount_to_print = text2num(href_list["build_amount"]) + for(var/i = 1 to amount_to_print) + linked_lathe.addToQueue(being_built) screen = 3.1 else if(href_list["imprint"]) //Causes the Circuit Imprinter to build something. @@ -333,7 +335,9 @@ won't update every console in existence) but it's more of a hassle to do. Also, being_built = D break if(being_built) - linked_imprinter.addToQueue(being_built) + var/amount_to_print = text2num(href_list["build_amount"]) + for(var/i = 1 to amount_to_print) + linked_imprinter.addToQueue(being_built) screen = 4.1 else if(href_list["disposeI"]) //Causes the circuit imprinter to dispose of a single reagent (all of it) @@ -722,15 +726,20 @@ won't update every console in existence) but it's more of a hassle to do. Also, continue var/temp_dat for(var/M in D.materials) - temp_dat += ", [D.materials[M]] [CallMaterialName(M)]" + temp_dat += ", [D.materials[M]*(linked_imprinter ? linked_imprinter.mat_efficiency : 1)] [CallMaterialName(M)]" for(var/T in D.chemicals) temp_dat += ", [D.chemicals[T]*(linked_imprinter ? linked_imprinter.mat_efficiency : 1)] [CallReagentName(T)]" if(temp_dat) temp_dat = " \[[copytext(temp_dat, 3)]\]" if(linked_lathe.canBuild(D)) - dat += "
  • [D.name][temp_dat]" + dat += "
  • [D.name]" + if(linked_lathe.canBuild(D, 5)) + dat += " x5" + if(linked_lathe.canBuild(D, 10)) + dat += " x10" else - dat += "
  • [D.name][temp_dat]" + dat += "
  • [D.name]" + dat += "[temp_dat]" dat += "" if(3.2) //Protolathe Material Storage Sub-menu @@ -808,7 +817,11 @@ won't update every console in existence) but it's more of a hassle to do. Also, if(temp_dat) temp_dat = " \[[copytext(temp_dat,3)]\]" if(linked_imprinter.canBuild(D)) - dat += "
  • [D.name][temp_dat]" + dat += "
  • [D.name][temp_dat]" + if(linked_imprinter.canBuild(D, 5)) + dat += " x5" + if(linked_imprinter.canBuild(D, 10)) + dat += " x10" else dat += "
  • [D.name][temp_dat]" dat += ""