重构猜谜活动并统一聊天室答题通知

This commit is contained in:
pllx
2026-04-29 13:35:20 +08:00
parent 192259f0a4
commit fe3e74b5f8
34 changed files with 3369 additions and 1833 deletions
+2 -2
View File
@@ -277,12 +277,12 @@ export function initChat(roomId) {
window.dispatchEvent(new CustomEvent("chat:pat", { detail: e }));
})
// 监听猜成语出题
.listen("IdiomGameStarted", (e) => {
.listen("RiddleGameStarted", (e) => {
console.log("猜成语:", e);
window.dispatchEvent(new CustomEvent("chat:idiom-started", { detail: e }));
})
// 监听猜成语答题结果
.listen("IdiomGameAnswered", (e) => {
.listen("RiddleGameAnswered", (e) => {
console.log("猜成语结果:", e);
window.dispatchEvent(new CustomEvent("chat:idiom-answered", { detail: e }));
})