From 60c566f2a90f98c38a02cd10aca19dd1983ef4e5 Mon Sep 17 00:00:00 2001 From: Heroman Date: Wed, 14 Dec 2022 18:24:16 +1000 Subject: [PATCH] Fixes autolathe thing. --- code/datums/components/material_container.dm | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/code/datums/components/material_container.dm b/code/datums/components/material_container.dm index 2b0c74e269b..75aee4b7d99 100644 --- a/code/datums/components/material_container.dm +++ b/code/datums/components/material_container.dm @@ -140,7 +140,12 @@ return // Cache this since S may go away after use() - var/list/sheet_matter = S.matter + var/list/sheet_matter + if(istype(S, /obj/item/stack/material)) + var/obj/item/stack/material/MS = S + sheet_matter = list(MS.material.name = 2000) + else + sheet_matter = S.matter // Calculate total amount of material for one sheet var/matter_per_sheet = 0