Add: [Badges] Vehicle variable to query badges of current rail or road types. - #14312
Merged
PeterN merged 1 commit intoAug 11, 2025
Merged
Conversation
PeterN
force-pushed
the
engines-query-rail-road-type-badges
branch
from
May 30, 2025 17:09
6361662 to
0cc6896
Compare
PeterN
marked this pull request as ready for review
May 30, 2025 17:49
Contributor
|
I have tested this with trains querying railtypes, and it works as expected for that case. |
Member
|
Looking for opinions from @andythenorth and other GRF authors: Does #14357 fulfil your needs in lieu of this? |
Contributor
Separate concerns 😄 Railtype badges aren't a solution for compatibility. Labels are the solution for that, per #14357. But railtype badges can be used for purposes like
|
2TallTyler
approved these changes
Aug 6, 2025
2TallTyler
left a comment
Member
There was a problem hiding this comment.
#YOLO, curious to see what mischief GRF developers do with this. 🙂
Contributor
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.
Motivation / Problem
Badges can be set on rail and road types. Vehicles can only query their own badges, or badges of other vehicles in their chain.
Description
Add a new variable, 0x65, which allows querying the badges of rail or road type of the current type occupied by the vehicle.
This works the same as variable 0x7A, taking a badge table index as a parameter.
Limitations
Foot-guns. Desyncs. Bending the spec.
Checklist for review
Some things are not automated, and forgotten often. This list is a reminder for the reviewers.