Esempio n. 1
0
 public bool OrderFulfillable(OrderSlot[] orderSlots)
 {
     foreach (OrderSlot os in orderSlots)
     {
         if (os.Used && os.Order.RareNeeded <= AvailableRare &&
             os.Order.MediumNeeded <= AvailableMedium &&
             os.Order.WellDoneNeeded <= AvailableWellDone)
         {
             return true;
         }
     }
     return false;
 }
Esempio n. 2
0
 public void MakeBurger(OrderSlot os)
 {
     if (os.Used && os.Order.RareNeeded <= AvailableRare &&
         os.Order.MediumNeeded <= AvailableMedium &&
         os.Order.WellDoneNeeded <= AvailableWellDone)
     {
         Log.AddMessage("Making burger...", Log.LoggingLevel.Debug);
         BuildBurger(os.Order);
         AvailableRare -= os.Order.RareNeeded;
         AvailableMedium -= os.Order.MediumNeeded;
         AvailableWellDone -= os.Order.WellDoneNeeded;
         GiveBurger(os);
         os.Used = false;
         os.Order = null;
         Log.AddMessage("Made burger", Log.LoggingLevel.Debug);
         return;
     }
 }
Esempio n. 3
0
 private static OrderSlot[] CreateOrderSlots()
 {
     var result = new OrderSlot[10];
     for (int i = 0; i < result.Length; i++)
         result[i] = new OrderSlot(70 + (i * 40), 12);
     return result;
 }
Esempio n. 4
0
 public OrderStation()
 {
     OrderSlots = CreateOrderSlots();
     ActiveSlot = new OrderSlot(560, 32);
 }
Esempio n. 5
0
 static void GiveBurger(OrderSlot os)
 {
     Log.AddMessage("Giving burger...", Log.LoggingLevel.Debug);
     FlashAutomation.DragDrop(os.X, os.Y, 189, 343);
     System.Threading.Thread.Sleep(10000);
     Log.AddMessage("Gave burger", Log.LoggingLevel.Debug);
 }