Some bug fixes

This commit is contained in:
LoveEevee
2020-03-13 08:32:53 +03:00
parent 929471698f
commit ad62ac800c
5 changed files with 86 additions and 41 deletions

View File

@@ -9,7 +9,7 @@ class ScoreStorage{
load(strings){
this.scores = {}
if(strings){
this.scoreStrings = strings
this.scoreStrings = this.prepareStrings(strings)
}else if(account.loggedIn){
return
}else{
@@ -58,6 +58,13 @@ class ScoreStorage{
}
return output
}
prepareStrings(scores){
var output = {}
for(var k in scores){
output[scores[k].hash] = scores[k].score
}
return output
}
save(localOnly){
for(var hash in this.scores){
this.writeString(hash)