RynthSuite/Plugins/RynthCore.Plugin.RynthOracle/Views/AugsTab.cs
BlankenshipG 7797901d69 feat: port SK test branch (2026.10.18.24) onto sk
Squash of test/hotbuild-2026-10-16 as merged onto aelrynth main 2026.10.17.1, matching the
2026.10.18.24 test installer. The test branch wins where both changed the same lines; sk-only
changes kept; duplicate features cut to the test branch's copy. RynthAi HandWrittenVersion stays
0.5.0-legacy-ui on sk.

Highlights: RynthOracle 0.6.0 (Legendary, Markers, Dynamic Stamps and Temple guardians merged into
the Quests list, RynthNav Go to), RynthILT 0.2.20 (ub-IT auto-chunk rules, rating level,
RynthILT.Data v3), RynthAi ub-IT /ub and VT/MT meta compatibility and the loot attribute checklist,
RynthNav destination alternatives. Changelog/2026-10-18-sk-port-test-branch-2026.10.18.24.md.
2026-10-18 16:22:40 -04:00

94 lines
3.8 KiB
C#

// Ported from Oracle of Dereth by Advis Eveldan (advis61), MIT. See THIRD_PARTY_NOTICES.md.
using System;
using RynthCore.Plugin.RynthOracle.Data;
using RynthCore.Plugin.RynthOracle.Ui;
namespace RynthCore.Plugin.RynthOracle.Views;
/// <summary>
/// Augmentations: aug-gem quest timers, experience augmentations and luminance auras, with
/// luminance spent and still to go (upstream's Augmentations and Luminance tabs).
/// </summary>
internal sealed partial class OracleView
{
private void DrawAugs(UiWindow w)
{
QuestFlagStore flags = _c.Flags;
Func<uint, int> prop = _c.Props;
DateTime now = _c.UtcNow;
QuestFlagsBar(w, "au", "gem timers and seer auras");
if (w.CollapsingHeader("Augmentation gem quests", "a.gems", defaultOpen: true))
{
foreach (AugQuest q in AugmentationList.Quests)
{
bool held = flags.TryGet(q.Flag, out QuestFlag f);
bool ready = !held || f.Ready(now);
DoneMark(w, !ready);
w.SameLine(50f);
AugQuest row = q;
w.Selectable(Cut(q.Name, 44), "a.g." + q.Flag, false,
() => PrintEntry(row.Name, row.Flag, ready ? "ready" : "on cooldown", row.Hint, row.Url), 300f);
w.SameLine(370f);
w.Text(held ? f.NextAvailable(now) : "ready");
if (held)
{
w.SameLine(480f);
w.Text(f.Solves.ToString());
}
}
}
// Starts closed: it is the longest list, and every row drawn costs replay time each frame.
if (w.CollapsingHeader("Experience augmentations", "a.xp", defaultOpen: false))
DrawAugRows(w, xp: true, prop, flags);
if (w.CollapsingHeader("Luminance auras", "a.lum", defaultOpen: true))
{
long spent = AugmentationList.TotalLuminanceSpent(prop, flags);
long total = AugmentationList.TotalLuminance;
w.ProgressBar((float)spent / total, -1f, 0f,
$"{TimeText.Number(spent)} spent of {TimeText.Number(total)} ({(int)(spent * 100 / total)}%), {TimeText.Number(Math.Max(0, total - spent))} to go");
DrawAugRows(w, xp: false, prop, flags);
}
}
private void DrawAugRows(UiWindow w, bool xp, Func<uint, int> prop, QuestFlagStore flags)
{
w.TextDisabled("Done");
w.SameLine(50f);
w.TextDisabled("Have");
w.SameLine(100f);
w.TextDisabled("Augmentation");
w.SameLine(300f);
w.TextDisabled("Effect");
w.SameLine(520f);
w.TextDisabled("Cost");
foreach (Augmentation a in AugmentationList.All)
{
if (a.IsXp != xp || a.Name == "Blank") continue;
if (a.IsHeading)
{
w.SeparatorText(a.Name);
continue;
}
DoneMark(w, a.IsComplete(prop, flags));
w.SameLine(50f);
w.Text(a.Text(prop, flags));
w.SameLine(100f);
Augmentation row = a;
w.Selectable(Cut(a.Name, 26), "a.r." + a.Category + a.Id + a.Flag + a.Name, false,
() => PrintEntry(row.Name, row.Flag.Length > 0 ? row.Flag : (row.Id == -3 ? Augmentation.LesserBenedictionFlag : ""), row.Effect, row.Hint, row.Url), 190f);
if (a.Id == -3)
w.Tooltip("Detected from the lesserbenedictionaug quest flag (after Donatello Linante / Blackmoor's Page). Refresh Quests if this looks stale.");
w.SameLine(300f);
w.Text(Cut(a.Effect, 34));
string cost = a.CostText(prop, flags);
if (cost.Length > 0)
{
w.SameLine(520f);
w.Text(cost);
}
}
}
}