feedback5 WD: the sim fields a 补位 stand-in — getChess(id, { standIn: true }) over data/backups.json, PlayerBattleInput standIn: true, kits by the stand-in's charId (never the replaced operator's), kits/ops/standin-<codename>.js registry, harness standIn
- simdata: DataSource keeps `backups` (rawBackups follows the fallback chain); getStandIn = shared/standIn.js standInRecord normalised (the chess's ids / bonds / 特质 / tier, the stand-in's body, def.standInFor); a PRESET / DIY chess or a source without backups fields itself; the per-battle view maps id-only lookups. - spec.js keeps `standIn` only when exactly true (never on a token); Battle passes it to getChess; syncUnitLoadout carries it; UnitInfo `standInFor`. - content/index.js kitOf: a stand-in's kit is KITS[def.charId] only; no default skill (a stand-in kit writes `skills`); without a kit the generic kit plus genericTalents. kits/index.js STANDIN_KIT_FILES / STANDIN_KITS, merged after the tier groups (old keys keep their order; golden unchanged). - server/data.js and tools/setup.mjs expect backups.json. - test/content/standin.test.js: the plumbing and the eight 预备干员 on all 28 chess records they replace.
This commit is contained in:
1 parent
286a34064f
commit
ed2b679f83
14 files changed
+656
-58
No files matched your search
+2
-2
@@ -2,7 +2,7 @@
|
||||
//
|
||||
// Every `*.json` file in the data directory becomes a top-level key named after its basename
|
||||
// (config, chess, bonds, garrisons, items, bands, effects, choices, enemies, factions, waves, stages,
|
||||
// bosses, tokens, assets, …). The result is deep-frozen so no module can mutate shared data by accident.
|
||||
// bosses, tokens, assets, backups, …). The result is deep-frozen so no module can mutate shared data by accident.
|
||||
// Missing or unparsable files are tolerated with a warning (data is generated in parallel with the
|
||||
// server); consumers must cope with an absent key.
|
||||
//
|
||||
@@ -26,7 +26,7 @@ export const DATA_DIR = path.join(ROOT, 'data');
|
||||
/** Files the game expects (a warning lists the missing ones). */
|
||||
export const DATA_FILES = Object.freeze([
|
||||
'config', 'chess', 'bonds', 'garrisons', 'items', 'bands', 'effects', 'choices',
|
||||
'enemies', 'factions', 'waves', 'stages', 'bosses', 'tokens', 'assets',
|
||||
'enemies', 'factions', 'waves', 'stages', 'bosses', 'tokens', 'assets', 'backups',
|
||||
]);
|
||||
|
||||
/**
|
||||
|
||||
Reference in new issue
Block a user