From a8a81c33269dadc1fd3554ba3c8d1ecfcb2e5975 Mon Sep 17 00:00:00 2001 From: d3athrow Date: Thu, 24 Oct 2013 20:13:00 -0500 Subject: [PATCH] Was hasty in the fix, much smaller now --- code/modules/research/rdconsole.dm | 40 +++--------------------------- 1 file changed, 4 insertions(+), 36 deletions(-) diff --git a/code/modules/research/rdconsole.dm b/code/modules/research/rdconsole.dm index ae93b8c9ef1..7c233fe0e73 100644 --- a/code/modules/research/rdconsole.dm +++ b/code/modules/research/rdconsole.dm @@ -346,60 +346,28 @@ won't update every console in existence) but it's more of a hassle to do. Also, use_power(power) spawn(16) for(var/M in being_built.materials) + if(!check_mat(being_built, M)) + src.visible_message("The [src.name] beeps, \"Not enough materials to complete prototype.\"") + g2g = 0 + break switch(M) if("$metal") - if(!check_mat(being_built, M)) - src.visible_message("The [src.name] beeps, \"Not enough materials to complete prototype.\"") - g2g = 0 - break linked_lathe.m_amount = max(0, (linked_lathe.m_amount-being_built.materials[M])) if("$glass") - if(!check_mat(being_built, M)) - src.visible_message("The [src.name] beeps, \"Not enough materials to complete prototype.\"") - g2g = 0 - break linked_lathe.g_amount = max(0, (linked_lathe.g_amount-being_built.materials[M])) if("$gold") - if(!check_mat(being_built, M)) - src.visible_message("The [src.name] beeps, \"Not enough materials to complete prototype.\"") - g2g = 0 - break linked_lathe.gold_amount = max(0, (linked_lathe.gold_amount-being_built.materials[M])) if("$silver") - if(!check_mat(being_built, M)) - src.visible_message("The [src.name] beeps, \"Not enough materials to complete prototype.\"") - g2g = 0 - break linked_lathe.silver_amount = max(0, (linked_lathe.silver_amount-being_built.materials[M])) if("$plasma") - if(!check_mat(being_built, M)) - src.visible_message("The [src.name] beeps, \"Not enough materials to complete prototype.\"") - g2g = 0 - break linked_lathe.plasma_amount = max(0, (linked_lathe.plasma_amount-being_built.materials[M])) if("$uranium") - if(!check_mat(being_built, M)) - src.visible_message("The [src.name] beeps, \"Not enough materials to complete prototype.\"") - g2g = 0 - break linked_lathe.uranium_amount = max(0, (linked_lathe.uranium_amount-being_built.materials[M])) if("$diamond") - if(!check_mat(being_built, M)) - src.visible_message("The [src.name] beeps, \"Not enough materials to complete prototype.\"") - g2g = 0 - break linked_lathe.diamond_amount = max(0, (linked_lathe.diamond_amount-being_built.materials[M])) if("$clown") - if(!check_mat(being_built, M)) - src.visible_message("The [src.name] beeps, \"Not enough materials to complete prototype.\"") - g2g = 0 - break linked_lathe.clown_amount = max(0, (linked_lathe.clown_amount-being_built.materials[M])) else - if(!check_mat(being_built, M)) - src.visible_message("The [src.name] beeps, \"Not enough materials to complete prototype.\"") - g2g = 0 - break linked_lathe.reagents.remove_reagent(M, being_built.materials[M]) if(being_built.build_path && g2g)