RynthSuite as of 2026-11-29 (internal 46bae49): release 2026.11.28.1
This commit is contained in:
parent
25552fa794
commit
598f49c899
131 changed files with 11825 additions and 329 deletions
|
|
@ -35,6 +35,73 @@ internal sealed class OracleContext
|
|||
/// </summary>
|
||||
public readonly RynthCore.Plugin.Shared.ServerQuestPackClient QuestPacks = new();
|
||||
/// <summary>
|
||||
/// The active server plugin's own quest guide ("RynthServer.QuestGuide", 2026-11-27): its wiki's quests
|
||||
/// with their steps, shown in the Guide tab over the AC Community Wiki's. None without one.
|
||||
/// </summary>
|
||||
public readonly RynthCore.Plugin.Shared.ServerQuestGuideClient ServerGuide = new();
|
||||
/// <summary>The AC Community Wiki feed (off by default; Settings.WikiFeedOn): the Guide tab's quests on every server.</summary>
|
||||
public readonly CommunityWikiFeed Wiki = new();
|
||||
/// <summary>Stamps seen in chat this session ("You've stamped X!"), as GuideStamp keys; SessionStampRevision goes up with each.</summary>
|
||||
public readonly System.Collections.Generic.HashSet<string> SessionStamps = new(StringComparer.Ordinal);
|
||||
public int SessionStampRevision;
|
||||
/// <summary>Kill task lines seen in chat this session.</summary>
|
||||
public readonly KillChat Kills = new();
|
||||
/// <summary>Where guide quests stand for this character (the flags, the session's stamps and kill lines).</summary>
|
||||
public readonly GuideProgress Progress;
|
||||
/// <summary>The seam for running a guide quest later; null in this version (no run controls drawn).</summary>
|
||||
public IGuideQuestRunner? GuideRunner;
|
||||
|
||||
public OracleContext()
|
||||
{
|
||||
Progress = new GuideProgress(Flags, SessionStamps, Kills);
|
||||
}
|
||||
|
||||
/// <summary>A chat line for the guide: a stamp ("You've stamped X!") or a kill task's kill line. True when it was one.</summary>
|
||||
public bool OnGuideChatLine(string line, DateTime utcNow)
|
||||
{
|
||||
if (GuideStamp.FromChat(line) is string stamp && line.TrimStart().StartsWith("You've stamped ", StringComparison.OrdinalIgnoreCase))
|
||||
{
|
||||
if (SessionStamps.Add(GuideStamp.Key(stamp))) SessionStampRevision++;
|
||||
return true;
|
||||
}
|
||||
return Kills.OnChatLine(line, utcNow);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Turns the AC Community Wiki feed on or off (the About and Guide tabs' buttons, /ro wiki on|off). Turning it on
|
||||
/// says what it reads and from where, then starts the first read. The answer, for the caller to show.
|
||||
/// </summary>
|
||||
public (bool Ok, string Text) SetWikiFeed(bool on)
|
||||
{
|
||||
if (Settings.WikiFeedOn == on)
|
||||
return (true, on ? "The AC Community Wiki feed is already on. " + WikiStatus() : "The AC Community Wiki feed is already off: nothing is fetched.");
|
||||
Settings.WikiFeedOn = on;
|
||||
Settings.Save();
|
||||
if (!on)
|
||||
{
|
||||
Wiki.Stop();
|
||||
return (true, "AC Community Wiki feed off: nothing more is fetched (the copy already saved stays in the Guide tab).");
|
||||
}
|
||||
bool started = Wiki.Start(on: true);
|
||||
return (true, "AC Community Wiki feed on. It reads " + CommunityWikiFeed.WhatItReads
|
||||
+ (started ? " Reading it now." : " A read is already under way."));
|
||||
}
|
||||
|
||||
/// <summary>Reads the wiki now (the Guide tab's Read now, /ro wiki read): only with the feed on.</summary>
|
||||
public (bool Ok, string Text) ReadWikiNow()
|
||||
{
|
||||
if (!Settings.WikiFeedOn)
|
||||
return (false, "The AC Community Wiki feed is off, so nothing is fetched. Turn it on first (About tab, Guide tab, or /ro wiki on); it reads "
|
||||
+ CommunityWikiFeed.WhatItReads);
|
||||
if (Wiki.Running) return (false, "The AC Community Wiki is being read already: " + Wiki.Status);
|
||||
return Wiki.Start(on: true)
|
||||
? (true, "Reading the AC Community Wiki (" + CommunityWikiFeed.Host + "): only the pages edited since the last read.")
|
||||
: (false, "Couldn't start reading the AC Community Wiki.");
|
||||
}
|
||||
|
||||
/// <summary>"on: 812 quests, ... (read ...)" or "off".</summary>
|
||||
public string WikiStatus() => (Settings.WikiFeedOn ? "On: " : "Off (nothing is fetched). Saved copy: ") + Wiki.Status + ".";
|
||||
/// <summary>
|
||||
/// The active server's Void DoT duration rule: its plugin's profile value "voidDotDurationScale"
|
||||
/// (RynthConquest publishes Conquest's), 1 on every other server or without the plugin.
|
||||
/// </summary>
|
||||
|
|
|
|||
Loading…
Reference in a new issue