diff --git a/code/datums/autolathe/autolathe.dm b/code/datums/autolathe/autolathe.dm index a049a4456c..91c9ec37b7 100644 --- a/code/datums/autolathe/autolathe.dm +++ b/code/datums/autolathe/autolathe.dm @@ -8,9 +8,12 @@ var/datum/category_collection/autolathe/autolathe_recipes for(var/material in I.matter) var/coeff = (no_scale ? 1 : 1.25) //most objects are more expensive to produce than to recycle resources[material] = I.matter[material]*coeff // but if it's a sheet or RCD cartridge, it's 1:1 - if(is_stack && istype(I, /obj/item/stack)) - var/obj/item/stack/IS = I - max_stack = IS.max_amount + if(is_stack) + if(istype(I, /obj/item/stack)) + var/obj/item/stack/IS = I + max_stack = IS.max_amount + else + max_stack = 10 qdel(I) /**************************** @@ -65,7 +68,7 @@ var/datum/category_collection/autolathe/autolathe_recipes var/list/resources var/hidden var/power_use = 0 - var/is_stack + var/is_stack // Creates multiple of an item if applied to non-stack items var/max_stack var/no_scale diff --git a/code/datums/autolathe/general.dm b/code/datums/autolathe/general.dm index 2e2fa3c6fb..2f4436bf55 100644 --- a/code/datums/autolathe/general.dm +++ b/code/datums/autolathe/general.dm @@ -105,10 +105,12 @@ /datum/category_item/autolathe/general/tube name = "light tube" path =/obj/item/weapon/light/tube + is_stack = TRUE /datum/category_item/autolathe/general/bulb name = "light bulb" path =/obj/item/weapon/light/bulb + is_stack = TRUE /datum/category_item/autolathe/general/ashtray_glass name = "glass ashtray" diff --git a/code/game/machinery/autolathe.dm b/code/game/machinery/autolathe.dm index 7d7c64f949..d1090f9f0a 100644 --- a/code/game/machinery/autolathe.dm +++ b/code/game/machinery/autolathe.dm @@ -276,9 +276,13 @@ //Create the desired item. var/obj/item/I = new making.path(src.loc) - if(multiplier > 1 && istype(I, /obj/item/stack)) - var/obj/item/stack/S = I - S.amount = multiplier + if(multiplier > 1) + if(istype(I, /obj/item/stack)) + var/obj/item/stack/S = I + S.amount = multiplier + else + for(multiplier; multiplier > 1; --multiplier) // Create multiple items if it's not a stack. + new making.path(src.loc) updateUsrDialog()