Skip to content

Commit

Permalink
Support for Medieval 1066 Total Conversion Beta mod for I:R (#1622) #…
Browse files Browse the repository at this point in the history
…minor
  • Loading branch information
IhateTrains authored Dec 1, 2023
1 parent fd28052 commit 40fe4e6
Show file tree
Hide file tree
Showing 4 changed files with 146 additions and 47 deletions.
14 changes: 11 additions & 3 deletions ImperatorToCK3/CK3/World.cs
Original file line number Diff line number Diff line change
Expand Up @@ -269,7 +269,17 @@ public World(Imperator.World impWorld, Configuration config) {

// Apply region-specific tweaks.
HandleIcelandAndFaroeIslands(config);
RemoveIslam(config);

// Check if any muslim religion exists in Imperator. Otherwise, remove Islam from the entire CK3 map.
var possibleMuslimReligionNames = new List<string> { "muslim", "islam", "sunni", "shiite" };
var muslimReligionExists = impWorld.Religions
.Any(r => possibleMuslimReligionNames.Contains(r.Id.ToLowerInvariant()));
if (muslimReligionExists) {
Logger.Info("Found muslim religion in Imperator save, keeping Islam in CK3.");
} else {
RemoveIslam(config);
}
Logger.IncrementProgress();

ImportImperatorWars(impWorld, config.CK3BookmarkDate);

Expand Down Expand Up @@ -656,8 +666,6 @@ private void RemoveIslam(Configuration config) {
Logger.Warn($"{muslimProvinces.Count} muslim provinces left after removing Islam: " +
$"{string.Join(", ", muslimProvinces.Select(p => p.Id))}");
}

Logger.IncrementProgress();
}

private void GenerateFillerHoldersForUnownedLands(CultureCollection cultures, Configuration config) {
Expand Down
Loading

0 comments on commit 40fe4e6

Please sign in to comment.