diff --git a/DevourClient/Hacks/Misc.cs b/DevourClient/Hacks/Misc.cs index f50ede8..d749c2e 100644 --- a/DevourClient/Hacks/Misc.cs +++ b/DevourClient/Hacks/Misc.cs @@ -175,7 +175,6 @@ namespace DevourClient.Hacks public static void InstantWin() { Survival survival_class = UnityEngine.Object.FindObjectOfType(); - survival_class.m_InnMapController.AddEggToWorld(); try { diff --git a/DevourClient/Hooks/Hooks.cs b/DevourClient/Hooks/Hooks.cs index 994a908..985597a 100644 --- a/DevourClient/Hooks/Hooks.cs +++ b/DevourClient/Hooks/Hooks.cs @@ -18,23 +18,21 @@ namespace DevourClient.Hooks } } */ - /* + [HarmonyPatch(typeof(RankHelpers))] [HarmonyPatch(nameof(RankHelpers.CalculateExpGain))] //annotation boiler plate to tell Harmony what to patch. Refer to docs. static class RankHelpers_CalculateExpGain { static void Postfix(ref RankHelpers.ExpGainInfo __result) { - __result.baseExp = 200; - __result.winBonus = 200; - __result.awardsBonus = 200; - __result.totalExp = 200; - __result.gameModeBonus = 200; - MelonLoader.MelonLogger.Msg("called"); + if (Load.exp_modifier) + { + __result.totalExp = (int)Load.exp; + } return; } } - */ + [HarmonyPatch(typeof(Horror.Menu))] [HarmonyPatch(nameof(Horror.Menu.SetupPerk))] //annotation boiler plate to tell Harmony what to patch. Refer to docs. diff --git a/DevourClient/MelonMain.cs b/DevourClient/MelonMain.cs index 1dfc489..bb148ed 100644 --- a/DevourClient/MelonMain.cs +++ b/DevourClient/MelonMain.cs @@ -16,6 +16,8 @@ namespace DevourClient bool fly = false; float fly_speed = 5; public bool _IsCarryingFirstAidOnLocalCharacter = false; + public static bool exp_modifier = false; + public static float exp = 1000f; bool spam_message = false; @@ -107,6 +109,10 @@ namespace DevourClient GUI.Label(new Rect(Settings.Settings.x + 310, Settings.Settings.y + 125, 100, 30), this.fly_speed.ToString()); //Prints the value of the slider; this._IsCarryingFirstAidOnLocalCharacter = GUI.Toggle(new Rect(Settings.Settings.x + 200, Settings.Settings.y + 190, 150, 20), this._IsCarryingFirstAidOnLocalCharacter, "IsCarryingFirstAid"); + Load.exp_modifier = GUI.Toggle(new Rect(Settings.Settings.x + 350, Settings.Settings.y + 40, 150, 20), Load.exp_modifier, "Exp Modifier"); + Load.exp = GUI.HorizontalSlider(new Rect(Settings.Settings.x + 350, Settings.Settings.y + 70, 100, 10), Load.exp, 1000f, 50000f); //Slider for the fly speed + GUI.Label(new Rect(Settings.Settings.x + 410, Settings.Settings.y + 75, 100, 30), Load.exp.ToString()); //Prints the value of the slider; + if (GUI.Button(new Rect(Settings.Settings.x + 10, Settings.Settings.y + 40, 150, 20), "Unlock Achievements")) { Thread AchievementsThread = new Thread(