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

NewGRF string codes #4738

Closed
DorpsGek opened this issue Aug 20, 2011 · 3 comments
Closed

NewGRF string codes #4738

DorpsGek opened this issue Aug 20, 2011 · 3 comments
Labels
component: NewGRF This issue is related to NewGRFs flyspray This issue is imported from FlySpray (https://bugs.openttd.org/) patch from FlySpray This issue is in fact a Patch, but imported from FlySrpay

Comments

@DorpsGek
Copy link
Member

Hirundo opened the ticket and wrote:

Patched against r22765

Attached is a series of patches that does the following in order:
- Change current NewGRF date string codes (82, 83) to interpret their argument as unsigned. Although the sign is not explicitly mentioned in the specs, this IMO qualifies as a bug fix since base-1920 dates are unsigned everywhere else.
- Fix: Let NewGRF string code 83 use the 'short' instead of 'tiny' date format to comply with specs.
- Rename NewGRF date string codes to clarify the size of their argument
- Add 2 NewGRF 9A string codes (16 and 17) that are equivalent to the existing 82 and 83, but with a dword-sized base-0 date as argument
- Add 2 NewGRF 9A string codes (18 and 19) that pop a signed dword off the stack and print it as 'power' resp. 'force'. This intended for use in the vehicle buy menu, so (combined with the 'push word' string code) you can display power or force in correct units in the NewGRF-supplied additional text.

Attachments

Reported version: trunk
Operating system: All


This issue was imported from FlySpray: https://bugs.openttd.org/task/4738
@DorpsGek
Copy link
Member Author

frosch wrote:

I am not sure about the string code for force.
Force is currently not exposed to NewGRFs. They only specify mass and friction. While OTTD comes up with the gravity on its own.


This comment was imported from FlySpray: https://bugs.openttd.org/task/4738#comment10214

@DorpsGek
Copy link
Member Author

frosch wrote:

Maybe a "print mass using force units"-stringcode would make it more consistent. But I wonder whether tonnes are precise enough in that case, or whether it needs to be kg.


This comment was imported from FlySpray: https://bugs.openttd.org/task/4738#comment10215

@DorpsGek
Copy link
Member Author

frosch closed the ticket.

Reason for closing: Implemented

at least what is reasonable to do today


This comment was imported from FlySpray: https://bugs.openttd.org/task/4738

@DorpsGek DorpsGek added flyspray This issue is imported from FlySpray (https://bugs.openttd.org/) component: NewGRF This issue is related to NewGRFs patch from FlySpray This issue is in fact a Patch, but imported from FlySrpay labels Apr 7, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component: NewGRF This issue is related to NewGRFs flyspray This issue is imported from FlySpray (https://bugs.openttd.org/) patch from FlySpray This issue is in fact a Patch, but imported from FlySrpay
Projects
None yet
Development

No branches or pull requests

1 participant