From 1596b57168015c055288b1b7d787b6048a3c463d Mon Sep 17 00:00:00 2001
From: Alexey Chernyshov <65975574+artifixer@users.noreply.github.com>
Date: Sat, 4 Feb 2023 10:45:53 +0300
Subject: [PATCH 1/8] Update source file civil_war_strings_xml.xml
---
.../Languages/civil_war_strings_xml.xml | 103 ++++++++++++++++++
1 file changed, 103 insertions(+)
create mode 100644 src/Bannerlord.Diplomacy/_Module/ModuleData/Languages/civil_war_strings_xml.xml
diff --git a/src/Bannerlord.Diplomacy/_Module/ModuleData/Languages/civil_war_strings_xml.xml b/src/Bannerlord.Diplomacy/_Module/ModuleData/Languages/civil_war_strings_xml.xml
new file mode 100644
index 00000000..b1f85a8a
--- /dev/null
+++ b/src/Bannerlord.Diplomacy/_Module/ModuleData/Languages/civil_war_strings_xml.xml
@@ -0,0 +1,103 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
From 5808ca8133f7521ebc8c1ec8d4456bd8825f3fdc Mon Sep 17 00:00:00 2001
From: Alexey Chernyshov <65975574+artifixer@users.noreply.github.com>
Date: Sat, 4 Feb 2023 10:45:53 +0300
Subject: [PATCH 2/8] Update source file faction_names_xml.xml
---
.../Languages/faction_names_xml.xml | 226 ++++++++++++++++++
1 file changed, 226 insertions(+)
create mode 100644 src/Bannerlord.Diplomacy/_Module/ModuleData/Languages/faction_names_xml.xml
diff --git a/src/Bannerlord.Diplomacy/_Module/ModuleData/Languages/faction_names_xml.xml b/src/Bannerlord.Diplomacy/_Module/ModuleData/Languages/faction_names_xml.xml
new file mode 100644
index 00000000..34792a7a
--- /dev/null
+++ b/src/Bannerlord.Diplomacy/_Module/ModuleData/Languages/faction_names_xml.xml
@@ -0,0 +1,226 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
From bcd9d60f4e6a4fcc4ba508d3273e9c49a7c8c260 Mon Sep 17 00:00:00 2001
From: Alexey Chernyshov <65975574+artifixer@users.noreply.github.com>
Date: Sat, 4 Feb 2023 10:45:54 +0300
Subject: [PATCH 3/8] Update source file help_strings_xml.xml
---
.../ModuleData/Languages/help_strings_xml.xml | 13 +++++++++++++
1 file changed, 13 insertions(+)
create mode 100644 src/Bannerlord.Diplomacy/_Module/ModuleData/Languages/help_strings_xml.xml
diff --git a/src/Bannerlord.Diplomacy/_Module/ModuleData/Languages/help_strings_xml.xml b/src/Bannerlord.Diplomacy/_Module/ModuleData/Languages/help_strings_xml.xml
new file mode 100644
index 00000000..2c6497b7
--- /dev/null
+++ b/src/Bannerlord.Diplomacy/_Module/ModuleData/Languages/help_strings_xml.xml
@@ -0,0 +1,13 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
From d9fa5d972edc8b7f571025372f16f27f97e74e08 Mon Sep 17 00:00:00 2001
From: Alexey Chernyshov <65975574+artifixer@users.noreply.github.com>
Date: Sat, 4 Feb 2023 10:45:54 +0300
Subject: [PATCH 4/8] Update source file language_data.xml
---
.../_Module/ModuleData/Languages/language_data.xml | 2 ++
1 file changed, 2 insertions(+)
create mode 100644 src/Bannerlord.Diplomacy/_Module/ModuleData/Languages/language_data.xml
diff --git a/src/Bannerlord.Diplomacy/_Module/ModuleData/Languages/language_data.xml b/src/Bannerlord.Diplomacy/_Module/ModuleData/Languages/language_data.xml
new file mode 100644
index 00000000..4d2d1348
--- /dev/null
+++ b/src/Bannerlord.Diplomacy/_Module/ModuleData/Languages/language_data.xml
@@ -0,0 +1,2 @@
+
+
\ No newline at end of file
From 0c5550a85addd349b3f511d8684d12a9d9cd5679 Mon Sep 17 00:00:00 2001
From: Alexey Chernyshov <65975574+artifixer@users.noreply.github.com>
Date: Sat, 4 Feb 2023 10:45:55 +0300
Subject: [PATCH 5/8] Update source file std_module_strings_xml.xml
---
.../Languages/std_module_strings_xml.xml | 268 ++++++++++++++++++
1 file changed, 268 insertions(+)
create mode 100644 src/Bannerlord.Diplomacy/_Module/ModuleData/Languages/std_module_strings_xml.xml
diff --git a/src/Bannerlord.Diplomacy/_Module/ModuleData/Languages/std_module_strings_xml.xml b/src/Bannerlord.Diplomacy/_Module/ModuleData/Languages/std_module_strings_xml.xml
new file mode 100644
index 00000000..f55a6483
--- /dev/null
+++ b/src/Bannerlord.Diplomacy/_Module/ModuleData/Languages/std_module_strings_xml.xml
@@ -0,0 +1,268 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
From a4edab0e6960753ff9b2b4056287fcf6da7cc45c Mon Sep 17 00:00:00 2001
From: Alexey Chernyshov <65975574+artifixer@users.noreply.github.com>
Date: Sat, 4 Feb 2023 10:45:55 +0300
Subject: [PATCH 6/8] Update source file war_exhaustion_strings.xml
---
.../Languages/war_exhaustion_strings.xml | 116 ++++++++++++++++++
1 file changed, 116 insertions(+)
create mode 100644 src/Bannerlord.Diplomacy/_Module/ModuleData/Languages/war_exhaustion_strings.xml
diff --git a/src/Bannerlord.Diplomacy/_Module/ModuleData/Languages/war_exhaustion_strings.xml b/src/Bannerlord.Diplomacy/_Module/ModuleData/Languages/war_exhaustion_strings.xml
new file mode 100644
index 00000000..f5569755
--- /dev/null
+++ b/src/Bannerlord.Diplomacy/_Module/ModuleData/Languages/war_exhaustion_strings.xml
@@ -0,0 +1,116 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
From 08ec223899a808b0f1c7eac81aaf8b4e8a709c4a Mon Sep 17 00:00:00 2001
From: Alexey Chernyshov <65975574+artifixer@users.noreply.github.com>
Date: Sat, 4 Feb 2023 13:13:34 +0300
Subject: [PATCH 7/8] Update Crowdin configuration file
---
crowdin.yml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/crowdin.yml b/crowdin.yml
index f513f6df..de16d9d1 100644
--- a/crowdin.yml
+++ b/crowdin.yml
@@ -1,6 +1,6 @@
files:
- source: /src/Bannerlord.Diplomacy/_Module/ModuleData/Languages/*.xml
- translation: /src/Bannerlord.Diplomacy/_Module/ModuleData/Languages/%two_letters_code%/%original_file_name%
+ translation: /src/Bannerlord.Diplomacy/_Module/ModuleData/Languages/%two_letters_code%/%two_letters_code%_%original_file_name%
content_segmentation: 0
translatable_elements:
- '/base/tags/tag[@language],/base/strings/string[@text]'
From ea0317118a336a6c8eb3db0994bed14248528de4 Mon Sep 17 00:00:00 2001
From: Alexey Chernyshov
Date: Sat, 4 Feb 2023 16:14:23 +0300
Subject: [PATCH 8/8] Crash fix
---
build/common.props | 2 +-
changelog.txt | 4 ++++
.../WarExhaustion/WarExhaustionManager.EventHandling.cs | 2 +-
3 files changed, 6 insertions(+), 2 deletions(-)
diff --git a/build/common.props b/build/common.props
index 117dc4ff..b184f4aa 100644
--- a/build/common.props
+++ b/build/common.props
@@ -2,7 +2,7 @@
- 1.2.0
+ 1.2.1
1.0.0
diff --git a/changelog.txt b/changelog.txt
index 0cfc8d0a..ff40e095 100644
--- a/changelog.txt
+++ b/changelog.txt
@@ -1,4 +1,8 @@
---------------------------------------------------------------------------------------------------
+Version: 1.2.1
+Game Versions: v1.0.0,v1.0.1,v1.0.2,v1.0.3,v1.1.0
+* Fixed rare crash that happened when War Exhaustion event precedes the war.
+---------------------------------------------------------------------------------------------------
Version: 1.2.0
Game Versions: v1.0.0,v1.0.1,v1.0.2,v1.0.3,v1.1.0
* Adapted for v1.1.0
diff --git a/src/Bannerlord.Diplomacy/WarExhaustion/WarExhaustionManager.EventHandling.cs b/src/Bannerlord.Diplomacy/WarExhaustion/WarExhaustionManager.EventHandling.cs
index 165c0d2d..87b81bab 100644
--- a/src/Bannerlord.Diplomacy/WarExhaustion/WarExhaustionManager.EventHandling.cs
+++ b/src/Bannerlord.Diplomacy/WarExhaustion/WarExhaustionManager.EventHandling.cs
@@ -376,7 +376,7 @@ private WarExhaustionRecord GetDivineWarExhaustionDelta(Kingdoms kingdoms, int t
}
private float GetDiminishingReturnsFactor(Kingdoms kingdoms, TObj eventRelatedObject, out bool yieldsDiminishingReturns) where TObj : MBObjectBase where TRec : WarExhaustionEventRecord =>
- GetDiminishingReturnsFactor(eventRelatedObject, _warExhaustionEventRecords[kingdoms.Key!], out yieldsDiminishingReturns);
+ GetDiminishingReturnsFactor(eventRelatedObject, _warExhaustionEventRecords.TryGetValue(kingdoms.Key!, out var currentRecords) ? currentRecords : new(), out yieldsDiminishingReturns);
private static float GetDiminishingReturnsFactor(TObj eventRelatedObject, List warExhaustionEventRecords, out bool yieldsDiminishingReturns) where TObj : MBObjectBase where TRec : WarExhaustionEventRecord
{