RynthSuite as of 2026-12-02 (internal a58302e): hotfix 2026.12.2.1
This commit is contained in:
parent
6b5a9c7e99
commit
ba4ea691fe
18 changed files with 263 additions and 148 deletions
|
|
@ -1,5 +1,4 @@
|
|||
using System;
|
||||
using RynthCore.Plugin.RynthDefective.Clock;
|
||||
using RynthCore.Plugin.RynthDefective.Model;
|
||||
using RynthCore.Plugin.Shared;
|
||||
|
||||
|
|
@ -120,18 +119,7 @@ namespace RynthDefective.Tests
|
|||
|
||||
private static void ClockWindowAndCommand()
|
||||
{
|
||||
// The window counts down from when the tick read the clock.
|
||||
var v = new DayNightView(true, DerethClock.At(RawAt(5715 - 100)), 1000);
|
||||
Eq(v.SecondsLeft(1000), 100.0, "at the reading");
|
||||
Eq(v.SecondsLeft(3500), 97.5, "2.5 s later");
|
||||
Eq(v.SecondsLeft(1_000_000), 0.0, "long after: 0, not negative");
|
||||
Check(!DayNightView.NotReady.Ready, "before the world: not ready");
|
||||
Eq(DayNightWindow.NotInWorld, "—", "out of world it shows a dash");
|
||||
Check(DayNightWindow.Tip(DayNightView.NotReady, 0).Contains("in the world", StringComparison.Ordinal), "tooltip out of world");
|
||||
string tip = DayNightWindow.Tip(v, 100);
|
||||
Check(tip.Contains("Day now (Warmtide-and-Half)", StringComparison.Ordinal) && tip.Contains("Night comes at Evensong, in 1 min 40 s", StringComparison.Ordinal), "tooltip: " + tip);
|
||||
|
||||
// /rdef daynight [show|hide]: parsed, and every answer says what happened.
|
||||
// /rdef daynight [show|hide|clear|box]: still parsed; since 2026-12-02 it hands over to RynthAi (/ra daynight).
|
||||
Eq(DefCommandParser.Parse("daynight").Text, "", "alone: toggle");
|
||||
Eq(DefCommandParser.Parse("daynight show").Text, "show", "show");
|
||||
Eq(DefCommandParser.Parse("DayNight ON").Text, "show", "on = show, any case");
|
||||
|
|
@ -145,16 +133,7 @@ namespace RynthDefective.Tests
|
|||
Eq(DefCommandParser.Parse("daynight transparent").Text, "clear", "transparent = clear");
|
||||
Eq(DefCommandParser.Parse("daynight box").Text, "box", "daynight box");
|
||||
Check(DefCommandParser.Usage.Contains("daynight [show|hide|clear|box]", StringComparison.Ordinal), "clear and box in the usage");
|
||||
Check(!new DefSettings().DayNightBox, "a clear background by default (and for a settings file from before)");
|
||||
Check(DefReplies.DayNightLook(false).Text.Contains("clear background", StringComparison.Ordinal), "clear: said so");
|
||||
Check(DefReplies.DayNightLook(true).Text.Contains("dark box", StringComparison.Ordinal), "box: said so");
|
||||
|
||||
DerethNow dusk = DerethClock.At(RawAt(5715));
|
||||
Eq(DefReplies.DayNight(1, dusk), (true, "Day/Night timer shown. Night now (Evensong); day in 1h 4m of real time."), "shown, with the time");
|
||||
Eq(DefReplies.DayNight(0, null), (true, "Day/Night timer hidden."), "hidden, out of world: no time");
|
||||
var old = DefReplies.DayNight(-1, dusk);
|
||||
Check(!old.Ok && old.Text.Contains("v90", StringComparison.Ordinal) && old.Text.Contains("day in 1h 4m", StringComparison.Ordinal),
|
||||
"an engine without the window: why, and the time still");
|
||||
Check(DefReplies.DayNightMoved.Contains("/ra daynight", StringComparison.Ordinal), "without RynthAi: where it went");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -129,7 +129,7 @@ namespace RynthDefective.Tests
|
|||
Run("day/night: day or night, the hour and the real seconds to dawn or dusk", ClockDayNight);
|
||||
Run("day/night: the same as RynthAi's meta expressions, a countdown with no jumps", ClockMatchesRynthAi);
|
||||
Run("day/night: the countdown text (23m, 4m 10s, 45s)", ClockCountdownText);
|
||||
Run("day/night: the window's view and tooltip, /rdef daynight and its answers", ClockWindowAndCommand);
|
||||
Run("day/night: /rdef daynight is parsed and hands over to RynthAi", ClockWindowAndCommand);
|
||||
Run("appraisal: a weapon's lines (skill, damage, speed, bonuses, slayer, wield, workmanship, set, ratings)", AppraiseWeapon);
|
||||
Run("appraisal: armor's protections and coverage, mana, spellcraft, the flags", AppraiseArmorAndMana);
|
||||
Run("appraisal: a caster's bonuses", AppraiseCaster);
|
||||
|
|
|
|||
Loading…
Reference in a new issue