Ejemplo n.º 1
0
        static Start()
        {
            var pawnSkillTimerCache = new PawnSkillTimerCache(25);
            var levelEventMaker     = new LevelEventMaker(pawnSkillTimerCache);

            SkillRecordLearnPatch.InitializePatch(new Harmony("Krafs.LevelUp"), levelEventMaker);
        }
Ejemplo n.º 2
0
        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);
        }
Ejemplo n.º 3
0
        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();
            }
        }