Skip to content

Fix Infinite Sleeper Agents + Tests - #46065

Open
Princess-Cheeseballs wants to merge 7 commits into
space-wizards:masterfrom
Princess-Cheeseballs:fix-infinite-game-rules
Open

Princess-Cheeseballs wants to merge 7 commits into
space-wizards:masterfrom
Princess-Cheeseballs:fix-infinite-game-rules

Conversation

@Princess-Cheeseballs

Copy link
Copy Markdown
Member

…but no game

About the PR

Title. Fixed the infinite sleeper agents bug.
This was as simple as properly checking ProtoId against ProtoId instead of against the name :P.
However I decided to actually go back and add tests because I forgot to before, and got a little soaped.

Why / Balance

Buge. Code cleanup yum!

Technical details

Fix a bug and then optimize some code. Add a test.

Test plan

Run the tests.
Bottom text.

Media

Requirements

  • I have read and am following the Pull Request and Changelog Guidelines.
  • I have tested this pull request and written instructions on how to test it
  • I have added media to this PR or it does not require an in-game showcase.

Breaking changes

CanRun no longer skips checks if the round has just started.
TryBuildLimitedEvents and AvailableEvents now return an EventTable instead of a Dictionary.
FindEvent now takes an EventTable instead of a Dictionary

Changelog

@Space-Wizards-Bot Space-Wizards-Bot added S: Untriaged Status: Indicates an item has not been triaged and doesn't have appropriate labels. S: Approved Status: Reviewed and approved by at least one maintainer; a PR may require another approval. S: Needs Review Status: Requires additional reviews before being fully accepted. Not to be replaced by S: Approved. size/M Denotes a PR that changes 100-999 lines. labels Sep 18, 2026
@Velken Velken self-assigned this Sep 18, 2026

@ScarKy0 ScarKy0 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Still has some issues with reoccurrancedelay

For context: BluespaceLocker has reoccurancedelay of 5 and IonStorm reoccurancedelay of 20
and they were sent back to back (unless maxed out Survival ignores reoccurrance for some reason)
Image

Also back-to-back GasLeak despite having a delay of 30

image

@Space-Wizards-Bot Space-Wizards-Bot added S: Awaiting Changes Status: Changes are required before another review can happen and removed S: Needs Review Status: Requires additional reviews before being fully accepted. Not to be replaced by S: Approved. labels Sep 18, 2026
@ScarKy0 ScarKy0 added the P3⁄4: Stable Blocker Priority: MUST be resolved before the next Stable merge, but isn't actively causing major issues. label Sep 18, 2026
@themias themias added T: Bugfix Type: Bugs and/or bugfixes A: Roundflow/Antag Area: Roundflow - "What happens in the game", including antagonist roles and their capabilities T: Tests Type: Unit/Integration tests. and removed S: Untriaged Status: Indicates an item has not been triaged and doesn't have appropriate labels. labels Sep 18, 2026
@Princess-Cheeseballs

Copy link
Copy Markdown
Member Author

Still has some issues with reoccurrancedelay

For context: BluespaceLocker has reoccurancedelay of 5 and IonStorm reoccurancedelay of 20 and they were sent back to back (unless maxed out Survival ignores reoccurrance for some reason) Image

Also back-to-back GasLeak despite having a delay of 30
image

Reoccurance delay is set to CurTime while the method is checking round time. I'll get that fixed real quick.

@Princess-Cheeseballs

Princess-Cheeseballs commented Sep 18, 2026

Copy link
Copy Markdown
Member Author
image

This shit been broken since 2023

@Velken Velken left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks good to me, and no more infinite sleeper agents within 5 minutes, at least on my testings

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A: Roundflow/Antag Area: Roundflow - "What happens in the game", including antagonist roles and their capabilities P3⁄4: Stable Blocker Priority: MUST be resolved before the next Stable merge, but isn't actively causing major issues. S: Approved Status: Reviewed and approved by at least one maintainer; a PR may require another approval. S: Awaiting Changes Status: Changes are required before another review can happen size/M Denotes a PR that changes 100-999 lines. T: Bugfix Type: Bugs and/or bugfixes T: Tests Type: Unit/Integration tests.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants