Fixes a table runtime (#19985)

* fixes table runtimes

* ryan's suggestion
This commit is contained in:
GDN
2022-12-24 13:07:17 -05:00
committed by GitHub
parent 07a84dd5c8
commit af85ed1e80
2 changed files with 6 additions and 1 deletions
+2
View File
@@ -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,
+4 -1
View File
@@ -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)