Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
/.local
/bin
/obj
/sdl
Expand Down Expand Up @@ -39,3 +40,4 @@ res/keeperfx_icon.ico
/deps/*.tar.gz
/cppcheck.cache
/src/ver_defs.h
.vscode/compile_and_copy_files.ps1
21 changes: 21 additions & 0 deletions .vscode/compile_and_copy_files.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -88,3 +88,24 @@ else
exit 1;
}
Copy-Item -Path "${workspaceFolder}\\bin\\*" -Destination $gameDir -Force;

# Copy campaign mod files from .local to game directory
if (Test-Path "${workspaceFolder}\\.local\\campaign_data") {
Write-Host 'Copying campaign mod files...' -ForegroundColor Cyan;

# First copy the source sound files to the campaign structure
if (Test-Path "${workspaceFolder}\\.local\\assets\\maiden dk2 wav") {
$soundSource = "${workspaceFolder}\\.local\\assets\\maiden dk2 wav";
$soundDest = "${workspaceFolder}\\.local\\campaign_data\\examplemaiden_crtr\\assets\\sounds";
if (-not (Test-Path $soundDest)) {
New-Item -Path $soundDest -ItemType Directory -Force | Out-Null;
}
Copy-Item -Path "$soundSource\\*" -Destination $soundDest -Recurse -Force;
}

$campaignDest = "$gameDir\\campgns";
Copy-Item -Path "${workspaceFolder}\\.local\\campaign_data\\examplemaiden.cfg" -Destination "$campaignDest\\examplemaiden.cfg" -Force -ErrorAction SilentlyContinue;
Copy-Item -Path "${workspaceFolder}\\.local\\campaign_data\\examplemaiden" -Destination "$campaignDest\\examplemaiden" -Recurse -Force -ErrorAction SilentlyContinue;
Copy-Item -Path "${workspaceFolder}\\.local\\campaign_data\\examplemaiden_crtr" -Destination "$campaignDest\\examplemaiden_crtr" -Recurse -Force -ErrorAction SilentlyContinue;
Write-Host 'Campaign mod files copied successfully!' -ForegroundColor Green;
}
Loading