diff --git a/Projects/BlacksmithMaster/.vs/BlacksmithMaster/v16/.suo b/Projects/BlacksmithMaster/.vs/BlacksmithMaster/v16/.suo index a50e4b3..243e275 100644 Binary files a/Projects/BlacksmithMaster/.vs/BlacksmithMaster/v16/.suo and b/Projects/BlacksmithMaster/.vs/BlacksmithMaster/v16/.suo differ diff --git a/Projects/BlacksmithMaster/BlacksmithMaster/Class1.cs b/Projects/BlacksmithMaster/BlacksmithMaster/Class1.cs index 9d219d9..5267070 100644 --- a/Projects/BlacksmithMaster/BlacksmithMaster/Class1.cs +++ b/Projects/BlacksmithMaster/BlacksmithMaster/Class1.cs @@ -15,6 +15,7 @@ namespace BlacksmithMaster { public static ConfigEntry debug; public static ConfigEntry xpMultiplier; + public static ConfigEntry moneyMultiplier; public void Awake() { debug = Config.Bind("General", "Debug", false); @@ -22,6 +23,9 @@ namespace BlacksmithMaster { xpMultiplier = Config.Bind("General", "XP Multiplier", 1f, new ConfigDescription("XP Multiplier", new AcceptableValueRange(0.01f, 1024f))); + moneyMultiplier = + Config.Bind("General", "Money Multiplier", 1f, + new ConfigDescription("Money Multiplier", new AcceptableValueRange(0.01f, 1024f))); Logger.LogInfo("Cykasmith loaded"); HarmonyFileLog.Enabled = true; @@ -45,4 +49,14 @@ namespace BlacksmithMaster { Main.LogDebug("Modified XP amount: " + amount); } } + + [HarmonyPatch(typeof(TavernModel), "ChangeMoney")] + public class TavernModel_ChangeMoney { + public static void Prefix(ref int value) { + Main.LogDebug("Original money amount: " + value); + if (value > 0) + value = (int)((float)value * Main.moneyMultiplier.Value); + Main.LogDebug("Modified money amount: " + value); + } + } }