aboutsummaryrefslogtreecommitdiffstats
path: root/desktop/companion/test_mood.js
diff options
context:
space:
mode:
authorDanilo M. <danix@danix.xyz>2026-10-23 16:53:17 +0200
committerDanilo M. <danix@danix.xyz>2026-10-23 16:53:17 +0200
commit1dea40ea309d72d2aa28983d13800074eff9ec3f (patch)
tree39b6765902110f4fcea55771976426e94a35d501 /desktop/companion/test_mood.js
parent7c8688ca7e6155f9e8db3978fd8df83b033f61af (diff)
downloadquickshell-1dea40ea309d72d2aa28983d13800074eff9ec3f.tar.gz
quickshell-1dea40ea309d72d2aa28983d13800074eff9ec3f.zip
companion: the leotard's timeout is a setting, or none at all
Settings > Desktop > Companion takes the seconds she stays in the leotard after the self-destruct, 60 as before. Switched off, she keeps it until she is hidden and shown again, which already put the dress back early. Mood.outfit takes the time instead of reading T. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Diffstat (limited to 'desktop/companion/test_mood.js')
-rw-r--r--desktop/companion/test_mood.js18
1 files changed, 12 insertions, 6 deletions
diff --git a/desktop/companion/test_mood.js b/desktop/companion/test_mood.js
index f24340c..37af2ea 100644
--- a/desktop/companion/test_mood.js
+++ b/desktop/companion/test_mood.js
@@ -99,12 +99,18 @@ assert.deepStrictEqual([1, 2, 3, 4, 5, 6].map(M.clickFrame),
// Outfit: the dress until the flash is over, then the leotard for
// scorched + skirtless, then the dress again.
-assert.strictEqual(M.outfit(0, NOW), "dress");
-assert.strictEqual(M.outfit(NOW - 10, NOW), "dress");
-assert.strictEqual(M.outfit(NOW - M.T.destruct, NOW), "leotard");
-const bare = M.T.destruct + M.T.scorched + M.T.skirtless;
-assert.strictEqual(M.outfit(NOW - bare + 10, NOW), "leotard");
-assert.strictEqual(M.outfit(NOW - bare, NOW), "dress");
+const SK = 60000;
+assert.strictEqual(M.outfit(0, NOW, SK), "dress");
+assert.strictEqual(M.outfit(NOW - 10, NOW, SK), "dress");
+assert.strictEqual(M.outfit(NOW - M.T.destruct, NOW, SK), "leotard");
+const bare = M.T.destruct + M.T.scorched + SK;
+assert.strictEqual(M.outfit(NOW - bare + 10, NOW, SK), "leotard");
+assert.strictEqual(M.outfit(NOW - bare, NOW, SK), "dress");
+// A skirtless time of 0 keeps the leotard until she is shown again, which
+// resets destructAt.
+assert.strictEqual(M.outfit(NOW - 10, NOW, 0), "dress");
+assert.strictEqual(M.outfit(NOW - 3600000, NOW, 0), "leotard");
+assert.strictEqual(M.outfit(0, NOW, 0), "dress");
// Cooldowns.
assert.strictEqual(M.mockAllowed(0, NOW), true);