jmaliksi / blaseball-mike

Totally not a microphone to the blaseball API
MIT License
14 stars 10 forks source link

Improved Items #122

Closed Edgarware closed 3 years ago

Edgarware commented 3 years ago

Now that we actually understand these things better:

Also threw in some of how these affect players:

I'm not sure if I like always including items in the rating, in the off chance the user wants to get the unaltered version. We also probably need to figure out how we're including the player attribute modifications but I'd rather not have to write a lazy-load function for all 30-some fields.

jmaliksi commented 3 years ago

hmm, I think we'd want to match the blaseball backend API if possible. I'm guessing it's the frontend that's adding the calculated rating to the item ratings?

Edgarware commented 3 years ago

Correct, the frontend is what's adding the item ratings. But we already duplicate some frontend stuff, like soulscreams and bet payouts. Maybe just make a separate get_rating function that can include items as an option?

jmaliksi commented 3 years ago

yeah a separate explicit rating function makes sense. Maybe we then convert the rating properties to just read from the API if available?

Edgarware commented 3 years ago

OK done pushed an update. So now Player has get_X_rating and get_X_stars to handle the item/rounding issues. Player.X_rating is staying around to match the backend (or the calculated one in cases where it does not exist) and Player.X_stars is now unchanged but has a new Depreciation warning to guide people to the new functions. I'll probably throw them out completely in 6.0