-
Notifications
You must be signed in to change notification settings - Fork 0
Refactor: Replace deprecated % string formatting in game_state.gd print statements #304
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -84,7 +84,7 @@ func load_game(path: String = "") -> Dictionary: | |
| # Validate schema before migration | ||
| var validation_result := validate_save_schema(parsed) | ||
| if not validation_result.valid: | ||
| print("SAVE_SCHEMA_VALIDATION_ERROR: %s" % validation_result.reason) | ||
| print("SAVE_SCHEMA_VALIDATION_ERROR: ", validation_result.reason) | ||
| return {} | ||
|
|
||
| var migrated := migrate_save(parsed) | ||
|
|
@@ -407,7 +407,7 @@ func migrate_save(data: Dictionary) -> Dictionary: | |
|
|
||
| # Reject unknown or future versions explicitly | ||
| if save_version > SAVE_VERSION: | ||
| print("SAVE_MIGRATION_ERROR: unknown future version %d (expected <=%d)" % [save_version, SAVE_VERSION]) | ||
| print("SAVE_MIGRATION_ERROR: unknown future version ", save_version, " (expected <=", SAVE_VERSION, ")") | ||
| return {} | ||
|
|
||
| # Version 0: treat as invalid/unsupported | ||
|
|
@@ -425,7 +425,7 @@ func migrate_save(data: Dictionary) -> Dictionary: | |
| return data | ||
|
|
||
| # Fallback: should not reach here, but handle defensively | ||
| print("SAVE_MIGRATION_ERROR: unhandled save version %d" % save_version) | ||
| print("SAVE_MIGRATION_ERROR: unhandled save version ", save_version) | ||
| return {} | ||
|
|
||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🛑 Blocker (bug): Indentation error: extra leading whitespace (8 tabs) before the unhandled-save-version print() call. This will cause a GDScript parse/syntax error and is the likely cause of CI failures. Automated finding from AI PR review. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Still open after this push; carried forward. (as of b9a097d) |
||
| func migrate_v1_to_v2(data: Dictionary) -> Dictionary: | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🛑 Blocker (bug): String placeholder {save_version} is printed literally instead of being substituted with the save_version value. Same interpolation bug as line 410.
Automated finding from AI PR review.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Still open after this push; carried forward. (as of f6f6382)