RynthSuite/Plugins/RynthCore.Plugin.RynthOracle/Views/SocietyTab.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

53 lines
2.2 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>Society: membership, rank, ribbons to the next rank and today, and the society quests.</summary>
internal sealed partial class OracleView
{
private void DrawSociety(UiWindow w)
{
CharacterSnapshot c = _c.Character;
var s = new SocietyStanding(
c.Int(_c.Host, CharacterSnapshot.IntSocietyCelhan),
c.Int(_c.Host, CharacterSnapshot.IntSocietyEldweb),
c.Int(_c.Host, CharacterSnapshot.IntSocietyRadblo));
QuestFlagStore flags = _c.Flags;
DateTime now = _c.UtcNow;
if (!s.IsMember)
{
w.Text("Not in a society.");
}
else
{
w.SeparatorText($"{s.SocietyName}: {s.RankName}");
w.ProgressBar(s.RankMax > 0 ? (float)s.Progress / s.RankMax : 1f, -1f, 0f, $"{s.Progress} / {s.RankMax} ribbons");
if (s.NextRankName.Length > 0) Field(w, "To " + s.NextRankName, $"{s.RibbonsToNextRank} ribbons", 0f, 130f);
else Field(w, "Rank", "Master (the top rank)", 0f, 130f);
Field(w, "Today", s.DailyLimit > 0
? $"{s.RibbonsToday(flags, now)} / {s.DailyLimit} ribbons"
: "no daily limit at Master", 300f, 400f);
QuestFlagsBar(w, "so", "ribbons and society quest timers");
}
w.SeparatorText("Quests");
foreach (SocietyQuest q in SocietyQuestList.Visible(s))
{
if (q.IsBlank) { w.Spacing(); continue; }
if (q.IsHeading) { w.TextColored(UiColors.Gold, q.Name); continue; }
DoneMark(w, q.IsComplete(s, flags, now));
w.SameLine(50f);
SocietyQuest row = q;
string status = q.Status(s, flags, now);
w.Selectable(Cut(q.Name, 36), "s.q." + q.Name, false, () => PrintEntry(row.Name, row.Flag, status, row.Hint, row.Url), 250f);
w.SameLine(310f);
w.TextDisabled(Cut(q.Area, 18));
w.SameLine(450f);
w.Text(status);
}
}
}