diff options
| author | Danilo M. <danix@danix.xyz> | 2026-10-23 16:53:17 +0200 |
|---|---|---|
| committer | Danilo M. <danix@danix.xyz> | 2026-10-23 16:53:17 +0200 |
| commit | 1dea40ea309d72d2aa28983d13800074eff9ec3f (patch) | |
| tree | 39b6765902110f4fcea55771976426e94a35d501 /desktop/companion/Mood.js | |
| parent | 7c8688ca7e6155f9e8db3978fd8df83b033f61af (diff) | |
| download | quickshell-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/Mood.js')
| -rw-r--r-- | desktop/companion/Mood.js | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/desktop/companion/Mood.js b/desktop/companion/Mood.js index c4df50b..409a958 100644 --- a/desktop/companion/Mood.js +++ b/desktop/companion/Mood.js @@ -31,7 +31,6 @@ var T = { admireLook: 1500, // turned to the wallpaper, before the blush admireBlush: 3000, admireCooldown: 180000, - skirtless: 60000, }; function st(state, frame) { return { state: state, frame: frame }; } @@ -79,12 +78,14 @@ function pick(s) { } // The self-destruct takes the skirt off once the flash is over, for the -// scorched moment and the skirtless minute after it. Showing her again -// sets destructAt back to 0, which restores it early. -function outfit(destructAt, now) { +// scorched moment and skirtless ms after it (Prefs.companionSkirtless), +// or with 0 until she is shown again, which sets destructAt back to 0 and +// also restores it early. +function outfit(destructAt, now, skirtless) { if (!destructAt) return "dress"; const since = now - destructAt; - return since >= T.destruct && since < T.destruct + T.scorched + T.skirtless ? "leotard" : "dress"; + if (since < T.destruct) return "dress"; + return skirtless === 0 || since < T.destruct + T.scorched + skirtless ? "leotard" : "dress"; } function mockAllowed(lastMockAt, now) { return now - lastMockAt >= T.mockCooldown; } |
