Files
CHOMPStation2/code/datums/autolathe/materials.dm
Razgriz a721affb95 Fix comment spelling
I don't give a shit if it's a comment. You don't just edit a comment for no reason just to misspell "duplication" as "duplaction". I'm putting that back to normal. My OCD demands it.
2021-04-10 22:20:55 -07:00

24 lines
729 B
Plaintext

/datum/category_item/autolathe/materials
is_stack = TRUE
no_scale = TRUE //Prevents material duplication exploits
/datum/category_item/autolathe/materials/New(var/loc, var/mat)
if(istype(mat, /obj/item/stack/material))
var/obj/item/stack/material/M = mat
name = M.name
resources = M.matter.Copy()
max_stack = M.max_amount
path = M.type
else if(istype(mat, /datum/material))
var/datum/material/M = mat
var/obj/item/stack/material/S = M.stack_type
name = initial(S.name)
resources = M.get_matter()
max_stack = initial(S.max_amount)
path = S
. = ..()
/datum/category_item/autolathe/materials/rods //Not strictly a material, so they need their own define
name = "metal rods"
path =/obj/item/stack/rods