Compare commits
1 Commits
1af46039ea
...
9d67968245
Author | SHA1 | Date | |
---|---|---|---|
9d67968245 |
Binary file not shown.
@@ -15,6 +15,7 @@ namespace BlacksmithMaster {
|
||||
public static ConfigEntry<bool> debug;
|
||||
|
||||
public static ConfigEntry<float> xpMultiplier;
|
||||
public static ConfigEntry<float> 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<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");
|
||||
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 amount) {
|
||||
Main.LogDebug("Original money amount: " + amount);
|
||||
if (amount > 0)
|
||||
amount = (int)((float)amount * Main.moneyMultiplier.Value);
|
||||
Main.LogDebug("Modified money amount: " + amount);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user