From bd8f0396c2dd56046bcea1f80c65914c55f4e089 Mon Sep 17 00:00:00 2001 From: variableundefined <40092670+variableundefined@users.noreply.github.com> Date: Wed, 29 Aug 2018 22:40:16 +0800 Subject: [PATCH] Photocopier safety check --- code/modules/paperwork/photocopier.dm | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/code/modules/paperwork/photocopier.dm b/code/modules/paperwork/photocopier.dm index b73d6172108..7e6d823e4be 100644 --- a/code/modules/paperwork/photocopier.dm +++ b/code/modules/paperwork/photocopier.dm @@ -72,6 +72,10 @@ photocopy(copyitem) sleep(15) else if(istype(copyitem, /obj/item/paper_bundle)) + var/obj/item/paper_bundle/C = copyitem + if(toner < (C.amount + 1)) + visible_message("A yellow light on \the [src] flashes, indicating there's not enough toner for the operation.") // It is better to prevent partial bundle than to produce broken paper bundle + return var/obj/item/paper_bundle/B = bundlecopy(copyitem) if(!B) return