Skip to content

Commit

Permalink
1.0 TryMakePreToilReservations bool added
Browse files Browse the repository at this point in the history
  • Loading branch information
alextd committed Jul 25, 2018
1 parent 5dd5bab commit 40df2cc
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions Source/StockUp/JobDriver_StockUp.cs
Original file line number Diff line number Diff line change
Expand Up @@ -11,17 +11,17 @@ namespace SmartMedicine
//Custom job just to reserve job.count
public class JobDriver_StockUp : JobDriver_TakeInventory
{
public override bool TryMakePreToilReservations()
public override bool TryMakePreToilReservations(bool errorOnFailed)
{
return this.pawn.ReserveAsMuchAsPossible(job.targetA, job, FindBestMedicine.maxPawns, job.count) > 0;
}
}

public class JobDriver_StockDown : JobDriver_HaulToCell
{
public override bool TryMakePreToilReservations()
public override bool TryMakePreToilReservations(bool errorOnFailed)
{
return this.pawn.Reserve(job.targetB, job);
return this.pawn.Reserve(job.targetB, job, 1, -1, null, errorOnFailed);
}

protected override IEnumerable<Toil> MakeNewToils()
Expand Down

0 comments on commit 40df2cc

Please sign in to comment.