Fix loved maps overwrite on both regular and relax; comment out log for completed statuses
This commit is contained in:
parent
d26270ed73
commit
6df638449f
|
@ -232,6 +232,7 @@ class score:
|
||||||
self.oldPersonalBest = 0
|
self.oldPersonalBest = 0
|
||||||
else:
|
else:
|
||||||
# Compare personal best's score with current score
|
# Compare personal best's score with current score
|
||||||
|
if b.rankedStatus == rankedStatus.RANKED:
|
||||||
if self.pp > personalBest["pp"]:
|
if self.pp > personalBest["pp"]:
|
||||||
# New best score
|
# New best score
|
||||||
self.completed = 3
|
self.completed = 3
|
||||||
|
@ -241,8 +242,18 @@ class score:
|
||||||
self.completed = 2
|
self.completed = 2
|
||||||
self.rankedScoreIncrease = 0
|
self.rankedScoreIncrease = 0
|
||||||
self.oldPersonalBest = 0
|
self.oldPersonalBest = 0
|
||||||
|
elif b.rankedStatus == rankedStatus.LOVED:
|
||||||
|
if self.score > personalBest["score"]:
|
||||||
|
# New best score
|
||||||
|
self.completed = 3
|
||||||
|
self.rankedScoreIncrease = self.score-personalBest["score"]
|
||||||
|
self.oldPersonalBest = personalBest["id"]
|
||||||
|
else:
|
||||||
|
self.completed = 2
|
||||||
|
self.rankedScoreIncrease = 0
|
||||||
|
self.oldPersonalBest = 0
|
||||||
|
|
||||||
log.info("Completed status: {}".format(self.completed))
|
#log.info("Completed status: {}".format(self.completed))
|
||||||
|
|
||||||
def saveScoreInDB(self):
|
def saveScoreInDB(self):
|
||||||
"""
|
"""
|
||||||
|
|
|
@ -231,6 +231,7 @@ class score:
|
||||||
self.oldPersonalBest = 0
|
self.oldPersonalBest = 0
|
||||||
else:
|
else:
|
||||||
# Compare personal best's score with current score
|
# Compare personal best's score with current score
|
||||||
|
if b.rankedStatus == rankedStatus.RANKED:
|
||||||
if self.pp > personalBest["pp"]:
|
if self.pp > personalBest["pp"]:
|
||||||
# New best score
|
# New best score
|
||||||
self.completed = 3
|
self.completed = 3
|
||||||
|
@ -240,8 +241,18 @@ class score:
|
||||||
self.completed = 2
|
self.completed = 2
|
||||||
self.rankedScoreIncrease = 0
|
self.rankedScoreIncrease = 0
|
||||||
self.oldPersonalBest = 0
|
self.oldPersonalBest = 0
|
||||||
|
elif b.rankedStatus == rankedStatus.LOVED:
|
||||||
|
if self.score > personalBest["score"]:
|
||||||
|
# New best score
|
||||||
|
self.completed = 3
|
||||||
|
self.rankedScoreIncrease = self.score-personalBest["score"]
|
||||||
|
self.oldPersonalBest = personalBest["id"]
|
||||||
|
else:
|
||||||
|
self.completed = 2
|
||||||
|
self.rankedScoreIncrease = 0
|
||||||
|
self.oldPersonalBest = 0
|
||||||
|
|
||||||
log.info("Completed status: {}".format(self.completed))
|
#log.info("Completed status: {}".format(self.completed))
|
||||||
|
|
||||||
def saveScoreInDB(self):
|
def saveScoreInDB(self):
|
||||||
"""
|
"""
|
||||||
|
|
Reference in New Issue
Block a user