games: Stop sending pages to players who forfeited#70
Merged
PartMan7 merged 4 commits intoPartMan7:mainfrom Jul 7, 2025
Merged
games: Stop sending pages to players who forfeited#70PartMan7 merged 4 commits intoPartMan7:mainfrom
PartMan7 merged 4 commits intoPartMan7:mainfrom
Conversation
PartMan7
reviewed
Jul 1, 2025
PartMan7
reviewed
Jul 1, 2025
src/ps/handlers/interface.ts
Outdated
| return game.update(user); | ||
| } | ||
| if (game.spectators.includes(user)) { | ||
| if (game.spectators.includes(user) || (player && player.out)) { |
Owner
There was a problem hiding this comment.
Oh oops
Issue here is that a player who's out won't be in spectators either. We might need to do something like:
- Players are only sent HTML if
player.outis nottrue - Players that should keep spectating even upon being
out(eg: Chain Reaction) should be moved togame.spectatorsinstead (and stuff likerejoinwill have to be rechecked once to make sureplayer.out === true && spectators.includes(player)conditions are handled
Owner
There was a problem hiding this comment.
Should be able to remove the line here now
Also need to disable auto-updates for players that are out
Collaborator
Author
There was a problem hiding this comment.
Removed the line but not sure what you mean by the auto-updates? Since they become spectators shouldn't they also keep getting updates sent to them
Owner
Owner
|
Okay this looks great, thanks! |
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.

No description provided.