Skip to content

Commit

Permalink
Fix multiple output on recycle bug
Browse files Browse the repository at this point in the history
  • Loading branch information
notfood committed Jul 7, 2017
1 parent 63ed521 commit 93dbe50
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 6 deletions.
Binary file modified Assemblies/Mending.dll
Binary file not shown.
14 changes: 8 additions & 6 deletions Source/JobDriver_Recycle.cs
Original file line number Diff line number Diff line change
Expand Up @@ -100,14 +100,16 @@ protected override Toil DoBill()
Log.Error("Mending :: " + actor + " could not drop recipe product " + list [j] + " near " + actor.Position);
}
}
}

list[0].SetPositionDirect (actor.Position);
} else if (list.Count == 1) {
list [0].SetPositionDirect (actor.Position);

curJob.bill.Notify_IterationCompleted (actor, list);
curJob.targetB = list[0];
curJob.bill.Notify_IterationCompleted (actor, list);
curJob.targetB = list [0];

pawn.Map.reservationManager.Reserve(pawn, curJob.targetB, 1);
pawn.Map.reservationManager.Reserve (pawn, curJob.targetB, 1);
} else {
Log.Message ("Mending :: " + actor + " could not reclaim anything from " + objectThing);
}

ReadyForNextToil();
}
Expand Down

0 comments on commit 93dbe50

Please sign in to comment.