Skip to content

Commit

Permalink
Prevent more exceptions
Browse files Browse the repository at this point in the history
  • Loading branch information
IhateTrains committed Oct 6, 2023
1 parent 2ee90b4 commit 79c0635
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions ImperatorToCK3/CK3/Religions/ReligionCollection.cs
Original file line number Diff line number Diff line change
Expand Up @@ -220,7 +220,7 @@ Date date
imperatorReligions,
holySiteEffectMapper
);
HolySites.Add(newHolySiteInSameBarony);
HolySites.AddOrReplace(newHolySiteInSameBarony);

faith.ReplaceHolySiteId(holySiteId, newHolySiteInSameBarony.Id);
}
Expand All @@ -238,7 +238,7 @@ Date date
imperatorReligions,
holySiteEffectMapper
);
HolySites.Add(replacementSite);
HolySites.AddOrReplace(replacementSite);

faith.ReplaceHolySiteId(holySiteId, replacementSite.Id);
}
Expand Down
2 changes: 1 addition & 1 deletion ImperatorToCK3/CK3/World.cs
Original file line number Diff line number Diff line change
Expand Up @@ -764,7 +764,7 @@ private void GenerateFillerHoldersForUnownedLands(CultureCollection cultures, Co
holder.SetFaithId(faithId, null);
holder.SetCultureId(culture.Id, null);
holder.History.AddFieldValue(date, "government", "change_government", "tribal_government");
Characters.Add(holder);
Characters.AddOrReplace(holder);

county.SetHolder(holder, date);
if (config.FillerDukes) {
Expand Down

0 comments on commit 79c0635

Please sign in to comment.