Files
ark-stronghold-protocol/public/js/screens/game/early.js
T
sganggs dd07dc1ec1 feedback5 R5: split the match screen's standalone pieces out
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.
2026-10-05 17:24:20 +08:00

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);