diff --git a/code/__DEFINES/is_helpers.dm b/code/__DEFINES/is_helpers.dm index c54c0014da8..097950b57e5 100644 --- a/code/__DEFINES/is_helpers.dm +++ b/code/__DEFINES/is_helpers.dm @@ -53,6 +53,8 @@ #define isstorage(A) (istype(A, /obj/item/storage)) +#define isstack(I) (istype(I, /obj/item/stack)) + GLOBAL_LIST_INIT(pointed_types, typecacheof(list( /obj/item/pen, /obj/item/screwdriver, diff --git a/code/game/objects/structures/table_frames.dm b/code/game/objects/structures/table_frames.dm index cbba55e24ba..05a56c19eb2 100644 --- a/code/game/objects/structures/table_frames.dm +++ b/code/game/objects/structures/table_frames.dm @@ -27,7 +27,10 @@ ///Try to make a table with the item used to attack. FALSE if you can't make a table and should attack. TRUE does not necessarily mean a table was made. /obj/structure/table_frame/proc/try_make_table(obj/item/stack/stack, mob/user) - if(!stack?.table_type) + if(!istype(stack)) + return FALSE + + if(!stack.table_type) return FALSE if(stack.get_amount() < 1)