diff --git a/Changelog/2026-10-15-ilt-chunk-hammer-0.2.8.md b/Changelog/2026-10-15-ilt-chunk-hammer-0.2.8.md new file mode 100644 index 0000000..4e6056e --- /dev/null +++ b/Changelog/2026-10-15-ilt-chunk-hammer-0.2.8.md @@ -0,0 +1,50 @@ +# Aetheria chunking uses only the Lugian Aetheria Hammer (Infinite Leaftide) + +Date: 2026-10-15 + +| Plugin | Version | Previous release | +|---|---|---| +| RynthCore.Plugin.RynthILT | 0.2.8 | 0.2.7 | + +## The problem + +Gear > Chunking showed "Status: nothing eligible" with "Auto-chunk low aetheria" on and 9 +Coalesced Aetheria under level 9 in the pack, and nothing was chunked. + +RynthILT picked the chunking tool by name: any item ending in " Lugian Hammer". On Silentkelpie +that matched a **Flaming Lugian Hammer**, a loot weapon. Using a weapon on aetheria does nothing: +the server answers the use with no result line. Each aetheria waited 10 s, was then skipped for +the rest of the session, and once all 9 were skipped the status said "nothing eligible". The logs +show this in four sessions on 2026-10-15. + +## Fixes + +- **The tool is only the "Lugian Aetheria Hammer"** (exact name, any case), and never an equipped + item. With no such hammer in the pack, the status says "no Lugian Aetheria Hammer carried". +- **Items with no answer are no longer hidden.** The status adds "N skipped with no answer (Chunk + now retries them)", and each timeout is written to the log (category IltGear). +- **"Chunk eligible items now" retries the skipped items**: a manual pass clears the skip list. +- **Corrupted-weapon results are recognised.** The server's line names the item and the tool + ("You smash the Corrupted Sword with the Lugian Aetheria Hammer."). A line naming a corrupted + item with the hammer, powder or shatter now ends the wait as a result, as UtilityBelt's chunk + policy does. Combat lines ("You smash Corrupted Shadow for 147 ...") are not results. +- The section header reads "Chunking (Lugian Aetheria Hammer)". + +## Files + +- `Plugins/RynthCore.Plugin.RynthILT/Hub/IltChunkClap.cs`: `IsChunkHammer`, `ClassifyChat`, + the skip count in the status, the timeout log, the manual-pass retry. +- `Plugins/RynthCore.Plugin.RynthILT/RynthILTPlugin.cs`: version 0.2.8. + +## Tests + +- `Tools\RynthILT.Tests`: 91 tests, 1501 checks, all passed. 2 are new: only the Lugian Aetheria + Hammer is the tool (the Flaming, plain and Acid Lugian Hammers are not), and the result-line + classifier (corrupted line, aetheria line, refused, busy, and a combat line that is no result). + +## Install + +Published as NativeAOT and installed to `C:\Games\RynthSuite\RynthILT\`. The 0.2.7 DLL (and PDB) +is first saved to `RynthILT\PreviousReleases\0.2.7`. + +Silentkelpie needs a **Lugian Aetheria Hammer** in the pack; the Flaming Lugian Hammer is not one. diff --git a/Plugins/RynthCore.Plugin.RynthILT/Hub/IltChunkClap.cs b/Plugins/RynthCore.Plugin.RynthILT/Hub/IltChunkClap.cs index 31f3b48..072f95b 100644 --- a/Plugins/RynthCore.Plugin.RynthILT/Hub/IltChunkClap.cs +++ b/Plugins/RynthCore.Plugin.RynthILT/Hub/IltChunkClap.cs @@ -10,8 +10,9 @@ // not equipped, not never-chunk, cleave (292) <= 1. // Peace mode only unless ChunkInCombat; waits for the result line (10 s max). // The tool is the "Lugian Aetheria Hammer" only. The Lugian Hammer weapons (Flaming, Acid, ...) -// are loot and chunk nothing: the server answers with no result line, so every item timed out -// into the skip list and the status sat on "nothing eligible" (SilentKelpie, 2026-10-15). +// are loot and chunk nothing on ILT: the server answers "done" with no result line. Matching +// them by name ending used the Flaming Lugian Hammer on Silentkelpie's 9 Coalesced Aetheria, +// every one timed out and was skipped, and the status sat on "nothing eligible" (2026-10-15). // Clap: "/clap all" converts aetheria chunks + trinkets into coins server-side. Needs the // AutoCraftingEnabled stamp; 30 min ± 2 min interval, first attempt ~1 min after enable. using System; @@ -296,7 +297,7 @@ internal sealed class IltChunkClap : IIltFeature public void Render() { - SafeImGui.TextColored(IltStyle.ColTeal, $"Chunking ({HammerName})"); + ImGui.TextColored(IltStyle.ColTeal, $"Chunking ({HammerName})"); bool a = G.AutoChunkAetheria, c = G.AutoChunkCorrupted, comb = G.ChunkInCombat; if (ImGui.Checkbox("Auto-chunk low aetheria", ref a)) G.AutoChunkAetheria = a; ImGui.SameLine(); @@ -306,7 +307,7 @@ internal sealed class IltChunkClap : IIltFeature ImGui.SetNextItemWidth(100); if (ImGui.InputInt("Chunk aetheria with max level below", ref under)) G.ChunkAetheriaUnderLevel = ClampUnderLevel(under); if (ImGui.IsItemHovered()) - SafeImGui.SetTooltip($"Infinite Leaftide aetheria goes up to level {IltInventory.AetheriaMaxLevel}; {IltInventory.AetheriaMaxLevel + 1} chunks every level."); + ImGui.SetTooltip($"Infinite Leaftide aetheria goes up to level {IltInventory.AetheriaMaxLevel}; {IltInventory.AetheriaMaxLevel + 1} chunks every level."); bool kc = G.KeepAetheriaWithCrit, kcd = G.KeepAetheriaWithCritDamage, kcdr = G.KeepAetheriaWithCritDamageResist; ImGui.TextUnformatted("Never chunk aetheria with:"); ImGui.SameLine(); diff --git a/Plugins/RynthCore.Plugin.RynthILT/RynthILTPlugin.cs b/Plugins/RynthCore.Plugin.RynthILT/RynthILTPlugin.cs index a918fbb..7eeecdb 100644 --- a/Plugins/RynthCore.Plugin.RynthILT/RynthILTPlugin.cs +++ b/Plugins/RynthCore.Plugin.RynthILT/RynthILTPlugin.cs @@ -5,22 +5,19 @@ // /rc bounties). Its reads run only while that window polls RynthILTGetBountiesJson, and the // engine polls only on ILT. // * The ILT Hub (Hub/, SilentKelpie's, moved here from RynthAi 2026-10-13): the Mini Remote's -// ILT tabs (Banking, Gear, Charms, Games; RynthAi's Mini Remote hosts them through -// RynthILT.Hub, HubInterface.cs, and lists them on RynthCore's sections rail; the Gear tab has -// the Rings inscription chain; the Character tab moved to RynthOracle's Character tab), its -// own Mini Remote sections (BuildSectionsJson: the ILT session extras in Session Stats, the -// /fship buttons in Fellowship, the /qb list in a Quests section), its sections in RynthAi's -// Pets / Remote tabs, the Guardian panel (RynthPluginRenderEmbed "guardian"), -// the Skills panel's Progression data (RynthILTGetProgressionJson, "prog ..." through -// RynthILTCommand), server feature detection, and the charms and bank balances for other -// plugins ("RynthILT.Data", DataInterface.cs). Every feature stays dormant off an ILT-like -// world (IltServerOptions: no probes, no chat). +// ILT tabs (Gear, Games; RynthAi's Mini Remote hosts them through RynthILT.Hub, +// HubInterface.cs; Character / Charms moved to RynthOracle's Character tab and Banking to +// RynthInventory's Global Inventory, both fed by "RynthILT.Data", DataInterface.cs), the ILT +// session extras in RynthCore's Session Stats section, its sections in RynthAi's Quests / Pets / Remote tabs, the +// Guardian panel (RynthPluginRenderEmbed "guardian"), the Skills panel's Progression data +// (RynthILTGetProgressionJson, "prog ..." through RynthILTCommand), server feature detection. +// Every feature stays dormant off an ILT-like world (IltServerOptions: no probes, no chat). // // Second: a copy of the ILT settings (IltSettingsView/): RynthCore's verdict, this character's -// override (read only: it is set in RynthCore Options > Diagnostics), the ILT world names and -// every feature the Hub read from the server, in its own window ("/ilt settings"). The verdict -// comes from RynthCore's server list (plugin API v86, polled every 2 s), and the Hub follows it -// once one arrives (IltEngineVerdict). +// override (read only: it is set in RynthCore Options > Diagnostics), the ILT world names and a +// summary of the features the Hub read from the server (the full list is RynthOracle's About tab), +// in its own window ("/ilt settings"). The Hub follows RynthCore's verdict once one arrives +// (IltEngineVerdict). // // Third: ILT's fellowship commands (IltFellowship/, ACECustom /fship) as buttons in RynthCore's // Fellowship section and their own window ("/ilt fellow"). While ILT is active the list is also @@ -31,7 +28,7 @@ // there, our own InvokeChatParser too), and RynthAi forwards its "/ra hub ..." verbs from there too, // so commands only queue and run on the next tick. OnRender / RenderEmbed and the RynthILT.Hub // render functions run on the render thread and only read what the pump built; the settings and -// fellowship windows queue their chat commands for the tick. +// fellowship views queue their chat commands for the tick. using System; using System.Collections.Concurrent; using System.Collections.Generic; @@ -50,12 +47,12 @@ namespace RynthCore.Plugin.RynthILT; public sealed class RynthILTPlugin : RynthPluginBase { internal static readonly IntPtr NamePointer = Marshal.StringToHGlobalAnsi("RynthILT"); - // Previous release: 0.3.1. - internal static readonly IntPtr VersionPointer = Marshal.StringToHGlobalAnsi("0.3.2"); + // Previous release: 0.2.7. + internal static readonly IntPtr VersionPointer = Marshal.StringToHGlobalAnsi("0.2.8"); /// - /// The settings view's surface. Not in the sections manifest (the force-server override lives - /// only in RynthCore Options > Diagnostics), but still drawn for an engine that asks. + /// The settings view's surface. No longer in the sections manifest (the force-server override + /// lives only in RynthCore Options > Diagnostics), but still drawn for an engine that asks. /// internal const string SettingsSurface = "section:ilt-settings"; @@ -65,19 +62,13 @@ public sealed class RynthILTPlugin : RynthPluginBase /// The fellowship commands' surface in RynthCore's Fellowship section. internal const string FellowshipSurface = "section:ilt-fellowship"; - /// - /// The quest bonus list (/qb) in RynthILT's own Mini Remote "Quests" section (it was part of - /// RynthAi's Quests tab, which moved to RynthOracle; Infinite Leaftide's /qb stays RynthILT's). - /// - internal const string QuestBonusSurface = "section:ilt-questbonus"; - /// RynthAi's name for the plugin-command broker (its Fellowship view draws our commands). private const string RynthAiPlugin = "RynthAi"; private readonly IltSettingsModel _settingsModel = new(); private readonly IltSettingsUi _settingsUi; private readonly IltFellowshipUi _fellowshipUi; - // Chat commands from the settings and fellowship windows (render thread), run on the next tick. + // Chat commands from the settings and fellowship views (render thread), run on the next tick. private readonly ConcurrentQueue _chatCommands = new(); private const int MaxQueuedChatCommands = 32; @@ -162,7 +153,6 @@ public sealed class RynthILTPlugin : RynthPluginBase _nextNameTryMs = 0; _nextHubTryMs = 0; _ai?.Reset(); - PollServerState(force: true); TryStartBounties(); TryStartHub(); } @@ -178,9 +168,7 @@ public sealed class RynthILTPlugin : RynthPluginBase while (_commands.TryDequeue(out _)) { } while (_typedBounty.TryDequeue(out _)) { } while (_engineCommands.TryDequeue(out _)) { } - while (_chatCommands.TryDequeue(out _)) { } _settingsModel.Clear(); - _serverStateJson = string.Empty; } // Plugin unload (hot reload, update, client closing): keep the list and the Hub state for the @@ -200,7 +188,6 @@ public sealed class RynthILTPlugin : RynthPluginBase try { RynthLog.Pump(); } catch { } if (!_loginComplete) return; _ai?.Tick(); - PollServerState(force: false); if (_bounties == null) TryStartBounties(); if (_hub == null) TryStartHub(); DrainTypedBounty(); @@ -212,169 +199,12 @@ public sealed class RynthILTPlugin : RynthPluginBase catch (Exception ex) { RynthLog.Exception(LogCat.IltHub, ex, "Tick"); } RetryPendingMigration(); PostDataWriteProblems(); - try { PublishHubFeatures(); } - catch (Exception ex) { RynthLog.Exception(LogCat.IltHub, ex, "PublishHubFeatures"); } try { ShareFellowshipCommands(); } catch (Exception ex) { Host.Log($"[RynthILT] Fellowship commands to RynthAi failed: {ex.Message}"); } + try { PublishHubFeatures(); } + catch (Exception ex) { RynthLog.Exception(LogCat.IltHub, ex, "PublishHubFeatures"); } } - // ── ILT fellowship commands for RynthAi's Fellowship view (IltFellowship/) ── - - private const long FellowshipShareCheckMs = 2000; - private const long FellowshipShareResendMs = 10_000; - private long _fellowshipShareNextAt; - private long _fellowshipShareSentAt; - // The last payload RynthAi took; empty when nothing was delivered (or after a clear). - private string _fellowshipShareLast = string.Empty; - - /// - /// Plugin tick: sends RynthAi ILT's fellowship commands while ILT is active (an empty list when - /// it isn't), when that changes and every (RynthAi may load - /// later, and drops a list that stops arriving). Nothing on an engine without the broker. - /// - private void ShareFellowshipCommands() - { - if (!Host.HasSendPluginCommand) return; - long now = Environment.TickCount64; - if (now < _fellowshipShareNextAt) return; - _fellowshipShareNextAt = now + FellowshipShareCheckMs; - - bool active = IltActive(); - // Nothing to clear when RynthAi never got a list. - if (!active && _fellowshipShareLast.Length == 0) return; - string payload = IltFellowshipCommands.Payload(active); - if (payload == _fellowshipShareLast && now - _fellowshipShareSentAt < FellowshipShareResendMs) return; - _fellowshipShareSentAt = now; - // Not delivered (RynthAi not installed or not loaded yet): the resend timer tries again. - if (Host.SendPluginCommand(RynthAiPlugin, ServerCommandShare.Action, payload)) - _fellowshipShareLast = active ? payload : string.Empty; - } - - /// Clears RynthAi's copy of the fellowship commands (logout) if it has one. - private void ClearSharedFellowshipCommands() - { - if (_fellowshipShareLast.Length == 0) return; - _fellowshipShareLast = string.Empty; - _fellowshipShareNextAt = 0; - try - { - if (Host.HasSendPluginCommand) - Host.SendPluginCommand(RynthAiPlugin, ServerCommandShare.Action, IltFellowshipCommands.Payload(active: false)); - } - catch { /* RynthAi drops a list that stops arriving */ } - } - - /// - /// The Hub's world check (RynthCore's verdict once it has one, else RynthILT's server list and - /// "Treat this world as ILT"); before the Hub exists, the engine verdict or the world name - /// (IltFellowshipCommands.IsActive). - /// - private bool IltActive() - { - var hub = _hub; - if (hub != null) return hub.Options.IsIltLikeWorld; - bool? engine = IltEngineVerdict.Active; - string world = engine == null && Host.HasGetWorldName && Host.TryGetWorldName(out string w) ? w : string.Empty; - return IltFellowshipCommands.IsActive(engine, world); - } - - // ── RynthCore's Mini Remote sections ───────────────────────────────────── - - /// - /// The broker actions answered on arrival rather than queued for the tick: RynthCore's - /// "servermenu" push (2026.10.5.47+, every 10 s) and the older "iltfeatures" text. - /// - internal static bool IsParsedRemoteAction(string action) => - action.Equals("servermenu", StringComparison.OrdinalIgnoreCase) - || action.Equals("iltfeatures", StringComparison.OrdinalIgnoreCase); - - /// - /// RynthPluginApplyRemoteCommand "servermenu" / "iltfeatures". Any thread. Taken and dropped: - /// the same verdicts, overrides and world names reach the settings model from RynthCore's - /// server list (plugin API v86, PollServerState), which RynthILT reads itself, so the push is - /// only acknowledged (it must not fall through to the ILT verbs). - /// - internal void ApplyRemoteCommand(string action, string value) { } - - /// - /// RynthPluginRenderEmbed: (Session Stats), - /// (Fellowship), (RynthILT's Quests section) or - /// in RynthCore's Mini Remote, drawn into the engine's current - /// window and context (popped-out windows have their own). is the - /// height it used. False until login or for another surface. Render thread. - /// - internal bool RenderEmbedded(string surface, out float wantHeight) - { - wantHeight = 0; - if (!_loginComplete) return false; - Action? body = surface switch - { - SettingsSurface => _settingsUi.RenderBody, - FellowshipSurface => _fellowshipUi.RenderBody, - RatesSurface => RenderRatesSurface, - QuestBonusSurface => RenderQuestBonusSurface, - _ => null, - }; - if (body == null) return false; - IntPtr previous = ImGui.GetCurrentContext(); - IntPtr context = previous != IntPtr.Zero ? previous : Host.ImGuiContext; - if (context == IntPtr.Zero) return false; - ImGui.SetCurrentContext(context); - try - { - float startY = ImGui.GetCursorPosY(); - body(); - wantHeight = MathF.Max(40f, ImGui.GetCursorPosY() - startY + 4f); - return true; - } - catch (Exception ex) - { - Host.Log($"[RynthILT] View {surface} failed: {ex.Message}"); - return false; - } - finally { ImGui.SetCurrentContext(previous); } - } - - /// The ILT session extras (render thread), or a line saying they start with the Hub. - private void RenderRatesSurface() - { - IltHubController? hub = _hub; - if (hub == null) { ImGui.TextDisabled("ILT session rates start once RynthILT's Hub is ready."); return; } - hub.RenderRatesSection(); - } - - /// The /qb list (render thread), or a line saying it starts with the Hub. - private void RenderQuestBonusSurface() - { - IltHubController? hub = _hub; - if (hub == null) { ImGui.TextDisabled("The quest bonus list starts once RynthILT's Hub is ready."); return; } - hub.RenderQuestBonusSection(); - } - - /// - /// RynthPluginGetSectionsJson (schema 1, UI/Sections/SectionManifest.cs in RynthCore): the ILT - /// session extras in Session Stats ("char"), the fellowship commands in Fellowship and the /qb - /// list in a Quests section of RynthILT's own, all Infinite Leaftide areas (shown while RynthCore - /// treats this world as ILT). The Mini Remote ILT tabs (Banking, Gear, Charms, Games) are listed - /// by RynthAi, which hosts them. Null before login. - /// - internal string? BuildSectionsJson() => _loginComplete ? SectionsJson : null; - - internal const string SectionsJson = - "{\"version\":1,\"sections\":[{\"id\":\"quests\",\"label\":\"Quests\",\"order\":1160}],\"contributions\":[" + - "{\"section\":\"char\",\"server\":\"ilt\"," + - "\"label\":\"ILT session rates (RynthILT)\",\"surface\":\"" + RatesSurface + "\",\"primary\":false," + - "\"height\":220,\"enabled\":true,\"tooltip\":\"Enlightened Coins, pyreals and item conversions this session, " + - "on the same clock as RynthAi's session stats (RynthILT).\",\"order\":120}," + - "{\"section\":\"fellowship\",\"server\":\"ilt\"," + - "\"label\":\"ILT fellowship (RynthILT)\",\"surface\":\"" + FellowshipSurface + "\",\"primary\":false," + - "\"height\":110,\"enabled\":true,\"tooltip\":\"Infinite Leaftide's /fship commands: create, invite, dismiss, " + - "invite your landblock, list nearby, leave, disband (RynthILT; also /ilt fellow).\",\"order\":120}," + - "{\"section\":\"quests\",\"server\":\"ilt\"," + - "\"label\":\"Quest bonus (/qb)\",\"surface\":\"" + QuestBonusSurface + "\",\"primary\":true," + - "\"width\":520,\"height\":440,\"enabled\":true,\"tooltip\":\"Infinite Leaftide's quest bonus list: completed and " + - "incomplete /qb flags (RynthILT; the quest list, timers and rewards are RynthOracle's, /ro).\",\"order\":100}]}"; - /// Plugin tick: runs the settings and fellowship views' chat commands through the engine. private void DrainChatCommands() { @@ -385,30 +215,6 @@ public sealed class RynthILTPlugin : RynthPluginBase } } - private const long ServerStatePollMs = 2000; - private long _serverStateNextAt; - private string _serverStateJson = string.Empty; - - /// - /// Plugin tick, every 2 s (and at login): RynthCore's server list (plugin API v86, - /// GetServerStateJson) into the settings model, whose "ilt" entry the Hub's world check follows - /// (IltEngineVerdict). Parsed only when the text changed. An older engine leaves it empty, and - /// RynthILT's own list decides. - /// - private void PollServerState(bool force) - { - long now = Environment.TickCount64; - if (!force && now < _serverStateNextAt) return; - _serverStateNextAt = now + ServerStatePollMs; - try - { - if (!Host.HasGetServerStateJson || !Host.TryGetServerStateJson(out string json) || json == _serverStateJson) return; - _serverStateJson = json; - _settingsModel.ApplyServerState(EngineServerState.Parse(json)); - } - catch (Exception ex) { RynthLog.Exception(LogCat.IltHub, ex, "PollServerState"); } - } - private const long FeaturePublishMs = 1000; private long _featurePublishNextAt; @@ -470,8 +276,87 @@ public sealed class RynthILTPlugin : RynthPluginBase DataWriteGuard.DrainChat(line => Host.WriteToChat(line, 2)); } + // ── ILT fellowship commands (IltFellowship/) ──────────────────────────── + + private const long FellowshipShareCheckMs = 2000; + private const long FellowshipShareResendMs = 10_000; + private long _fellowshipShareNextAt; + private long _fellowshipShareSentAt; + // The last payload RynthAi took; empty when nothing was delivered (or after a clear). + private string _fellowshipShareLast = string.Empty; + + /// + /// Plugin tick: sends RynthAi ILT's fellowship commands while ILT is active (an empty list when + /// it isn't), when that changes and every (RynthAi may load + /// later, and drops a list that stops arriving). Nothing on an engine without the broker. + /// + private void ShareFellowshipCommands() + { + if (!Host.HasSendPluginCommand) return; + long now = Environment.TickCount64; + if (now < _fellowshipShareNextAt) return; + _fellowshipShareNextAt = now + FellowshipShareCheckMs; + + bool active = IltActive(); + // Nothing to clear when RynthAi never got a list. + if (!active && _fellowshipShareLast.Length == 0) return; + string payload = IltFellowshipCommands.Payload(active); + if (payload == _fellowshipShareLast && now - _fellowshipShareSentAt < FellowshipShareResendMs) return; + _fellowshipShareSentAt = now; + // Not delivered (RynthAi not installed or not loaded yet): the resend timer tries again. + if (Host.SendPluginCommand(RynthAiPlugin, ServerCommandShare.Action, payload)) + _fellowshipShareLast = active ? payload : string.Empty; + } + + /// Clears RynthAi's copy of the fellowship commands (logout) if it has one. + private void ClearSharedFellowshipCommands() + { + if (_fellowshipShareLast.Length == 0) return; + _fellowshipShareLast = string.Empty; + _fellowshipShareNextAt = 0; + try + { + if (Host.HasSendPluginCommand) + Host.SendPluginCommand(RynthAiPlugin, ServerCommandShare.Action, IltFellowshipCommands.Payload(active: false)); + } + catch { /* RynthAi drops a list that stops arriving */ } + } + + /// + /// The Hub's world check (RynthCore's verdict once it has sent one, else RynthILT's server list + /// and "Treat this world as ILT"); before the Hub exists, the engine verdict or the world name + /// (IltFellowshipCommands.IsActive). + /// + private bool IltActive() + { + var hub = _hub; + if (hub != null) return hub.Options.IsIltLikeWorld; + bool? engine = IltEngineVerdict.Active; + string world = engine == null && Host.HasGetWorldName && Host.TryGetWorldName(out string w) ? w : string.Empty; + return IltFellowshipCommands.IsActive(engine, world); + } + // ── ILT settings ───────────────────────────────────────────────────────── + /// + /// The broker actions parsed on arrival rather than queued for the tick: RynthCore's + /// "servermenu" push and the older "iltfeatures" text (IltSettingsModel has both formats). + /// + internal static bool IsParsedRemoteAction(string action) => + action.Equals("servermenu", StringComparison.OrdinalIgnoreCase) + || action.Equals("iltfeatures", StringComparison.OrdinalIgnoreCase); + + /// + /// RynthPluginApplyRemoteCommand: "servermenu" from RynthCore, "iltfeatures" from an older + /// sender. Any thread: parsed and published, nothing else. The Hub's next world check follows + /// a changed verdict (IltEngineVerdict). + /// + internal void ApplyRemoteCommand(string action, string value) + { + if (action.Equals("servermenu", StringComparison.OrdinalIgnoreCase)) _settingsModel.ApplyEngine(value); + else if (action.Equals("iltfeatures", StringComparison.OrdinalIgnoreCase)) _settingsModel.ApplyFeatures(value); + } + /// Asks the Hub to read the server's ILT features again (as "/ilt hub refresh", on the next tick). Render thread. private bool RefreshFeatures() { @@ -480,6 +365,70 @@ public sealed class RynthILTPlugin : RynthPluginBase return true; } + /// + /// RynthPluginRenderEmbed: (the settings view, Char section) or + /// (the fellowship commands, Fellowship section) in RynthCore's + /// Mini Remote, drawn into the engine's current window and context (popped-out windows have + /// their own). is the height it used. False until login or for + /// another surface. Render thread. + /// + internal bool RenderEmbedded(string surface, out float wantHeight) + { + wantHeight = 0; + if (!_loginComplete) return false; + Action? body = surface switch + { + SettingsSurface => _settingsUi.RenderBody, + FellowshipSurface => _fellowshipUi.RenderBody, + RatesSurface => RenderRatesSurface, + _ => null, + }; + if (body == null) return false; + IntPtr previous = ImGui.GetCurrentContext(); + IntPtr context = previous != IntPtr.Zero ? previous : Host.ImGuiContext; + if (context == IntPtr.Zero) return false; + ImGui.SetCurrentContext(context); + try + { + float startY = ImGui.GetCursorPosY(); + body(); + wantHeight = MathF.Max(40f, ImGui.GetCursorPosY() - startY + 4f); + return true; + } + catch (Exception ex) + { + Host.Log($"[RynthILT] View {surface} failed: {ex.Message}"); + return false; + } + finally { ImGui.SetCurrentContext(previous); } + } + + /// The ILT session extras (render thread), or a line saying they start with the Hub. + private void RenderRatesSurface() + { + IltHubController? hub = _hub; + if (hub == null) { ImGui.TextDisabled("ILT session rates start once RynthILT's Hub is ready."); return; } + hub.RenderRatesSection(); + } + + /// + /// RynthPluginGetSectionsJson: the ILT session extras in RynthCore's Session Stats section + /// (the "char" id) and the fellowship commands in its Fellowship section, Infinite Leaftide + /// areas (shown while RynthCore treats this world as ILT). Null before login. + /// + internal string? BuildSectionsJson() => _loginComplete ? SectionsJson : null; + + private const string SectionsJson = + "{\"version\":1,\"sections\":[],\"contributions\":[" + + "{\"section\":\"char\",\"server\":\"ilt\"," + + "\"label\":\"ILT session rates (RynthILT)\",\"surface\":\"" + RatesSurface + "\",\"primary\":false," + + "\"height\":220,\"enabled\":true,\"tooltip\":\"Enlightened Coins, pyreals and item conversions this session, " + + "on the same clock as RynthAi's session stats (RynthILT).\",\"order\":120}," + + "{\"section\":\"fellowship\",\"server\":\"ilt\"," + + "\"label\":\"ILT fellowship (RynthILT)\",\"surface\":\"" + FellowshipSurface + "\",\"primary\":false," + + "\"height\":110,\"enabled\":true,\"tooltip\":\"Infinite Leaftide's /fship commands: create, invite, dismiss, " + + "invite your landblock, list nearby, leave, disband (RynthILT; also /ilt fellow).\",\"order\":120}]}"; + public override void OnChatWindowText(string? text, int chatType, ref int eat) { if (string.IsNullOrEmpty(text)) return; @@ -635,7 +584,9 @@ public sealed class RynthILTPlugin : RynthPluginBase if (sub is "open") return words.Length < 3 || !IltSections.IsUniversalTabName(words[2]); if (sub is "tab") - return words.Length >= 3 && IltSections.TryParse(words[2], out IltSection t) && IltSections.IsTab(t); + // Gear / Games, and the sections that moved out (redirected to RynthOracle / RynthInventory). + return words.Length >= 3 && IltSections.TryParse(words[2], out IltSection t) + && (IltSections.IsTab(t) || IltSections.MovedCommand(t) != null); return true; default: return false; @@ -694,8 +645,8 @@ public sealed class RynthILTPlugin : RynthPluginBase case "help": ChatLine("[RynthILT] /ilt hub ... (the Mini Remote's ILT tabs; same as /ra hub ...), /ilt guardian ..., /ilt servers [list||default],"); ChatLine("[RynthILT] /ilt bounty [list|refresh] - the tracked ACECustom bounties (the Bounties window: the ILT button on the RynthCore bar, or /rc bounties),"); - ChatLine("[RynthILT] /ilt settings [show|hide|toggle] - the ILT settings: the world verdict, the ILT world names and the server's features (force a server: RynthCore Options > Diagnostics),"); - ChatLine("[RynthILT] /ilt fellow [show|hide|toggle] - ILT's /fship commands as buttons (also in the Mini Remote's Fellowship section),"); + ChatLine("[RynthILT] /ilt settings [show|hide|toggle] - the ILT settings: the world verdict, the ILT world names and a feature summary (force a server: RynthCore Options > Diagnostics; all features: RynthOracle > About),"); + ChatLine("[RynthILT] /ilt fellow [show|hide|toggle] - ILT's /fship commands as buttons (also in the Mini Remote's Fellowship section and RynthOracle's Fellowship tab),"); ChatLine("[RynthILT] /ilt trace [on|off], /ilt debug [on|off]."); return; default: diff --git a/Tools/RynthILT.Tests/AetheriaChunkTests.cs b/Tools/RynthILT.Tests/AetheriaChunkTests.cs index 7cfdb38..6a011b0 100644 --- a/Tools/RynthILT.Tests/AetheriaChunkTests.cs +++ b/Tools/RynthILT.Tests/AetheriaChunkTests.cs @@ -5,12 +5,38 @@ namespace RynthILT.Tests; // The Lugian-hammer aetheria rules (Hub/IltChunkClap.cs): Infinite Leaftide aetheria goes up to // level 10, and aetheria carrying a C, CD or CDR rating is kept unless its keep switch is off. +// Only the Lugian Aetheria Hammer chunks, and ILT's result lines name the item and the tool. internal static class AetheriaChunkTests { public static void Register(Runner r) { r.Add("aetheria: the chunk cap runs to one past ILT's level 10", Cap); r.Add("aetheria: C / CD / CDR ratings are kept by default, each with its own switch", Ratings); + r.Add("chunk: only the Lugian Aetheria Hammer is the tool, never a Lugian Hammer weapon", HammerOnly); + r.Add("chunk: ILT's result lines (item and tool named) end the wait; combat lines don't", ResultLines); + } + + /// + /// Silentkelpie 2026-10-15: the Flaming Lugian Hammer (a loot weapon) matched " Lugian Hammer", + /// chunked nothing, and all 9 Coalesced Aetheria timed out into the skip list. + /// + private static void HammerOnly() + { + Check.True(IltChunkClap.IsChunkHammer("Lugian Aetheria Hammer"), "the ILT tool"); + Check.True(IltChunkClap.IsChunkHammer("lugian aetheria hammer"), "any case"); + Check.False(IltChunkClap.IsChunkHammer("Flaming Lugian Hammer"), "a loot weapon is not the tool"); + Check.False(IltChunkClap.IsChunkHammer("Lugian Hammer"), "nor the plain one"); + Check.False(IltChunkClap.IsChunkHammer("Acid Lugian Hammer"), "nor any variant"); + } + + private static void ResultLines() + { + Check.Eq(IltChunkClap.ClassifyChat("You smash the Corrupted Sword with the Lugian Aetheria Hammer."), IltChunkClap.ChunkResult.Done, "ILT corrupted line"); + Check.Eq(IltChunkClap.ClassifyChat("You smash the aetheria with the hammer."), IltChunkClap.ChunkResult.Done, "aetheria line"); + Check.Eq(IltChunkClap.ClassifyChat("The aetheria is too powerful to chunk."), IltChunkClap.ChunkResult.Refused, "refused"); + Check.Eq(IltChunkClap.ClassifyChat("You're too busy!"), IltChunkClap.ChunkResult.Busy, "busy"); + Check.Eq(IltChunkClap.ClassifyChat("You smash Corrupted Shadow for 147 points of bludgeoning damage!"), IltChunkClap.ChunkResult.None, + "a combat line naming a corrupted monster is no result"); } private static void Cap()