From 5b6819ceb57dbcb7cadbf7a62dbc540769354d2c Mon Sep 17 00:00:00 2001 From: Fox McCloud Date: Sun, 20 Oct 2019 12:16:29 -0400 Subject: [PATCH] Fixes R&D Materials Exploit (#12608) --- code/modules/research/rdconsole.dm | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/code/modules/research/rdconsole.dm b/code/modules/research/rdconsole.dm index 9c62b44cdf9..202b931b7a9 100644 --- a/code/modules/research/rdconsole.dm +++ b/code/modules/research/rdconsole.dm @@ -357,7 +357,8 @@ won't update every console in existence) but it's more of a hassle to do. Also, submenu = 0 if(linked_lathe) //Also sends salvaged materials to a linked protolathe, if any. for(var/material in linked_destroy.loaded_item.materials) - linked_lathe.materials.insert_amount(min((linked_lathe.materials.max_amount - linked_lathe.materials.total_amount), (linked_destroy.loaded_item.materials[material]*(linked_destroy.decon_mod/10))), material) + var/can_insert = min(linked_lathe.materials.max_amount - linked_lathe.materials.total_amount, linked_destroy.loaded_item.materials[material] * (linked_destroy.decon_mod / 10), linked_destroy.loaded_item.materials[material]) + linked_lathe.materials.insert_amount(can_insert, material) linked_destroy.loaded_item = null else menu = 0