예제 #1
0
 public override bool DoLoading(Game game)
 {
     if (Campaign.Current != null)
     {
         if (Settings.Instance.PrisonerImprisonmentTweakEnabled)
         {
             PrisonerImprisonmentTweak.Apply(Campaign.Current);
         }
         if (Settings.Instance.DailyTroopExperienceTweakEnabled)
         {
             DailyTroopExperienceTweak.Apply(Campaign.Current);
         }
     }
     return(base.DoLoading(game));
 }
예제 #2
0
 public override void OnGameInitializationFinished(Game game)
 {
     base.OnGameInitializationFinished(game);
     if (Campaign.Current != null && BannerlordTweaksSettings.Instance is { } settings&& (settings.EnableMissingHeroFix && settings.PrisonerImprisonmentTweakEnabled))
     {
         try
         {
             CampaignEvents.DailyTickEvent.AddNonSerializedListener(this, delegate
             {
                 PrisonerImprisonmentTweak.DailyTick();
             });
         }
         catch (Exception ex)
         {
             MessageBox.Show($"Error Initialising Missing Hero Fix:\n\n{ex.ToStringFull()}");
         }
     }
 }
예제 #3
0
 public override bool DoLoading(Game game)
 {
     if (Campaign.Current != null && BannerlordTweaksSettings.Instance is { } settings)
     {
         if (settings.PrisonerImprisonmentTweakEnabled)
         {
             PrisonerImprisonmentTweak.Apply(Campaign.Current);
         }
         if (settings.DailyTroopExperienceTweakEnabled)
         {
             DailyTroopExperienceTweak.Apply(Campaign.Current);
         }
         // 1.5.7.2 - Disable until we understand main quest changes.
         //if (settings.TweakedConspiracyQuestTimerEnabled)
         //    ConspiracyQuestTimerTweak.Apply(Campaign.Current);
     }
     return(base.DoLoading(game));
 }