Fixes polling causing an unexpected return value when there are 0 players picked #86912
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
About The Pull Request
So this was caused by the change in #86012 .
They tried to fix a case for polls with
amount_to_pick
set to greater than 1 having null entries in the returned lists, and succeeded at that.However, in doing so they messed up the control flow of the proc such that now it's returning early with an empty
list()
whenever the amount is equal to 1.The assumption was, when
amount_to_pick
was equal to 1 specifically then the return value would be either anull
value or the valid mob. However, now what was being returned was either alist()
or the valid mob because that code was no longer ever being reached.For example
Fixes NovaSector/NovaSector#4427
Fixes both bugs in a way that should not cause any problems, and adjusts documentation to make it clearer what the return value of this proc is expected to be.
Why It's Good For The Game
Fixes a bug that pretty much effects the majority of ghost polls as most of them are only asking for 1 player.
Changelog
🆑
fix: fixes pulsing tumor failing to spawn the elite if no ghosts respond to the poll and leaving you in a bugged state, and possibly other related issues
/:cl: