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: Support for faster ship speed 23 and acceleration 24 (OTTD #10734) #315

Merged
merged 1 commit into from
Jan 29, 2024

Conversation

zephyris
Copy link
Contributor

Add support for the new ship Action0 properties from OTTD#10734. Add support for 0x24 byte for ship acceleration and 0x23 word for ship speed, the latter only set if speed is >255 thus does not fit in the existing 0x0B byte for ship speed.

(This seems to work as expected, but is my first time trying to update nml - I may well have made mistakes/be wrong!)


# prop 23 should not be set if value(prop0B_value) <= 255.
def prop23_test(value):
return isinstance(value, ConstantNumeric) and value.value >= 0x00FF
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
return isinstance(value, ConstantNumeric) and value.value >= 0x00FF
return isinstance(value, ConstantNumeric) and value.value >= 0xFF

@glx22 glx22 merged commit b7d9a17 into OpenTTD:master Jan 29, 2024
21 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
Development

Successfully merging this pull request may close these issues.

2 participants