internal static bool Prefix(ref double c, Simulation.CashType from, Simulation.CashSource source, Tower tower) { bool gainedCash = (c > 0); if (!gainedCash) { return(true); } if (from != Simulation.CashType.Normal || source != Simulation.CashSource.Normal || tower != null) { return(true); } if (SessionData.CurrentSession.IsCheating) { return(true); } c = Settings.LoadedSettings.CashPerPop; return(true); }
internal static void Postfix(double c, Simulation.CashType from, int cashIndex, Simulation.CashSource source) { MelonMain.DoPatchMethods(mod => mod.OnCashRemoved(c, from, cashIndex, source)); }
/// <summary> /// Called right after Cash is removed in a game /// /// Equivalent to a HarmonyPostFix on Simulation.RemoveCash /// </summary> public virtual void OnCashRemoved(double amount, Simulation.CashType from, int cashIndex, Simulation.CashSource source) { }
/// <summary> /// Called right after Cash is added in a game /// Tower might be null /// /// Equivalent to a HarmonyPostFix on Simulation.AddCash /// </summary> public virtual void OnCashAdded(double amount, Simulation.CashType from, int cashIndex, Simulation.CashSource source, Tower tower) { }
internal static void Postfix(double c, Simulation.CashType from, int cashIndex, Simulation.CashSource source, Tower tower) { MelonMain.PerformHook(mod => mod.OnCashAdded(c, from, cashIndex, source, tower)); }