Allows Multiple Light Printing in Autolathe

Allows light tubes and light bulbs to be printed 5 or 10 at a time.

Changes the is_stack var to be more general. Non-stack items with it will be able to produce 5 or 10 of said item at a time. This means it can be applied to other items if desired.
This commit is contained in:
Nalarac
2019-07-20 15:22:47 -05:00
parent 887804ea10
commit d6ab9c1fc7
3 changed files with 16 additions and 7 deletions

View File

@@ -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

View File

@@ -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"