kuhrusty / MorbadScorepad

DUNGEON DEGENERATES support app.
GNU General Public License v3.0
7 stars 0 forks source link

DangerDeckActivity: reload Danger deck on prefs change #20

Closed kuhrusty closed 5 years ago

kuhrusty commented 5 years ago

Because the preferences can now affect the set of cards in the Danger deck (because the Mean Streets expansion adds some), we should attempt to reload the deck state in checkPrefs().

This is sort of a separate issue, but we should also do a better job of loading a saved DeckState when the set of cards in the underlying Deck has changed. I think right now, if we detect a change in the number of cards, we throw our hands up & say we can't load the deck; instead, we should probably add new cards to the discard pile, and delete cards which no longer exist. (Oh, but, it may be that our undo log is screwed up anyway if it contains references to cards which no longer exist... maybe we leave this broken for now.)

kuhrusty commented 5 years ago

This is sort of a separate issue, but we should also do a better job of loading a saved DeckState when the set of cards in the underlying Deck has changed. I think right now, if we detect a change in the number of cards, we throw our hands up & say we can't load the deck; instead, we should probably add new cards to the discard pile, and delete cards which no longer exist. (Oh, but, it may be that our undo log is screwed up anyway if it contains references to cards which no longer exist... maybe we leave this broken for now.)

Closing, although I didn't do this part. The main thing is that the new cards get picked up.