private static void Postfix(Panel_IceFishing __instance, bool enable) { if (enable) { UpdateIceFishingPanel(__instance); } }
// Panel_IceFishing private static void UpdateIceFishingPanel(Panel_IceFishing panel) { int hours = panel.m_HoursToFish; float origBurnRate = GameManager.GetHungerComponent().m_CalorieBurnPerHourStanding; float calorieBurnRate = GameManager.GetPlayerManagerComponent().CalculateModifiedCalorieBurnRate(origBurnRate); HungerTuple simulation = HungerRevamped.Instance.SimulateHungerBar(calorieBurnRate, hours); UILabel calorieStoreLabel = panel.m_CurrentCaloriesLabel.GetComponent <UILabel>(); int storedCalories = Mathf.RoundToInt(simulation.storedCalories); calorieStoreLabel.text = Localization.Get("GAMEPLAY_CalorieStore") + ": " + storedCalories.ToString(); UILabel hungerLabel = panel.m_EstimatedCaloriesBurnedLabel.GetComponent <UILabel>(); int hungerPercent = Mathf.RoundToInt(simulation.hungerRatio * 100f); hungerLabel.text = Localization.Get("GAMEPLAY_Hunger") + ": " + hungerPercent.ToString() + "%"; }
public static void Prefix(Panel_IceFishing __instance) { Debug.LogFormat("Panel_IceFishing::OnFish"); lastAction = FasterGenericAction.FISHING; }
private static bool Prefix(Panel_IceFishing __instance) { UpdateIceFishingPanel(__instance); return(false); }