Created
April 27, 2025 00:26
-
-
Save kyrathasoft/614adce9a8ff332637021a8b67a557bb to your computer and use it in GitHub Desktop.
The Arbitrarily Long Return function for use in Sugarcube
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* Trigger the following code at the start of navigation to a new passage. */ | |
$(document).on(":passagestart", function (event) { | |
/* Make sure the current passage doesn't have a "noreturn" tag. */ | |
if (!tags().includes("noreturn")) { | |
/* If it doesn't, then set $return to the current passage name. */ | |
State.variables.return = passage(); | |
} | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment