Weekly prizes stay for Game Pass holders (Marty 2026-11-23, restoring the 11-02 rule changed in 5e8c903 an hour earlier); the leaderboard page now says in plain words that an active Game Pass at week end is needed to win, with a link to get one; guides and terms back to the Pass wording; the one-time fill route stays and is documented as ignoring the Pass

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
This commit is contained in:
martbost
2026-11-23 08:21:55 -06:00
parent 5e8c903b63
commit a71d8ea276
7 changed files with 14 additions and 12 deletions
+2 -2
View File
@@ -53,7 +53,7 @@ const IAP_URL = String(process.env.IAP_URL || 'https://instantadpay.com').replac
gp.use({ game: 'polhunter', secret: String(process.env.HUNT_SSO_SECRET || '').trim(), iap: IAP_URL, store, notify: (kind, p) => notify(kind, p) });
const passActive = me => !!(gp.on() && me && gp.passOf(me.memberId, me.email).active);
const passExtra = me => passActive(me) ? 2 : 0; // the perk: 5 missions a day instead of 3
// the full tier (Marty 2026-11-02): Game Pass holders get the full allotment, the full draw and the Mystery Box (weekly prizes are open to everyone since 2026-11-23);
// the full tier (Marty 2026-11-02): Game Pass holders get the full allotment, the full draw, the weekly prizes and the Mystery Box;
// a free account gets the free tier (lib/rewards.js freeMissionsPerDay / freeMinPol / freeMaxPol). With GAMEPASS off there is no
// pass to buy, so everyone stays on the full tier as before.
const fullTier = me => !gp.on() || passActive(me);
@@ -396,7 +396,7 @@ const server = http.createServer(async (req, res) => {
if (p === '/api/admin/settings' && req.method === 'POST') { const b = await readBody(req); const patch = {}; for (const k of ['minPol', 'maxPol', 'dailyCapPol', 'lowBalancePol', 'weeklyMinFinds', 'drawSkew', 'missionsPerDay', 'freeMissionsPerDay', 'freeMinPol', 'freeMaxPol', 'detectiveOn', 'detectivePol', 'refEnabled', 'refBountyPol', 'refMatchPct', 'refMatchDays', 'refNewDays', 'refCapPol', 'refMatchMinPol', 'rotationOn', 'tourStopCredits', 'tourStopCreditsDailyMax']) if (b[k] != null && Number(b[k]) >= 0) patch[k] = Number(b[k]); for (const k of ['weeklyPrizes', 'leaderboardExclude']) if (Array.isArray(b[k])) patch[k] = b[k].map(Number).filter(n => n >= 0); return json(res, 200, { ok: true, settings: rewards.setSettings(patch) }); }
// award a week by hand (its Monday key); already-awarded weeks are skipped
if (p === '/api/admin/prizes/award' && req.method === 'POST') { const b = await readBody(req); const r = social.awardWeek(String(b.week || '')); if (r && r.winners && r.winners.length) notify('prize', r).catch(() => {}); return json(res, r && r.error ? 400 : 200, r); }
// fill an already-awarded week under today's rule (2026-11-23): pays the places that went unpaid, never anyone twice
// one-time catch-up for an already-awarded week (2026-11-23), ignoring the Pass: pays the places that went unpaid, never anyone twice
if (p === '/api/admin/prizes/fill' && req.method === 'POST') { const b = await readBody(req); const r = social.awardFill(String(b.week || '')); if (r && r.winners && r.winners.length) notify('prize', r).catch(() => {}); return json(res, r && r.error ? 400 : 200, r); }
// Ad Detective question bank: stats per question, add or edit one, retire or restore one
if (p === '/api/admin/rotation') return json(res, 200, rotation.adminView()); // the Network Tour: rounds per hunter, tour-stop credits sent / owed