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

View file

@ -0,0 +1,22 @@
<Project Sdk="Microsoft.NET.Sdk">
<!--
Offline checks for which window-layout file a client uses (src\RynthCore.Engine\UI\PanelStatePath.cs,
compiled in): panel_state.<server>.<character>.txt from the launch context's ServerName and
TargetCharacter, unsafe characters as "_", and the shared panel_state.txt when the character
isn't known. No files, no ImGui. Run: dotnet run -c Release (exit 0 = pass, 1 = fail)
-->
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net10.0</TargetFramework>
<Nullable>enable</Nullable>
<ImplicitUsings>enable</ImplicitUsings>
<InvariantGlobalization>true</InvariantGlobalization>
<RootNamespace>PanelStateTests</RootNamespace>
</PropertyGroup>
<ItemGroup>
<Compile Include="..\..\src\RynthCore.Engine\UI\PanelStatePath.cs" Link="Engine\PanelStatePath.cs" />
</ItemGroup>
</Project>

View file

@ -0,0 +1,54 @@
using RynthCore.Engine.UI;
namespace PanelStateTests;
// Offline tests for the per-character window-layout file name. See the csproj.
internal static class Program
{
private static int _fails, _asserts;
private static void Check(bool cond, string msg)
{
_asserts++;
if (!cond) { _fails++; Console.WriteLine($" [FAIL] {msg}"); }
}
private static void Eq<T>(T actual, T expected, string msg) =>
Check(EqualityComparer<T>.Default.Equals(actual, expected), $"{msg}: expected '{expected}', got '{actual}'");
private static int Main()
{
FileNames();
LaunchContext();
Console.WriteLine();
Console.WriteLine(_fails == 0 ? $"PASS ({_asserts} checks)" : $"FAIL ({_fails} of {_asserts} checks failed)");
return _fails == 0 ? 0 : 1;
}
/// <summary>Silentkelpie 2026-10-24: each character keeps its own layout, so another client's moves don't reset it.</summary>
private static void FileNames()
{
Console.WriteLine("FileNames");
Eq(PanelStatePath.FileNameFor("Infinite Leaftide", "Silentkelpie"), "panel_state.infinite_leaftide.silentkelpie.txt", "server and character");
Eq(PanelStatePath.FileNameFor("ILT", "Sir O'Brien-Smith"), "panel_state.ilt.sir_o_brien_smith.txt", "spaces, apostrophe and dash become one _");
Eq(PanelStatePath.FileNameFor("", "Silentkelpie"), "panel_state.silentkelpie.txt", "no server: character only");
Eq(PanelStatePath.FileNameFor("ILT", ""), PanelStatePath.SharedFileName, "no character: the shared file");
Eq(PanelStatePath.FileNameFor(null, null), PanelStatePath.SharedFileName, "nothing known: the shared file");
Eq(PanelStatePath.FileNameFor("ILT", " *** "), PanelStatePath.SharedFileName, "a name of only symbols: the shared file");
Eq(PanelStatePath.FileNameFor("ILT", "Sílentkelpie"), "panel_state.ilt.s_lentkelpie.txt", "non-ASCII letters become _");
string longName = new string('a', 80);
Eq(PanelStatePath.FileNameFor("x", longName), $"panel_state.x.{new string('a', PanelStatePath.MaxPartLength)}.txt", "a long name is cut");
Eq(PanelStatePath.FileNameFor("ILT", "Silentkelpie"), PanelStatePath.FileNameFor("ilt", "SILENTKELPIE"), "case doesn't make a second file");
}
private static void LaunchContext()
{
Console.WriteLine("LaunchContext");
var parsed = PanelStatePath.ParseLaunchContext("{\"ProcessId\":5392,\"AccountName\":\"acct\",\"ServerName\":\" ILT \",\"TargetCharacter\":\"Silentkelpie\"}");
Eq(parsed.Server, "ILT", "server, trimmed");
Eq(parsed.Character, "Silentkelpie", "character");
Eq(PanelStatePath.ParseLaunchContext("{\"ServerName\":\"ILT\"}").Character, "", "no character");
Eq(PanelStatePath.ParseLaunchContext("{\"TargetCharacter\":42}").Character, "", "a non-string character");
Eq(PanelStatePath.ParseLaunchContext("{ cut-off").Character, "", "a broken file");
Eq(PanelStatePath.ParseLaunchContext("[1,2]").Character, "", "not an object");
Eq(PanelStatePath.ParseLaunchContext(null).Character, "", "no file");
}
}