import { parseDialogueLines } from '@datamoc/mwg/core';
const lines = parseDialogueLines(`
The bridge creaks.
@mara Careful.
@jon I know.
- Is it holding?
- Barely.
`);
for (const line of lines) console.log(`${line.speaker ?? 'narrator'}: ${line.text}`);
//narrator: The bridge creaks.
//mara: Careful.
//jon: I know.
//mara: Is it holding?
//jon: Barely.
Parses the terse
@id text/- textdialogue format into oneDialogueLineper spoken or narrated line, in order. To play it on a scene, hand the same source toparseDialogueTextintwo-d/stage(orrpg), which wraps these lines in that module's own commands.