Skip to content

Save unloaded signal #128

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

Merged
merged 3 commits into from
Jul 13, 2025
Merged

Save unloaded signal #128

merged 3 commits into from
Jul 13, 2025

Conversation

tudddorrr
Copy link
Contributor

No description provided.

@tudddorrr tudddorrr added the enhancement New feature or request label Jul 12, 2025
@tudddorrr
Copy link
Contributor Author

@CodiumAI-Agent /review

@CodiumAI-Agent
Copy link

CodiumAI-Agent commented Jul 13, 2025

PR Reviewer Guide 🔍

(Review updated until commit 979298d)

Here are some key observations to aid the review process:

⏱️ Estimated effort to review: 3 🔵🔵🔵⚪⚪
🧪 No relevant tests
🔒 No security concerns identified
⚡ Recommended focus areas for review

Null Safety

Validate that the current property exists and is not null before emitting save_unloaded, and ensure the unload logic order (event emit vs unload) doesn’t lead to inconsistent state.

func unload_current_save() -> void:
	if current:
		save_unloaded.emit(current)

	_saves_manager.unload_current_save()
File Path Safety

DirAccess.remove_absolute uses an absolute path on res://; verify this file removal works at runtime and consider using user:// or proper project path resolution to avoid permission issues.

func _clear_username() -> void:
	DirAccess.remove_absolute(_username_file_path)
Loader Sync

Ensure _match_loadables correctly synchronizes saved objects and loadables on save loading and unloading, and check for potential edge cases when clearing and re-registering loadables.

	_match_loadables(save)

func _match_loadables(save: TaloGameSave) -> void:
	for object in save.content.get("objects", []):
		var saved_object := TaloSavedObject.new(object)
		_saved_objects.set(object.id, saved_object)

@tudddorrr tudddorrr force-pushed the save-unloaded-signal branch from 5808941 to 979298d Compare July 13, 2025 00:10
@tudddorrr tudddorrr merged commit 6cfa92e into develop Jul 13, 2025
4 checks passed
@tudddorrr tudddorrr deleted the save-unloaded-signal branch July 13, 2025 00:12
@CodiumAI-Agent
Copy link

Persistent review updated to latest commit 979298d

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants