mirror of
https://github.com/HarmonyHoney/tiny_crate.git
synced 2026-01-23 02:34:53 +00:00
Limit leaderboard scores to 10 !
This commit is contained in:
parent
620d384c5a
commit
d5bc068952
1 changed files with 5 additions and 0 deletions
|
|
@ -178,6 +178,7 @@ func new_score(arg1 = null, arg2 = null, arg3 = null):
|
|||
func write_score():
|
||||
var map_name = current_map + ("-note" if show_score == 2 else "")
|
||||
var t = ""
|
||||
var count = 0
|
||||
if Leaderboard.is_online:
|
||||
if Leaderboard.scores.has(map_name):
|
||||
var s = Leaderboard.scores[map_name]
|
||||
|
|
@ -186,6 +187,8 @@ func write_score():
|
|||
else:
|
||||
for i in s:
|
||||
t += time_to_string(-int(i["score"])) + " " + str(i["player_name"]) + "\n"
|
||||
count += 1
|
||||
if count > 9 : break
|
||||
else:
|
||||
t = "LOADING..."
|
||||
else:
|
||||
|
|
@ -193,6 +196,8 @@ func write_score():
|
|||
for i in Shared.replays[map_name]:
|
||||
if i.has("frames"):
|
||||
t += time_to_string(int(i["frames"])) + "\n"
|
||||
count += 1
|
||||
if count > 9 : break
|
||||
else:
|
||||
t = "NO DATA!"
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue