Skip to content

Commit

Permalink
Don't load CK3 characters in parallel, which could cause file order p…
Browse files Browse the repository at this point in the history
…roblems
  • Loading branch information
IhateTrains committed Oct 20, 2024
1 parent c432f8b commit 6917ae7
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
4 changes: 3 additions & 1 deletion ImperatorToCK3/CK3/Characters/CharactersLoader.cs
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ public void LoadCK3Characters(ModFilesystem ck3ModFS, Date bookmarkDate) {
loadedCharacters.Add(character);
});
parser.IgnoreAndLogUnregisteredItems();
parser.ParseGameFolder("history/characters", ck3ModFS, "txt", recursive: true, parallel: true);
parser.ParseGameFolder("history/characters", ck3ModFS, "txt", recursive: true);

string[] irrelevantEffects = ["set_relation_rival", "set_relation_potential_rival", "set_relation_nemesis",
"set_relation_lover", "set_relation_soulmate",
Expand Down Expand Up @@ -76,5 +76,7 @@ public void LoadCK3Characters(ModFilesystem ck3ModFS, Date bookmarkDate) {
character.InitConcubinesCache();
character.UpdateChildrenCacheOfParents();
}

Logger.Info("Loaded CK3 characters.");
}
}
2 changes: 1 addition & 1 deletion ImperatorToCK3/CK3/Dynasties/DynastyCollection.cs
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ public void LoadCK3Dynasties(ModFilesystem ck3ModFS) {
AddOrReplace(dynasty);
});
parser.IgnoreAndLogUnregisteredItems();
parser.ParseGameFolder("common/dynasties", ck3ModFS, "txt", recursive: true, parallel: true);
parser.ParseGameFolder("common/dynasties", ck3ModFS, "txt", recursive: true);
}

private void CreateDynastiesForCharactersFromMinorFamilies(Imperator.World irWorld, LocDB irLocDB, CK3LocDB ck3LocDB, Date date) {
Expand Down
2 changes: 1 addition & 1 deletion ImperatorToCK3/CK3/Dynasties/HouseCollection.cs
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ public void LoadCK3Houses(ModFilesystem ck3ModFS) {
AddOrReplace(house);
});
parser.IgnoreAndLogUnregisteredItems();
parser.ParseGameFolder("common/dynasty_houses", ck3ModFS, "txt", recursive: true, parallel: true);
parser.ParseGameFolder("common/dynasty_houses", ck3ModFS, "txt", recursive: true);
}

public void PurgeUnneededHouses(CharacterCollection ck3Characters, Date date) {
Expand Down

0 comments on commit 6917ae7

Please sign in to comment.