From 4b98c9bcf5d44c319edd350f0e7350c0f4ccb6cf Mon Sep 17 00:00:00 2001 From: CIB123 Date: Tue, 18 Sep 2012 23:09:26 +0000 Subject: [PATCH] Merge branch 'cib' of github.com:CIB/tgstation13 into cib git-svn-id: http://tgstation13.googlecode.com/svn/trunk@4724 316c924e-a436-60f5-8080-3fe189b3f50e --- code/game/mecha/mech_fabricator.dm | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/code/game/mecha/mech_fabricator.dm b/code/game/mecha/mech_fabricator.dm index bbd096d7616..8689b09b431 100644 --- a/code/game/mecha/mech_fabricator.dm +++ b/code/game/mecha/mech_fabricator.dm @@ -400,11 +400,17 @@ /obj/machinery/mecha_part_fabricator/proc/process_queue() var/obj/item/part = listgetindex(src.queue, 1) if(!part) - remove_from_queue(1) - return process_queue() + if(remove_from_queue(1)) + return process_queue() + else + // Most likely means we have an empty queue, so stop processing + return 0 if(!(part.vars.Find("construction_time")) || !(part.vars.Find("construction_cost")))//If it shouldn't be printed - remove_from_queue(1)//Take it out of the quene - return process_queue()//Then reprocess it + if(remove_from_queue(1))//Take it out of the quene + return process_queue()//Then reprocess it + else + // Most likely means we have an empty queue, so stop processing + return 0 temp = null while(part) if(stat&(NOPOWER|BROKEN))