static Start() { var pawnSkillTimerCache = new PawnSkillTimerCache(25); var levelEventMaker = new LevelEventMaker(pawnSkillTimerCache); SkillRecordLearnPatch.InitializePatch(new Harmony("Krafs.LevelUp"), levelEventMaker); }
static Start() { var pawnSkillTimerCache = new PawnSkillTimerCache(25); var modSettings = LoadedModManager.GetMod <ModHandler>().GetSettings <Settings>(); var levelEventMaker = new LevelEventMaker(pawnSkillTimerCache, modSettings); SkillRecordLearnPatch.InitializePatch(new Harmony("Krafs.LevelUp"), levelEventMaker); }
public override void DoSettingsWindowContents(Rect rect) { var doLevelUp = this.Settings.DoLevelUp; var doLevelDown = this.Settings.DoLevelDown; var list = new Listing_Standard { ColumnWidth = 120f }; list.Begin(rect); list.CheckboxLabeled("Krafs.LevelUp.LevelUpLabel".Translate(), ref this.Settings.DoLevelUp); list.CheckboxLabeled("Krafs.LevelUp.LevelDownLabel".Translate(), ref this.Settings.DoLevelDown); list.End(); if (doLevelUp != this.Settings.DoLevelUp || doLevelDown != this.Settings.DoLevelDown) { SkillRecordLearnPatch.UpdatePatch(); } }