mirror of
https://github.com/yuukiwww/taiko-web.git
synced 2024-10-22 17:05:49 +02:00
[PATCH] Add Easier Big Notes setting
This commit is contained in:
parent
2ab0de9644
commit
3097dd3736
@ -60,7 +60,11 @@ class Controller{
|
||||
this.view = new View(this)
|
||||
this.mekadon = new Mekadon(this, this.game)
|
||||
this.keyboard = new GameInput(this)
|
||||
this.TaikoForceLv5 = this.keyboard.keyboard.TaikoForceLv5 && !autoPlayEnabled && (this.multiplayer !== 2);
|
||||
if(!autoPlayEnabled && this.multiplayer !== 2){
|
||||
this.easierBigNotes = settings.getItem("easierBigNotes") || this.keyboard.keyboard.TaikoForceLv5
|
||||
}else{
|
||||
this.easierBigNotes = false
|
||||
}
|
||||
|
||||
this.drumSounds = settings.getItem("latency").drumSounds
|
||||
this.playedSounds = {}
|
||||
|
@ -31,6 +31,7 @@ class Game{
|
||||
this.branchNames = ["normal", "advanced", "master"]
|
||||
this.resetSection()
|
||||
this.gameLagSync = !this.controller.touchEnabled && !(/Firefox/.test(navigator.userAgent))
|
||||
this.lastPressedKeys = [false, false, false, false]
|
||||
|
||||
assets.songs.forEach(song => {
|
||||
if(song.id == selectedSong.folder){
|
||||
@ -264,6 +265,11 @@ class Game{
|
||||
var don_r = keys["don_r"] && !this.controller.isWaiting("don_r", "score")
|
||||
var ka_l = keys["ka_l"] && !this.controller.isWaiting("ka_l", "score")
|
||||
var ka_r = keys["ka_r"] && !this.controller.isWaiting("ka_r", "score")
|
||||
if(don_l || don_r || ka_l || ka_r){
|
||||
this.lastPressedKeys = [don_l, don_r, ka_l, ka_r]
|
||||
}else{
|
||||
[don_l, don_r, ka_l, ka_r] = this.lastPressedKeys
|
||||
}
|
||||
|
||||
var checkDon = () => {
|
||||
if(don_l && don_r){
|
||||
@ -330,10 +336,11 @@ class Game{
|
||||
}
|
||||
var score = 0
|
||||
if(keysDon && typeDon || keysKa && typeKa){
|
||||
if (typeDai && !keyDai) {
|
||||
if (this.controller.TaikoForceLv5) { // Taiko Force Lv5 can't hit both Dons at the same time, so dai offered
|
||||
keyDai = true;
|
||||
} else if(!circle.daiFailed){
|
||||
if(typeDai && !keyDai){
|
||||
if(this.controller.easierBigNotes){
|
||||
// Taiko Force Lv5 can't hit both Dons at the same time, so dai offered
|
||||
keyDai = true
|
||||
}else if(!circle.daiFailed){
|
||||
circle.daiFailed = ms
|
||||
return false
|
||||
}else if(ms < circle.daiFailed + this.rules.daiLeniency){
|
||||
|
@ -19,14 +19,13 @@ class Keyboard{
|
||||
pageEvents.keyAdd(this, "all", "both", this.keyEvent.bind(this))
|
||||
pageEvents.blurAdd(this, this.blurEvent.bind(this))
|
||||
}
|
||||
isTaikoForceLv5(kbdSettings) { // the key of Taiko Force Lv5's PC module looks like this
|
||||
//console.log(kbdSettings);
|
||||
isTaikoForceLv5(kbdSettings){
|
||||
// the key of Taiko Force Lv5's PC module looks like this
|
||||
return (kbdSettings.ka_l[0] === "f") && (kbdSettings.ka_r[0] === "e") && (kbdSettings.don_l[0] === "i") && (kbdSettings.don_r[0] === "j");
|
||||
}
|
||||
update(){
|
||||
var kbdSettings = settings.getItem("keyboardSettings")
|
||||
this.TaikoForceLv5 = this.isTaikoForceLv5(kbdSettings);
|
||||
//console.log("Taiko Force Lv5", this.TaikoForceLv5);
|
||||
this.TaikoForceLv5 = this.isTaikoForceLv5(kbdSettings)
|
||||
var drumKeys = {}
|
||||
for(var name in kbdSettings){
|
||||
var keys = kbdSettings[name]
|
||||
|
@ -46,6 +46,10 @@ class Settings{
|
||||
"video": 0,
|
||||
"drumSounds": true
|
||||
}
|
||||
},
|
||||
easierBigNotes: {
|
||||
type: "toggle",
|
||||
default: false
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -151,6 +151,9 @@
|
||||
video: "Video",
|
||||
drumSounds: "Drum Sounds"
|
||||
},
|
||||
easierBigNotes: {
|
||||
name: "大きな音符を簡単にする"
|
||||
},
|
||||
on: "オン",
|
||||
off: "オフ",
|
||||
default: "既定値にリセット",
|
||||
@ -343,6 +346,9 @@ function StringsEn(){
|
||||
video: "Video",
|
||||
drumSounds: "Drum Sounds"
|
||||
},
|
||||
easierBigNotes: {
|
||||
name: "Easier Big Notes"
|
||||
},
|
||||
on: "On",
|
||||
off: "Off",
|
||||
default: "Reset to Defaults",
|
||||
@ -535,6 +541,9 @@ function StringsCn(){
|
||||
video: "Video",
|
||||
drumSounds: "Drum Sounds"
|
||||
},
|
||||
easierBigNotes: {
|
||||
name: "使大音符变得容易"
|
||||
},
|
||||
on: "开",
|
||||
off: "关",
|
||||
default: "重置为默认值",
|
||||
@ -727,6 +736,9 @@ function StringsTw(){
|
||||
video: "Video",
|
||||
drumSounds: "Drum Sounds"
|
||||
},
|
||||
easierBigNotes: {
|
||||
name: "使大音符變得容易"
|
||||
},
|
||||
on: "開",
|
||||
off: "關",
|
||||
default: "重置為默認值",
|
||||
@ -919,6 +931,9 @@ function StringsKo(){
|
||||
video: "Video",
|
||||
drumSounds: "Drum Sounds"
|
||||
},
|
||||
easierBigNotes: {
|
||||
name: "쉬운 큰 음표"
|
||||
},
|
||||
on: "온",
|
||||
off: "오프",
|
||||
default: "기본값으로 재설정",
|
||||
|
Loading…
Reference in New Issue
Block a user