From 9e5a8f44754b466a5a2b8d9780473b0302f1f737 Mon Sep 17 00:00:00 2001 From: Remie Richards Date: Sat, 21 May 2016 15:07:02 +0100 Subject: [PATCH] is_type_in_list() fixes is_type_in_list() will now detect non-numeric associative values, to avoid unnecessary conversions that would break the list, for example: Grinding uses a type = list("results" = amount) format, with list() not being a number it was then converted to type = 1, this conversion was unnecessary as a list() is still true and all we want in the associative value is a truth value, not specifically a 1. --- code/__HELPERS/lists.dm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/__HELPERS/lists.dm b/code/__HELPERS/lists.dm index 58a87f374a7..afc07638e4b 100644 --- a/code/__HELPERS/lists.dm +++ b/code/__HELPERS/lists.dm @@ -55,7 +55,7 @@ /proc/is_type_in_list(atom/A, list/L) if (!L.len) return 0 - if (!isnum(L[L[1]])) + if (!L[L[1]]) generate_type_list_cache(L) return L[A.type]