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,17 +232,28 @@ 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 self.pp > personalBest["pp"]: if b.rankedStatus == rankedStatus.RANKED:
# New best score if self.pp > personalBest["pp"]:
self.completed = 3 # New best score
self.rankedScoreIncrease = self.score-personalBest["score"] self.completed = 3
self.oldPersonalBest = personalBest["id"] self.rankedScoreIncrease = self.score-personalBest["score"]
else: self.oldPersonalBest = personalBest["id"]
self.completed = 2 else:
self.rankedScoreIncrease = 0 self.completed = 2
self.oldPersonalBest = 0 self.rankedScoreIncrease = 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,17 +231,28 @@ 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 self.pp > personalBest["pp"]: if b.rankedStatus == rankedStatus.RANKED:
# New best score if self.pp > personalBest["pp"]:
self.completed = 3 # New best score
self.rankedScoreIncrease = self.score-personalBest["score"] self.completed = 3
self.oldPersonalBest = personalBest["id"] self.rankedScoreIncrease = self.score-personalBest["score"]
else: self.oldPersonalBest = personalBest["id"]
self.completed = 2 else:
self.rankedScoreIncrease = 0 self.completed = 2
self.oldPersonalBest = 0 self.rankedScoreIncrease = 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):
""" """