-
Notifications
You must be signed in to change notification settings - Fork 2.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix antag selection being evil #28197
fix antag selection being evil #28197
Conversation
} | ||
|
||
return new AntagSelectionPlayerPool(new() { preferredList, fallbackList, unwantedList, invalidList }); | ||
return new AntagSelectionPlayerPool(new() { preferredList, fallbackList }); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
When i was trying to fix this myself i basically did the same thing. My only consairn and why i never made a pr was cause. What happens if we got no one in the prefferedlist or fallbacklist? Are we starting the gamemode without any antags. This resulting in a broken gamerule/greenshift.
Yes i agree this should be intended behavior (#24292). But i don't think we currently have a solution to prevent broken gamerules.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ok this doesnt cancel it, but nukies should be changed to make spawners if theres not enough players like in my issue
traitors zombies etc doesnt really matter as theres no unused map lying around doing nothing
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Afaik it also picks people at random in game not just in the lobby (look at sleeper agents. There are reports that players get sleeper agent given to them when they never opted in)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes this fixes that since it wont pick anyone that didnt opt in
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
keep the unwanted list but not the invalid one at least until we have ways of setting up ghost roles and other rules properly.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the majority of the issue is people that arent opted in getting picked, invalid is only really picked in a dev environment. nukies making ghost roles for missing players wyci
You probably have to update the tests so that you can specify preferences for clients, so that they can opt into the nukie role? |
Content.IntegrationTests/Tests/GameRules/AntagPreferenceTest.cs
Outdated
Show resolved
Hide resolved
I pushed a few commits, most notably: Allow tests to modify antag preferences Fix antag selection Add AntagPreferenceTest edit: |
not only can antag selection pick people who are just waiting in the lobby, it also has a chance to make ghosts antags as well |
} | ||
|
||
return new AntagSelectionPlayerPool(new() { preferredList, fallbackList, unwantedList, invalidList }); | ||
return new AntagSelectionPlayerPool(new() { preferredList, fallbackList }); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
keep the unwanted list but not the invalid one at least until we have ways of setting up ghost roles and other rules properly.
Evil antag selection: I will work properly and not run like shit. |
I think it fixes the selection bugs? but its hard to know because its pretty hard to test properly.
I don't think there's any situation where you want to force someone to be an antag if they explicitly opted out of that role. That is probably just going to lead to people leaving the server. |
realistically it doesnt happen much and i think its preferable when we dont have a system that resolves not having players for a given antag. |
it happens enough to have like 4 issues opened |
that's because the selection has been bugged. that's been the old behavior for literal ages and the amount of times it happens normally is extremely low |
I'd still rather it not pick anyone than force an unwilling player that will probably just leave. Eventually the game rule system should be reworked so that at bare minimum the rule should notify any active admins somehow that it failed to select players and they can sort it out. Though ideally the rule just wouldn't even be picked. |
fairnuff i dont care to push on it |
About the PR
remove the shitcode that made it pick people IN THE LOBBY and that dont meet requirements for any listed antag role in the rule
Why / Balance
idk being a traitor in ooc sounds bad, if it even worked and didnt just crash the server
fixes #27425 and fixes #28196
Media
wyci
Breaking changes
no
Changelog
🆑