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

Fix mixing action features and variable scopes. #175

merged 4 commits into from Dec 23, 2020


Copy link

@frosch123 frosch123 commented Dec 8, 2020

No description provided.

frosch123 added 2 commits Dec 8, 2020
…ope of the random_switch.

Regular switches already behaved this way.
For random_switches with BACKWARD/FORWARD-scope there is no sane behavior, but these scopes are pretty useless anyway.
@@ -359,6 +359,9 @@ def pre_process(self):
def optimise(self):
if self.optimised:
return True
if self.triggers.value != 0:
# Triggers have side-effects, and can't be skipped.
Copy link

@glx22 glx22 Dec 21, 2020

Choose a reason for hiding this comment

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

Oh I totally missed that. I though about all (I think) non-skip cases for non random, but didn't check random.

glx22 approved these changes Dec 22, 2020
Copy link

@glx22 glx22 left a comment

Seems to be the right thing to do.

@frosch123 frosch123 merged commit 9f5ab6d into OpenTTD:master Dec 23, 2020
21 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

2 participants