Repository navigation
feat(pass): let players earn and redeem slender passes in the lobby - #435
Merged
Merged
Conversation
Contributor
Test results 870 files 870 suites 7m 21s ⏱️ Results for commit 34bb1dd. ♻️ This comment has been updated with latest results. |
3 of 7 tasks
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
TheMeinerLP
force-pushed
the
feat/slender-pass
branch
from
October 27, 2026 09:36
9569849 to
9774c1b
Compare
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
TheMeinerLP
force-pushed
the
feat/slender-pass
branch
from
October 27, 2026 11:13
9774c1b to
1a10f7f
Compare
TheMeinerLP
force-pushed
the
feat/slender-pass
branch
from
October 27, 2026 11:16
1a10f7f to
34bb1dd
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Proposed changes
Until now the Slender was always drawn at random, so a player who really wanted to hunt could wait many rounds without ever getting the role. Like the traitor passes back in TTT, players can now redeem a slender pass in the lobby and are sure to play the Slender in the next round.
In the lobby a new item shows how many passes a player has. A right click (or
/pass) reserves the role, a second click (or/pass cancel) gives it back. Only one player per round can reserve: whoever comes first gets it, everyone else keeps their pass and is told the role is taken. The lobby learns that a pass was redeemed, but not by whom, so the Slender stays a secret. The pass is only spent when the round really starts with that player as the Slender. A player who leaves the lobby or whose round never starts keeps it. If the Slender leaves mid-round, the replacement is still drawn at random.Players get passes in three ways:
/pass give|take|set <player> <amount>(cygnus.pass.admin), for events, the shop or support.cygnus.slender-pass.monthly-quota, credited on the first lobby join of each month.Earned and quota passes stop at five (
pass.max-balance), admin grants do not. Passes are stored in the statistics database next to the yearly statistics, with a ledger of every change. A GDPR deletion removes them too. Without a database the feature stays hidden and/passsays it is unavailable.Types of changes
What types of changes does your code introduce to this project?
Put an
xin the boxes that applyChecklist
Put an
xin the boxes that apply. You can also fill these out after creating the PR. If you're unsure about any ofthem, don't hesitate to ask. We're here to help! This is simply a reminder of what we are going to look for before
merging your code.
Further comments
The plan behind this pull request, the OpenSpec changes
add-slender-pass(redeeming) andadd-slender-pass-earning(earning), is reviewed separately in #436 to keep this diff to the code.The role is handed out at once when the round starts, and the pass is spent right after in the background, so a slow database never holds up the round start. The only way this spend can fail is an admin taking the last pass in that very moment. The player then keeps the role for that round, and the failure is logged.
Still open: a live test against a real server with PostgreSQL. The admin commands also only find players who are online.