Esempio n. 1
0
 public override bool TryMakePreToilReservations(bool errorOnFailed)
 {
     if (job.targetQueueB != null && job.targetQueueB.Count == 1 && job.targetQueueB[0].Thing != null)
     {
         book  = job.targetQueueB[0].Thing;
         shelf = ThingOwnerUtility.GetFirstSpawnedParentThing(book) as Building_BookStore;
         if (shelf != null) //insert bookstore in queue
         {
             job.targetQueueB.Clear();
             job.AddQueuedTarget(TargetIndex.B, shelf);
             job.AddQueuedTarget(TargetIndex.B, book);
         }
         project = book.TryGetTech();
     }
     else
     {
         return(false);
     }
     return(base.TryMakePreToilReservations(errorOnFailed));
 }