private static void SendInput(Hotkey hotkey, int repeat = 1) { for (int i = repeat; i > 0; i--) { UICommunicator.UpdateStatus2("Sending \"" + hotkey.ToString() + "\""); KeyInputEngine.SendKeysToGame(hotkey.KeyCode, hotkey.ModKeyCodes); SleepThread(hotkey.TimerInMiliseconds); } }
private static void EndCraftingProcess() { // ALL CLEANUP UICommunicator.EndAllProgress(); UICommunicator.UpdateStatus("Crafting Finished!"); var craftCompleted = "Completed "; craftCompleted += Settings.CraftCount > 0 ? $"{TotalCount}/{Settings.CraftCount}" : $"{TotalCount}"; UICommunicator.UpdateStatus2(craftCompleted); CraftingActive = false; var foodRemaining = (int)(NextFoodUse - DateTime.Now).TotalMinutes; var syrupRemaining = (int)(NextSyrupUse - DateTime.Now).TotalMinutes; SetFoodAndSyrupTimings.Invoke(foodRemaining, syrupRemaining); EndCraftCallback.Invoke(); }