Make always chads
This commit is contained in:
@@ -20,6 +20,7 @@ namespace BlacksmithMaster {
|
||||
public static ConfigEntry<float> researchMultiplier;
|
||||
public static ConfigEntry<float> salaryMultiplier;
|
||||
public static ConfigEntry<bool> alwaysEvenly;
|
||||
public static ConfigEntry<bool> 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<bool>(false, true)));
|
||||
alwaysChad = Config.Bind("General", "Always Chad", false,
|
||||
new ConfigDescription("Always Chad", new AcceptableValueRange<bool>(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");
|
||||
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;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user