Adding linkToNextStorylet to Readme and fixing a bug

This commit is contained in:
David Masad
2021-02-28 10:38:24 -05:00
parent a30931691e
commit f3bafb8d35
7 changed files with 79 additions and 41 deletions

View File

@ -105,7 +105,7 @@ StoryManager.weightedRandom = function(allStorylets, n) {
// ---------------------------------------------------------------
Macro.add("getStoryletLinks", {
handler: function() {
let n, tag;
let n, tag, selection;
[n=null, tag=null, selection="ordered"] = this.args;
State.temporary.nextStorylets = StoryManager.getStorylets(n, tag, selection);
$(this.output).wiki(`\
@ -114,7 +114,7 @@ Macro.add("getStoryletLinks", {
[[_storylet.description|_storylet.passage][$currentStorylet=_storylet]]<br>
<</capture>> \
<</for>> \
`);
`)
}
});