-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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
Require denomination pricing for price and price_postapoc #78905
base: master
Are you sure you want to change the base?
Conversation
cents--->cent dollar-->USD dollars-->USD
Ooooooooooh okay, I don't think we can do the aliasing without some really nasty stuff. So if both "cent" and "cents" are valid, it reads If our input is instead We could maybe, maybe, change the order of units in units::money so that |
Summary
Infrastructure "Item price and price_postapoc must be denominated (cents/USD/kUSD). Integer values no longer used"
Purpose of change
#78901 (comments)
Describe the solution
Throw error if an integer is found
Print list of valid denominations, so that the
cent
/cents
conundrum is clearly communicated to our contributors . Pulls directly frommoney_units
, so should be future proofed.Also the following units are now accepted as subsitutes:
cents--->cent
dollar--->USD
dollars--->USD
Describe alternatives you've considered
Also acceptdoing that.cents
as a valid unit which converts to1_cent
. Single line change in units.h, but not sure if it's a good ideaTesting
Additional context
In draft until I do all the JSON stuff