Skip to content
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

Single stage init for MapViewState game loading #1648

Open
DanRStevens opened this issue Feb 27, 2025 · 0 comments
Open

Single stage init for MapViewState game loading #1648

DanRStevens opened this issue Feb 27, 2025 · 0 comments

Comments

@DanRStevens
Copy link
Member

Currently MapViewState has a constructor overload taking a saved game name, which it stores locally, and then completes the load later during initialize. We should instead use single stage initialization, where the full load is done by the time the constructor completes, and if there was any error loading, it should throw from the constructor, preventing object instantiation. This prevents creating zombie objects which exist, and can have methods called, but don't really work because they're in some kind of failed state.

Related:

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

No branches or pull requests

1 participant