From 074e745727922dec9d48cd11d4e5ff6f3288a6cc Mon Sep 17 00:00:00 2001 From: nightred Date: Fri, 25 Sep 2020 21:16:32 -0500 Subject: [PATCH 1/3] why beaker --- .../reagents/chemistry/machinery/chem_master.dm | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/code/modules/reagents/chemistry/machinery/chem_master.dm b/code/modules/reagents/chemistry/machinery/chem_master.dm index 21019a994bd..0d2a2122411 100644 --- a/code/modules/reagents/chemistry/machinery/chem_master.dm +++ b/code/modules/reagents/chemistry/machinery/chem_master.dm @@ -1,5 +1,5 @@ /obj/machinery/chem_master - name = "ChemMaster 3000" + name = "ChemMaster 3001" desc = "Used to separate chemicals and distribute them in a variety of forms." density = TRUE layer = BELOW_OBJ_LAYER @@ -210,8 +210,6 @@ return TRUE if(action == "transfer") - if(!beaker) - return FALSE var/reagent = GLOB.name2reagent[params["id"]] var/amount = text2num(params["amount"]) var/to_container = params["to"] @@ -220,7 +218,10 @@ amount = text2num(input( "Enter the amount you want to transfer:", name, "")) - if (amount == null || amount <= 0) + if (to_container == "beaker" && !mode) + reagents.remove_reagent(reagent, amount) + return TRUE + if (!beaker || amount == null || amount <= 0) return FALSE if (to_container == "buffer") beaker.reagents.trans_id_to(src, reagent, amount) @@ -228,9 +229,6 @@ if (to_container == "beaker" && mode) reagents.trans_id_to(beaker, reagent, amount) return TRUE - if (to_container == "beaker" && !mode) - reagents.remove_reagent(reagent, amount) - return TRUE return FALSE if(action == "toggleMode") From 42f2981b972aee0476dcae4e536af90b1d756f05 Mon Sep 17 00:00:00 2001 From: nightred Date: Fri, 25 Sep 2020 21:30:14 -0500 Subject: [PATCH 2/3] early breaks done well --- code/modules/reagents/chemistry/machinery/chem_master.dm | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/code/modules/reagents/chemistry/machinery/chem_master.dm b/code/modules/reagents/chemistry/machinery/chem_master.dm index 0d2a2122411..84204671f36 100644 --- a/code/modules/reagents/chemistry/machinery/chem_master.dm +++ b/code/modules/reagents/chemistry/machinery/chem_master.dm @@ -218,10 +218,12 @@ amount = text2num(input( "Enter the amount you want to transfer:", name, "")) + if (amount == null || amount <= 0) + return FALSE if (to_container == "beaker" && !mode) reagents.remove_reagent(reagent, amount) return TRUE - if (!beaker || amount == null || amount <= 0) + if (!beaker) return FALSE if (to_container == "buffer") beaker.reagents.trans_id_to(src, reagent, amount) From 645ad11cfb6e834f8ea133022a46ae9dda7975db Mon Sep 17 00:00:00 2001 From: nightred Date: Sun, 27 Sep 2020 11:08:37 -0500 Subject: [PATCH 3/3] sad --- code/modules/reagents/chemistry/machinery/chem_master.dm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/modules/reagents/chemistry/machinery/chem_master.dm b/code/modules/reagents/chemistry/machinery/chem_master.dm index 84204671f36..be74f8ac328 100644 --- a/code/modules/reagents/chemistry/machinery/chem_master.dm +++ b/code/modules/reagents/chemistry/machinery/chem_master.dm @@ -1,5 +1,5 @@ /obj/machinery/chem_master - name = "ChemMaster 3001" + name = "ChemMaster 3000" desc = "Used to separate chemicals and distribute them in a variety of forms." density = TRUE layer = BELOW_OBJ_LAYER