diff --git a/Assemblies/MendAndRecycle.dll b/Assemblies/MendAndRecycle.dll index f5c7bc6..f14ecac 100644 Binary files a/Assemblies/MendAndRecycle.dll and b/Assemblies/MendAndRecycle.dll differ diff --git a/Source/JobDriver_Recycle.cs b/Source/JobDriver_Recycle.cs index ff8096f..9e78ae4 100644 --- a/Source/JobDriver_Recycle.cs +++ b/Source/JobDriver_Recycle.cs @@ -91,18 +91,22 @@ protected override Toil DoBill () Log.Error ("MendAndRecycle :: " + pawn + " could not drop recipe product " + list [j] + " near " + pawn.Position); } } - } else if (list.Count == 1) { + } + + if (list.Count >= 1) { list [0].SetPositionDirect (pawn.Position); job.bill.Notify_IterationCompleted (pawn, list); - job.targetB = list [0]; + job.SetTarget(IngredientInd, list[0]); + + pawn.Map.reservationManager.Reserve (pawn, job, job.GetTarget(IngredientInd), 1); - pawn.Map.reservationManager.Reserve (pawn, job, job.targetB, 1); + ReadyForNextToil(); } else { Log.Message ("MendAndRecycle :: " + pawn + " could not reclaim anything from " + objectThing); - } - ReadyForNextToil (); + pawn.jobs.EndCurrentJob(JobCondition.Succeeded); + } } workCycleProgress = workCycle;