diff --git a/build/common.props b/build/common.props index 2c23c7d9..5c47fae2 100644 --- a/build/common.props +++ b/build/common.props @@ -2,7 +2,7 @@ - 1.2.6 + 1.2.7 1.0.0 diff --git a/changelog.txt b/changelog.txt index c690104d..4439b625 100644 --- a/changelog.txt +++ b/changelog.txt @@ -1,4 +1,8 @@ --------------------------------------------------------------------------------------------------- +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 +--------------------------------------------------------------------------------------------------- Version: 1.2.6 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 * Adapted for latest game versions. diff --git a/src/Bannerlord.Diplomacy/Actions/GiveGoldToKingdomAction.cs b/src/Bannerlord.Diplomacy/Actions/GiveGoldToKingdomAction.cs index 3580126c..12b7b05a 100644 --- a/src/Bannerlord.Diplomacy/Actions/GiveGoldToKingdomAction.cs +++ b/src/Bannerlord.Diplomacy/Actions/GiveGoldToKingdomAction.cs @@ -62,7 +62,7 @@ private static void GetMoneyFromGiver(Kingdom giverKingdom, int amount, WalletTy { foreach ((var settlement, var amountToCoverBySettlement) in MBMath.DistributeShares(amountToCover, giverKingdom.Settlements.Where(s => s.IsCastle || s.IsTown), CalculateSettlementShare)) { -#if v100 || v101 || v102 || v103 || v110 || v111 || v112 || v113 || v114 || v115 +#if v100 || v101 || v102 || v103 || v110 || v111 || v112 || v113 || v114 || v115 || v116 settlement.Prosperity -= amountToCoverBySettlement / GoldPerProsperity; #else settlement.Town.Prosperity -= amountToCoverBySettlement / GoldPerProsperity; @@ -145,7 +145,7 @@ private static void GiveGoldToKingdom(int gold, Kingdom kingdom) private static int CalculateShare(Clan clan) => Math.Max(clan.Tier / 2, 1) + (clan == clan.Kingdom?.Leader?.Clan ? 1 : 0); private static int CalculateMercenaryShare(Clan clan) => Math.Max((int) clan.Influence, 1); -#if v100 || v101 || v102 || v103 || v110 || v111 || v112 || v113 || v114 || v115 +#if v100 || v101 || v102 || v103 || v110 || v111 || v112 || v113 || v114 || v115 || v116 private static int CalculateSettlementShare(Settlement settlement) => Math.Max((int) settlement.Prosperity, 1); #else private static int CalculateSettlementShare(Settlement settlement) => Math.Max((int) settlement.Town.Prosperity, 1); diff --git a/src/Bannerlord.Diplomacy/Actions/GrantFiefAction.cs b/src/Bannerlord.Diplomacy/Actions/GrantFiefAction.cs index 04a4fc92..bfa35127 100644 --- a/src/Bannerlord.Diplomacy/Actions/GrantFiefAction.cs +++ b/src/Bannerlord.Diplomacy/Actions/GrantFiefAction.cs @@ -51,7 +51,7 @@ private static int CalculateBaseRelationChange(Settlement settlement) { // TODO: Consider basing the relationship change with the granted clan upon the fief's value // normalized to the average fief value in the kingdom. -#if v100 || v101 || v102 || v103 || v110 || v111 || v112 || v113 || v114 || v115 +#if v100 || v101 || v102 || v103 || v110 || v111 || v112 || v113 || v114 || v115 || v116 var baseRelationChange = (int) Math.Round(Math.Max(5, Math.Log(settlement.Prosperity / 1000, 1.1f))); #else var baseRelationChange = (int) Math.Round(Math.Max(5, Math.Log(settlement.Town.Prosperity / 1000, 1.1f))); diff --git a/src/Bannerlord.Diplomacy/CivilWar/Actions/ChangeKingdomBannerAction.cs b/src/Bannerlord.Diplomacy/CivilWar/Actions/ChangeKingdomBannerAction.cs index 904a471a..07f3ed1d 100644 --- a/src/Bannerlord.Diplomacy/CivilWar/Actions/ChangeKingdomBannerAction.cs +++ b/src/Bannerlord.Diplomacy/CivilWar/Actions/ChangeKingdomBannerAction.cs @@ -66,7 +66,7 @@ public static void Apply(Kingdom kingdom, uint backgroundColor, uint sigilColor) if (clanKingdom == kingdom) { -#if v100 || v101 || v102 || v103 || v110 || v111 || v112 || v113 || v114 || v115 +#if v100 || v101 || v102 || v103 || v110 || v111 || v112 || v113 || v114 || v115 || v116 var visuals = mobileParty.Party!.Visuals; if (visuals != null) { @@ -80,7 +80,7 @@ public static void Apply(Kingdom kingdom, uint backgroundColor, uint sigilColor) foreach (var settlement in kingdom.Settlements) { -#if v100 || v101 || v102 || v103 || v110 || v111 || v112 || v113 || v114 || v115 +#if v100 || v101 || v102 || v103 || v110 || v111 || v112 || v113 || v114 || v115 || v116 var visuals = settlement.Party.Visuals; if (visuals != null) { @@ -95,7 +95,7 @@ public static void Apply(Kingdom kingdom, uint backgroundColor, uint sigilColor) var party = settlement.Village.VillagerPartyComponent.MobileParty.Party; if (party != null) { -#if v100 || v101 || v102 || v103 || v110 || v111 || v112 || v113 || v114 || v115 +#if v100 || v101 || v102 || v103 || v110 || v111 || v112 || v113 || v114 || v115 || v116 party.Visuals.SetMapIconAsDirty(); #else party.SetVisualAsDirty(); @@ -107,7 +107,7 @@ public static void Apply(Kingdom kingdom, uint backgroundColor, uint sigilColor) var party = settlement.Town.GarrisonParty.Party; if (party != null) { -#if v100 || v101 || v102 || v103 || v110 || v111 || v112 || v113 || v114 || v115 +#if v100 || v101 || v102 || v103 || v110 || v111 || v112 || v113 || v114 || v115 || v116 party.Visuals.SetMapIconAsDirty(); #else party.SetVisualAsDirty(); diff --git a/src/Bannerlord.Diplomacy/DiplomaticAction/WarPeace/Conditions/NoSiegeCondition.cs b/src/Bannerlord.Diplomacy/DiplomaticAction/WarPeace/Conditions/NoSiegeCondition.cs index 390c504e..d234cc36 100644 --- a/src/Bannerlord.Diplomacy/DiplomaticAction/WarPeace/Conditions/NoSiegeCondition.cs +++ b/src/Bannerlord.Diplomacy/DiplomaticAction/WarPeace/Conditions/NoSiegeCondition.cs @@ -15,7 +15,7 @@ public bool ApplyCondition(Kingdom kingdom, Kingdom otherKingdom, out TextObject if (kingdom == playerKingdom || otherKingdom == playerKingdom) { var besiegedKingdom = PlayerSiege.PlayerSiegeEvent?.BesiegedSettlement?.OwnerClan.Kingdom; -#if v100 || v101 || v102 || v103 || v110 || v111 || v112 || v113 || v114 || v115 +#if v100 || v101 || v102 || v103 || v110 || v111 || v112 || v113 || v114 || v115 || v116 var besiegingKingdom = PlayerSiege.PlayerSiegeEvent?.BesiegerCamp?.BesiegerParty.LeaderHero.MapFaction as Kingdom; #else var besiegingKingdom = PlayerSiege.PlayerSiegeEvent?.BesiegerCamp?.LeaderParty.LeaderHero.MapFaction as Kingdom; diff --git a/src/Bannerlord.Diplomacy/Patches/RebelKingdomPatches.cs b/src/Bannerlord.Diplomacy/Patches/RebelKingdomPatches.cs index d5e1bc96..fb1b377c 100644 --- a/src/Bannerlord.Diplomacy/Patches/RebelKingdomPatches.cs +++ b/src/Bannerlord.Diplomacy/Patches/RebelKingdomPatches.cs @@ -16,7 +16,7 @@ internal sealed class RebelKingdomPatches : PatchClass { protected override IEnumerable Prepare() { -#if v100 || v101 || v102 || v103 || v110 || v111 || v112 || v113 || v114 || v115 +#if v100 || v101 || v102 || v103 || v110 || v111 || v112 || v113 || v114 || v115 || v116 var conversationBehaviorType = Type.GetType("SandBox.CampaignBehaviors.LordConversationsCampaignBehavior, SandBox, Version=1.0.0.0, Culture=neutral")!; #else var conversationBehaviorType = Type.GetType("TaleWorlds.CampaignSystem.CampaignBehaviors.LordConversationsCampaignBehavior, TaleWorlds.CampaignSystem, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null")!; diff --git a/src/Bannerlord.Diplomacy/Settings.cs b/src/Bannerlord.Diplomacy/Settings.cs index 2e991223..a1df160e 100644 --- a/src/Bannerlord.Diplomacy/Settings.cs +++ b/src/Bannerlord.Diplomacy/Settings.cs @@ -38,7 +38,7 @@ class Settings : AttributeGlobalSettings [SettingPropertyGroup(HeadingKingdomDiplomacy)] public bool EnableFiefFirstRight { get; set; } = true; -#if v100 || v101 || v102 || v103 || v110 || v111 || v112 || v113 || v114 || v115 +#if v100 || v101 || v102 || v103 || v110 || v111 || v112 || v113 || v114 || v115 || v116 [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.")] [SettingPropertyGroup(HeadingKingdomDiplomacy)] public bool EnableKingdomElimination { get; set; } = true; diff --git a/src/Bannerlord.Diplomacy/ViewModel/GrantFiefItemVM.cs b/src/Bannerlord.Diplomacy/ViewModel/GrantFiefItemVM.cs index 4b1eb801..64a2c74e 100644 --- a/src/Bannerlord.Diplomacy/ViewModel/GrantFiefItemVM.cs +++ b/src/Bannerlord.Diplomacy/ViewModel/GrantFiefItemVM.cs @@ -30,7 +30,7 @@ public GrantFiefItemVM(Settlement settlement, Hero targetHero, Action