Fix loved maps overwrite on both regular and relax; comment out log for completed statuses

This commit is contained in:
Josh Smith 2019-02-18 06:57:28 -05:00
parent d26270ed73
commit 6df638449f
2 changed files with 42 additions and 20 deletions

View File

@ -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):
""" """

View File

@ -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):
""" """