From 8155b00fce18d377077ce16063aacb95e6666b3e Mon Sep 17 00:00:00 2001 From: rebel228 <58699696+rebel228@users.noreply.github.com> Date: Tue, 26 May 2020 08:42:11 +0300 Subject: [PATCH] Library computer fix (#13486) fixes library computer printing wrong manuals fixes a bug with an empty interface button in "print manual" section --- code/modules/library/computers/checkout.dm | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/code/modules/library/computers/checkout.dm b/code/modules/library/computers/checkout.dm index 99f7e2cb8fe..31eebc5d05c 100644 --- a/code/modules/library/computers/checkout.dm +++ b/code/modules/library/computers/checkout.dm @@ -165,7 +165,7 @@ dat += "" var/list/forbidden = list( - /obj/item/book/manual + /obj/item/book/manual/random ) if(!emagged) @@ -174,11 +174,12 @@ var/manualcount = 1 var/obj/item/book/manual/M = null - for(var/manual_type in (typesof(/obj/item/book/manual) - forbidden)) - M = new manual_type() - dat += "" + for(var/manual_type in subtypesof(/obj/item/book/manual)) + if(!(manual_type in forbidden)) + M = new manual_type() + dat += "" + QDEL_NULL(M) manualcount++ - QDEL_NULL(M) dat += "
[M.title]
[M.title]
" dat += "
(Return to main menu)
"