Skip to content

Commit fc1576a

Browse files
authored
Workflow fix, tweaks for Codacy (#319) #patch
* Fix release workflow * Tweaks for Codacy
1 parent 7bcf820 commit fc1576a

File tree

2 files changed

+7
-4
lines changed

2 files changed

+7
-4
lines changed

.github/workflows/create_release.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ jobs:
2525
cd ImperatorToCK3
2626
dotnet publish -p:PublishProfile=win-x64 -c:Release
2727
cd ..
28-
rmdir /s /q "Release\ImperatorToCK3"
28+
Remove-Item -LiteralPath "Release\ImperatorToCK3" -Force -Recurse
2929
Xcopy /E /Y Publish Release
3030
- name: "Build frontend"
3131
run: |

ImperatorToCK3/CK3/World.cs

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -174,8 +174,9 @@ private void ImportVanillaProvinces(string ck3Path, Date ck3BookmarkDate) {
174174
var path = Path.Combine(ck3Path, "game/history/provinces");
175175
var fileNames = SystemUtils.GetAllFilesInFolderRecursive(path);
176176
foreach (var fileName in fileNames) {
177-
if (!fileName.EndsWith(".txt"))
177+
if (!fileName.EndsWith(".txt")) {
178178
continue;
179+
}
179180
var provincesPath = Path.Combine(ck3Path, "game/history/provinces", fileName);
180181
try {
181182
var newProvinces = new Provinces.Provinces(provincesPath, ck3BookmarkDate);
@@ -300,8 +301,9 @@ Imperator.World impWorld
300301
private void AddHistoryToVanillaTitles() {
301302
foreach (var (name, title) in LandedTitles) {
302303
var historyOpt = titlesHistory.PopTitleHistory(name);
303-
if (historyOpt is not null)
304+
if (historyOpt is not null) {
304305
title.AddHistory(landedTitles, historyOpt);
306+
}
305307
}
306308
// add vanilla development to counties
307309
// for counties that inherit development level from de jure lieges, assign it to them directly for better reliability
@@ -442,8 +444,9 @@ private void ImportImperatorFamilies(Imperator.World impWorld) {
442444

443445
// dynasties only holds dynasties converted from Imperator families, as vanilla ones aren't modified
444446
foreach (var family in impWorld.Families.StoredFamilies.Values) {
445-
if (family.Minor)
447+
if (family.Minor) {
446448
continue;
449+
}
447450

448451
var newDynasty = new Dynasty(family, localizationMapper);
449452
Dynasties.Add(newDynasty.ID, newDynasty);

0 commit comments

Comments
 (0)