Skip to content

Add: Missing features to random switch.#433

Open
Rito13 wants to merge 1 commit into
OpenTTD:masterfrom
Rito13:missing_random_features
Open

Add: Missing features to random switch.#433
Rito13 wants to merge 1 commit into
OpenTTD:masterfrom
Rito13:missing_random_features

Conversation

@Rito13

@Rito13 Rito13 commented Jun 8, 2026

Copy link
Copy Markdown
Contributor

When road stops and badges were added the data for random action 2 was not.

Add TILE and SELF for road stops matching behaviour in stations. However road stops have 8 bits in TILE when stations have only 4 (based on https://newgrf-specs.tt-wiki.net/wiki/RandomAction2#Triggers)

Add empty dictionary for badges to generate pretty errors instead of internal ones.

@glx22

glx22 commented Jun 13, 2026

Copy link
Copy Markdown
Contributor

Not sure, but 0x0D being empty might be wrong.
I think it's should be "SELF": {"type": 0x80, "param": 0, "first_bit": 0, "num_bits": 16, "triggers": False} based on doc.

@Rito13 Rito13 force-pushed the missing_random_features branch from 12db253 to 8bb0fad Compare June 13, 2026 21:58
@Rito13

Rito13 commented Jun 13, 2026

Copy link
Copy Markdown
Contributor Author

Based on newgrf_airport.cpp L198 and newgrf_spritegroup.cpp L268 I think that NFO specs are correct.

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