Skip to content

Commit

Permalink
Remove Christian and Islamic syncretism tenets from all faiths
Browse files Browse the repository at this point in the history
  • Loading branch information
IhateTrains committed Jan 18, 2025
1 parent 418e369 commit bfbfbbf
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 1 deletion.
15 changes: 14 additions & 1 deletion ImperatorToCK3/CK3/Religions/ReligionCollection.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
using ImperatorToCK3.CK3.Titles;
using ImperatorToCK3.CK3.Provinces;
using ImperatorToCK3.Mappers.HolySiteEffect;
using Open.Collections;
using System;
using System.Collections.Generic;
using System.Collections.Immutable;
Expand Down Expand Up @@ -57,6 +58,18 @@ public void LoadConverterFaiths(string converterFaithsPath, ColorFactory colorFa
parser.ParseFile(converterFaithsPath);
}

public void RemoveChristianAndIslamicSyncretismFromAllFaiths() {
Logger.Info("Removing Christian and Islamic syncretism tenets from all faiths...");
string[] tenetsToRemove = ["tenet_christian_syncretism", "tenet_islamic_syncretism"];

foreach (var religion in this) {
religion.DoctrineIds.Remove(tenetsToRemove);
}
foreach (var faith in Faiths) {
faith.DoctrineIds.Remove(tenetsToRemove);
}
}

private void RegisterHolySitesKeywords(Parser parser, bool areSitesFromConverter) {
parser.RegisterRegex(CommonRegexes.String, (holySiteReader, holySiteId) => {
try {
Expand Down Expand Up @@ -175,7 +188,7 @@ HolySiteEffectMapper holySiteEffectMapper
return new HolySite(barony, ck3Faith, landedTitles);
}

OrderedDictionary<string, double> imperatorModifiers;
System.Collections.Generic.OrderedDictionary<string, double> imperatorModifiers;
var deity = imperatorProvince.GetHolySiteDeity(imperatorReligions);
if (deity is not null) {
imperatorModifiers = new(deity.PassiveModifiers);
Expand Down
2 changes: 2 additions & 0 deletions ImperatorToCK3/CK3/World.cs
Original file line number Diff line number Diff line change
Expand Up @@ -190,6 +190,8 @@ public World(Imperator.World impWorld, Configuration config, Thread? irCoaExtrac
Religions.LoadConverterFaiths("configurables/converter_faiths.txt", ck3ColorFactory);
Logger.Info("Loaded converter faiths.");
Logger.IncrementProgress();
Religions.RemoveChristianAndIslamicSyncretismFromAllFaiths();

Religions.LoadReplaceableHolySites("configurables/replaceable_holy_sites.txt");
Logger.Info("Loaded replaceable holy sites.");
},
Expand Down

0 comments on commit bfbfbbf

Please sign in to comment.