SugarCube v2.36.1 has been published.
Downloads & documentation for all Twine/Twee compilers: https://www.motoslave.net/sugarcube/2/
v2.36.1 Changelog highlights:
- Fixed an issue with the build system that was producing subtly broken builds.
v2.36.0 Changelog highlights:
- Fixed an issue with the
selected
keyword in the<<cycle>>
and<<listbox>>
macros’<<option>>
tags. - Fixed instances where using the
[img[]]
markup as an argument to macros would drop thelink-image
class. - Fixed
Config.history.maxStates
to disallow unlimited states (value:0
). - Added the
init
special tag that, similar toStoryInit
, allows pre-story-start initialization tasks. Intended for add-on/library use. - Added a
data-init-passage
content attribute toStoryInterface
that allows content to be updated only once at initialization. - Added the
State.metadata.entries()
andState.metadata.keys()
static methods. - Added a
once
keyword to the<<cycle>>
macro that ends the cycle upon reaching the final option. - Added the
<Array>.countWith()
method. - Added the
Save
Events API. - Added support for template literals within TwineScript.
- Added various accessibility improvements.
- Updated the
<<done>>
macro to better serve when used to wait for DOM updates. -
<<widget>>
macro updates:- Added a
container
keyword that allows non-void/container widgets and an associated_contents
special variable. - Added a new special arguments variable,
_args
, and deprecated the old variable,$args
.
- Added a
- Updated the default value of
Config.history.maxStates
from100
to40
. - Updated passage objects to maintain the order of passage tags as specified in the data chunk.
- Deprecated the
Config.saves.onLoad
andConfig.saves.onSave
settings in favor of theSave
Events API. - Updated bundled library:
jQuery
to v3.6.0. - Updates to locale files:
- Updated the localization template. Translators are asked to updated the locale files as necessary.
- Added
nl.js
– Dutch.
- Various documentation updates.
- Various internal improvements.
- Build system updates.