diff --git a/src/client/TerritoryPatternsModal.ts b/src/client/TerritoryPatternsModal.ts index 9af5a53c6..24c723a1c 100644 --- a/src/client/TerritoryPatternsModal.ts +++ b/src/client/TerritoryPatternsModal.ts @@ -111,22 +111,27 @@ export class TerritoryPatternsModal extends LitElement { this.userMeResponse, this.affiliateCode, ); - // Only show owned patterns (skip blocked and purchasable) - if (rel !== "owned") { + if (rel === "blocked") { continue; } - buttons.push(html` - this.selectPattern(p)} - .onPurchase=${(p: Pattern, colorPalette: ColorPalette | null) => - handlePurchase(p, colorPalette)} - > - `); + + // If in affiliate shop, show only purchaseable skins. + // Otherwise, show only owned skins. + const isAffiliateShop = this.affiliateCode !== null; + if ((isAffiliateShop && rel === "purchasable") || rel === "owned") { + buttons.push(html` + this.selectPattern(p)} + .onPurchase=${(p: Pattern, colorPalette: ColorPalette | null) => + handlePurchase(p, colorPalette)} + > + `); + } } }