feat(遊戲化): 新增大廳、附身、時間流、後日談進度等遊戲化系統功能
新增角色大廳(lobby)邀約與通話、附身(possession)、時鐘(clock)抽象、 時間流與睡眠負債、後日談進度、行為選擇與旁觀反應等模組,並補齊對應冒煙 測試(R~V)與單元測試;同步調整 web/mobile 對應頁面與元件。 Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
@@ -0,0 +1,13 @@
|
||||
const STORAGE_KEY = "kokorone:voice-autoplay-enabled";
|
||||
|
||||
// T26:自走語音在場自動播放的開關,純前端偏好(不需要跨裝置同步),預設開啟。
|
||||
export function isVoiceAutoplayEnabled(): boolean {
|
||||
if (typeof window === "undefined") return true;
|
||||
const stored = window.localStorage.getItem(STORAGE_KEY);
|
||||
return stored !== "false";
|
||||
}
|
||||
|
||||
export function setVoiceAutoplayEnabled(enabled: boolean): void {
|
||||
window.localStorage.setItem(STORAGE_KEY, String(enabled));
|
||||
window.dispatchEvent(new StorageEvent("storage", { key: STORAGE_KEY }));
|
||||
}
|
||||
Reference in New Issue
Block a user