generated from dave/MelonTemplate
Fix improperly loading preferences
This commit is contained in:
@@ -1,5 +1,4 @@
|
|||||||
using System;
|
using System.Linq;
|
||||||
using System.Linq;
|
|
||||||
using Il2CppFunGI.ATTT.Game.Gameplay.FinancialReport;
|
using Il2CppFunGI.ATTT.Game.Gameplay.FinancialReport;
|
||||||
using MelonLoader;
|
using MelonLoader;
|
||||||
using UnityEngine;
|
using UnityEngine;
|
||||||
@@ -11,7 +10,7 @@ namespace ArmsTradeTycoonTanks {
|
|||||||
public static MelonPreferences_Entry<float> MoneyMultiplier;
|
public static MelonPreferences_Entry<float> MoneyMultiplier;
|
||||||
|
|
||||||
public static void InitializePreferences() {
|
public static void InitializePreferences() {
|
||||||
category = MelonPreferences.CreateCategory("ArmsTradeTycoonTanks");
|
category = MelonPreferences.CreateCategory("ArmsTradeTycoonTanksMelonMod");
|
||||||
|
|
||||||
Debug = category.CreateEntry("Debug", true, description: "Enable debug mode");
|
Debug = category.CreateEntry("Debug", true, description: "Enable debug mode");
|
||||||
MoneyMultiplier = category.CreateEntry("MoneyMultiplier", 1.0f, description: "Multiplier for money gains");
|
MoneyMultiplier = category.CreateEntry("MoneyMultiplier", 1.0f, description: "Multiplier for money gains");
|
||||||
@@ -19,8 +18,11 @@ namespace ArmsTradeTycoonTanks {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public class ArmsTradeTycoonTanksMelonMod : MelonMod {
|
public class ArmsTradeTycoonTanksMelonMod : MelonMod {
|
||||||
public override void OnInitializeMelon() {
|
public override void OnApplicationStart() {
|
||||||
Global.InitializePreferences();
|
Global.InitializePreferences();
|
||||||
|
}
|
||||||
|
|
||||||
|
public override void OnInitializeMelon() {
|
||||||
LoggerInstance.Msg("Phat Melon mod loaded");
|
LoggerInstance.Msg("Phat Melon mod loaded");
|
||||||
HarmonyLib.Harmony harmony = HarmonyInstance;
|
HarmonyLib.Harmony harmony = HarmonyInstance;
|
||||||
harmony.PatchAll();
|
harmony.PatchAll();
|
||||||
|
|||||||
@@ -53,6 +53,12 @@
|
|||||||
<Reference Include="UnityEngine">
|
<Reference Include="UnityEngine">
|
||||||
<HintPath>$(GAME_MANAGED)/UnityEngine.dll</HintPath>
|
<HintPath>$(GAME_MANAGED)/UnityEngine.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
|
<Reference Include="UnityEngine">
|
||||||
|
<HintPath>$(GAME_MANAGED)/UnityEngine.InputLegacyModule.dll</HintPath>
|
||||||
|
</Reference>
|
||||||
|
<Reference Include="UnityEngine">
|
||||||
|
<HintPath>$(GAME_MANAGED)/UnityEngine.IMGUIModule.dll</HintPath>
|
||||||
|
</Reference>
|
||||||
<Reference Include="UnityEngine.CoreModule">
|
<Reference Include="UnityEngine.CoreModule">
|
||||||
<HintPath>$(GAME_MANAGED)/UnityEngine.CoreModule.dll</HintPath>
|
<HintPath>$(GAME_MANAGED)/UnityEngine.CoreModule.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
@@ -71,9 +77,6 @@
|
|||||||
<Reference Include="Il2CppInterop.Common">
|
<Reference Include="Il2CppInterop.Common">
|
||||||
<HintPath>$(GAME_NET6)/Il2CppInterop.Common.dll</HintPath>
|
<HintPath>$(GAME_NET6)/Il2CppInterop.Common.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="UrGUI">
|
|
||||||
<HintPath>$(GAME_USER_LIBS)/UrGUI.dll</HintPath>
|
|
||||||
</Reference>
|
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets"/>
|
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets"/>
|
||||||
</Project>
|
</Project>
|
||||||
|
|||||||
Reference in New Issue
Block a user