Solumin / YGO-FM-FusionCalc

A Fusion calculator for Yu-Gi-Oh! Forbidden Memories
20 stars 17 forks source link

Isotope implementation, pretty buggy #16

Closed CathodeRaymond closed 8 years ago

CathodeRaymond commented 8 years ago

Here's the isotope implementation (only on handcalc so far). I thought I could get it to sort elements that didn't exist on page load (search results) by reinitializing the grid every time a sort button is clicked but it didn't really work. It will sort only one set of calculation results before breaking. It also does some weird resizing to the results divs sometimes but that would be pretty easy to fix.

CathodeRaymond commented 8 years ago

I added isotope functionality to the search page (which was really the page that could use it) and I looked at the isotope docs and fixed it so that subsequent searches work. When it came to adding the sort functionality to the General fuses, I ran into a bit of trouble making multiple isotope grids on the same page, but I'm sure it can be done.

Alternately, we could get rid of the two columns, put both types of fuses in the same isotope grid, and separate the fuses by color like you alluded to in one of the enhancements.

Solumin commented 8 years ago

Thanks for doing this. I didn't see the notification for the pull request! I'll take a look and see about resolving the conflicts.

I think getting rid of the two columns is the best idea. Perhaps general fusions in the fusion search could be handled the same way as general fusions in the hand calc: Instead of showing up as [card type] + [card type], they're shown as [input card] + [card type]. (The code for this is here.) I'll think about it.

CathodeRaymond commented 8 years ago

Yeah I think getting rid of the two columns is probably the best if we're going to implement sorting/filtering. I've been pretty busy the last 2 weeks or so but things will be settling down pretty soon most likely so we can talk about it more. You can just discard this pull request (instead of trying to resolve merge conflicts) and we can do a more comprehensive implementation in the future that's compatible with the current main branch.

I saw the person who volunteered the fusion info straight from the DotR ROM and I think getting good data for the calculator for that game that should probably take priority over sorting features.

Solumin commented 8 years ago

I've changed it up some so that the two columns are Fusions and Equips, and this is much more amenable to sorting than the old two-column approach was. I think maybe sorting the Equip fusions alphabetically may be the way to go for that column -- though if they search for an Equip card, being able to sort by Attack is a good idea. Hmm. The card information I have unfortunately does not tell me what each Equip card does, though it might be hidden somewhat...