Added Persistence to the AbilityList #376
No reviewers
Labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
ThreeTAG/Palladium!376
Loading…
Reference in a new issue
No description provided.
Delete branch "BanditHelps/Palladium:26.1/ability-list-persistence"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Before, whenever a change in a player's powers were detected, (i.e power addition, power removal, or power dampening) the AbilityList would repopulate itself. This lead to the behavior where the player's currently selected power in the AbilityBar would change automatically without the player pressing the key bind. This behavior was due to the fact that only the "slot index" was being saved, and power additions/removals shift what is in those slots.
This PR makes it so that each list has a stable key instead of simply a slot index. Every time
populate()is called, it will now use the key to remember the player's selected power list, and choose it if it still exists.This prevents the Ability List from cycling during power changes, a QOL fix that makes it easier to use the powers.
Implements suggestion #371