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

Support extended object/station/roadstop limits (draft) #287

Merged
merged 2 commits into from
May 14, 2023

Conversation

andythenorth
Copy link
Contributor

Draft, support for OpenTTD/OpenTTD#10672

@andythenorth
Copy link
Contributor Author

Compiled my FIRS test fine.

image

@glx22
Copy link
Contributor

glx22 commented May 12, 2023

Seems you are using an outdated black

@PeterN
Copy link
Member

PeterN commented May 12, 2023

I'm using no such thing at all :-)

Copy link
Contributor

@glx22 glx22 left a comment

Choose a reason for hiding this comment

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

Can't force push to the branch, let's use the other way

@@ -194,7 +194,7 @@ def find_unused(self, length):
BlockAllocation(88, 0xFFFF, "Road Vehicle"),
BlockAllocation(11, 0xFFFF, "Ship"),
BlockAllocation(41, 0xFFFF, "Aircraft"),
BlockAllocation(0, 255, "Station"),
BlockAllocation(0, 0xFFFE, "Station"), # UINT16_MAX - 1
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
BlockAllocation(0, 0xFFFE, "Station"), # UINT16_MAX - 1
BlockAllocation(0, 0xFFFE, "Station"), # UINT16_MAX - 1

@@ -205,12 +205,12 @@ def find_unused(self, length):
BlockAllocation(0, -1, "Sound"),
BlockAllocation(0, 127, "Airport"),
BlockAllocation(0, -1, "Signal", False),
BlockAllocation(0, 255, "Object"),
BlockAllocation(0, 0xF9FF, "Object"), # 64000
Copy link
Contributor

@glx22 glx22 May 12, 2023

Choose a reason for hiding this comment

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

Suggested change
BlockAllocation(0, 0xF9FF, "Object"), # 64000
BlockAllocation(0, 64000, "Object"),

Copy link
Member

Choose a reason for hiding this comment

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

In fact just s/0xF9FF/64000/ and remove the comment would do.

Copy link
Contributor

Choose a reason for hiding this comment

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

Updated the suggestion

BlockAllocation(0, 63, "Railtype"),
BlockAllocation(0, 255, "Airport Tile"),
BlockAllocation(0, 62, "Roadtype"),
BlockAllocation(0, 62, "Tramtype"),
BlockAllocation(0, 255, "RoadStop"),
BlockAllocation(0, 0xFFFE, "RoadStop"), # UINT16_MAX - 1
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
BlockAllocation(0, 0xFFFE, "RoadStop"), # UINT16_MAX - 1
BlockAllocation(0, 0xFFFE, "RoadStop"), # UINT16_MAX - 1

@glx22 glx22 merged commit 7237f01 into OpenTTD:master May 14, 2023
@andythenorth
Copy link
Contributor Author

Added to nml spec https://newgrf-specs.tt-wiki.net/wiki/NML:Objects

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.

3 participants