Library computer fix (#13486)

fixes library computer printing wrong manuals
fixes a bug with an empty interface button in "print manual" section
This commit is contained in:
rebel228
2020-05-25 23:42:11 -06:00
committed by GitHub
parent 5562afe5a8
commit 8155b00fce
+6 -5
View File
@@ -165,7 +165,7 @@
dat += "<table>"
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 += "<tr><td><A href='?src=[UID()];manual=[manualcount]'>[M.title]</A></td></tr>"
for(var/manual_type in subtypesof(/obj/item/book/manual))
if(!(manual_type in forbidden))
M = new manual_type()
dat += "<tr><td><A href='?src=[UID()];manual=[manualcount]'>[M.title]</A></td></tr>"
QDEL_NULL(M)
manualcount++
QDEL_NULL(M)
dat += "</table>"
dat += "<BR><A href='?src=[UID()];switchscreen=0'>(Return to main menu)</A><BR>"