Changed look of song loading, fix custom game assets and song skins, fix auth error

- Change the way a selected song appears while it is loading the metadata
- Fix custom taikowebskin
- Fix importing custom game assets (local only)
- Get the oauth token again on auth error
This commit is contained in:
LoveEevee
2020-10-31 14:47:42 +03:00
parent c5ce5104f1
commit 180ec58adb
10 changed files with 103 additions and 59 deletions

View File

@@ -40,12 +40,12 @@ class Controller{
this.parsedSongData = new ParseOsu(songData, selectedSong.difficulty, selectedSong.stars, selectedSong.offset)
}
this.offset = this.parsedSongData.soundOffset
var maxCombo = this.parsedSongData.circles.filter(circle => ["don", "ka", "daiDon", "daiKa"].indexOf(circle.type) > -1 && (!circle.branch || circle.branch.name == "master")).length
if (maxCombo >= 50) {
var comboVoices = ["v_combo_50"].concat([...Array(Math.floor(maxCombo/100)).keys()].map(i => "v_combo_" + (i + 1)*100))
var comboVoices = ["v_combo_50"].concat(Array.from(Array(Math.min(50, Math.floor(maxCombo / 100))), (d, i) => "v_combo_" + ((i + 1) * 100)))
var promises = []
comboVoices.forEach(name => {
if (!assets.sounds[name + "_p1"]) {
promises.push(loader.loadSound(name + ".wav", snd.sfxGain).then(sound => {
@@ -54,7 +54,7 @@ class Controller{
}))
}
})
Promise.all(promises)
}