Snapshot for release 2026.10.13.2 (internal fa01751)
This commit is contained in:
parent
1d86acdf27
commit
401a8613cd
28 changed files with 428 additions and 105 deletions
|
|
@ -39,6 +39,7 @@ internal static class Program
|
|||
Run("CommandParsing", CommandParsing);
|
||||
Run("VTankActions", VTankActions);
|
||||
Run("MetaStateParam", MetaStateParam);
|
||||
Run("IltPanelsOnlyOnIlt", IltPanelsOnlyOnIlt);
|
||||
}
|
||||
finally
|
||||
{
|
||||
|
|
@ -316,6 +317,37 @@ internal static class Program
|
|||
Check(wWarn.Count == 1 && wWarn[0].Contains("AC won't get that key"), "AC-key warning text");
|
||||
}
|
||||
|
||||
// RynthILT's panels (Bounties, Guardian) are hotkey actions only where the bar's ILT button is:
|
||||
// Infinite Leaftide with RynthILT loaded (the engine sets IltAvailable from IltInfo).
|
||||
private static void IltPanelsOnlyOnIlt()
|
||||
{
|
||||
Func<bool> saved = HotkeyActions.IltAvailable;
|
||||
try
|
||||
{
|
||||
HotkeyAction? bounties = HotkeyActions.Find("panel:Bounties");
|
||||
HotkeyAction? guardian = HotkeyActions.Find("panel:Guardian");
|
||||
Check(bounties is { Ilt: true, Panel: "Bounties" } && guardian is { Ilt: true, Panel: "Guardian" }, "both ILT panels are built-ins, marked ILT");
|
||||
int iltCount = 0;
|
||||
foreach (HotkeyAction a in HotkeyActions.BuiltIns) if (a.Ilt) iltCount++;
|
||||
Check(iltCount == 2, "only those two are ILT");
|
||||
|
||||
HotkeyActions.IltAvailable = static () => false;
|
||||
Check(!HotkeyActions.Offered(bounties!) && !HotkeyActions.Offered(guardian!), "off ILT: not offered");
|
||||
Check(HotkeyActions.Resolve("bounties") == null && HotkeyActions.Resolve("panel guardian") == null, "off ILT: can't be typed");
|
||||
Check(HotkeyActions.Offered(HotkeyActions.Find("panel:Radar")!), "other panels are offered anywhere");
|
||||
Check(HotkeyActions.Describe(new HotkeyBinding(new KeyCombo(VK_F5, 0), "panel:Bounties")).Contains("Bounties"),
|
||||
"off ILT a saved binding still describes itself");
|
||||
|
||||
HotkeyActions.IltAvailable = static () => true;
|
||||
Check(HotkeyActions.Offered(bounties!) && HotkeyActions.Resolve("bounties") == bounties, "on ILT: offered, typed by title");
|
||||
Check(HotkeyActions.Resolve("panel guardian") == guardian, "on ILT: 'panel guardian'");
|
||||
|
||||
HotkeyActions.IltAvailable = static () => throw new InvalidOperationException("no engine");
|
||||
Check(!HotkeyActions.Offered(bounties!), "a failing check counts as off ILT");
|
||||
}
|
||||
finally { HotkeyActions.IltAvailable = saved; }
|
||||
}
|
||||
|
||||
private static void ActionsResolve()
|
||||
{
|
||||
Check(HotkeyActions.Resolve("combat")?.Id == "combat", "id");
|
||||
|
|
@ -332,7 +364,7 @@ internal static class Program
|
|||
{
|
||||
Check(ids.Add(a.Id), $"unique id {a.Id}");
|
||||
Check(HotkeyActions.Find(a.Id) == a, $"Find({a.Id})");
|
||||
Check(HotkeyActions.Resolve(a.Id) == a, $"Resolve({a.Id})");
|
||||
Check(HotkeyActions.Resolve(a.Id) == (HotkeyActions.Offered(a) ? a : null), $"Resolve({a.Id})");
|
||||
}
|
||||
Check(HotkeyActions.Describe(new HotkeyBinding(new KeyCombo(VK_F1, 0), "command", "/ra start")) == "Chat: /ra start", "describe command");
|
||||
Check(HotkeyActions.Describe(new HotkeyBinding(new KeyCombo(VK_F1, 0), "gone")).Contains("Unknown"), "describe unknown");
|
||||
|
|
|
|||
|
|
@ -20,6 +20,7 @@ internal static class Program
|
|||
ConfiguredLists();
|
||||
FromCommandLines();
|
||||
Wildcards();
|
||||
PluginVerdict();
|
||||
|
||||
Console.WriteLine();
|
||||
Console.WriteLine($"{_checks - _failed}/{_checks} checks passed.");
|
||||
|
|
@ -28,6 +29,31 @@ internal static class Program
|
|||
return _failed == 0 ? 0 : 1;
|
||||
}
|
||||
|
||||
// RynthILT's own verdict (2026-10-13: every ILT feature is RynthILT's, which keeps its own world
|
||||
// list and a per-character "Treat this world as ILT"): read from RynthILTGetStatusJson, added to
|
||||
// the engine's.
|
||||
private static void PluginVerdict()
|
||||
{
|
||||
Case("RynthILT's verdict");
|
||||
Check(IltDetect.ParsePluginStatus("{\"loaded\":true,\"ilt\":true,\"forced\":true,\"available\":false,\"world\":\"MyShard\"}",
|
||||
out bool loaded, out bool ilt, out bool forced, out bool available, out string world)
|
||||
&& loaded && ilt && forced && !available && world == "MyShard", "the status JSON parses");
|
||||
Check(IltDetect.ParsePluginStatus("{\"loaded\":true}", out loaded, out ilt, out forced, out available, out world)
|
||||
&& loaded && !ilt && !forced && !available && world == "", "missing fields read false / empty");
|
||||
Check(!IltDetect.ParsePluginStatus("not json", out _, out _, out _, out _, out _), "garbage is refused");
|
||||
Check(!IltDetect.ParsePluginStatus("[]", out _, out _, out _, out _, out _), "not an object is refused");
|
||||
Check(!IltDetect.ParsePluginStatus(null, out _, out _, out _, out _, out _), "nothing is refused");
|
||||
|
||||
var no = IltDetect.Decide(null, "Aeshnidae", null, null);
|
||||
var yes = IltDetect.Decide("game.infiniteleaftide.online", null, null, null);
|
||||
var forcedHere = IltDetect.Combine(no, true, "RynthILT: \"Treat this world as ILT\" is ticked for this character");
|
||||
Check(forcedHere.IsIlt && forcedHere.Reason.Contains("Treat this world"), "RynthILT's override makes it ILT: " + forcedHere.Reason);
|
||||
Check(!IltDetect.Combine(no, false, "x").IsIlt, "RynthILT saying no changes nothing");
|
||||
Check(ReferenceEquals(IltDetect.Combine(yes, false, ""), yes), "RynthILT can't take ILT away from the engine's verdict");
|
||||
Check(ReferenceEquals(IltDetect.Combine(yes, true, "x"), yes), "the engine's own reason is kept when both agree");
|
||||
Check(IltDetect.Combine(no, true, null).Reason.Contains("RynthILT"), "a missing reason still names RynthILT");
|
||||
}
|
||||
|
||||
private static void Hosts()
|
||||
{
|
||||
Case("hosts");
|
||||
|
|
|
|||
Loading…
Reference in a new issue