Settings has a Music folder row. A folder with subfolders is played as soundtracks: Next picks a random subfolder and a random song in it, the subfolder is the answer's soundtrack and the file name without its type the song. The inspiration list and Search show the subfolders. A folder with songs and no subfolders is a prepared quiz, played once in order (natural sort) or at random, showing only the song title. It has no winning score: after the last song Next becomes Show winner, and the players with the most points win, ties included. While a folder is used nothing but the characters is asked from the server: Sync, QR, Statistics, the update check and play counting are off. Characters fall back to the cached pictures when the server can't be reached. mp3, ogg and wav play; other files and broken ones are skipped. The old local playback code, the hidden Open button and the hidden Local toggle are removed. Next now waits for the song to start before preparing the next one.
103 lines
4.4 KiB
GDScript
103 lines
4.4 KiB
GDScript
class_name AboutPopup
|
|
extends BasePopup
|
|
## Shows the game's and the server's version, and what is new in each of their versions,
|
|
## side by side.
|
|
|
|
## What is new in each version, newest first.
|
|
const WHATS_NEW: Dictionary = {
|
|
"2.0.0": "Reworked all popups, they dim the background and close when clicking outside
|
|
Fixed blurry text and the layout of the player list
|
|
Moved Sync to the top row and Settings next to the reset buttons
|
|
The inspiration and sync lists now show where each item starts
|
|
The sync result now looks right with any number of columns
|
|
Failed song downloads are now retried instead of getting stuck
|
|
The game no longer waits forever when the server does not answer
|
|
The song cache now fills up to the cache size in the settings
|
|
Statistics are turned back on when a new game starts
|
|
Fixed bugs with low winning scores and Show answer before a song is playing
|
|
The log now shows the time on every row
|
|
New app icon and a menu entry on Linux
|
|
Reorganized the code and added automated tests",
|
|
"1.9.0": "Made improvements to the Search window
|
|
Made small changes to the inspiration list scrolling
|
|
Made small changes to the player list
|
|
Changed the term game to soundtrack
|
|
#28: Made changes to the sync window
|
|
#34: Fixed bug in Character Select when clicking or scrolling",
|
|
"1.8.5": "#9: New winner screen with positions of all players
|
|
#32: New setting for how long to hide the beginning
|
|
#33: Fixed bug with hiding beginning when song restarts",
|
|
"1.8.0": "#14: Updated About page
|
|
#15: Create new keymap page
|
|
#20: The winner song can now be stopped
|
|
#24: The speed of the inspiration list can now be changed
|
|
#29: New settings to hide time left and things like that
|
|
#31: Added a QR page",
|
|
"1.7.0": "#22: Now block add player if player name is empty
|
|
#23: Add a log for when points are given to players
|
|
#25: Fixed some graphical stuff
|
|
#26: Changed so the same character can be on a song multiple times
|
|
#27: Turning off statistics after win",
|
|
"1.6.1": "#17: Removed Debug text in release
|
|
#18: Fixed bug with new character select screen",
|
|
"1.6.0": "#1: Fixed bug with inspiration list not reloading after sync
|
|
#2: New dialog for sync
|
|
#4: Now downloads characters from the server
|
|
#5: New character select screen
|
|
#6: Now show progress during sync
|
|
#7: Blocking all requests to the server during sync
|
|
#8: Added functionality to cache more than one song",
|
|
"1.5.0": "Made big changes to players and the song list and how the local song list works",
|
|
"0.9.0-Beta": "Fixed settings and updated the player view",
|
|
"0.8.0-Beta": "Fixed reset buttons and some other small things",
|
|
"0.7.8-Beta": "Added shortcuts. Added dialog for winner. Started cleaning code.",
|
|
"0.7.5-Beta": "Added settings menu, most things don't do anything yet",
|
|
"0.7-Beta": "Can now hop between songs"
|
|
}
|
|
|
|
@onready var about_panel: Panel = %AboutPanel
|
|
@onready var version_label: Label = %VersionLabel
|
|
@onready var whats_new_label: Label = %WhatsNewLabel
|
|
@onready var server_version_label: Label = %ServerVersionLabel
|
|
@onready var server_history_label: Label = %ServerHistoryLabel
|
|
|
|
|
|
func open() -> void:
|
|
super()
|
|
version_label.text = Settings.version
|
|
var entries: Array = []
|
|
for version: String in WHATS_NEW.keys():
|
|
entries.append([version, [WHATS_NEW[version]]])
|
|
whats_new_label.text = changelog_text(entries)
|
|
|
|
# Asked every time, as another server can be picked in the settings
|
|
server_history_label.text = ""
|
|
if Settings.is_offline():
|
|
server_version_label.text = "Not connected, playing from a music folder"
|
|
return
|
|
server_version_label.text = "Loading…"
|
|
MusicServerClient.fetch_version_history(_show_server_history, _show_server_history_failed)
|
|
|
|
|
|
## The changelog text for [param entries], each a [code][version, lines][/code] pair, newest
|
|
## first: every version on its own line, followed by its lines, with an empty line
|
|
## between versions.
|
|
static func changelog_text(entries: Array) -> String:
|
|
var versions: PackedStringArray = []
|
|
for entry: Array in entries:
|
|
versions.append(entry[0] + "\n" + "\n".join(entry[1]))
|
|
return "\n\n".join(versions)
|
|
|
|
|
|
func _show_server_history(history: Array[VersionData]) -> void:
|
|
server_version_label.text = history[0].version if !history.is_empty() else ""
|
|
var entries: Array = []
|
|
for version: VersionData in history:
|
|
entries.append([version.version, version.changelog])
|
|
server_history_label.text = changelog_text(entries)
|
|
|
|
|
|
func _show_server_history_failed() -> void:
|
|
server_version_label.text = "Could not reach the server"
|
|
server_history_label.text = ""
|