From 89ce4e112dcfa847f8d9e9c7710612908fe8daff Mon Sep 17 00:00:00 2001 From: Menshin Date: Sun, 13 Sep 2015 01:57:21 +0200 Subject: [PATCH] Stored the material name in case the stack was deleted after the sleep() when dealing with overlays. --- code/modules/research/protolathe.dm | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/code/modules/research/protolathe.dm b/code/modules/research/protolathe.dm index 197ac1d7253..9e1a31e84db 100644 --- a/code/modules/research/protolathe.dm +++ b/code/modules/research/protolathe.dm @@ -119,11 +119,12 @@ Note: Must be placed west/left of and R&D console to function. if(!amount_inserted) return 1 else + var/stack_name = stack.name busy = 1 use_power(max(1000, (MINERAL_MATERIAL_AMOUNT*amount_inserted/10))) user << "You add [amount_inserted] sheets to the [src.name]." - overlays += "protolathe_[stack.name]" + overlays += "protolathe_[stack_name]" sleep(10) - overlays -= "protolathe_[stack.name]" + overlays -= "protolathe_[stack_name]" busy = 0 updateUsrDialog()