Match intro "players joining" loading screen + i18n fix; checkpoint
- MatchIntroOverlay: UNO-style pre-game reveal — the 4 seats animate into the table (with "?" placeholders until each player's data streams in for live matches), a 3-2-1-GO countdown, then the table shows. Wired via game-store matchIntroPending/consumeIntro, rendered online-only in GameScreen. - Fix: intro.found / intro.getReady / intro.go existed only in the Persian dict; added the English strings (would have shown raw keys to EN users). - Checkpoint of the in-progress UI/social batch (CoinsPill, shop titles section, friend-request rate limit, etc.) — all green. Verified: tsc + next build + scripts/sim.ts + dotnet build server/Hokm.slnx all pass. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
@@ -94,6 +94,8 @@ interface GameStore {
|
||||
forfeited: boolean;
|
||||
/** a teammate is asking to forfeit and needs your confirmation. */
|
||||
forfeitRequest: ForfeitRequest | null;
|
||||
/** a fresh online match just started — play the "players joining the table" intro once. */
|
||||
matchIntroPending: boolean;
|
||||
|
||||
newMatch: (settings: GameSettings) => void;
|
||||
newOnlineMatch: (cfg: OnlineMatchConfig) => void;
|
||||
@@ -109,6 +111,8 @@ interface GameStore {
|
||||
forfeit: () => void;
|
||||
/** Respond to a teammate's forfeit request. */
|
||||
respondForfeit: (confirm: boolean) => void;
|
||||
/** Mark the match-intro reveal as played (so it doesn't replay on resume). */
|
||||
consumeIntro: () => void;
|
||||
reset: () => void;
|
||||
}
|
||||
|
||||
@@ -334,6 +338,7 @@ export const useGameStore = create<GameStore>((set, get) => {
|
||||
paused: false,
|
||||
forfeited: false,
|
||||
forfeitRequest: null,
|
||||
matchIntroPending: false,
|
||||
|
||||
newMatch: (settings) => {
|
||||
clearPending();
|
||||
@@ -376,6 +381,7 @@ export const useGameStore = create<GameStore>((set, get) => {
|
||||
paused: false,
|
||||
forfeited: false,
|
||||
forfeitRequest: null,
|
||||
matchIntroPending: true,
|
||||
matchMeta: { ranked: cfg.ranked, stake: cfg.stake, speed: !!cfg.speed },
|
||||
tally: freshTally(),
|
||||
turnDeadline: null,
|
||||
@@ -410,6 +416,7 @@ export const useGameStore = create<GameStore>((set, get) => {
|
||||
paused: false,
|
||||
forfeited: false,
|
||||
forfeitRequest: null,
|
||||
matchIntroPending: true,
|
||||
matchMeta: { ranked: true, stake: 0, speed: false },
|
||||
tally: freshTally(),
|
||||
turnDeadline: null,
|
||||
@@ -529,6 +536,8 @@ export const useGameStore = create<GameStore>((set, get) => {
|
||||
set({ forfeitRequest: null });
|
||||
},
|
||||
|
||||
consumeIntro: () => set({ matchIntroPending: false }),
|
||||
|
||||
reset: () => {
|
||||
clearPending();
|
||||
if (liveUnsub) {
|
||||
@@ -553,6 +562,7 @@ export const useGameStore = create<GameStore>((set, get) => {
|
||||
paused: false,
|
||||
forfeited: false,
|
||||
forfeitRequest: null,
|
||||
matchIntroPending: false,
|
||||
seatPlayers: [],
|
||||
tally: freshTally(),
|
||||
turnDeadline: null,
|
||||
|
||||
Reference in New Issue
Block a user