Show a graph of the game on the Winner popup
The Winner popup now shows every player's score after each song as a step line, with the winning score marked, and three facts under it: the longest streak, the longest standstill and the song most players scored on. The data comes from the points each song already records, through the new ScoreHistory. The popup grows to 1600x920 with the graph across the full width, so a 60-song game with five players stays readable. Reset points now starts a new game: it clears the points on the songs and the graph starts after the song that was playing. Songs already on the server at startup count as an earlier game. The screenshot tour has a long five-player game, and only the Winner popup differs from before.
This commit is contained in:
1 parent
b40b160fde
commit
e1e05f3904
21 files changed
+2461
-182
No files matched your search
@@ -11,6 +11,9 @@ var first_song_downloaded: bool = false
|
||||
var first_song_played: bool = false
|
||||
var number_of_tracks_to_preload: int = 1
|
||||
var is_song_downloading: bool = false
|
||||
## The first song of the current game. Songs before it belong to earlier games, which
|
||||
## ended with Reset points.
|
||||
var game_start_song: int = 0
|
||||
|
||||
|
||||
func get_next_song() -> SongObject:
|
||||
@@ -68,6 +71,7 @@ func get_playlist() -> Array[SongObject]:
|
||||
func reset_playlist() -> void:
|
||||
currently_playing_song = -1
|
||||
latest_played_song = 0
|
||||
game_start_song = 0
|
||||
clear_song_list()
|
||||
|
||||
|
||||
@@ -100,6 +104,12 @@ func remove_point(player_id: String) -> void:
|
||||
song_object_array[currently_playing_song].remove_point(player_id)
|
||||
|
||||
|
||||
## Removes every player's points from every song, for a new game.
|
||||
func clear_points() -> void:
|
||||
for song_object: SongObject in song_object_array:
|
||||
song_object.players_given_point.clear()
|
||||
|
||||
|
||||
## Removes a player's points from every song.
|
||||
func remove_player_from_list(player_id: String) -> void:
|
||||
for song_object: SongObject in song_object_array:
|
||||
|
||||
Reference in new issue
Block a user