aboutsummaryrefslogtreecommitdiffstats
path: root/desktop/companion/Mood.js
diff options
context:
space:
mode:
authorDanilo M. <danix@danix.xyz>2026-10-23 15:10:19 +0200
committerDanilo M. <danix@danix.xyz>2026-10-23 15:10:19 +0200
commit5e506270a8e5c891070672b60b7a397a4b1aec1e (patch)
tree29f876246c1317b28e8e50a63c47343f6efc60ec /desktop/companion/Mood.js
parenta162d1263692626e4731354764c53d37ad03fb28 (diff)
downloadquickshell-5e506270a8e5c891070672b60b7a397a4b1aec1e.tar.gz
quickshell-5e506270a8e5c891070672b60b7a397a4b1aec1e.zip
companion: shoved for a moment, then mad beside the balloon
The shoved frame held for as long as a balloon stayed, which read as her stumbling for ten seconds. It now lasts T.shoveHold (1.2 s), then she is mad beside the balloon until it goes. shovedAt is reset to 0 when the shove ends and 0 reads as the shove's first instant, so the binding cannot show mad for a tick before the handler stamps the time. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Diffstat (limited to 'desktop/companion/Mood.js')
-rw-r--r--desktop/companion/Mood.js4
1 files changed, 3 insertions, 1 deletions
diff --git a/desktop/companion/Mood.js b/desktop/companion/Mood.js
index f3a4133..584b4d6 100644
--- a/desktop/companion/Mood.js
+++ b/desktop/companion/Mood.js
@@ -19,6 +19,7 @@ var T = {
burstGap: 1500, // a click burst ends after this long without a click
clickHold: 2000, // a click reaction lasts this long after the last click
mockHold: 2500,
+ shoveHold: 1200, // knocked off balance, before she turns mad at the balloon
mockCooldown: 20000,
typingHold: 2000,
waveHold: 3000,
@@ -54,7 +55,8 @@ function pick(s) {
if (since < T.destruct) return st("destruct", "base");
if (since < T.destruct + T.scorched) return st("scorched", "scorched");
if (s.dodging) return st("dodge", "base");
- if (s.shoved) return st("shoved", "shoved");
+ // shovedAt 0 is the instant before Companion.qml stamps it.
+ if (s.shoved) return st("shoved", s.shovedAt && s.now - s.shovedAt >= T.shoveHold ? "mad" : "shoved");
if (s.recording) return st("listen", "listen");
if (s.busy) return st("think", "think");
if (s.now - s.repliedAt < T.waveHold) return st("wave", "wave");