Skip to content

Commit

Permalink
Merge pull request #27 from BUTR/dev
Browse files Browse the repository at this point in the history
v0.6.2
  • Loading branch information
Aragas authored Jun 26, 2022
2 parents e41dd3f + 9a0fb12 commit af8546d
Show file tree
Hide file tree
Showing 8 changed files with 35 additions and 6 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ jobs:
shell: pwsh

- name: Upload Bannerlord folder
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v3
with:
name: bannerlord
path: ./bannerlord/
Expand All @@ -49,7 +49,7 @@ jobs:
github-token: ${{secrets.GITHUB_TOKEN}}

- name: Download bannerlord folder
uses: actions/download-artifact@v2
uses: actions/download-artifact@v3
with:
name: bannerlord
path: ./bannerlord
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
using Bannerlord.YellToInspire.HotKeys;

#if e172
using TaleWorlds.Core;
#elif e180
using TaleWorlds.Library;
#endif
using TaleWorlds.Localization;
using TaleWorlds.MountAndBlade;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
using Bannerlord.YellToInspire.HotKeys;

#if e172
using TaleWorlds.Core;
#elif e180
using TaleWorlds.Library;
#endif
using TaleWorlds.Localization;
using TaleWorlds.MountAndBlade;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
using Bannerlord.YellToInspire.HotKeys;

#if e172
using TaleWorlds.MountAndBlade.View.Missions;
#elif e180
using TaleWorlds.MountAndBlade.View.MissionViews;
#endif

namespace Bannerlord.YellToInspire.MissionBehaviors
{
Expand Down
17 changes: 13 additions & 4 deletions src/Bannerlord.YellToInspire/SubModule.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,6 @@
using Bannerlord.YellToInspire.HotKeys;
using Bannerlord.YellToInspire.MissionBehaviors;

using BUTR.DependencyInjection;

using MCM.Abstractions.Settings.Providers;

using System;
using System.IO;

Expand Down Expand Up @@ -53,14 +49,17 @@ protected override void OnSubModuleLoad()

var moduleInfo = ModuleInfoHelper.GetModuleByType(typeof(SubModule));
var path = Path.Combine(ModuleHelper.GetModuleFullPath(moduleInfo!.Id), "ModuleData", "module_strings.xml");
#if e172
Module.CurrentModule.GlobalTextManager.LoadGameTexts(path);
#endif
HotKeyManager.AddAuxiliaryCategory(new YellToInspireHotkeyCategory());

base.OnSubModuleLoad();
}

protected override void InitializeGameStarter(Game game, IGameStarter starterObject)
{
#if e172
void OnHeroGainedSkill(Hero hero, SkillObject skill, bool hasNewPerk, int change, bool shouldNotify)
{
if (hero != Hero.MainHero) return;
Expand All @@ -69,6 +68,16 @@ void OnHeroGainedSkill(Hero hero, SkillObject skill, bool hasNewPerk, int change

RefreshPerks();
}
#elif e180
void OnHeroGainedSkill(Hero hero, SkillObject skill, int change, bool shouldNotify)
{
if (hero != Hero.MainHero) return;

if (skill != DefaultSkills.Leadership && skill != DefaultSkills.Roguery) return;

RefreshPerks();
}
#endif

if (starterObject is CampaignGameStarter campaignStarter)
{
Expand Down
3 changes: 3 additions & 0 deletions src/Bannerlord.YellToInspire/Utils.cs
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@

using TaleWorlds.CampaignSystem;
using TaleWorlds.Core;
#if e180
using TaleWorlds.Library;
#endif
using TaleWorlds.Localization;
using TaleWorlds.MountAndBlade;

Expand Down
4 changes: 4 additions & 0 deletions src/Bannerlord.YellToInspire/changelog.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
---------------------------------------------------------------------------------------------------
Version: 0.6.2
Game Versions: e1.8.0
* Adapted to 1.8.0
---------------------------------------------------------------------------------------------------
Version: 0.6.1
Game Versions: e1.7.2
* Split settings into categories
Expand Down
1 change: 1 addition & 0 deletions src/Bannerlord.YellToInspire/supported-game-versions.txt
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
e1.8.0
e1.7.2

0 comments on commit af8546d

Please sign in to comment.