Skip to content

Commit

Permalink
Fix outputted CoAs causing an error in error.log (#2157) #patch
Browse files Browse the repository at this point in the history
  • Loading branch information
IhateTrains authored Sep 8, 2024
1 parent 1b5aeb1 commit 96d7b0c
Showing 1 changed file with 9 additions and 2 deletions.
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

0 comments on commit 96d7b0c

Please sign in to comment.