Skip to content

Commit 5df9753

Browse files
authored
Merge pull request #238 from DiplomacyTeam/dev
v1.2.7
2 parents ddd942f + 08b392a commit 5df9753

File tree

10 files changed

+17
-12
lines changed

10 files changed

+17
-12
lines changed

build/common.props

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
<!--Module Version-->
44
<PropertyGroup>
5-
<Version>1.2.6</Version>
5+
<Version>1.2.7</Version>
66
<GameVersion>1.0.0</GameVersion>
77
</PropertyGroup>
88

changelog.txt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,8 @@
11
---------------------------------------------------------------------------------------------------
2+
Version: 1.2.7
3+
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
4+
* Add support for v1.1.6
5+
---------------------------------------------------------------------------------------------------
26
Version: 1.2.6
37
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.2.0,v1.2.1,v1.2.2,v1.2.3
48
* Adapted for latest game versions.

src/Bannerlord.Diplomacy/Actions/GiveGoldToKingdomAction.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ private static void GetMoneyFromGiver(Kingdom giverKingdom, int amount, WalletTy
6262
{
6363
foreach ((var settlement, var amountToCoverBySettlement) in MBMath.DistributeShares(amountToCover, giverKingdom.Settlements.Where(s => s.IsCastle || s.IsTown), CalculateSettlementShare))
6464
{
65-
#if v100 || v101 || v102 || v103 || v110 || v111 || v112 || v113 || v114 || v115
65+
#if v100 || v101 || v102 || v103 || v110 || v111 || v112 || v113 || v114 || v115 || v116
6666
settlement.Prosperity -= amountToCoverBySettlement / GoldPerProsperity;
6767
#else
6868
settlement.Town.Prosperity -= amountToCoverBySettlement / GoldPerProsperity;
@@ -145,7 +145,7 @@ private static void GiveGoldToKingdom(int gold, Kingdom kingdom)
145145

146146
private static int CalculateShare(Clan clan) => Math.Max(clan.Tier / 2, 1) + (clan == clan.Kingdom?.Leader?.Clan ? 1 : 0);
147147
private static int CalculateMercenaryShare(Clan clan) => Math.Max((int) clan.Influence, 1);
148-
#if v100 || v101 || v102 || v103 || v110 || v111 || v112 || v113 || v114 || v115
148+
#if v100 || v101 || v102 || v103 || v110 || v111 || v112 || v113 || v114 || v115 || v116
149149
private static int CalculateSettlementShare(Settlement settlement) => Math.Max((int) settlement.Prosperity, 1);
150150
#else
151151
private static int CalculateSettlementShare(Settlement settlement) => Math.Max((int) settlement.Town.Prosperity, 1);

src/Bannerlord.Diplomacy/Actions/GrantFiefAction.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ private static int CalculateBaseRelationChange(Settlement settlement)
5151
{
5252
// TODO: Consider basing the relationship change with the granted clan upon the fief's value
5353
// normalized to the average fief value in the kingdom.
54-
#if v100 || v101 || v102 || v103 || v110 || v111 || v112 || v113 || v114 || v115
54+
#if v100 || v101 || v102 || v103 || v110 || v111 || v112 || v113 || v114 || v115 || v116
5555
var baseRelationChange = (int) Math.Round(Math.Max(5, Math.Log(settlement.Prosperity / 1000, 1.1f)));
5656
#else
5757
var baseRelationChange = (int) Math.Round(Math.Max(5, Math.Log(settlement.Town.Prosperity / 1000, 1.1f)));

src/Bannerlord.Diplomacy/CivilWar/Actions/ChangeKingdomBannerAction.cs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ public static void Apply(Kingdom kingdom, uint backgroundColor, uint sigilColor)
6666

6767
if (clanKingdom == kingdom)
6868
{
69-
#if v100 || v101 || v102 || v103 || v110 || v111 || v112 || v113 || v114 || v115
69+
#if v100 || v101 || v102 || v103 || v110 || v111 || v112 || v113 || v114 || v115 || v116
7070
var visuals = mobileParty.Party!.Visuals;
7171
if (visuals != null)
7272
{
@@ -80,7 +80,7 @@ public static void Apply(Kingdom kingdom, uint backgroundColor, uint sigilColor)
8080

8181
foreach (var settlement in kingdom.Settlements)
8282
{
83-
#if v100 || v101 || v102 || v103 || v110 || v111 || v112 || v113 || v114 || v115
83+
#if v100 || v101 || v102 || v103 || v110 || v111 || v112 || v113 || v114 || v115 || v116
8484
var visuals = settlement.Party.Visuals;
8585
if (visuals != null)
8686
{
@@ -95,7 +95,7 @@ public static void Apply(Kingdom kingdom, uint backgroundColor, uint sigilColor)
9595
var party = settlement.Village.VillagerPartyComponent.MobileParty.Party;
9696
if (party != null)
9797
{
98-
#if v100 || v101 || v102 || v103 || v110 || v111 || v112 || v113 || v114 || v115
98+
#if v100 || v101 || v102 || v103 || v110 || v111 || v112 || v113 || v114 || v115 || v116
9999
party.Visuals.SetMapIconAsDirty();
100100
#else
101101
party.SetVisualAsDirty();
@@ -107,7 +107,7 @@ public static void Apply(Kingdom kingdom, uint backgroundColor, uint sigilColor)
107107
var party = settlement.Town.GarrisonParty.Party;
108108
if (party != null)
109109
{
110-
#if v100 || v101 || v102 || v103 || v110 || v111 || v112 || v113 || v114 || v115
110+
#if v100 || v101 || v102 || v103 || v110 || v111 || v112 || v113 || v114 || v115 || v116
111111
party.Visuals.SetMapIconAsDirty();
112112
#else
113113
party.SetVisualAsDirty();

src/Bannerlord.Diplomacy/DiplomaticAction/WarPeace/Conditions/NoSiegeCondition.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ public bool ApplyCondition(Kingdom kingdom, Kingdom otherKingdom, out TextObject
1515
if (kingdom == playerKingdom || otherKingdom == playerKingdom)
1616
{
1717
var besiegedKingdom = PlayerSiege.PlayerSiegeEvent?.BesiegedSettlement?.OwnerClan.Kingdom;
18-
#if v100 || v101 || v102 || v103 || v110 || v111 || v112 || v113 || v114 || v115
18+
#if v100 || v101 || v102 || v103 || v110 || v111 || v112 || v113 || v114 || v115 || v116
1919
var besiegingKingdom = PlayerSiege.PlayerSiegeEvent?.BesiegerCamp?.BesiegerParty.LeaderHero.MapFaction as Kingdom;
2020
#else
2121
var besiegingKingdom = PlayerSiege.PlayerSiegeEvent?.BesiegerCamp?.LeaderParty.LeaderHero.MapFaction as Kingdom;

src/Bannerlord.Diplomacy/Patches/RebelKingdomPatches.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ internal sealed class RebelKingdomPatches : PatchClass<RebelKingdomPatches>
1616
{
1717
protected override IEnumerable<Patch> Prepare()
1818
{
19-
#if v100 || v101 || v102 || v103 || v110 || v111 || v112 || v113 || v114 || v115
19+
#if v100 || v101 || v102 || v103 || v110 || v111 || v112 || v113 || v114 || v115 || v116
2020
var conversationBehaviorType = Type.GetType("SandBox.CampaignBehaviors.LordConversationsCampaignBehavior, SandBox, Version=1.0.0.0, Culture=neutral")!;
2121
#else
2222
var conversationBehaviorType = Type.GetType("TaleWorlds.CampaignSystem.CampaignBehaviors.LordConversationsCampaignBehavior, TaleWorlds.CampaignSystem, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null")!;

src/Bannerlord.Diplomacy/Settings.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ class Settings : AttributeGlobalSettings<Settings>
3838
[SettingPropertyGroup(HeadingKingdomDiplomacy)]
3939
public bool EnableFiefFirstRight { get; set; } = true;
4040

41-
#if v100 || v101 || v102 || v103 || v110 || v111 || v112 || v113 || v114 || v115
41+
#if v100 || v101 || v102 || v103 || v110 || v111 || v112 || v113 || v114 || v115 || v116
4242
[SettingPropertyBool("{=8VKC3jtN}Enable Fiefless Kingdom Elimination", Order = 10, RequireRestart = false, HintText = "{=TlymwwPZ}If enabled, kingdoms without any fiefs are destroyed when they sign a peace treaty ending the last ongoing war they participate in. Default value is enabled.")]
4343
[SettingPropertyGroup(HeadingKingdomDiplomacy)]
4444
public bool EnableKingdomElimination { get; set; } = true;

src/Bannerlord.Diplomacy/ViewModel/GrantFiefItemVM.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ public GrantFiefItemVM(Settlement settlement, Hero targetHero, Action<GrantFiefI
3030
}
3131
else if (settlement.IsCastle)
3232
{
33-
#if v100 || v101 || v102 || v103 || v110 || v111 || v112 || v113 || v114 || v115
33+
#if v100 || v101 || v102 || v103 || v110 || v111 || v112 || v113 || v114 || v115 || v116
3434
Prosperity = (int) Math.Round(settlement.Prosperity);
3535
#else
3636
Prosperity = (int) Math.Round(settlement.Town.Prosperity);

supported-game-versions.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ v1.2.3
22
v1.2.2
33
v1.2.1
44
v1.2.0
5+
v1.1.6
56
v1.1.5
67
v1.1.4
78
v1.1.3

0 commit comments

Comments
 (0)