From 23743c86305606b9622ce90f37c922a9775ba386 Mon Sep 17 00:00:00 2001 From: Thalpy <48600475+ThalpySci@users.noreply.github.com> Date: Tue, 15 Oct 2019 11:21:05 +0100 Subject: [PATCH] Updates chemmaster --- code/modules/reagents/chemistry/machinery/chem_master.dm | 9 +++++++++ code/modules/reagents/reagent_containers/syringes.dm | 2 +- tgui/src/interfaces/chem_master.ract | 5 +++++ 3 files changed, 15 insertions(+), 1 deletion(-) diff --git a/code/modules/reagents/chemistry/machinery/chem_master.dm b/code/modules/reagents/chemistry/machinery/chem_master.dm index 653259d0d7..8b5448641c 100644 --- a/code/modules/reagents/chemistry/machinery/chem_master.dm +++ b/code/modules/reagents/chemistry/machinery/chem_master.dm @@ -390,6 +390,11 @@ if(reagents.total_volume == 0) return + for(var/datum/reagent/R in beaker.reagents.reagent_list) + if(!(istype(R, /datum/reagent/medicine))) + visible_message("The [src] beeps, \"SmartDarts are insoluble with non-medicinal compounds.\"") + return + var/amount_full = 0 var/vol_part = min(reagents.total_volume, 20) if(text2num(many)) @@ -405,12 +410,16 @@ P.name = trim("[name] SmartDart") adjust_item_drop_location(P) reagents.trans_to(P, 20) + P.mode=!mode + P.update_icon() if(vol_part) P = new /obj/item/reagent_containers/syringe/dart(drop_location()) P.name = trim("[name] SmartDart") adjust_item_drop_location(P) reagents.trans_to(P, vol_part) + P.mode=!mode + P.update_icon() . = TRUE //END CITADEL ADDITIONS diff --git a/code/modules/reagents/reagent_containers/syringes.dm b/code/modules/reagents/reagent_containers/syringes.dm index cc83eb28f6..245c6f0bf9 100644 --- a/code/modules/reagents/reagent_containers/syringes.dm +++ b/code/modules/reagents/reagent_containers/syringes.dm @@ -307,7 +307,7 @@ var/trans = target.reagents.trans_to(src, amount_per_transfer_from_this) to_chat(user, "You soak the [src] with [trans] units of the solution. It now contains [reagents.total_volume] units.") - if (reagents.total_volume >= reagents.maximum_volume) + if (round(reagents.total_volume,1) >= reagents.maximum_volume) mode=!mode update_icon() diff --git a/tgui/src/interfaces/chem_master.ract b/tgui/src/interfaces/chem_master.ract index 1a7b82330d..f68e33d72a 100644 --- a/tgui/src/interfaces/chem_master.ract +++ b/tgui/src/interfaces/chem_master.ract @@ -81,6 +81,11 @@
Dispense Buffer to Hypo vials
+
+ Create SmartDart (max 20ยต) +
+ Dispense Buffer to SmartDarts +