Skip to content

Add loadout manager for copying, renaming and deleting loadouts - #10224

Open
canuysal wants to merge 2 commits into
PathOfBuildingCommunity:devfrom
canuysal:manage_loadouts
Open

Add loadout manager for copying, renaming and deleting loadouts#10224
canuysal wants to merge 2 commits into
PathOfBuildingCommunity:devfrom
canuysal:manage_loadouts

Conversation

@canuysal

Copy link
Copy Markdown
Contributor
  • Add "Manage Loadouts" option to the loadouts dropdown, replacing "Sync"
  • Manager supports New, Copy, Rename and Delete across all four associated sets, plus double-click to activate
  • Copy creates the new loadout automatically with a unique name
  • Move Sync into the manager popup
  • Update help.txt and add tests

Description of the problem being solved:

Hey guys, long time no see!

Previous loadout management was bugging me, whenever I wanted to clone a loadout for some changes, I have to copy tree/skills/itemset/config, rename each, then sync to get a new set to play around. If I have a live build to import from poe, it means losing the subtle changes I made to the skills/items, i.e making raise zombie count 17, managing spectres (another issue on that, will send a PR soon) and so on. This fixes that by adding instant clone, new, delete and rename buttons for loadouts in a similar manage dialog as individual sets use.

Sync button is moved inside the dialog. Reason is it will be used less and less from now on, but it's still there in the dialog for backwards compatibility, organizing individual sets into one.

New Loadouts are left in the quick access menu for convenience.

Steps taken to verify a working solution:

  • Ran the busted suite via docker compose up: 525 successes / 0 failures (522 pre-existing plus 3 new loadout tests in spec/System/TestLoadouts_spec.lua, covering loadout creation, automatic copy with unique naming, and {identifier} link resolution)
  • Created a loadout via "New Loadout" and via the manager's "New" button, confirmed a tree, item set, skill set and config set are all created with the given name and that the loadout appears in the dropdown
  • Selected a loadout with customised gems and items, hit "Copy", confirmed a " (copy)" loadout is created instantly with all four sets duplicated, and that editing the copy's tree, gems and items leaves the original untouched
  • Copied the same loadout twice, confirmed the second copy is named " (copy 2)" rather than colliding
  • Renamed a loadout, confirmed all four sets are renamed on the Tree, Skills, Items and Configuration tabs
  • Renamed a loadout that uses {1} style identifiers, confirmed the identifier is preserved on each set and the loadout still resolves
  • Deleted a loadout, confirmed all four of its sets are removed, and that a set shared with another loadout (e.g. a single "Default" config set) is kept rather than deleted
  • Double-clicked a loadout in the manager, confirmed it activates and shows "(Current)"
  • Confirmed "Sync" inside the manager still rebuilds the list after renaming a set directly on its own tab
  • Saved and reloaded the build, confirmed loadouts persist (no new save data is introduced, loadouts are still derived from set names)

Link to a build that showcases this PR:

Any build would do:
https://pobb.in/H_y7eOag7gaK

Before screenshot:

image

After screenshot:

imageimageimageimageimageimageimageimageimage

* Add "Manage Loadouts" option to the loadouts dropdown, replacing "Sync"
* Manager supports New, Copy, Rename and Delete across all four associated sets, plus double-click to activate
* Copy creates the new loadout automatically with a unique name
* Move Sync into the manager popup
* Update help.txt and add tests
* Add "New/Copy Custom" button, which creates a loadout choosing per set whether to start fresh or copy an existing one
* Default the choices to the currently active sets, so saving immediately copies the active loadout
* Split the per-set copy and delete logic out of Copy/Delete so both paths share it
* Add tests for copying the untitled default loadout, deleting a loadout, keeping shared sets, and resetting the dropdown selection
@canuysal

Copy link
Copy Markdown
ContributorAuthor

New changes, reflecting #9647

* Add "New/Copy Custom" button, which creates a loadout choosing per set whether to start fresh or copy an existing one
* Default the choices to the currently active sets, so saving immediately copies the active loadout
* Split the per-set copy and delete logic out of Copy/Delete so both paths share it
* Add tests for copying the untitled default loadout, deleting a loadout, keeping shared sets, and resetting the dropdown selection

Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant

@canuysal