Change: always assume non-track station ground tile#304
Open
glx22 wants to merge 1 commit intoOpenTTD:masterfrom
Open
Change: always assume non-track station ground tile#304glx22 wants to merge 1 commit intoOpenTTD:masterfrom
glx22 wants to merge 1 commit intoOpenTTD:masterfrom
Conversation
980461a to
ea1699a
Compare
ea1699a to
6d36f0a
Compare
6d36f0a to
1e5891a
Compare
For track station ground tile explicitly use `GROUNDSPRITE_RAIL_X` and `GROUNDSPRITE_RAIL_Y`
1e5891a to
7461299
Compare
frosch123
reviewed
Apr 13, 2025
| self.feature == 0x04 | ||
| and self.type == Action2LayoutSpriteType.GROUND | ||
| and value.value != global_constants.constant_numbers["GROUNDSPRITE_RAIL_X"] | ||
| and value.value != global_constants.constant_numbers["GROUNDSPRITE_RAIL_Y"] |
Member
There was a problem hiding this comment.
To match SplitGroundSpriteForOverlay https://github.com/OpenTTD/OpenTTD/blob/7157e9666498d6a500b718a363dbcf16ed62b667/src/station_cmd.cpp#L3025 this should also include the snow variants.
Though NML seems to miss constants for those.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
For station ground sprite, OpenTTD always adds a railtype offset, unless a special trick is used to prevent it (like in example station before this PR).
With this PR, it is now always assumed the station ground sprite is a non-track one unless ground sprite is
GROUNDSPRITE_RAIL_XorGROUNDSPRITE_RAIL_Y.This hides the underlying GRF spec, and should simplify authors' life.
I think railtype offset might still be applied if ground sprite is from a spriteset, but it most likely depends on how the NML is written (
sprite: spriteset;vssprite: spriteset(offset)) and I didn't test, just guessing from the code.