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

@ -54,7 +54,7 @@ internal static class Program
Run(nameof(ServerBlockRejectsBadIds), ServerBlockRejectsBadIds);
Run(nameof(ServerHostMatching), ServerHostMatching);
Run(nameof(ServerGateKeepsOnlyTheHostsPlugin), ServerGateKeepsOnlyTheHostsPlugin);
Run(nameof(ServerGateUnclaimedHost), ServerGateUnclaimedHost);
Run(nameof(ServerGateFailsOpen), ServerGateFailsOpen);
Run(nameof(ServerGatePlanFromFiles), ServerGatePlanFromFiles);
Run(nameof(SdkApiVersionCannotDrift), SdkApiVersionCannotDrift);
Run(nameof(TrainingStructsMirror), TrainingStructsMirror);
@ -525,7 +525,7 @@ internal static class Program
Eq(PluginManifestGate.SelectServerPlugins(list, "leafdawn.hopto.org", true, log).Count, 0, "LoadAllServerPlugins keeps every one");
}
private static void ServerGateUnclaimedHost()
private static void ServerGateFailsOpen()
{
var list = new List<PluginCandidate>
{
@ -534,7 +534,7 @@ internal static class Program
};
var log = new List<string>();
Eq(PluginManifestGate.SelectServerPlugins(list, "", false, log).Count, 0, "no connect host: all load");
Eq(PluginManifestGate.SelectServerPlugins(list, "10.0.0.5", false, log).Count, 2, "a host nobody lists: none load now (late load by world name or a pick)");
Eq(PluginManifestGate.SelectServerPlugins(list, "10.0.0.5", false, log).Count, 0, "a host nobody lists: all load");
Check(log.Any(l => l.Contains("none lists host 10.0.0.5")), "said why");
}
@ -608,8 +608,8 @@ internal static class Program
(int)Marshal.OffsetOf<RynthCore.PluginSdk.RynthCoreApiNative>(prev) + IntPtr.Size, "SDK " + slot + " right after " + prev);
prev = slot;
}
Eq(typeof(RynthCore.Engine.Plugins.RynthCoreAPI).GetFields().Select(f => f.Name).SkipLast(4).Last(), "GetMonsterHealthFn", "engine table: GetMonsterHealthFn precedes the four");
Eq(typeof(RynthCore.PluginSdk.RynthCoreApiNative).GetFields().Select(f => f.Name).SkipLast(4).Last(), "GetMonsterHealthFn", "SDK table: GetMonsterHealthFn precedes the four");
Eq(typeof(RynthCore.Engine.Plugins.RynthCoreAPI).GetFields().Select(f => f.Name).SkipLast(2 + 4).Last(), "GetMonsterHealthFn", "engine table: GetMonsterHealthFn precedes the four (v98's two placement slots follow them)");
Eq(typeof(RynthCore.PluginSdk.RynthCoreApiNative).GetFields().Select(f => f.Name).SkipLast(2 + 4).Last(), "GetMonsterHealthFn", "SDK table: GetMonsterHealthFn precedes the four (v98's two placement slots follow them)");
}
private static void StructMirror(Type engine, Type sdk, int size)
@ -758,27 +758,36 @@ internal static class Program
Eq(RynthCore.PluginSdk.TrainingInfoFlags.Busy, RynthCore.Engine.Plugins.TrainingInfoFlags.Busy, "info flag bits");
Eq(RynthCore.PluginSdk.TrainingEntryFlags.Trainable, RynthCore.Engine.Plugins.TrainingEntryFlags.Trainable, "entry flag bits");
// The three v79 slots follow v78's, then v80's two and v81's GetMergeStackResultFn (v82-v91 follow:
// eleven slots to v89, then v90's thirteen, v91's two, v93's one and v94's four).
var names = typeof(RynthCore.Engine.Plugins.RynthCoreAPI).GetFields().Select(f => f.Name).SkipLast(31).TakeLast(6).ToArray();
// eleven slots to v89, then v90's thirteen, v91's two, v93's one, v94's four and v98's two).
var names = typeof(RynthCore.Engine.Plugins.RynthCoreAPI).GetFields().Select(f => f.Name).SkipLast(33).TakeLast(6).ToArray();
Check(names.SequenceEqual(new[] { "GetTrainingInfoFn", "RaiseFn", "TrainSkillFn", "GetContainerOrderFn", "PutItemInContainerFn", "GetMergeStackResultFn" }),
"v79, v80 then v81 slots last: " + string.Join(",", names));
var sdkNames = typeof(RynthCore.PluginSdk.RynthCoreApiNative).GetFields().Select(f => f.Name).SkipLast(31).TakeLast(6).ToArray();
var sdkNames = typeof(RynthCore.PluginSdk.RynthCoreApiNative).GetFields().Select(f => f.Name).SkipLast(33).TakeLast(6).ToArray();
Check(sdkNames.SequenceEqual(names), "SDK v79, v80 and v81 slots in the same order");
}
// v80: GetContainerOrder and PutItemInContainer come right before v81's slot, engine and SDK alike;
// v81: GetMergeStackResult, then v82: SalvageDirect, v83's two and v84's GetObjectProperties last. The whole table has the same field names in the same
// order on both sides, and the same size.
// v81: GetMergeStackResult, v82: SalvageDirect, v83: the ghost-creature pair, v84: GetObjectProperties,
// v85: the confirmation pair, v86: GetServerStateJson last.
// The whole table has the same field names in the same order on both sides, and the same size.
private static void ContainerOrderSlots()
{
var all = typeof(RynthCore.Engine.Plugins.RynthCoreAPI).GetFields().Select(f => f.Name).ToArray();
var sdkAll = typeof(RynthCore.PluginSdk.RynthCoreApiNative).GetFields().Select(f => f.Name).ToArray();
// v94: the web panel's four slots end the table; the checks after these are on the table before them.
// v98: the per-character window placements end the table (2026-10-26; v91 on the test branch, v94 after
// upstream's v93, v98 after upstream's v94-v97, 2026-11-14); upstream's v94 web panel slots right before them.
string[] v98 = { "GetWindowPlacementFn", "SetWindowPlacementFn" };
Check(all.TakeLast(v98.Length).SequenceEqual(v98), "v98 slots last: " + string.Join(",", all.TakeLast(v98.Length)));
Check(sdkAll.TakeLast(v98.Length).SequenceEqual(v98), "SDK v98 slots last: " + string.Join(",", sdkAll.TakeLast(v98.Length)));
foreach (string slot in v98)
Eq((int)Marshal.OffsetOf<RynthCore.PluginSdk.RynthCoreApiNative>(slot),
(int)Marshal.OffsetOf<RynthCore.Engine.Plugins.RynthCoreAPI>(slot), slot + " offset");
// v94: the web panel's four slots come right before them.
string[] v94 = { "WebPanelOpenFn", "WebPanelNavigateFn", "WebPanelCloseFn", "WebPanelGetStateFn" };
Check(all.TakeLast(v94.Length).SequenceEqual(v94), "v94 slots last: " + string.Join(",", all.TakeLast(v94.Length)));
Check(sdkAll.TakeLast(v94.Length).SequenceEqual(v94), "SDK v94 slots last: " + string.Join(",", sdkAll.TakeLast(v94.Length)));
all = all.SkipLast(v94.Length).ToArray();
sdkAll = sdkAll.SkipLast(v94.Length).ToArray();
Check(all.SkipLast(v98.Length).TakeLast(v94.Length).SequenceEqual(v94), "v94 slots before v98: " + string.Join(",", all.SkipLast(v98.Length).TakeLast(v94.Length)));
Check(sdkAll.SkipLast(v98.Length).TakeLast(v94.Length).SequenceEqual(v94), "SDK v94 slots before v98: " + string.Join(",", sdkAll.SkipLast(v98.Length).TakeLast(v94.Length)));
all = all.SkipLast(v98.Length + v94.Length).ToArray();
sdkAll = sdkAll.SkipLast(v98.Length + v94.Length).ToArray();
// v93: the monster plates' health readings end the table (2026-11-07), right after v91's two.
Check(all.Last() == "GetMonsterHealthFn", "v93 slot last: " + all.Last());
Check(sdkAll.Last() == "GetMonsterHealthFn", "SDK v93 slot last: " + sdkAll.Last());