Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add: Currency: Indonesian Rupiah (IDR) #8616

Merged
merged 1 commit into from Feb 19, 2021
Merged

Conversation

@WilloIzCitron
Copy link
Contributor

@WilloIzCitron WilloIzCitron commented Jan 30, 2021

Adds a Currency of indonesia
With conversion rate of 19 to GBP.

@WilloIzCitron WilloIzCitron marked this pull request as draft Jan 30, 2021
@WilloIzCitron WilloIzCitron marked this pull request as ready for review Jan 30, 2021
@WilloIzCitron
Copy link
Contributor Author

@WilloIzCitron WilloIzCitron commented Jan 30, 2021

im lazy of commit naming smh

@ldpl
Copy link
Contributor

@ldpl ldpl commented Jan 30, 2021

Because of such a high conversion rate, this actually needs careful consideration and excessive testing. As most calculations are done in 64 bit types these eye-candy conversion rates eat up bits from useful values and this one just uses 2 more bits than everything else. And I remember there already being some issues with overflowing money, not sure if they were all fixed. It's also quite bad for the UI to have all those pointless numbers at the end. So I think it would be much better from both UI and implementation pov to add such currencies in thousands, so this one would be a "thousand rupiahs" currency with the conversion rate of 19.

@WilloIzCitron
Copy link
Contributor Author

@WilloIzCitron WilloIzCitron commented Jan 30, 2021

Because of such a high conversion rate, this actually needs careful consideration and excessive testing. As most calculations are done in 64 bit types these eye-candy conversion rates eat up bits from useful values and this one just uses 2 more bits than everything else. And I remember there already being some issues with overflowing money, not sure if they were all fixed. It's also quite bad for the UI to have all those pointless numbers at the end. So I think it would be much better from both UI and implementation pov to add such currencies in thousands, so this one would be a "thousand rupiahs" currency with the conversion rate of 19.

ok imma fix it

@Wuzzy2
Copy link
Contributor

@Wuzzy2 Wuzzy2 commented Feb 1, 2021

Because of such a high conversion rate, this actually needs careful consideration and excessive testing.

FYI: Everyone can already test this by using the manual currency and setting the max value. I think I'm going to play with such a fantasy currency from now on. I'll report back (in other issues) if I find any bugs.

About the "thausand rupees" thing: Shouldn't the suffix change then, or is this intended?

The exchange rate is actually more like 19,000, but OpenTTD
doesn't handle such high exchange rates kindly.
Copy link
Member

@TrueBrain TrueBrain left a comment

I am not the biggest fan of using 19 instead of 19k, but I understand the other side of this problem. So why not.

@TrueBrain TrueBrain merged commit 1f6fb8c into OpenTTD:master Feb 19, 2021
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

4 participants