diff --git a/code/modules/reagents/chemistry/machinery/chem_master.dm b/code/modules/reagents/chemistry/machinery/chem_master.dm
index 27563a246a7..a44b60c44f8 100644
--- a/code/modules/reagents/chemistry/machinery/chem_master.dm
+++ b/code/modules/reagents/chemistry/machinery/chem_master.dm
@@ -1,3 +1,5 @@
+#define MAX_CONTAINER_PRINT_AMOUNT 50
+
/obj/machinery/chem_master
name = "ChemMaster 3000"
desc = "Used to separate chemicals and distribute them in a variety of forms."
@@ -26,8 +28,8 @@
var/printing_progress
/// Number of containers to be printed
var/printing_total
- /// The amount of containers that can be printed in 1 cycle
- var/printing_amount = 1
+ /// The time it takes to print a container
+ var/printing_speed = 0.75 SECONDS
/obj/machinery/chem_master/Initialize(mapload)
create_reagents(100)
@@ -76,7 +78,7 @@
/obj/machinery/chem_master/examine(mob/user)
. = ..()
if(in_range(user, src) || isobserver(user))
- . += span_notice("The status display reads:
Reagent buffer capacity: [reagents.maximum_volume] units.
Number of containers printed per cycle [printing_amount].")
+ . += span_notice("The status display reads:
Reagent buffer capacity: [reagents.maximum_volume] units.
Printing speed: [0.75 SECONDS / printing_speed * 100]%.")
if(!QDELETED(beaker))
. += span_notice("[beaker] of [beaker.reagents.maximum_volume]u capacity inserted")
. += span_notice("Right click with empty hand to remove beaker")
@@ -149,10 +151,11 @@
for(var/obj/item/reagent_containers/cup/beaker/beaker in component_parts)
reagents.maximum_volume += beaker.reagents.maximum_volume
- printing_amount = 0
+ //Servo tier determines printing speed
+ printing_speed = 1 SECONDS
for(var/datum/stock_part/servo/servo in component_parts)
- printing_amount += servo.tier * 12.5
- printing_amount = min(50, ROUND_UP(printing_amount))
+ printing_speed -= servo.tier * 0.25 SECONDS
+ printing_speed = max(printing_speed, 0.25 SECONDS)
///Return a map of category->list of containers this machine can print
/obj/machinery/chem_master/proc/load_printable_containers()
@@ -266,6 +269,7 @@
/obj/machinery/chem_master/ui_static_data(mob/user)
var/list/data = list()
+ data["maxPrintable"] = MAX_CONTAINER_PRINT_AMOUNT
data["categories"] = list()
for(var/category in printable_containers)
//make the category
@@ -295,7 +299,6 @@
.["isPrinting"] = is_printing
.["printingProgress"] = printing_progress
.["printingTotal"] = printing_total
- .["maxPrintable"] = printing_amount
//contents of source beaker
var/list/beaker_data = null
@@ -471,7 +474,7 @@
item_count = text2num(item_count)
if(isnull(item_count) || item_count <= 0)
return FALSE
- item_count = min(item_count, printing_amount)
+ item_count = min(item_count, MAX_CONTAINER_PRINT_AMOUNT)
var/volume_in_each = round(reagents.total_volume / item_count, CHEMICAL_VOLUME_ROUNDING)
// Generate item name
@@ -535,7 +538,7 @@
//print more items
item_count --
if(item_count > 0)
- addtimer(CALLBACK(src, PROC_REF(create_containers), user, item_count, item_name, volume_in_each), 0.75 SECONDS)
+ addtimer(CALLBACK(src, PROC_REF(create_containers), user, item_count, item_name, volume_in_each), printing_speed)
else
is_printing = FALSE
update_appearance(UPDATE_OVERLAYS)
@@ -550,3 +553,5 @@
if(!length(containers))
containers = list(CAT_CONDIMENTS = GLOB.reagent_containers[CAT_CONDIMENTS])
return containers
+
+#undef MAX_CONTAINER_PRINT_AMOUNT