Repository navigation
feature: community servers report each map's final counts and name the map, so the panel can keep a map's last kills on that map - #281
Merged
Conversation
…e map, so the panel can keep a map's last kills on that map The roster sends the counts it had when a map ended in a sync of its own, before it holds through the map change, and every sync names the map. A map-end report the panel misses is sent again, and given up after the hold cap so it cannot hold up the reports after it. Panels that predate per-map sessions ignore the map.
…nd the map is read from the map load event A roster that changed over the map change differed from the pending report on every poll, so each poll became a sync until the report was taken. The map name now comes with SwiftlyS2's map load event, and a plugin only asks the engine for it on a hot reload, where it has missed that event and the engine has a map to answer with.
…end report, and a kill during the hold stays out of it
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.
Community servers now name the map in every sanction sync, and send the counts they had when a map ended in a sync of their own, before the roster holds through the map change.
The panel side is 5stackgg/api#883, which splits a community session into one stretch per map and mode. Without this PR that api change still works, with the map left empty. Without that api PR, this one is harmless: panels that predate per-map sessions ignore
map, and the map-end report is an ordinary roster sync.PlayerRoster.MapEndedsnapshots the players, departures and map while the roster is known, and makes a sync due at once.Reportsends that snapshot first;Delivereddrops it once the panel records it.OnMapStarton CSS,OnMapLoadon SwiftlyS2). On a hot reload, which misses that event, the plugin reads the current map once.PlayerSanctionsRequest.mapis optional; a blank name is sent as no map.Known limits, documented on
MapEnded: a map that ends before its own hold has settled has no roster to send, and a second map change while the first report is still undelivered replaces it. Either way those kills land on the next map, as they do today.Tests:
PlayerRosterTestscovers the final report, its departures, resending a missed one, the retry pacing on a refusal (fails without the fix), the cap, an unknown roster and a blank map. 131/131 pass; both plugins build.Reopened from a branch here, next to the api PRs (was #279).