generated from dave/MelonTemplate
Give up
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
using System.Linq;
|
||||
using Il2CppFunGI.ATTT.Game.Gameplay.FinancialReport;
|
||||
using Il2CppSystem;
|
||||
using MelonLoader;
|
||||
using UnityEngine;
|
||||
|
||||
@@ -21,7 +22,7 @@ namespace ArmsTradeTycoonTanks {
|
||||
public override void OnApplicationStart() {
|
||||
Global.InitializePreferences();
|
||||
}
|
||||
|
||||
|
||||
public override void OnInitializeMelon() {
|
||||
LoggerInstance.Msg("Phat Melon mod loaded");
|
||||
HarmonyLib.Harmony harmony = HarmonyInstance;
|
||||
@@ -35,17 +36,20 @@ namespace ArmsTradeTycoonTanks {
|
||||
}
|
||||
}
|
||||
|
||||
// I could not get this to work...
|
||||
// IL2CPP fucked it up beyond any recognition
|
||||
// Such a shame
|
||||
[HarmonyLib.HarmonyPatch]
|
||||
public class Patches {
|
||||
[HarmonyLib.HarmonyPrefix]
|
||||
[HarmonyLib.HarmonyPatch(typeof(FinancialReportSystem), "HandleMoneyUpdated")]
|
||||
public static void PrefixMoney(ref long __0) {
|
||||
if (Global.Debug.Value)
|
||||
Debug.Log($"Money is {__0}");
|
||||
// if (Global.Debug.Value)
|
||||
Console.WriteLine($"Money is {__0}");
|
||||
if (__0 > 0) {
|
||||
__0 = (long)(__0 * Global.MoneyMultiplier.Value);
|
||||
if (Global.Debug.Value)
|
||||
Debug.Log($"Money modified to {__0}");
|
||||
Console.WriteLine($"Money modified to {__0}");
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user