Thorinair / Stardew-Profits

A Stardew Valley crop profits calculator and visualizer. Link: https://thorinair.github.io/Stardew-Profits/
MIT License
153 stars 74 forks source link

Fix foraging quality rates #36

Closed FinalDoom closed 3 years ago

FinalDoom commented 3 years ago

Calculations are different from standard crops. I'm still not quite sure how a crop qualifies as foraged because there's some magic numbers in there I have a hard time tracing. But according to the wiki anything planted from wild seeds does count for this math.

Everything looks good from what I could see, calculations look good and your changes seem to have fixed #18, as I'll add in there.

One question: What's the purpose of the stringify/parse in fetchCrops on 349? I was having an issue with an old URL token breaking things, but I don't think that's related.

Thorinair commented 3 years ago

One question: What's the purpose of the stringify/parse in fetchCrops on 349? I was having an issue with an old URL token breaking things, but I don't think that's related.

This is a very dirty way of me cloning data. It is dumb, but works. Unless Ive done it like this, the values of crops would be permanently changed when extra produce and % is added. And indeed, it is not related with the URL token. I am still not sure why it breaks things...

FinalDoom commented 3 years ago

Ahh, gotcha that makes sense now. Neat. Thanks for the great tool :)