From ebf57a832cea51defd6b155dfc5a9dfec382a77b Mon Sep 17 00:00:00 2001 From: yuuki <> Date: Sun, 8 Dec 2024 19:40:13 +0900 Subject: [PATCH] =?UTF-8?q?=E3=81=82=E3=81=B9=E3=81=93=E3=81=B9=E3=82=92?= =?UTF-8?q?=E5=AE=9F=E8=A3=85=E3=81=99=E3=82=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- public/src/js/parsetja.js | 19 ++++++++++++++++++- public/src/js/songselect.js | 20 ++++++++++++++++++++ public/src/js/view.js | 2 +- 3 files changed, 39 insertions(+), 2 deletions(-) diff --git a/public/src/js/parsetja.js b/public/src/js/parsetja.js index de69a5e..8968aae 100644 --- a/public/src/js/parsetja.js +++ b/public/src/js/parsetja.js @@ -516,7 +516,24 @@ var string = line.toUpperCase().split("") for(let symbol of string){ - + const abekobe = localStorage.getItem("abekobe") ?? "false"; + + if (abekobe === "true") { + if (symbol === "1") { + symbol = "2"; + } else if (symbol === "2") { + symbol = "1"; + } else if (symbol === "3") { + symbol = "4"; + } else if (symbol === "4") { + symbol = "3"; + } else if (symbol === "A") { + symbol = "B"; + } else if (symbol === "B") { + symbol - "A"; + } + } + var error = false switch(symbol){ diff --git a/public/src/js/songselect.js b/public/src/js/songselect.js index 08a306b..2696f89 100644 --- a/public/src/js/songselect.js +++ b/public/src/js/songselect.js @@ -250,6 +250,12 @@ class SongSelect{ action: "doron", }); + this.songs.push({ + title: "あべこべ", + skin: this.songSkin.customSettings, + action: "abekobe", + }); + this.songs.push({ title: strings.back, skin: this.songSkin.back, @@ -941,6 +947,20 @@ class SongSelect{ } localStorage.setItem("doron", doron); }, 100); + } else if (currentSong.action === "abekobe") { + this.playSound("se_don"); + setTimeout(() => { + let abekobe = localStorage.getItem("abekobe") ?? "false"; + const input = prompt("あべこべを有効にするには\"true\"を入力してね!", abekobe); + if (input === null) { + // キャンセル + } else if (input === "") { + input = "false"; + } else { + abekobe = input; + } + localStorage.setItem("abekobe", abekobe); + }, 100); } } this.pointer(false) diff --git a/public/src/js/view.js b/public/src/js/view.js index 582ecf5..baa29d1 100644 --- a/public/src/js/view.js +++ b/public/src/js/view.js @@ -1708,7 +1708,7 @@ const doron = localStorage.getItem("doron") ?? "false"; - if((!fade || fade < 1) && doron === "false"){ + if((!fade || fade < 1) && doron !== "true"){ // Main circle ctx.fillStyle = fill ctx.beginPath()