mirror of
https://github.com/deunix-educ/aventuriers-des-mots.git
synced 2026-11-26 21:29:42 +01:00
Read corrupted save and settings files without engine error logs
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -70,7 +70,9 @@ func load_from_disk() -> void:
|
||||
if FileAccess.file_exists(SETTINGS_PATH):
|
||||
var file := FileAccess.open(SETTINGS_PATH, FileAccess.READ)
|
||||
if file != null:
|
||||
raw = JSON.parse_string(file.get_as_text())
|
||||
var json := JSON.new()
|
||||
if json.parse(file.get_as_text()) == OK:
|
||||
raw = json.data
|
||||
var clean := AppSettings.sanitize(raw)
|
||||
volume = clean["volume"]
|
||||
music_volume = clean["music_volume"]
|
||||
|
||||
Reference in New Issue
Block a user