Fixes a runtime when you remove a fax too fast when sending it (#17360)

This commit is contained in:
Farie82
2022-01-24 14:40:08 +01:00
committed by GitHub
parent 57eb272399
commit 671f289e18
+4 -5
View File
@@ -315,10 +315,10 @@ GLOBAL_LIST_EMPTY(fax_blacklist)
flick(receive_anim, src)
playsound(loc, 'sound/goonstation/machines/printer_dotmatrix.ogg', 50, 1)
addtimer(CALLBACK(src, .proc/print_fax, incoming), 2 SECONDS)
return TRUE
// give the sprite some time to flick
sleep(20)
/obj/machinery/photocopier/faxmachine/proc/print_fax(obj/item/incoming)
if(istype(incoming, /obj/item/paper))
papercopy(incoming)
else if(istype(incoming, /obj/item/photo))
@@ -326,10 +326,9 @@ GLOBAL_LIST_EMPTY(fax_blacklist)
else if(istype(incoming, /obj/item/paper_bundle))
bundlecopy(incoming)
else
return FALSE
return
use_power(active_power_usage)
return TRUE
/obj/machinery/photocopier/faxmachine/proc/send_admin_fax(mob/sender, destination)
use_power(active_power_usage)