Tie equipment loadouts to active deck#9599
Tie equipment loadouts to active deck#9599vanja-ivancevic wants to merge 3 commits intoCard-Forge:masterfrom
Conversation
f0b8cad to
e2e7781
Compare
|
Seems like the kind of feature that should have to be enabled by a setting. There are users who keep 10+ decks, and if one of those people gets a better set of boots, it'll be a bit annoying having to go through and update the loadout for each of them. Having it default to off would also ensure the user understands that equipment is now tied to their active deck. Otherwise I suspect we'd encounter plenty of users that load up a game, switch decks, wander into battle without realizing all their equipment fell off, then file a bug report because they don't understand why it happened. |
|
Great point! I will update it as a setting, default "off". |
|
This PR has not been updated in a while nad has been marked on stale. Stale PRs will be auto closed |
|
Hey, any chance we could revisit this? Thanks a lot :) |
|
Got a merge conflict to resolve. Should it clear the stored loadout when the corresponding deck is deleted? Or copy it when a deck is copied? |
Equipment is now automatically saved/restored when switching decks. Each deck remembers its own equipment configuration. - Add deckLoadouts HashMap to store per-deck equipment - Save/restore loadouts on deck switch in setSelectedDeckSlot() - Persist loadouts in save/load methods - Backward compatible with existing saves
Use ArrayList instead of HashMap for deckLoadouts to mirror the decks list, so index shifting on deletion is handled automatically. Clear stale loadouts on game reload. Copy loadouts when copying decks.
25685d7 to
08b0596
Compare
Rebased onto master and resolved the merge conflict in Also added a new commit to handle deck loadouts on delete, copy, and clear:
Switched |
Works well so far in testing.