diff --git a/code/modules/reagents/Chemistry-Machinery.dm b/code/modules/reagents/Chemistry-Machinery.dm index 181514ef0c..e13dcbdb69 100644 --- a/code/modules/reagents/Chemistry-Machinery.dm +++ b/code/modules/reagents/Chemistry-Machinery.dm @@ -238,7 +238,7 @@ count = input("Select the number of pills to make.", "Max [max_pill_count]", pillamount) as null|num if(!count) //Covers 0 and cancel return - count = CLAMP(count, 1, max_pill_count) + count = CLAMP(round(count), 1, max_pill_count) // Fix decimals input and clamp to reasonable amounts if(reagents.total_volume/count < 1) //Sanity checking. return @@ -260,7 +260,7 @@ if(reagents.total_volume/count < 1) //Sanity checking. return - while (count--) + while(count-- > 0) // Will definitely eventually stop. var/obj/item/weapon/reagent_containers/pill/P = new/obj/item/weapon/reagent_containers/pill(src.loc) if(!name) name = reagents.get_master_reagent_name() P.name = "[name] pill"