Card-Forge / Card-Forge/forge

New ImageKeys Design Hash/Record

Open
#7,771 15 comments 0 reactions 4 assignees Claimed by @kevlahnota View on GitHub
Game Mechanics GUI keep
Dominant language
Java
Stars
2.7k
Forks
1.1k
Avg merge
1d 1h
Merged PRs (30d)
158

Description

> The different situations of ImageKeys: (With/Without Set, With/Without CN, With/Without Artist, maybe back) lets me think it might be better to have them as Key-Value: `c:Jaheira, Ruthless Harper|HBG|16b` into `c:Name$ Jaheira, Ruthless Harper | Set$ HBG | CN$ 16b | Artist$ Mila Pesic`
>
> Then I don't need to ask the Edition/EditionEntry when I want to display the Artist

Sounds like the amount of data here is growing beyond what a string is good at storing. Maybe the image key needs to be expanded into a full on class/record for containing image metadata? Then we could pile on whatever extra metadata we want - specialize mode, front or back, artist, flipped flag, whether we even expect it exists on Scryfall or if it's something local like an Adventure card or placeholder. It could just have its own methods for translating itself into a filename, a legacy filename, a Scryfall URL, a hashcode, etc.

_Originally posted by @Jetz72 in https://github.com/Card-Forge/forge/issues/7757#issuecomment-2932023655_

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.