The match-ended plate, the solo pause plate, the highlight styles and keepEarly now live in public/js/screens/game/*.js. game.js stays the screen entry. MatchScreen stays one component. Imports only those pieces used moved with them. Two source pins follow the lines that moved.
10 lines
548 B
JavaScript
10 lines
548 B
JavaScript
// public/js/screens/game/early.js — which events are replayed when a field is entered late.
|
|
|
|
import { fxForm } from '../../../../shared/protocol.js';
|
|
|
|
export const STATE_EV = new Set(['spawn', 'die', 'deploy', 'status', 'skill']);
|
|
|
|
/** Event tuples replayed when a field is entered late: the state-bearing kinds and the fx that change an enemy's model
|
|
* form (shared/protocol.js fxForm — the field meta's UnitInfo `form` predates them). */
|
|
export const keepEarly = (e) => Array.isArray(e) && (STATE_EV.has(e[0]) || fxForm(e) !== undefined);
|