From b7e666ff2335f380849f9eca4303e29df31c6491 Mon Sep 17 00:00:00 2001 From: CitadelStationBot Date: Sat, 10 Mar 2018 06:55:12 -0600 Subject: [PATCH] [MIRROR] Fixes science scaling to decrease materials rather than increase.... (#5882) * Fixes scaling displays (#36253) * Fixes science scaling to decrease materials rather than increase.... --- code/modules/research/machinery/_production.dm | 9 +++++++-- code/modules/research/machinery/circuit_imprinter.dm | 7 ------- code/modules/research/machinery/protolathe.dm | 7 ------- 3 files changed, 7 insertions(+), 16 deletions(-) diff --git a/code/modules/research/machinery/_production.dm b/code/modules/research/machinery/_production.dm index 3cef3a0b84..26e2eaef2d 100644 --- a/code/modules/research/machinery/_production.dm +++ b/code/modules/research/machinery/_production.dm @@ -73,6 +73,11 @@ materials.max_amount = 0 for(var/obj/item/stock_parts/matter_bin/M in component_parts) materials.max_amount += M.rating * 75000 + var/total_rating = 0 + for(var/obj/item/stock_parts/manipulator/M in component_parts) + total_rating += M.rating + total_rating = max(1, total_rating) + efficiency_coeff /= total_rating //we eject the materials upon deconstruction. /obj/machinery/rnd/production/on_deconstruction() @@ -234,9 +239,9 @@ t = check_mat(D, M) temp_material += " | " if (t < 1) - temp_material += "[all_materials[M]*coeff] [CallMaterialName(M)]" + temp_material += "[all_materials[M]/coeff] [CallMaterialName(M)]" else - temp_material += " [all_materials[M]*coeff] [CallMaterialName(M)]" + temp_material += " [all_materials[M]/coeff] [CallMaterialName(M)]" c = min(c,t) if (c >= 1) diff --git a/code/modules/research/machinery/circuit_imprinter.dm b/code/modules/research/machinery/circuit_imprinter.dm index 3a56850a2f..e51b1c5cf5 100644 --- a/code/modules/research/machinery/circuit_imprinter.dm +++ b/code/modules/research/machinery/circuit_imprinter.dm @@ -20,13 +20,6 @@ production_animation = "circuit_imprinter_ani" allowed_buildtypes = IMPRINTER -/obj/machinery/rnd/production/circuit_imprinter/calculate_efficiency() - . = ..() - var/T = 0 - for(var/obj/item/stock_parts/manipulator/M in component_parts) - T += M.rating - efficiency_coeff = 2 ** (T - 1) //Only 1 manipulator here, you're making runtimes Razharas - /obj/machinery/rnd/production/circuit_imprinter/disconnect_console() linked_console.linked_imprinter = null ..() \ No newline at end of file diff --git a/code/modules/research/machinery/protolathe.dm b/code/modules/research/machinery/protolathe.dm index 404a982b51..ef74fec666 100644 --- a/code/modules/research/machinery/protolathe.dm +++ b/code/modules/research/machinery/protolathe.dm @@ -20,13 +20,6 @@ production_animation = "protolathe_n" allowed_buildtypes = PROTOLATHE -/obj/machinery/rnd/production/protolathe/calculate_efficiency() - . = ..() - efficiency_coeff = 0 - for(var/obj/item/stock_parts/manipulator/M in component_parts) - efficiency_coeff += M.rating - efficiency_coeff = max(1, efficiency_coeff) - /obj/machinery/rnd/production/protolathe/disconnect_console() linked_console.linked_lathe = null ..() \ No newline at end of file