cameroncondry / cbc-kitten-scientists

Add-on for the wonderful incremental browser game: http://kittensgame.com/web/
MIT License
113 stars 94 forks source link

Suggestion: Resource stock simplified input #221

Open Ramdat opened 7 years ago

Ramdat commented 7 years ago

The game uses shorthand to refer to large numbers, such as 100k, 1M, 1G and 1T.

Add a feature to interpret these shorthands as the number for the stock setting. For example, inputting "1T" into the stock dialogue box will interpret it as 1000000000000.

Currently you must write the entire number. This is particularly troublesome for larger numbers, since you must input the correct amount of zeros every time. It also does not accept "1,000,000,000,000", which makes it more difficult to read. Interpreting the shorthand version will solve both problems.

kaeroku commented 6 years ago

I've noticed that 1e3 (for instance) results in an input of 1000. Maybe try that?

eykanal commented 6 years ago

This relies on a one-way transformation that would be fairly non-trivial to implement.