Skip to content

Alt art grouping#8012

Merged
NBKelly merged 5 commits intomtgred:masterfrom
NBKelly:alt-art-grouping
May 4, 2025
Merged

Alt art grouping#8012
NBKelly merged 5 commits intomtgred:masterfrom
NBKelly:alt-art-grouping

Conversation

@NBKelly
Copy link
Collaborator

@NBKelly NBKelly commented Mar 15, 2025

The regex will probably need to be adjusted for alt versions of flip cards, but that's a bridge that can be crossed later.

The output on mongo looks like this, for a case with two versions of overclock in the same folder:
db-output_000

Closes #8004

@NBKelly NBKelly marked this pull request as ready for review March 15, 2025 04:08
@NBKelly
Copy link
Collaborator Author

NBKelly commented Mar 15, 2025

ok this was a nightmare to actually figure out, but I ended up with something that:

  1. works
  2. maintains compatability

Essentially, we're already storing arts on cards as 1-ary lists (I don't know why), so we can just store multiple things in those lists instead.

On the cardbrowser, we now seperate it by item in each list, rather than just by each list.

When you select an alt art, it now indexes code [key idx], instead of code key.

When looking at a card art, we then check if art is sequential: if yes, we fetch the list of arts, then pick the art at the given idx.
If no, then we just do what we already do which is yield the first item from the list.

@NBKelly NBKelly merged commit afea20e into mtgred:master May 4, 2025
3 checks passed
Sign up for free to 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.

Allowing for more than 1 alt art of the same card in the same folder

1 participant