-
Notifications
You must be signed in to change notification settings - Fork 3.6k
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 a station event weighting bug #33584
fix a station event weighting bug #33584
Conversation
We could support floats, but the solution here is kinda elegant, so Id rather just restrict to int in the component so people dont make the mistake. |
Your changelog is formatted wrong. |
50% of the time it works every time. |
Couldn't the random integer just be changed to a random float from 0 to sumOfWeights? |
No it can, just a stylistic difference I suppose. |
Good catch with the bug. We would likely have never noticed and it looks like it affects some other events as well, for example the Urist swarm. |
The math makes sense, thanks for the fix |
About the PR
Due to how the weighted event selector works, FindEvent(..), only integer weights resulted in the event ever getting selected.
Why / Balance
bugfix
Technical details
Media
Requirements
Breaking changes
Changelog
🆑