diff --git a/Projects/BlacksmithMaster/BlacksmithMaster/Class1.cs b/Projects/BlacksmithMaster/BlacksmithMaster/Class1.cs index 89b27ac..ad1e654 100644 --- a/Projects/BlacksmithMaster/BlacksmithMaster/Class1.cs +++ b/Projects/BlacksmithMaster/BlacksmithMaster/Class1.cs @@ -25,6 +25,7 @@ namespace BlacksmithMaster { public static ConfigEntry decorationAdditionOffset; public static ConfigEntry globalSpeedMultiplier; public static ConfigEntry globalSpeedOffset; + public static ConfigEntry hiringCostMultiplier; public static ConfigEntry alwaysEvenly; public static ConfigEntry alwaysChad; @@ -61,6 +62,9 @@ namespace BlacksmithMaster { globalSpeedOffset = Config.Bind( "General", "Global Speed Offset", 0f, new ConfigDescription("Global Speed Offset", new AcceptableValueRange(-1024f, 1024f))); + hiringCostMultiplier = Config.Bind( + "General", "Hiring Cost Multiplier", 1f, + new ConfigDescription("Hiring Cost Multiplier", new AcceptableValueRange(0.01f, 1024f))); alwaysEvenly = Config.Bind("General", "Always Evenly", false, new ConfigDescription("Always Evenly", new AcceptableValueRange(false, true))); @@ -146,6 +150,15 @@ namespace BlacksmithMaster { } } + [HarmonyPatch(typeof(StaffModel), "GetCostToHire")] + public class StaffModel_GetCostToHire { + public static void Postfix(ref int __result) { + Main.LogDebug("Original hiring cost: " + __result); + __result = (int)(__result * Main.hiringCostMultiplier.Value); + Main.LogDebug("Modified hiring cost: " + __result); + } + } + [HarmonyPatch(typeof(StaffUtil), "FillBasicInfo")] public class StaffUtil_FillBasicInfo { public static void Postfix(TavernData.StaffType staffType, Random rnd, ref TavernData.StaffInfo newPerson) {