Skyrat-SS13 / Skyrat-tg

A Skyrat downstream of /tg/station SS13.
GNU Affero General Public License v3.0
121 stars 686 forks source link

[MIRROR] Fixes polling returning a list full of nulls when not enough candidates are available #29565

Closed SkyratBot closed 2 weeks ago

SkyratBot commented 2 weeks ago

Original PR: https://github.com/tgstation/tgstation/pull/86012

About The Pull Request

I was trying to fix an unrelated bug with abductors on a downstream that I'm not even sure exists on here and found another unrelated bug.

Turns out polling always returns the list of a requested size, except it fills in the empty spots with nulls. image

This makes this check completely broken, and runtimes abductors trying to spawn with null clients, making the one lone abductor spawn naked on the shuttle. image

There might be an issue open for this but I was unable to find one

Why It's Good For The Game

Uuuuh bugfix good.

See it working here image image

Changelog

:cl: fix: SSPolling no longer fills in the candidate list with empty entries to guarantee it returns a list size of amount_to_pick /:cl: