2 Commits

Author SHA1 Message Date
1af46039ea Remove suo files
What the fuck anyway...
2025-05-17 11:11:38 +02:00
5adb7defec Multiply the monies 2025-05-17 11:11:15 +02:00
6 changed files with 15 additions and 0 deletions

1
.gitignore vendored
View File

@@ -10,3 +10,4 @@ Projects/Regiments/Regiments/obj/Release
Projects/CykaOfQud/.vs/ Projects/CykaOfQud/.vs/
Projects/CykaOfQud/.vscode/ Projects/CykaOfQud/.vscode/
*.suo

View File

@@ -15,6 +15,7 @@ namespace BlacksmithMaster {
public static ConfigEntry<bool> debug; public static ConfigEntry<bool> debug;
public static ConfigEntry<float> xpMultiplier; public static ConfigEntry<float> xpMultiplier;
public static ConfigEntry<float> moneyMultiplier;
public void Awake() { public void Awake() {
debug = Config.Bind("General", "Debug", false); debug = Config.Bind("General", "Debug", false);
@@ -22,6 +23,9 @@ namespace BlacksmithMaster {
xpMultiplier = xpMultiplier =
Config.Bind("General", "XP Multiplier", 1f, Config.Bind("General", "XP Multiplier", 1f,
new ConfigDescription("XP Multiplier", new AcceptableValueRange<float>(0.01f, 1024f))); new ConfigDescription("XP Multiplier", new AcceptableValueRange<float>(0.01f, 1024f)));
moneyMultiplier =
Config.Bind("General", "Money Multiplier", 1f,
new ConfigDescription("Money Multiplier", new AcceptableValueRange<float>(0.01f, 1024f)));
Logger.LogInfo("Cykasmith loaded"); Logger.LogInfo("Cykasmith loaded");
HarmonyFileLog.Enabled = true; HarmonyFileLog.Enabled = true;
@@ -45,4 +49,14 @@ namespace BlacksmithMaster {
Main.LogDebug("Modified XP amount: " + amount); 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);
}
}
} }