Merge pull request #6320 from Nalarac/Autolathe

Allows Multiple Light Printing in Autolathe
This commit is contained in:
Atermonera
2019-07-21 20:43:28 -08:00
committed by VirgoBot
parent 2aa1222b46
commit 54966826af
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"