docs: document story engine and PR2 playable loop
CI / verify (push) Failing after 58s
CI / verify (pull_request) Failing after 41s

This commit is contained in:
ginnoir
2026-06-11 19:00:49 -05:00
parent 1461510a4b
commit c76265d648
14 changed files with 137 additions and 30 deletions
+14 -2
View File
@@ -6,7 +6,13 @@ const resourcesById = {
coin: { id: 'coin', name: 'Coin', startAmount: 0 },
};
const actionsById = {
scout_path: { id: 'scout_path', name: 'Scout', durationMs: 1000, costs: [], yields: [{ resourceId: 'coin', amount: 1 }] },
scout_path: {
id: 'scout_path',
name: 'Scout',
durationMs: 1000,
costs: [],
yields: [{ resourceId: 'coin', amount: 1 }],
},
};
const validNodes = [
@@ -47,7 +53,13 @@ describe('buildStoryContent()', () => {
it('rejects dangling targetNodeId on choices', () => {
expect(() =>
buildStoryContent(
[{ id: 'n', prose: 'x', choices: [{ id: 'c', label: 'y', outcomes: [], targetNodeId: 'missing' }] }],
[
{
id: 'n',
prose: 'x',
choices: [{ id: 'c', label: 'y', outcomes: [], targetNodeId: 'missing' }],
},
],
actionsById,
resourcesById,
),