Some bug fixes
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user