From 709f662e78bc2474ca24b9c3cee38d1c1e183ba8 Mon Sep 17 00:00:00 2001 From: Leshana Date: Fri, 13 May 2016 20:10:02 -0400 Subject: [PATCH] Fixes #21 - Prevents making oversize stacks in autolathe. - Previously when making stack'd items in autolathe, it lets you make as big a stack as you have materials loaded, even if it is larger than the maximum stack size for that material. - Now autolathe recipies remember this, and autolathe respects maximum stack size. --- code/game/machinery/autolathe.dm | 1 + code/game/machinery/autolathe_datums.dm | 6 +++++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/code/game/machinery/autolathe.dm b/code/game/machinery/autolathe.dm index 051223d6fe..5d80030337 100644 --- a/code/game/machinery/autolathe.dm +++ b/code/game/machinery/autolathe.dm @@ -102,6 +102,7 @@ //Build list of multipliers for sheets. if(R.is_stack) if(max_sheets && max_sheets > 0) + max_sheets = min(max_sheets, R.max_stack) // Limit to the max allowed by stack type. multiplier_string += "
" for(var/i = 5;i