aboutsummaryrefslogtreecommitdiffstats
path: root/desktop/companion/Mood.js
diff options
context:
space:
mode:
Diffstat (limited to 'desktop/companion/Mood.js')
-rw-r--r--desktop/companion/Mood.js11
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; }