mirror of
https://github.com/VOREStation/VOREStation.git
synced 2026-08-26 05:27:39 +01:00
Autolathes don't spam debug on first use (#8019)
Co-authored-by: atermonera <matthew.forsland@revature.net>
This commit is contained in:
committed by
VirgoBot
co-authored by
atermonera
parent
a8b775c8d9
commit
3fa568de5e
@@ -5,7 +5,7 @@
|
||||
I = new path()
|
||||
|
||||
if(!I) // Something has gone horribly wrong, or right.
|
||||
log_debug("[name] created an Autolathe design without an assigned path. This is expected for only the Material Sheet generation.")
|
||||
log_debug("[name] created an Autolathe design without an assigned path.")
|
||||
return
|
||||
|
||||
if(I.matter && !resources)
|
||||
@@ -80,22 +80,12 @@
|
||||
if(istype(M, /datum/material/alienalloy))
|
||||
continue
|
||||
|
||||
var/obj/item/stack/material/Mat = new M.stack_type()
|
||||
|
||||
if(Mat.name in items_by_name)
|
||||
qdel(Mat)
|
||||
var/obj/item/stack/material/S = M.stack_type
|
||||
if(initial(S.name) in items_by_name)
|
||||
continue
|
||||
|
||||
var/datum/category_item/autolathe/materials/WorkDat = new(src)
|
||||
var/datum/category_item/autolathe/materials/WorkDat = new(src, M)
|
||||
|
||||
WorkDat.name = "[Mat.name]"
|
||||
WorkDat.resources = Mat.matter.Copy()
|
||||
WorkDat.is_stack = TRUE
|
||||
WorkDat.no_scale = TRUE
|
||||
WorkDat.max_stack = Mat.max_amount
|
||||
WorkDat.path = M.stack_type
|
||||
|
||||
qdel(Mat)
|
||||
|
||||
items |= WorkDat
|
||||
items_by_name[WorkDat.name] = WorkDat
|
||||
|
||||
@@ -1,38 +1,23 @@
|
||||
|
||||
/datum/category_item/autolathe/materials/metal
|
||||
name = "steel sheets"
|
||||
path =/obj/item/stack/material/steel
|
||||
/datum/category_item/autolathe/materials
|
||||
is_stack = TRUE
|
||||
no_scale = TRUE //prevents material duplication exploits
|
||||
no_scale = TRUE // Prevents material duplaction exploits
|
||||
|
||||
/datum/category_item/autolathe/materials/glass
|
||||
name = "glass sheets"
|
||||
path =/obj/item/stack/material/glass
|
||||
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/rglass
|
||||
name = "reinforced glass sheets"
|
||||
path =/obj/item/stack/material/glass/reinforced
|
||||
is_stack = TRUE
|
||||
no_scale = TRUE //prevents material duplication exploits
|
||||
|
||||
/datum/category_item/autolathe/materials/rods
|
||||
/datum/category_item/autolathe/materials/rods // Not strictly a material, so they need their own define
|
||||
name = "metal rods"
|
||||
path =/obj/item/stack/rods
|
||||
is_stack = TRUE
|
||||
no_scale = TRUE //prevents material duplication exploits
|
||||
|
||||
/datum/category_item/autolathe/materials/plasteel
|
||||
name = "plasteel sheets"
|
||||
path =/obj/item/stack/material/plasteel
|
||||
is_stack = TRUE
|
||||
no_scale = TRUE //prevents material duplication exploits
|
||||
resources = list(MAT_PLASTEEL = 2000)
|
||||
|
||||
/datum/category_item/autolathe/materials/plastic
|
||||
name = "plastic sheets"
|
||||
path =/obj/item/stack/material/plastic
|
||||
is_stack = TRUE
|
||||
no_scale = TRUE //prevents material duplication exploits
|
||||
resources = list(MAT_PLASTIC = 2000)
|
||||
path =/obj/item/stack/rods
|
||||
Reference in New Issue
Block a user