[MIRROR] Printer cooldown fix (#2547)

* Moves cooldown setting after early return check (#55999)

Library console printers no longer become unavaible after failing to print something.

* Printer cooldown fix

Co-authored-by: interestingusernam3 <51925758+interestingusernam3@users.noreply.github.com>
This commit is contained in:
SkyratBot
2021-01-07 23:19:19 +01:00
committed by GitHub
parent 9bda9884ed
commit 86a3d43fda

View File

@@ -465,7 +465,6 @@
if(printer_cooldown > world.time)
say("Printer unavailable. Please allow a short time before attempting to print.")
else
printer_cooldown = world.time + PRINTER_COOLDOWN
var/datum/db_query/query_library_print = SSdbcore.NewQuery(
"SELECT * FROM [format_table_name("library")] WHERE id=:id AND isnull(deleted)",
list("id" = id)
@@ -474,6 +473,7 @@
qdel(query_library_print)
say("PRINTER ERROR! Failed to print document (0x0000000F)")
return
printer_cooldown = world.time + PRINTER_COOLDOWN
while(query_library_print.NextRow())
var/author = query_library_print.item[2]
var/title = query_library_print.item[3]