Skip to content

Commit

Permalink
Merge pull request #240 from DiplomacyTeam/dev
Browse files Browse the repository at this point in the history
Add support for 1.2.4 - new version 1.2.8
  • Loading branch information
bennyz committed Sep 29, 2023
2 parents 5df9753 + 6f1538f commit 0b038f7
Show file tree
Hide file tree
Showing 6 changed files with 19 additions and 2 deletions.
2 changes: 1 addition & 1 deletion build/common.props
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

<!--Module Version-->
<PropertyGroup>
<Version>1.2.7</Version>
<Version>1.2.8</Version>
<GameVersion>1.0.0</GameVersion>
</PropertyGroup>

Expand Down
4 changes: 4 additions & 0 deletions changelog.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
---------------------------------------------------------------------------------------------------
Version: 1.2.8
Game Versions: v1.0.0,v1.0.1,v1.0.2,v1.0.3,v1.1.0,v1.1.1,v1.1.2,v1.1.3,v1.1.4,v1.1.5,v1.1.6,v1.2.0,v1.2.1,v1.2.2,v1.2.3.v1.2.4
* Add support for v1.2.4
---------------------------------------------------------------------------------------------------
Version: 1.2.7
Game Versions: v1.0.0,v1.0.1,v1.0.2,v1.0.3,v1.1.0,v1.1.1,v1.1.2,v1.1.3,v1.1.4,v1.1.5,v1.1.6,v1.2.0,v1.2.1,v1.2.2,v1.2.3
* Add support for v1.1.6
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,11 @@ internal sealed class CivilWarBehavior : CampaignBehaviorBase
public override void RegisterEvents()
{
CampaignEvents.DailyTickClanEvent.AddNonSerializedListener(this, DailyTickClan);
#if v124
CampaignEvents.OnClanChangedKingdomEvent.AddNonSerializedListener(this, (x, y, z, _, _) => RemoveClanFromRebelFaction(x, y, z));
#elif v100 || v101 || v102 || v103 || v110 || v111 || v112 || v113 || v114 || v115 || v116 || v120 || v121 || v122 || v123
CampaignEvents.ClanChangedKingdom.AddNonSerializedListener(this, (x, y, z, _, _) => RemoveClanFromRebelFaction(x, y, z));
#endif
CampaignEvents.MakePeace.AddNonSerializedListener(this, ResolveCivilWar);
CampaignEvents.KingdomDecisionConcluded.AddNonSerializedListener(this, NewKing);
CampaignEvents.DailyTickEvent.AddNonSerializedListener(this, DailyTick);
Expand Down
2 changes: 1 addition & 1 deletion src/Bannerlord.Diplomacy/ViewModel/RebelFactionsVM.cs
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ public void OnCreateFaction()
inquiryElements,
true,
1,
#if v120 || v121 || v122 || v123
#if v120 || v121 || v122 || v123 || v124
1,
#endif
GameTexts.FindText("str_ok").ToString(),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,11 @@ public WarExhaustionMapIndicatorVM()
_kingdomsAtWar = new MBBindingList<WarExhaustionMapIndicatorItemVM>();
RefreshValues();
DiplomacyEvents.WarExhaustionInitialized.AddNonSerializedListener(this, HandleStanceChange);
#if v124
CampaignEvents.OnClanChangedKingdomEvent.AddNonSerializedListener(this, (x, _, _, _, _) => HandleClanChangedKingdom(x));
#elif v100 || v101 || v102 || v103 || v110 || v111 || v112 || v113 || v114 || v115 || v116 || v120 || v121 || v122 || v123
CampaignEvents.ClanChangedKingdom.AddNonSerializedListener(this, (x, _, _, _, _) => HandleClanChangedKingdom(x));
#endif
DiplomacyEvents.WarExhaustionAdded.AddNonSerializedListener(this, HandleWarExhaustionChange);
Settings.Instance!.PropertyChanged += Settings_PropertyChanged;
}
Expand Down Expand Up @@ -47,7 +51,11 @@ public override void OnFinalize()
{
base.OnFinalize();

#if v124
CampaignEvents.OnClanChangedKingdomEvent.ClearListeners(this);
#elif v100 || v101 || v102 || v103 || v110 || v111 || v112 || v113 || v114 || v115 || v116 || v120 || v121 || v122 || v123
CampaignEvents.ClanChangedKingdom.ClearListeners(this);
#endif
DiplomacyEvents.WarExhaustionInitialized.ClearListeners(this);
DiplomacyEvents.WarExhaustionAdded.ClearListeners(this);
}
Expand Down
1 change: 1 addition & 0 deletions supported-game-versions.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
v1.2.4
v1.2.3
v1.2.2
v1.2.1
Expand Down

0 comments on commit 0b038f7

Please sign in to comment.