From c6d55955e77d100cbf82858a1595b5cc64da8cbc Mon Sep 17 00:00:00 2001 From: phil235 Date: Thu, 26 May 2016 22:23:24 +0200 Subject: [PATCH] let's not have the paper forever stuck in case of power outage. --- code/modules/library/lib_machines.dm | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/code/modules/library/lib_machines.dm b/code/modules/library/lib_machines.dm index 56de7282e19..003bb9ceb26 100644 --- a/code/modules/library/lib_machines.dm +++ b/code/modules/library/lib_machines.dm @@ -532,10 +532,13 @@ var/global/list/datum/cachedbook/cachedbooks // List of our cached book datums busy = 1 sleep(rand(200,400)) busy = 0 - if(P && !stat) - visible_message("[src] whirs as it prints and binds a new book.") - var/obj/item/weapon/book/B = new(src.loc) - B.dat = P.info - B.name = "Print Job #" + "[rand(100, 999)]" - B.icon_state = "book[rand(1,7)]" - qdel(P) \ No newline at end of file + if(P) + if(!stat) + visible_message("[src] whirs as it prints and binds a new book.") + var/obj/item/weapon/book/B = new(src.loc) + B.dat = P.info + B.name = "Print Job #" + "[rand(100, 999)]" + B.icon_state = "book[rand(1,7)]" + qdel(P) + else + P.loc = loc \ No newline at end of file