From 7b11d89c56a91ef6e5d8bb5167c23e9171090a67 Mon Sep 17 00:00:00 2001 From: Mark van Alphen Date: Fri, 31 May 2019 23:16:02 +0200 Subject: [PATCH] Random bookcase fix --- code/modules/library/random_books.dm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/modules/library/random_books.dm b/code/modules/library/random_books.dm index 9fc396f5eff..f36e493ce3f 100644 --- a/code/modules/library/random_books.dm +++ b/code/modules/library/random_books.dm @@ -49,7 +49,7 @@ if(prob(25)) category = null var/c = category? " AND category='[sanitizeSQL(category)]'" :"" - var/DBQuery/query_get_random_books = dbcon.NewQuery("SELECT * FROM [format_table_name("library")] WHERE isnull(flagged)[c] GROUP BY title ORDER BY rand() LIMIT [amount];") + var/DBQuery/query_get_random_books = dbcon.NewQuery("SELECT * FROM [format_table_name("library")] WHERE (isnull(flagged) OR flagged = 0)[c] GROUP BY title ORDER BY rand() LIMIT [amount];") query_get_random_books.Execute() while(query_get_random_books.NextRow()) var/obj/item/book/B = new(location)