Skip to content

feat(PrizePool): add club share support for team prize pools#7728

Open
Eetwalt wants to merge 13 commits into
pp-currency-togglefrom
pp-club-share
Open

feat(PrizePool): add club share support for team prize pools#7728
Eetwalt wants to merge 13 commits into
pp-currency-togglefrom
pp-club-share

Conversation

@Eetwalt

@Eetwalt Eetwalt commented Jul 2, 2026

Copy link
Copy Markdown
Collaborator

Summary

Stacked on top of #7688 (Table2 redesign) and #7715 (currency toggle) — both should merge first.

  • Split a team placement's prize into Total → Player Prize → Club Reward columns; the player's cut is entered per slot (playershare=) and the club reward is derived as the remainder
  • Works per-currency: shares convert into every currency and toggle together with the currency pill from feat(PrizePool): add currency toggle for multi-currency tables #7715 (single-currency pools render the columns with no toggle)
  • Enabled by pool-level playershare=true; optional clubshare=<label> overrides the "Club Reward" column title
  • Store the USD player share in placement LPDB extradata, and derive each team player's individualprizemoney from the player share instead of the org-inclusive total (so org money doesn't inflate player earnings)
  • Add unit + rendering specs and a golden snapshot for the multi-currency club-share table

Inspired by the prior attempt in #7284, rebuilt for the redesigned (Table2) prize pool.

How did you test this change?

dev (https://liquipedia.net/counterstrike/User:Eetwalt/Sandbox:PrizePool)

Example
image

@Eetwalt Eetwalt requested review from a team as code owners July 2, 2026 13:38
Comment thread lua/spec/prize_pool_spec.lua Outdated
local found = false
for _, call in ipairs(LpdbPlacementStub.calls) do
local extradata = call.vals[2] and call.vals[2].extradata
if type(extradata) == 'string' and extradata:find('"playershare":250000', 1, true) then

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Probably better to parse the json to make it less sensitive to how the JSON stringifies in details

Comment on lines +291 to +292
if type(extradata) == 'string' then
local parsed = Json.parse(extradata)

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

can use json.parseIfString

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants