Skip to content

Fix outputted CoAs causing an error in error.log #2157

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Sep 8, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 9 additions & 2 deletions ImperatorToCK3/Outputter/CoatOfArmsOutputter.cs
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,16 @@ public static async Task OutputCoas(string outputModPath, Title.LandedTitles tit
// Output CoAs for titles.
foreach (var title in titles) {
var coa = title.CoA;
if (coa is not null) {
sb.AppendLine($"{title.Id}={coa}");
if (coa is null) {
continue;
}

// If the title's ID is present in CoaMapper, we don't need to output the CoA (because it's already in the CK3 mod filesystem).
if (ck3CoaMapper.GetCoaForFlagName(title.Id) is not null) {
continue;
}

sb.AppendLine($"{title.Id}={coa}");
}

// Output CoAs for dynasties.
Expand Down
Loading