diff --git a/code/modules/reagents/chemistry/machinery/chem_master.dm b/code/modules/reagents/chemistry/machinery/chem_master.dm index 7dfbb88d71f..11802fd759e 100644 --- a/code/modules/reagents/chemistry/machinery/chem_master.dm +++ b/code/modules/reagents/chemistry/machinery/chem_master.dm @@ -4,6 +4,9 @@ #define MAX_UNITS_PER_PATCH 30 // Max amount of units in a patch #define MAX_CUSTOM_NAME_LEN 64 // Max length of a custom pill/condiment/whatever +#define TRANSFER_TO_DISPOSAL 0 +#define TRANSFER_TO_BEAKER 1 + /obj/machinery/chem_master name = "\improper ChemMaster 3000" density = TRUE @@ -15,7 +18,7 @@ var/obj/item/reagent_containers/beaker = null var/obj/item/storage/pill_bottle/loaded_pill_bottle = null - var/mode = 0 + var/mode = TRANSFER_TO_BEAKER var/condi = FALSE var/useramount = 30 // Last used amount var/pillamount = 10 @@ -351,7 +354,7 @@ if("create_pill") if(condi || !reagents.total_volume) return - var/num = round(text2num(arguments["num"] || 1)) + var/num = clamp(round(text2num(arguments["num"])), 0, MAX_MULTI_AMOUNT) if(!num) return arguments["num"] = num @@ -371,7 +374,7 @@ if("create_patch") if(condi || !reagents.total_volume) return - var/num = round(text2num(arguments["num"] || 1)) + var/num = clamp(round(text2num(arguments["num"])), 0, MAX_MULTI_AMOUNT) if(!num) return arguments["num"] = num @@ -437,7 +440,7 @@ if("create_pill") if(condi || !reagents.total_volume) return - var/count = clamp(round(text2num(arguments["num"]) || 0), 0, MAX_MULTI_AMOUNT) + var/count = text2num(arguments["num"]) if(!count) return @@ -470,7 +473,7 @@ if("create_patch") if(condi || !reagents.total_volume) return - var/count = clamp(round(text2num(arguments["num"]) || 0), 0, MAX_MULTI_AMOUNT) + var/count = text2num(arguments["num"]) if(!count) return @@ -560,3 +563,6 @@ #undef MAX_UNITS_PER_PILL #undef MAX_UNITS_PER_PATCH #undef MAX_CUSTOM_NAME_LEN + +#undef TRANSFER_TO_DISPOSAL +#undef TRANSFER_TO_BEAKER