From d19b9bc3b7066d7d37d22902fc7c2a408f5df51e Mon Sep 17 00:00:00 2001 From: Cael Aislinn Date: Tue, 29 Oct 2013 22:27:23 +1000 Subject: [PATCH] fixes the issue with coolant being ineffective Signed-off-by: Cael Aislinn --- .../machinery/geosample_scanner.dm | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/code/modules/research/xenoarchaeology/machinery/geosample_scanner.dm b/code/modules/research/xenoarchaeology/machinery/geosample_scanner.dm index 74d886edb6..6dcd45c825 100644 --- a/code/modules/research/xenoarchaeology/machinery/geosample_scanner.dm +++ b/code/modules/research/xenoarchaeology/machinery/geosample_scanner.dm @@ -68,7 +68,7 @@ user << "You can't do that while [src] is scanning!" else if(istype(I, /obj/item/stack/nanopaste)) - var/choice = alert("What do you want to do with the nanopaste?","Radiometric Scanner","Add nanopaste","Fix seal integrity") + var/choice = alert("What do you want to do with the nanopaste?","Radiometric Scanner","Scan nanopaste","Fix seal integrity") if(choice == "Fix seal integrity") var/obj/item/stack/nanopaste/N = I var/amount_used = min(N.amount, 10 - scanner_seal_integrity / 10) @@ -79,12 +79,16 @@ var/choice = alert("What do you want to do with the container?","Radiometric Scanner","Add coolant","Empty coolant","Scan container") if(choice == "Add coolant") var/obj/item/weapon/reagent_containers/glass/G = I - G.reagents.trans_to(src, min(src.reagents.maximum_volume - src.reagents.total_volume, G.reagents.total_volume)) + var/amount_transferred = min(src.reagents.maximum_volume - src.reagents.total_volume, G.reagents.total_volume) + G.reagents.trans_to(src, amount_transferred) + user << "You empty [amount_transferred]u of coolant into [src]." update_coolant() return else if(choice == "Empty coolant") var/obj/item/weapon/reagent_containers/glass/G = I - src.reagents.trans_to(G, min(G.reagents.maximum_volume - G.reagents.total_volume, src.reagents.total_volume)) + var/amount_transferred = min(G.reagents.maximum_volume - G.reagents.total_volume, src.reagents.total_volume) + src.reagents.trans_to(G, amount_transferred) + user << "You remove [amount_transferred]u of coolant from [src]." update_coolant() return user.drop_item() @@ -95,14 +99,18 @@ var/total_purity = 0 fresh_coolant = 0 coolant_purity = 0 + var/num_reagent_types = 0 for (var/datum/reagent/current_reagent in src.reagents.reagent_list) if (!current_reagent) continue var/cur_purity = coolant_reagents_purity[current_reagent.id] if(!cur_purity) cur_purity = 0.1 - total_purity += cur_purity + else if(cur_purity > 1) + cur_purity = 1 + total_purity += cur_purity * current_reagent.volume fresh_coolant += current_reagent.volume + num_reagent_types += 1 if(total_purity && fresh_coolant) coolant_purity = total_purity / fresh_coolant