DreamWeave: the bar menu is plugin API v95

The engine's barMenu manifest key landed as plugin API v95 (was v94 on
up/bar-menu; renumbered after the web panel's v94). BarMenuEngineApi and the
comments follow; the test still pins the const to the engine's own
PluginContractVersion.BarMenu.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Daniel Wallace 2026-11-08 13:31:47 -08:00
commit aa4551e8b1
4 changed files with 4 additions and 4 deletions

View file

@ -27,7 +27,7 @@ internal static class DreamWeaveWeb
};
/// <summary>The first engine API that draws a plugin window's bar-icon dropdown from the manifest's barMenu.</summary>
internal const uint BarMenuEngineApi = 94;
internal const uint BarMenuEngineApi = 95;
/// <summary>Whether an engine of this API version draws the bar menu (so the card's buttons are redundant).</summary>
internal static bool EngineDrawsBarMenu(uint engineVersion) => engineVersion >= BarMenuEngineApi;

View file

@ -188,7 +188,7 @@ internal sealed class ServerPackModel
sb.Append(",\"icon\":").Append(Q(WindowIcon));
sb.Append(",\"width\":").Append(tabs ? ServerPackPages.Width : 460).Append(",\"height\":").Append(ServerPackPages.Height);
sb.Append(",\"minWidth\":320,\"minHeight\":200,\"bar\":true,\"server\":").Append(Q(info.Id));
// The bar icon's hover dropdown (RynthCore API 94); an older engine ignores the key.
// The bar icon's hover dropdown (RynthCore API 95); an older engine ignores the key.
if (barMenu != null && barMenu.Count > 0)
{
sb.Append(",\"barMenu\":[");

View file

@ -161,7 +161,7 @@ public sealed partial class ServerPackPlugin : RynthPluginBase
/// <summary>Every frame while logged in (render thread, AC's main thread; the engine's ImGui context current).</summary>
partial void ServerRender();
/// <summary>
/// Items for a hover dropdown on the server window's bar icon (RynthCore API 94; an older engine
/// Items for a hover dropdown on the server window's bar icon (RynthCore API 95; an older engine
/// ignores it). Called once, from the constructor (no Host yet).
/// </summary>
partial void ServerBarMenu(List<ServerBarMenuItem> items);

View file

@ -35,7 +35,7 @@ internal static class DreamWeaveWebTests
r.Add("dreamweave web: the source scan's helpers read code, not comments or strings", ScanHelpers);
r.Add("dreamweave web: the plugin's shared hooks hand off to the web tools first", HooksHandOff);
r.Add("dreamweave web: the bar icon's menu lists the destinations, in the engine's own terms", BarMenuItems);
r.Add("dreamweave web: the engine draws the bar menu from API 94", EngineDrawsMenu);
r.Add("dreamweave web: the engine draws the bar menu from API 95", EngineDrawsMenu);
r.Add("dreamweave web: the card hides its buttons only when the engine's version says it draws the menu", CardHidesButtonsOnNewEngines);
}