mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-10 10:12:45 +00:00
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.
24 lines
729 B
Plaintext
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
|