Slight time score bug fixes.
This commit is contained in:
+6
-3
@@ -79,9 +79,12 @@ async def submit_score(
|
|||||||
# create score tuple for either time or int
|
# create score tuple for either time or int
|
||||||
# define sort index
|
# define sort index
|
||||||
if highscores_config["categories"][category]["is_time_record"]:
|
if highscores_config["categories"][category]["is_time_record"]:
|
||||||
minutes = score.split(":")[0]
|
if score.find(":") == -1:
|
||||||
seconds = score.split(":")[1]
|
score_seconds = float(score)
|
||||||
score_seconds = int(minutes) * 60 + int(seconds)
|
else:
|
||||||
|
minutes = score.split(":")[0]
|
||||||
|
seconds = score.split(":")[1]
|
||||||
|
score_seconds = int(minutes) * 60 + float(seconds)
|
||||||
score_tuple = (user, score, score_seconds)
|
score_tuple = (user, score, score_seconds)
|
||||||
sort_index = 2
|
sort_index = 2
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user