From dcf88a498e2f0e126a04da5ba796dd2fa92db123 Mon Sep 17 00:00:00 2001 From: PhatPhuckDave Date: Sat, 17 May 2025 12:47:58 +0200 Subject: [PATCH] Make always chads --- .../BlacksmithMaster/BlacksmithMaster/Class1.cs | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/Projects/BlacksmithMaster/BlacksmithMaster/Class1.cs b/Projects/BlacksmithMaster/BlacksmithMaster/Class1.cs index e2c7182..d6c3d50 100644 --- a/Projects/BlacksmithMaster/BlacksmithMaster/Class1.cs +++ b/Projects/BlacksmithMaster/BlacksmithMaster/Class1.cs @@ -20,6 +20,7 @@ namespace BlacksmithMaster { public static ConfigEntry researchMultiplier; public static ConfigEntry salaryMultiplier; public static ConfigEntry alwaysEvenly; + public static ConfigEntry alwaysChad; public void Awake() { debug = Config.Bind("General", "Debug", false); @@ -39,6 +40,8 @@ namespace BlacksmithMaster { alwaysEvenly = Config.Bind("General", "Always Evenly", false, new ConfigDescription("Always Evenly", new AcceptableValueRange(false, true))); + alwaysChad = Config.Bind("General", "Always Chad", false, + new ConfigDescription("Always Chad", new AcceptableValueRange(false, true))); Logger.LogInfo("Cykasmith loaded"); HarmonyFileLog.Enabled = true; @@ -96,7 +99,18 @@ namespace BlacksmithMaster { public class StaffUtil_FillBasicInfo { public static void Postfix(TavernData.StaffType staffType, Random rnd, ref TavernData.StaffInfo newPerson) { Main.LogDebug("Setting skill assignment strategy to evenly"); - newPerson.SkillAssignmentStrategy = TavernData.SkillAssignmentStrategyType.Balanced; + if (Main.alwaysEvenly.Value) + newPerson.SkillAssignmentStrategy = TavernData.SkillAssignmentStrategyType.Balanced; + } + } + + [HarmonyPatch(typeof(HireData), "GetStaffInfo")] + public class TavernData_GetStaffInfo { + public static void Prefix(Random rnd, int id, string staffName, bool isMale, ref bool shouldBeSuperWorker, + ref EliteTraitType forcedEliteTrait) { + Main.LogDebug("Setting shouldBeSuperWorker to true"); + if (Main.alwaysChad.Value) + shouldBeSuperWorker = true; } } }