Save fullscreen and read server, password and debug from config.ini
The settings the game saves itself, the quiz settings and now fullscreen, move to settings.cfg (settings_debug.cfg in debug mode). config.ini in the same folder is edited by hand: the server to start with, the API password and debug mode. The game writes it with everything commented out when it is missing and never changes it after that. IniFile reads it: plain key = value lines, whole-line # or ; comments and optional quotes.
This commit is contained in:
1 parent
92e3a66075
commit
d21b3e2ce0
13 files changed
+491
-163
No files matched your search
@@ -174,6 +174,6 @@ func test_changes_are_saved_at_once() -> void:
|
||||
_card.lower_winning_score_button.pressed.emit()
|
||||
|
||||
var saved: ConfigFile = ConfigFile.new()
|
||||
assert_int(saved.load(Settings.quiz_settings_path())).is_equal(OK)
|
||||
assert_int(saved.load(Settings.saved_settings_path())).is_equal(OK)
|
||||
assert_bool(saved.get_value("quiz", "hide_next_track")).is_false()
|
||||
assert_int(saved.get_value("quiz", "winning_score")).is_equal(19)
|
||||
@@ -35,10 +35,10 @@ func test_statistics_settings_are_not_saved_with_the_quiz_settings() -> void:
|
||||
Settings.add_to_stats = false
|
||||
Settings.use_low_played_mode = true
|
||||
|
||||
Settings.save_quiz_settings()
|
||||
Settings.save_settings()
|
||||
|
||||
var saved: ConfigFile = ConfigFile.new()
|
||||
assert_int(saved.load(Settings.quiz_settings_path())).is_equal(OK)
|
||||
assert_int(saved.load(Settings.saved_settings_path())).is_equal(OK)
|
||||
assert_bool(saved.has_section_key("quiz", "add_to_stats")).is_false()
|
||||
assert_bool(saved.has_section_key("quiz", "use_low_played_mode")).is_false()
|
||||
|
||||
|
||||
Reference in new issue
Block a user