docs: document story engine and PR2 playable loop
This commit is contained in:
@@ -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,
|
||||
),
|
||||
|
||||
Reference in New Issue
Block a user