Skip to content

Commit

Permalink
Removed undated succession_laws entries from history
Browse files Browse the repository at this point in the history
  • Loading branch information
IhateTrains committed Jan 6, 2025
1 parent 9e6ed9f commit 55659aa
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions ImperatorToCK3/CK3/Titles/LandedTitles.cs
Original file line number Diff line number Diff line change
Expand Up @@ -338,6 +338,15 @@ public void CleanUpHistory(CharacterCollection characters, Date ck3BookmarkDate)
}
}
}

// Remove undated succession_laws entries; the game doesn't seem to like them.
foreach (var title in this) {
if (!title.History.Fields.TryGetValue("succession_laws", out var successionLawsField)) {
continue;
}

successionLawsField.InitialEntries.RemoveAll(entry => true);
}
}

Check notice on line 351 in ImperatorToCK3/CK3/Titles/LandedTitles.cs

View check run for this annotation

codefactor.io / CodeFactor

ImperatorToCK3/CK3/Titles/LandedTitles.cs#L268-L351

Complex Method
internal void ImportImperatorCountries(
Expand Down

0 comments on commit 55659aa

Please sign in to comment.