Repository navigation
Hide a disguised Ditto's shiny state in save snapshots - #420
Merged
Merged
Conversation
chattymin
pushed a commit
to Borisserz/PokeTokenBar
that referenced
this pull request
Oct 5, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Fixes #419. The snapshot list in Settings drew a disguised shiny Ditto as a shiny sprite of its disguise species, which spoiled the reveal.
SaveSnapshotManagerread the rawactive.isShinyin all three snapshot paths: create, list for envelope files, and list for legacy raw-state files. Every other display path hides it untildittoRevealed.The hiding rule now lives in one place,
MonState.displaysShiny.CompanionStore.currentIsShiny,CompanionState.ownsShinySpeciesand the three snapshot paths all use it, so no display path can reimplement it differently. Graduation keeps storing the rawisShinyinDexEntry, because that is stored data, not display.Type of change
UI changes
Validation
SaveSnapshotTests.testSnapshotDoesNotRevealShinyOfDisguisedDittocovers the create path, the envelope listing and a legacy raw-state file, plus a revealed Ditto that must show as shiny. On unfixedmainit fails with 4 failures.swift test: 1385 tests, 0 failures (17 skipped, as onmain). The existing Ditto hiding tests (testReleasingDisguisedDittoKeepsShinyHiddenand others) still pass after the refactor.isShinyread inSources: the remaining ones are storage (graduate) or run after the reveal (revealDittocelebration), so they are correct.Checklist
swift buildandswift testpass locally