From 9d2d84f53d8ae6567cbe2814b41794458574b236 Mon Sep 17 00:00:00 2001 From: Poojawa Date: Fri, 4 Oct 2019 15:49:25 -0500 Subject: [PATCH] Update table_frames.dm --- code/game/objects/structures/table_frames.dm | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/code/game/objects/structures/table_frames.dm b/code/game/objects/structures/table_frames.dm index 33f5aa8b60..f62bed878b 100644 --- a/code/game/objects/structures/table_frames.dm +++ b/code/game/objects/structures/table_frames.dm @@ -31,7 +31,7 @@ return var/obj/item/stack/material = I - if (material?.tableVariant) + if (istype(I, /obj/item/stack) && material?.tableVariant) if(material.get_amount() < 1) to_chat(user, "You need one [material.name] sheet to do this!") return @@ -73,9 +73,9 @@ resistance_flags = FLAMMABLE /obj/structure/table_frame/wood/attackby(obj/item/I, mob/user, params) - var/obj/item/stack/material = I - if (material) - var/obj/structure/table/toConstruct + if (istype(I, /obj/item/stack)) + var/obj/item/stack/material = I + var/toConstruct // stores the table variant if(istype(I, /obj/item/stack/sheet/mineral/wood)) toConstruct = /obj/structure/table/wood else if(istype(I, /obj/item/stack/tile/carpet))