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

Formatting of CurrentMoney and MonthlyBudget needs a change #29

Closed
Clauvin opened this issue Apr 19, 2017 · 4 comments
Closed

Formatting of CurrentMoney and MonthlyBudget needs a change #29

Clauvin opened this issue Apr 19, 2017 · 4 comments
Assignees
Milestone

Comments

@Clauvin
Copy link
Owner

Clauvin commented Apr 19, 2017

CurrentMoney and MonthlyBudget show sometimes the decimal point of their values and everything to the left of the point, but nothing in the right. (Example: 465823.)

  • The decimal values are useful for the player?
  • Is there any situation in game where not having them visible would result in a perceived bug?
  • Is there any situation in game where having them visible would result in other bugs?
@Clauvin
Copy link
Owner Author

Clauvin commented Apr 19, 2017

First things first: no, the decimal values aren't useful. Nothing in game is bought using decimals of money, so that information is irrelevant.

@Clauvin
Copy link
Owner Author

Clauvin commented Apr 19, 2017

Still, the engine MAY use that information for something. Pause and consideration must be given to cases where money is compared to a value.

In a case of (money > 0), money = 0.5 would result in true, but the player wouldn't see the decimals and that would be a bug by both interpretations: or the system is using unseen information in an unfair way, or the money system SHOULDN'T have decimals.

@Clauvin Clauvin added this to the UI Working milestone Apr 19, 2017
@Clauvin
Copy link
Owner Author

Clauvin commented Apr 19, 2017

The cleanest solution would be to transform the money values in long long ints and solve the issue, but that leads to possible problems involving calculations.

The jerry-rig solution is to alert the programmers of the problem cited in the above post and convert to int the money values in the UI.

...let's go with the cleanest solution.

@Clauvin
Copy link
Owner Author

Clauvin commented Apr 19, 2017

Problem solved and warning in comments added to both variables.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant