Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Find custom set symbols by set code #14

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

EmilyMalkieri
Copy link

With this change, cardconjurer searches for set symbol images in both the custom and the official directories, preferring custom over official symbols and svgs over pngs. This way, people don't have to manually add their own set symbols with the "Via URL" field, they can just drop them into img/setSymbols/custom/ and use the set code and rarity fields like they'd do for official cards.

This also makes the weird hardcoding of specific set codes that have pngs instead of svgs or that are located in img/setSymbols/custom instead of img/setSymbols/official unnecessary.

Unfortunately this will log a 404 error message to console whenever we fail to find an image. I'm not aware of any reasonable way to avoid this--apparently you could register a service worker and have that handle the fetch but that seems like overkill to me.

Search for set symbols in both the custom and the official directories,
preferring custom over official and svgs over pngs. This way, people can
just drop their own set symbols into img/setSymbols/custom/ and use the
set code like they'd do for official cards.

Unfortunately this will log a 404 error message to console whenever we
fail to find an image. I'm not aware of any way to avoid this.
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.

1 participant