Testing interruptions and adding passage

This commit is contained in:
David Masad
2021-01-28 21:18:32 -05:00
parent 37c5740060
commit 2bf181a68d
4 changed files with 75 additions and 6 deletions

View File

@ -38,8 +38,8 @@ StoryManager.getStorylets = function(n=null, tag=null, respect_interrupt=true)
// Check for interruptions
// TODO: Handle more than one interruption
if (respect_interrupt)
for (let storylet in allStorylets)
if (storylet.interrupt) return [storylet];
for (let i in allStorylets)
if (allStorylets[i].interrupt) return [allStorylets[i]];
// Get n stories in priority order
if (n != null) {