Snapshot for release 2026.10.28.3 (internal db7f094)

This commit is contained in:
Tom Bohar 2026-10-28 23:23:42 -04:00
commit e6642d0e10
102 changed files with 4821 additions and 782 deletions

View file

@ -84,6 +84,7 @@ namespace RynthSort.Tests
Run("order: slot orders and the pack column", SlotOrders);
Run("plan: stacks and order inside packs", PlanInPack);
Run("moves: answers for moves within a pack", MoveAnswersInPlace);
Run("replies: every /rsort word answers", Replies);
Run("plan: a fixed inventory runs out of moves", Converges);
Run("loop: auto-sort tidies every pack, then stays still", ConvergesInTheLoop);
Run("remote: another plugin's \"rsort\" command reaches /rsort, anything else is not ours", RemoteCommand);

View file

@ -0,0 +1,42 @@
using System;
using System.Collections.Generic;
using RynthCore.Plugin.RynthSort;
namespace RynthSort.Tests
{
// Every /rsort command answers in chat (2026-10-28). RunCommand needs the plugin's host, so the parse
// of every /rsort word, which ones wait for the login, and the lines are checked here.
internal static partial class Program
{
private static void Replies()
{
var words = new (string Typed, SortVerb Verb, bool Quiet, int? Pack)[]
{
("", SortVerb.Window, false, null), ("on", SortVerb.On, false, null), ("off", SortVerb.Off, false, null),
("on quiet", SortVerb.On, true, null), ("OFF Quiet", SortVerb.Off, true, null),
("now", SortVerb.Now, false, null), ("tidy", SortVerb.Now, false, null), ("clean", SortVerb.Clean, false, null),
("unpack", SortVerb.Unpack, false, null), ("unpack 2", SortVerb.Unpack, false, 2), ("unpack x", SortVerb.Unpack, false, null),
("unpack 0", SortVerb.Unpack, false, null), ("status", SortVerb.Status, false, null), ("help", SortVerb.Help, false, null),
("?", SortVerb.Help, false, null), ("sortt", SortVerb.Unknown, false, null),
};
var seen = new HashSet<SortVerb>();
foreach (var (typed, verb, quiet, pack) in words)
{
SortCommand c = SortCommand.Parse(typed);
Check(c.Verb == verb && c.Quiet == quiet && c.Pack == pack, $"'/rsort {typed}': {verb} quiet={quiet} pack={pack} (got {c.Verb} {c.Quiet} {c.Pack})");
seen.Add(c.Verb);
}
foreach (SortVerb v in Enum.GetValues<SortVerb>()) Check(seen.Contains(v), $"the table covers /rsort's {v}");
Check(!SortCommand.Parse("").NeedsLogin && !SortCommand.Parse("help").NeedsLogin, "the window and help work before login");
Check(SortCommand.Parse("now").NeedsLogin && SortCommand.Parse("sortt").NeedsLogin, "the rest says 'Log in first.' before login");
Eq(SortCommand.Window(true), "RynthSort window shown.", "/rsort: shown");
Eq(SortCommand.Started(SortVerb.Now), "Sorting every pack now.", "now / tidy");
Check(SortCommand.Started(SortVerb.Clean).StartsWith("Cleaning", StringComparison.Ordinal), "clean");
Check(SortCommand.Unpacking(3).StartsWith("Emptying pack 3", StringComparison.Ordinal), "unpack 3");
Check(SortCommand.Unpacking(null).StartsWith("Emptying your side packs", StringComparison.Ordinal), "unpack");
string unknown = SortCommand.Unknown("sortt");
Check(unknown.StartsWith("Unknown '/rsort sortt'.", StringComparison.Ordinal) && unknown.Contains(SortCommand.Usage), "an unknown word: named, with the usage");
}
}
}

View file

@ -38,6 +38,7 @@
<Compile Include="..\..\Plugins\Shared\RynthAiActivityApi.cs" Link="Shared\RynthAiActivityApi.cs" />
<Compile Include="..\..\Plugins\Shared\RynthAiStatusApi.cs" Link="Shared\RynthAiStatusApi.cs" />
<Compile Include="..\..\Plugins\Shared\RynthInstallPaths.cs" Link="Shared\RynthInstallPaths.cs" />
<Compile Include="..\..\Plugins\Shared\CommandReply.cs" Link="Shared\CommandReply.cs" />
<Compile Include="..\..\..\RynthCore\src\RynthCore.Engine\UI\ScriptWindows\DisplayListParser.cs" Link="Engine\DisplayListParser.cs" />
</ItemGroup>