taw / magic-search-engine

Search engine for Magic cards
MIT License
47 stars 19 forks source link

Refactor Booster System Internals #187

Closed taw closed 1 year ago

taw commented 1 year ago

Very little of it should be visible, it's mostly internal stuff for me.

There's probably going to be more cleanup to do, but that's a start.

taw commented 1 year ago

Booster names are now handled by booster indexer, for any custom ones they can be overriden by header like name: "Alara Premium Foil Booster". All default classes are set by indexer.

Small complication is that indexer is loaded before mtgjson data, so it doesn't know set names, only their codes, so names are all like {set_name} Arena Booster and {set_name} only gets replaced by final value when loaded.

taw commented 1 year ago

Closing this as done enough. I might still add a cache for precomputed booster data at some point.