From 9357c247919355a7e5467e2bc8ce2d2dde8e69cf Mon Sep 17 00:00:00 2001 From: c0 Date: Sat, 11 Jun 2016 11:05:41 +0300 Subject: [PATCH] Fixes protolathe not accepting any reagents --- code/modules/research/circuitprinter.dm | 10 ++++++---- code/modules/research/protolathe.dm | 11 +++++++---- 2 files changed, 13 insertions(+), 8 deletions(-) diff --git a/code/modules/research/circuitprinter.dm b/code/modules/research/circuitprinter.dm index 7ee80b4e266..41b58622d1b 100644 --- a/code/modules/research/circuitprinter.dm +++ b/code/modules/research/circuitprinter.dm @@ -47,14 +47,16 @@ using metal and glass, it uses glass and reagents (usually sulfuric acis). /obj/item/weapon/reagent_containers/glass/beaker = 2) /obj/machinery/r_n_d/circuit_imprinter/RefreshParts() - var/T = 0 + reagents.maximum_volume = 0 for(var/obj/item/weapon/reagent_containers/glass/G in component_parts) reagents.maximum_volume += G.volume G.reagents.trans_to(src, G.reagents.total_volume) + + materials.max_amount = 0 for(var/obj/item/weapon/stock_parts/matter_bin/M in component_parts) - T += M.rating - materials.max_amount = T * 75000 - T = 0 + materials.max_amount += M.rating * 75000 + + var/T = 0 for(var/obj/item/weapon/stock_parts/manipulator/M in component_parts) T += M.rating efficiency_coeff = 2 ** (T - 1) //Only 1 manipulator here, you're making runtimes Razharas diff --git a/code/modules/research/protolathe.dm b/code/modules/research/protolathe.dm index 9af5ba770e9..8335b43e1c4 100644 --- a/code/modules/research/protolathe.dm +++ b/code/modules/research/protolathe.dm @@ -51,13 +51,16 @@ Note: Must be placed west/left of and R&D console to function. return ..() /obj/machinery/r_n_d/protolathe/RefreshParts() - var/T = 0 + reagents.maximum_volume = 0 for(var/obj/item/weapon/reagent_containers/glass/G in component_parts) + reagents.maximum_volume += G.volume G.reagents.trans_to(src, G.reagents.total_volume) + + materials.max_amount = 0 for(var/obj/item/weapon/stock_parts/matter_bin/M in component_parts) - T += M.rating - materials.max_amount = T * 75000 - T = 1.2 + materials.max_amount += M.rating * 75000 + + var/T = 1.2 for(var/obj/item/weapon/stock_parts/manipulator/M in component_parts) T -= M.rating/10 efficiency_coeff = min(max(0, T), 1)