DreamWeave: pin bar menu API to the engine's constant

Link the engine's PluginContractVersion into the tests and compare the plugin's
BarMenuEngineApi to PluginContractVersion.BarMenu instead of a literal 94. Reword
the plugin description: links in the bar icon dropdown, card buttons on older
RynthCore.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Daniel Wallace 2026-11-07 20:29:43 -08:00
commit 17601b9768
3 changed files with 9 additions and 5 deletions

View file

@ -70,10 +70,12 @@ internal static class DreamWeaveWebTests
private static void EngineDrawsMenu()
{
Check.Eq(DreamWeaveWeb.BarMenuEngineApi, 94u, "the engine API that draws the bar menu");
Check.False(DreamWeaveWeb.EngineDrawsBarMenu(93), "93: the card keeps its buttons");
Check.True(DreamWeaveWeb.EngineDrawsBarMenu(94), "94: the engine draws the menu");
Check.True(DreamWeaveWeb.EngineDrawsBarMenu(95), "95: the engine draws the menu");
// The plugin's const is pinned to the engine's own (the linked PluginContractVersion), so a renumber fails here.
uint bar = RynthCore.Engine.Plugins.PluginContractVersion.BarMenu;
Check.Eq(DreamWeaveWeb.BarMenuEngineApi, bar, "the engine API that draws the bar menu equals the engine's BarMenu");
Check.False(DreamWeaveWeb.EngineDrawsBarMenu(bar - 1), "one before: the card keeps its buttons");
Check.True(DreamWeaveWeb.EngineDrawsBarMenu(bar), "at BarMenu: the engine draws the menu");
Check.True(DreamWeaveWeb.EngineDrawsBarMenu(bar + 1), "after: the engine draws the menu");
Check.False(DreamWeaveWeb.EngineDrawsBarMenu(0), "0: unknown version keeps the buttons");
}

View file

@ -62,6 +62,8 @@
<Compile Include="$(RynthSuiteRoot)Plugins\Shared\StorageFeed.cs" Link="Shared\StorageFeed.cs" />
<!-- RynthCore's own sections-manifest parser (pure), so the manifest is checked the way the engine reads it. -->
<Compile Include="..\..\..\RynthCore\src\RynthCore.Engine\UI\Sections\SectionManifest.cs" Link="Engine\SectionManifest.cs" />
<!-- The engine's API numbers (pure const file): the plugin's own copy of the barMenu version is pinned to it. -->
<Compile Include="..\..\..\RynthCore\src\RynthCore.Engine\Plugins\PluginContractVersion.cs" Link="Engine\PluginContractVersion.cs" />
<!-- "RynthServer.Profile": the profile JSON, and the shared reader's parser that consumes it. -->
<Compile Include="..\..\Plugins\Shared\ServerPack\ServerPackProfile.cs" Link="Plugin\ServerPackProfile.cs" />
<!-- "RynthServer.QuestPack": a server plugin's own quest list (the info JSON; the pack itself is data). -->