diff --git a/Projects/Quasimorph/.vs/Quasimorph/v16/.suo b/Projects/Quasimorph/.vs/Quasimorph/v16/.suo index 18f3d71..ae94042 100644 Binary files a/Projects/Quasimorph/.vs/Quasimorph/v16/.suo and b/Projects/Quasimorph/.vs/Quasimorph/v16/.suo differ diff --git a/Projects/Quasimorph/Quasimorph/Class1.cs b/Projects/Quasimorph/Quasimorph/Class1.cs index 2bf24cc..ef76e26 100644 --- a/Projects/Quasimorph/Quasimorph/Class1.cs +++ b/Projects/Quasimorph/Quasimorph/Class1.cs @@ -3,6 +3,7 @@ using BepInEx; using BepInEx.Configuration; using HarmonyLib; using HarmonyLib.Tools; +using MGSC; namespace Quasimorph { [BepInPlugin(PluginGuid, PluginName, PluginVersion)] @@ -21,7 +22,7 @@ namespace Quasimorph { Config.Bind("General", "Scrapping Multiplier", 1, new ConfigDescription("Scrapping Multiplier", new AcceptableValueRange(1, 10000))); xpMultiplier = - Config.Bind("General", "XP Multiplier", 1, + Config.Bind("General", "XP Multiplier", 1f, new ConfigDescription("XP Multiplier", new AcceptableValueRange(0.01f, 100f))); Logger.LogInfo("Quasicyka loaded"); @@ -31,5 +32,15 @@ namespace Quasimorph { var originalMethods = harmony.GetPatchedMethods(); Logger.LogInfo("Patched " + originalMethods.Count() + " methods"); } + + [HarmonyPatch(typeof(Perk), nameof(Perk.AddExp))] + [HarmonyPrefix] + public static void AddExp(ref int val) { + if (debug.Value) + Console.WriteLine($"Before: {val}"); + val = (int)((float)val * scrappingMultiplier.Value); + if (debug.Value) + Console.WriteLine($"After: {val}"); + } } }