ScoreStorage: Use hashes instead of song titles

This commit is contained in:
LoveEevee
2020-03-07 04:48:30 +03:00
parent 0221c977c8
commit 1759772831
8 changed files with 150 additions and 84 deletions

View File

@@ -204,9 +204,21 @@ class Loader{
}
settings = new Settings()
scoreStorage = new ScoreStorage()
pageEvents.setKbd()
scoreStorage = new ScoreStorage()
for(var i in assets.songsDefault){
var song = assets.songsDefault[i]
if(!song.hash){
song.hash = song.title
}
scoreStorage.songTitles[song.title] = song.hash
var score = scoreStorage.get(song.hash)
if(score){
score.title = song.title
}
}
Promise.all(this.promises).then(() => {
this.canvasTest.drawAllImages().then(result => {
perf.allImg = result