aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDanilo M. <danix@danix.xyz>2026-10-23 15:01:29 +0200
committerDanilo M. <danix@danix.xyz>2026-10-23 15:01:29 +0200
commit1239dc3aa73c488990a40dc356fdc1e7ba40940c (patch)
tree701fffb19523c76e590f0e35c49bef97e7f044cc
parent524362dcf762713f15907668f990504fdc9b9929 (diff)
downloadquickshell-1239dc3aa73c488990a40dc356fdc1e7ba40940c.tar.gz
quickshell-1239dc3aa73c488990a40dc356fdc1e7ba40940c.zip
companion: her lines and the opening monologue
Fixed English lines per reaction, terse in the game's register, and the opening monologue split at its sentences so each fills one bubble. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
-rw-r--r--desktop/companion/Lines.js45
1 files changed, 45 insertions, 0 deletions
diff --git a/desktop/companion/Lines.js b/desktop/companion/Lines.js
new file mode 100644
index 0000000..6f387aa
--- /dev/null
+++ b/desktop/companion/Lines.js
@@ -0,0 +1,45 @@
+// Copyright (C) 2026 Danilo M. <danix@danix.xyz>
+//
+// This program is free software; you can redistribute it and/or modify
+// it under the terms of the GNU General Public License version 2 as
+// published by the Free Software Foundation.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+
+.pragma library
+
+// What she says, in English, grouped by the reaction that says it.
+// Companion.qml picks one at random per reaction and keeps to one line in
+// 30 s, except for clicks and the self-destruct (Mood.canSpeak).
+
+var lines = {
+ shown: ["Glory to mankind.", "2B, reporting.", "...Back on duty."],
+ bored: ["...Operator, I'm bored.", "Nothing to report.", "Awaiting orders."],
+ wake: ["I'm awake.", "Systems online."],
+ mock: ["Typo again?", "Delete, delete, delete.", "Were you aiming for that key?"],
+ shoved: ["Hey.", "Rude.", "I was standing here."],
+ ready: ["Answer's ready.", "Your reply came in."],
+ click: ["...Yes?", "Can I help you?"],
+ blush: ["S-stop that.", "...Operator."],
+ dodge: ["...Fine.", "I'll move."],
+ destruct: ["Self-destruct sequence initiated."],
+ aftermath: ["...That was unpleasant."],
+};
+
+// The game's opening, one sentence per bubble.
+var monologue = [
+ "Everything that lives is designed to end.",
+ "We are perpetually trapped in a never-ending spiral of life and death.",
+ "Is this a curse?",
+ "Or some kind of punishment?",
+ "I often think about the god who blessed us with this cryptic puzzle...and wonder if we'll ever get the chance to kill him.",
+];
+
+// A line for kind; roll is Math.random(). "" for a kind with no lines.
+function pick(kind, roll) {
+ const l = lines[kind] || [];
+ return l.length ? l[Math.min(l.length - 1, Math.floor(roll * l.length))] : "";
+}