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