Files
Bubberstation/code/controllers/subsystem
Bloop e5f023a3d5 Fixes polling causing an unexpected return value when there are 0 players picked (#86912)
## About The Pull Request

So this was caused by the change in
https://github.com/tgstation/tgstation/pull/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 a `null` value or the valid mob.
However, now what was being returned was either a `list()` or the valid
mob because that code was no longer ever being reached.

For example


![image](https://github.com/user-attachments/assets/e49fe031-7120-4a17-8bba-3c5054a90fae)


![image](https://github.com/user-attachments/assets/c7ae27a8-1dce-4fcd-9f19-fcde417f7695)

Fixes https://github.com/NovaSector/NovaSector/issues/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
/🆑

<!-- Both 🆑's are required for the changelog to work! You can put
your name to the right of the first 🆑 if you want to overwrite your
GitHub username as author ingame. -->
<!-- You can use multiple of the same prefix (they're only used for the
icon ingame) and delete the unneeded ones. Despite some of the tags,
changelogs should generally represent how a player might be affected by
the changes rather than a summary of the PR's contents. -->
2024-09-28 04:19:34 +02:00
..
2024-08-25 00:21:12 +02:00
2024-05-04 23:33:52 -04:00
2024-08-21 17:07:02 +12:00
2024-08-21 17:07:02 +12:00
2024-08-23 21:49:46 +02:00