PawelKusnierek / TibiaPal

The site has a number of features to help with the day-to-day life of the players, in the form of tools, guides and information.
https://tibiapal.com
MIT License
22 stars 10 forks source link

"intelligent" parsing of exp_per_hour #70

Closed divinity76 closed 2 years ago

divinity76 commented 2 years ago

only supporting "kk" exp/h may be rather limiting for low-level players, and OT players. a lvl 100 mage doesn't make nearly 1kk exp/h (or at least didn't back in 2010, when i retired from tibia)

it may also be rather limiting for OT players, I am currently playing an OT where i get ~1.4 billion exp/h, and yes i can write "1400kk" to get 1.4b, but it would be nice if i can just write 1.4b, and with this parser, i can 👍

PawelKusnierek commented 2 years ago

I disagree. For 'low' levels you can use fractional values, nobody in the game makes less than 100k/h so they can easily just input 0.1.

Yes, in theory if every user was "intelligent" and read instructions and knew to enter k/kk/m/b/t or whatever, then this implementation in theory would be the 'cleaner' and more optimal solution, but the reality is that the average user is not "intelligent" and for vast majority of users and cases the simple default of 'kk' will be more useful. Expecting every user to enter the k/kk/m/b/t is unrealistic, even if it would be slightly better for a small minority of users (like yourself, who has values in B or T).

Thank you anyway but I strongly prefer current implementation for probably 95% of users/cases.

Also, while it doesn't make a difference in practice due to the return statements, I would prefer the implemetation to be 'else ifs' instead of just a bunch of 'ifs'.