Fixed the duplicate scoretab entries issue

main
unfa 2021-09-26 01:52:03 +02:00
parent b936750afa
commit 25f5fbc1e9
1 changed files with 5 additions and 1 deletions

View File

@ -24,10 +24,14 @@ func update_scoretab():
scores.sort()
scores.reverse()
var done = []
for i in scores:
for j in main.player_list.players.keys():
if main.player_list.get(j).score == i:
$ScoreTable/VBoxContainer/ScoreTab.text += str(i) + " - " + main.player_list.get(j).name + "\n"
if j not in done:
$ScoreTable/VBoxContainer/ScoreTab.text += str(i) + " - " + main.player_list.get(j).name + "\n"
done.append(j)
func scoretab(show: bool, winner = null):
if show: