feat: SK backlog from test through 2026.11.22.48 (Trade Shop + inventory/loot/chat/nav)

Squash of test/main-merge-2026-10-25 onto aelrynth main 2026.11.19.1 for the standing sk PR. Includes Trade Shop Storefront, loot checklist editor, chat routing, window placements, and related engine work. See Changelog/2026-11-22-sk-backlog-test-merge.md.
This commit is contained in:
BlankenshipG 2026-11-23 00:08:31 -05:00
commit c6e8bb8dbf
438 changed files with 39545 additions and 1271 deletions

67
scripts/Fetch-Dxvk.ps1 Normal file
View file

@ -0,0 +1,67 @@
# Fetch-Dxvk.ps1
# Downloads the latest official DXVK release and stages x32/d3d9.dll into a cache folder
# (default: C:\Games\RynthCore\Runtime\dxvk). Used by the launcher's "Fetch / update DXVK"
# (C# twin: DxvkPackageService) and by Build-Installer.ps1 to seed the installer payload.
#
# .\scripts\Fetch-Dxvk.ps1
# .\scripts\Fetch-Dxvk.ps1 -Target "D:\asherons call-int code\RynthCore\installer\staging\core\Runtime\dxvk"
# .\scripts\Fetch-Dxvk.ps1 -Version 3.1.1 # pin a tag (without leading v)
param(
[string]$Target = "C:\Games\RynthCore\Runtime\dxvk",
[string]$Version = "" # empty = latest from GitHub
)
$ErrorActionPreference = "Stop"
function Get-LatestDxvkTag {
$headers = @{ "User-Agent" = "RynthCore-Fetch-Dxvk/1.0"; "Accept" = "application/vnd.github+json" }
$rel = Invoke-RestMethod -Uri "https://api.github.com/repos/doitsujin/dxvk/releases/latest" -Headers $headers
return ($rel.tag_name -replace '^v', '')
}
function Get-DxvkTarballUrl([string]$tag) {
$headers = @{ "User-Agent" = "RynthCore-Fetch-Dxvk/1.0"; "Accept" = "application/vnd.github+json" }
$rel = Invoke-RestMethod -Uri "https://api.github.com/repos/doitsujin/dxvk/releases/tags/v$tag" -Headers $headers
$asset = $rel.assets | Where-Object {
$_.name -like "dxvk-*.tar.gz" -and $_.name -notlike "*native*"
} | Select-Object -First 1
if (-not $asset) { throw "No dxvk-*.tar.gz asset on release v$tag" }
return @{ Url = $asset.browser_download_url; Name = $asset.name }
}
if ([string]::IsNullOrWhiteSpace($Version)) {
$Version = Get-LatestDxvkTag
Write-Host "Latest DXVK tag: $Version"
}
$asset = Get-DxvkTarballUrl $Version
$stage = Join-Path $env:TEMP ("rynthcore-dxvk-" + [guid]::NewGuid().ToString("N"))
New-Item -ItemType Directory -Force -Path $stage | Out-Null
$tarball = Join-Path $stage $asset.Name
Write-Host "Downloading $($asset.Url) ..."
Invoke-WebRequest -Uri $asset.Url -OutFile $tarball -UseBasicParsing
$extract = Join-Path $stage "extract"
New-Item -ItemType Directory -Force -Path $extract | Out-Null
tar -xzf $tarball -C $extract
$src = Get-ChildItem $extract -Recurse -Filter "d3d9.dll" |
Where-Object { $_.Directory.Name -eq "x32" } |
Select-Object -First 1
if (-not $src) { throw "x32/d3d9.dll not found in archive" }
New-Item -ItemType Directory -Force -Path $Target | Out-Null
Copy-Item $src.FullName (Join-Path $Target "d3d9.dll") -Force
$utf8 = New-Object System.Text.UTF8Encoding $false
[IO.File]::WriteAllText((Join-Path $Target "version.txt"), $Version, $utf8)
$conf = @"
# Managed by RynthCore (launcher Enable DXVK). Safe to delete with the toggle off.
dxgi.deferSurfaceCreation = True
d3d9.maxFrameLatency = 1
d3d9.presentInterval = 1
"@
[IO.File]::WriteAllText((Join-Path $Target "dxvk.conf"), $conf.TrimStart() + "`n", $utf8)
Write-Host "DXVK $Version staged at $Target"
Remove-Item $stage -Recurse -Force -ErrorAction SilentlyContinue

View file

@ -14,6 +14,9 @@
(2026-10-22: tests only ran when someone remembered to; a release went out with Missile Crafting
broken while the tests that existed passed).
Each test program is also checked for test groups that exist but never run (a class with a static
Register(...) that is never registered, a static RunXxx() that is never called): those fail the run.
Every folder whose name contains "Test" is run unless $Skip below names it with a reason; skipped ones
are listed in the summary, never dropped silently. Each program's output goes to
<LogDir>\<repo>.<name>.log, and the summary (also <LogDir>\summary.txt) shows each failure's last lines.
@ -75,6 +78,48 @@ foreach ($r in $repos) {
}
if ($Only.Count -gt 0 -and $tests.Count -eq 0 -and $skipped.Count -eq 0) { throw "-Only matched no test folder: $($Only -join ', ')" }
# Tests that exist but never run (2026-10-30: RynthAiHostTests' RingEscapeTests and RingEvadeTests
# had stopped being registered in a merge, and PetDamageTintTests never was; their checks silently
# didn't run). In each test program: every class with a static Register(...) must be registered
# (Name.Register( somewhere in the program), and every parameterless "static void RunXxx()" group
# must be called. A miss fails the run as "<repo>.<folder> (registration)".
function Find-UnrunTests([string]$dir) {
$files = @(Get-ChildItem $dir -Recurse -Filter *.cs | Where-Object { $_.FullName -notmatch '[\\/](bin|obj)[\\/]' })
if ($files.Count -eq 0) { return @() }
$src = @{}
foreach ($f in $files) { $src[$f.FullName] = Get-Content $f.FullName -Raw }
$all = ($src.Values -join "`n")
$miss = [System.Collections.Generic.List[string]]::new()
foreach ($kv in $src.GetEnumerator()) {
$text = $kv.Value
if ($text -notmatch 'static\s+void\s+Register\s*\(\s*Runner\b') { }
else {
foreach ($m in [regex]::Matches($text, '(?:internal|public)\s+(?:static\s+)?(?:sealed\s+)?(?:partial\s+)?class\s+(\w+)')) {
$cls = $m.Groups[1].Value
# the class's own Register: the first "static void Register(" after its declaration, before the next class
$rest = $text.Substring($m.Index + $m.Length)
$next = [regex]::Match($rest, '(?:internal|public)\s+(?:static\s+)?(?:sealed\s+)?(?:partial\s+)?class\s+\w+')
$body = if ($next.Success) { $rest.Substring(0, $next.Index) } else { $rest }
if ($body -match 'static\s+void\s+Register\s*\(\s*Runner\b' -and $all -notmatch "\b$cls\.Register\s*\(") {
$miss.Add("$cls.Register(...) is never called ($([IO.Path]::GetRelativePath($dir, $kv.Key)))")
}
}
}
foreach ($m in [regex]::Matches($text, 'static\s+void\s+(Run[A-Z]\w*)\s*\(\s*\)')) {
$name = $m.Groups[1].Value
if ($all -notmatch "\b$name\s*\(\s*\)\s*;") { $miss.Add("$name() is never called ($([IO.Path]::GetRelativePath($dir, $kv.Key)))") }
}
}
return $miss
}
$registration = [System.Collections.Generic.List[object]]::new()
foreach ($t in $tests) {
if ($t.Kind -ne "dotnet") { continue }
$miss = @(Find-UnrunTests $t.Dir)
if ($miss.Count -gt 0) { $registration.Add([pscustomobject]@{ Id = "$($t.Id) (registration)"; Lines = $miss }) }
}
# Runs one program with its output captured; returns @{ Code; TimedOut; Output }.
function Invoke-Captured([string]$file, [string[]]$argList, [string]$cwd) {
$psi = [System.Diagnostics.ProcessStartInfo]::new($file)
@ -138,6 +183,13 @@ foreach ($t in $tests) {
$results.Add([pscustomobject]@{ Id = $t.Id; Status = $status; Seconds = [math]::Round($sw.Elapsed.TotalSeconds); Log = $log })
}
foreach ($g in $registration) {
$log = Join-Path $LogDir "$($g.Id -replace '[^\w.\-]', '_').log"
Set-Content $log (@("Tests that exist but never run:") + $g.Lines)
Write-Host ("{0}: {1} test group(s) never run" -f $g.Id, $g.Lines.Count) -ForegroundColor Red
$results.Add([pscustomobject]@{ Id = $g.Id; Status = "NOT RUN"; Seconds = 0; Log = $log })
}
$failed = @($results | Where-Object Status -ne "PASS")
$summary = [System.Collections.Generic.List[string]]::new()
$summary.Add("RynthCore $(git -C $RynthCoreRoot rev-parse --short HEAD) ($RynthCoreRoot), RynthSuite $(git -C $RynthSuiteRoot rev-parse --short HEAD) ($RynthSuiteRoot), RynthServers $(git -C $RynthServersRoot rev-parse --short HEAD) ($RynthServersRoot)")