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

Change: allow any expression for station (purchase_)prepare_layout #268

Merged
merged 2 commits into from
Sep 11, 2022

Conversation

glx22
Copy link
Contributor

@glx22 glx22 commented Sep 10, 2022

Only simple expression, or procedure call, were allowed.
Now an array of expression can be used too.
For purchase_prepare_layout the expression is simply inlined into the purchase action2.
For prepare_layout a procedure is generated if it's not already a procedure call, this is done to reduce code duplication as prepare_layout is added to all cargo action2.

I decided to disable LOAD_TEMP() optimisation in spritelayout for stations, so usage of STORE_TEMP() in default, custom or foundations will not conflict.

frosch123
frosch123 previously approved these changes Sep 11, 2022
nml/actions/action2layout.py Show resolved Hide resolved
frosch123
frosch123 previously approved these changes Sep 11, 2022
@glx22 glx22 merged commit 5913a97 into OpenTTD:master Sep 11, 2022
@glx22 glx22 deleted the prepare_layout_expression branch September 11, 2022 21:16
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.

None yet

2 participants