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.
This commit is contained in:
1 parent
aaef748ad9
commit
dd07dc1ec1
6 files changed
+65
-48
No files matched your search
@@ -0,0 +1,9 @@
|
||||
// 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);
|
||||
Reference in new issue
Block a user