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; }
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; } }
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; }
public OrderStation() { OrderSlots = CreateOrderSlots(); ActiveSlot = new OrderSlot(560, 32); }
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); }