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

Fix Crashes when Sprites for Pokémon are missing #1021

Merged
merged 2 commits into from
May 18, 2024

Conversation

bennybroseph
Copy link
Collaborator

Fixes an issue where a missing sprite will cause the game to crash instead of using the base sprite or the Substitute sprite.

Failsafes were already in place to load these backups, this code just allows a graceful fail and a simple error message instead of a crash.

Back sprites are missing but regular sprites can be used instead

Error.404.mp4

Sprites are completely missing for a Pokmeon

Missing.Images.mp4

Fixes an issue where a missing sprite will cause the game to crash instead of using the base sprite or the Substitute sprite.

Failsafes were already in place to load these backups, this code just allows a graceful fail and a simple error message instead of a crash.
@bennybroseph bennybroseph added the Bug Something isn't working label May 17, 2024
Copy link
Contributor

@torranx torranx left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm!

src/field/pokemon.ts Outdated Show resolved Hide resolved
@Madmadness65 Madmadness65 merged commit 6dc10f5 into pagefaultgames:main May 18, 2024
1 check passed
@bennybroseph bennybroseph deleted the PokemonSprite-Fix branch May 19, 2024 11:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants