Skip to content

randomizer nonrandom fallback fix#1981

Merged
bosh merged 1 commit intomissionpinball:devfrom
bosh:randomizer_no_random_with_fallback
Feb 28, 2026
Merged

randomizer nonrandom fallback fix#1981
bosh merged 1 commit intomissionpinball:devfrom
bosh:randomizer_no_random_with_fallback

Conversation

@bosh
Copy link
Collaborator

@bosh bosh commented Feb 28, 2026

Turns out if you use a bunch of randomizer features together it didnt behave as expected:

  • disable_random
  • fallback_value
  • events that all use conditionals and all happen to be false when trying to generate a value

Put that all together and previously you would always get the last event from the event list out even with the false condition, and thus the fallback would also never be used.

This commit properly falls back to the fallback value when all are false and should return to items from the list when conditions become true again.

Turns out if you use a bunch of randomizer features together it didnt behave as expected:
- disable_random
- fallback_value
- events that all use conditionals and all happen to be false when trying to generate a value

Put that all together and previously you would always get the last event from the event list out
even with the false condition, and thus the fallback would also never be used.

This commit properly falls back to the fallback value when all are
false, and should recover back into the sequence when dynamic conditions
change and allow some items to become valid again.
@bosh bosh force-pushed the randomizer_no_random_with_fallback branch from eba59ad to 025e009 Compare February 28, 2026 20:01
@sonarqubecloud
Copy link

@bosh bosh merged commit bfbcb67 into missionpinball:dev Feb 28, 2026
25 checks passed
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.

1 participant