From d36f936f6f0e3fe5b6b168b5c020189ba0510a28 Mon Sep 17 00:00:00 2001 From: strawberry42271 <2806566736@qq.com> Date: Thu, 23 Jan 2025 22:53:29 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8Dmusic=20bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- _server/config.json | 2 +- project/plugins.js | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/_server/config.json b/_server/config.json index bdcb574..84aac55 100644 --- a/_server/config.json +++ b/_server/config.json @@ -1 +1 @@ -{"viewportLoc":[0,0],"editorLastFloorId":"jiedao"} \ No newline at end of file +{"viewportLoc":[0,0],"editorLastFloorId":"street02"} \ No newline at end of file diff --git a/project/plugins.js b/project/plugins.js index d9697f6..86944f8 100644 --- a/project/plugins.js +++ b/project/plugins.js @@ -234,8 +234,8 @@ var plugins_bb40132b_638b_4a9f_b028_d3fe47acc8d1 = }); core.registerEvent("setmusics", function (data) { - if (!data.img) { core.setLocalStorage('musics', []) } else { - let a = core.getLocalStorage('musics') ?? [] + if (!data.bgm) { core.setLocalStorage('musics', ["theme.opus"]) } else { + let a = core.getLocalStorage('musics') ?? ["theme.opus"] if (!a.includes(data.bgm)) a.push(data.bgm) core.setLocalStorage('musics', a) } @@ -243,8 +243,8 @@ var plugins_bb40132b_638b_4a9f_b028_d3fe47acc8d1 = }); core.registerEvent("setcgs", function (data) { - if (!data.img) { core.setLocalStorage('cgs', ["theme.opus"]) } else { - let a = core.getLocalStorage('cgs') ?? ["theme.opus"] + if (!data.img) { core.setLocalStorage('cgs', []) } else { + let a = core.getLocalStorage('cgs') ?? [] if (!a.includes(data.img)) a.push(data.img) core.setLocalStorage('cgs', a) }