mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-01-05 22:43:46 +00:00
* Disease Outbreak/Heart Attack candidate lists clear themselves before generating (#73596) ## About The Pull Request When canSpawnEvent is run for the disease outbreak event, it would generate_candidates() and add whoever was a valid infectee to a list. Unfortunately, this list would not be cleared until the event was actually run, meaning the candidate list could become malformed if the event was cancelled, interrupted, or otherwise stopped before it could properly start. Additionally, this issue would arise if the admin setup process was begun without actually running the event, or if two admins were attempting to press buttons at the same time. The list could contain duplicates, or players who were valid candidates on the first candidacy check, but not at the present moment. The list now clears itself every time it is generated, meaning that a fresh candidate list is made every time one is needed. Since the heart attack event uses the same candidate generating system as the disease event, the change has been made there as well. ## Why It's Good For The Game Closes #73552, hopefully? I can't imagine it's an issue with how the candidates are selected, and am like 99% sure it's just the list getting fudged somehow. ## Changelog 🆑 fix: The disease outbreak/heart attack event candidate list will now clear itself before generating. /🆑 * Disease Outbreak/Heart Attack candidate lists clear themselves before generating --------- Co-authored-by: Rhials <Datguy33456@gmail.com>