From df0f9f14c2a6205f3c7150a1f12e4790c717d883 Mon Sep 17 00:00:00 2001 From: semantic-release-bot Date: Sat, 13 Nov 2021 09:10:38 +0000 Subject: [PATCH] chore(release): 19.2.0 [skip ci] # [19.2.0](https://github.com/seleb/bitsy-hacks/compare/v19.1.2...v19.2.0) (2021-11-13) ### Features * allow more than 2 choices by automatically expanding box ([e1014ac](https://github.com/seleb/bitsy-hacks/commit/e1014ac2287d5d523732d963314274db019ec58c)) * include long dialog hack in dialog choices hack ([3cd01b6](https://github.com/seleb/bitsy-hacks/commit/3cd01b6ed9ffb747f3c4126416f1f5de1a14784a)) * make long dialog size dynamic (adds `textboxsize` tag) ([2815a94](https://github.com/seleb/bitsy-hacks/commit/2815a94ae94cd2d124dac3b1ba64d668fc9bea56)) --- CHANGELOG.md | 9 + README.md | 2 +- dist/avatar-by-room.js | 6 +- dist/backdrops.js | 8 +- dist/basic-sfx.js | 6 +- dist/bitsymuse.js | 6 +- dist/canvas-replacement.js | 4 +- dist/character-portraits-animated.js | 6 +- dist/character-portraits.js | 4 +- dist/close-on-ending.js | 4 +- dist/corrupt.js | 8 +- dist/custom-exit-effects.js | 4 +- dist/custom-keyhandlers.js | 4 +- dist/custom-text-effect.js | 4 +- dist/dialog-audio-vocal-synth.js | 8 +- dist/dialog-audio.js | 4 +- dist/dialog-box-transition.js | 4 +- dist/dialog-choices.js | 252 +++++++++++++++++++++++++-- dist/dialog-jump.js | 4 +- dist/dialog-pause.js | 4 +- dist/dialog-prompt.js | 6 +- dist/direction-in-dialog.js | 4 +- dist/directional-avatar.js | 8 +- dist/dynamic-background.js | 6 +- dist/edit-dialog-from-dialog.js | 6 +- dist/edit-image-from-dialog.js | 8 +- dist/edit-player-from-dialog.js | 6 +- dist/edit-room-from-dialog.js | 6 +- dist/end-from-dialog.js | 4 +- dist/exit-from-dialog.js | 6 +- dist/external-game-data.js | 4 +- dist/favicon-from-sprite.js | 6 +- dist/follower.js | 6 +- dist/gamepad-input.js | 4 +- dist/gravity.js | 8 +- dist/itsy-bitsy.js | 4 +- dist/javascript-dialog.js | 4 +- dist/logic-operators-extended.js | 4 +- dist/long-dialog.js | 92 +++++++++- dist/multi-sprite-avatar.js | 6 +- dist/noclip.js | 6 +- dist/online.js | 14 +- dist/opaque-tiles.js | 4 +- dist/paragraph-break.js | 4 +- dist/permanent-items.js | 4 +- dist/push-sprites.js | 8 +- dist/replace-drawing.js | 4 +- dist/save.js | 6 +- dist/smooth-moves.js | 4 +- dist/solid-items.js | 4 +- dist/sprite-effects.js | 6 +- dist/stopwatch.js | 6 +- dist/text-to-speech.js | 4 +- dist/tracery-processing.js | 4 +- dist/transitions.js | 6 +- dist/transparent-background.js | 6 +- dist/transparent-dialog.js | 4 +- dist/transparent-sprites.js | 4 +- dist/twine-bitsy-comms.js | 4 +- dist/unique-items.js | 4 +- package-lock.json | 2 +- package.json | 2 +- 62 files changed, 486 insertions(+), 173 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index baea8efb..52599640 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,12 @@ +# [19.2.0](https://github.com/seleb/bitsy-hacks/compare/v19.1.2...v19.2.0) (2021-11-13) + + +### Features + +* allow more than 2 choices by automatically expanding box ([e1014ac](https://github.com/seleb/bitsy-hacks/commit/e1014ac2287d5d523732d963314274db019ec58c)) +* include long dialog hack in dialog choices hack ([3cd01b6](https://github.com/seleb/bitsy-hacks/commit/3cd01b6ed9ffb747f3c4126416f1f5de1a14784a)) +* make long dialog size dynamic (adds `textboxsize` tag) ([2815a94](https://github.com/seleb/bitsy-hacks/commit/2815a94ae94cd2d124dac3b1ba64d668fc9bea56)) + ## [19.1.2](https://github.com/seleb/bitsy-hacks/compare/v19.1.1...v19.1.2) (2021-10-12) diff --git a/README.md b/README.md index a8335a88..1fd1e857 100644 --- a/README.md +++ b/README.md @@ -31,7 +31,7 @@ Last tested against Bitsy 7.10 - 💬 [dialog audio](/dist/dialog-audio.js): animal crossing-style audio - 🎺 [dialog audio vocal synth](/dist/dialog-audio-vocal-synth.js): animal crossing-style audio powered by the pink trombone vocal synth - 🔁 [dialog box transition](/dist/dialog-box-transition.js): adds an easing transition animation to display the dialog box text -- 🔀 [dialog choices](/dist/dialog-choices.js): binary dialog choices +- 🔀 [dialog choices](/dist/dialog-choices.js): dialog choices - 🚀 [dialog jump](/dist/dialog-jump.js): jump from one dialog entry to another - 💬 [dialog pause](/dist/dialog-pause.js): add pauses in between printing text - ⌨ [dialog prompt](/dist/dialog-prompt.js): prompt the user for text input in dialog diff --git a/dist/avatar-by-room.js b/dist/avatar-by-room.js index e6c881b8..b7f89e2a 100644 --- a/dist/avatar-by-room.js +++ b/dist/avatar-by-room.js @@ -4,7 +4,7 @@ @summary change the avatar in certain rooms @license MIT @author Sean S. LeBlanc -@version 19.1.2 +@version 19.2.0 @requires Bitsy 7.10 @@ -174,7 +174,7 @@ function applyHook(root, functionName) { @summary Monkey-patching toolkit to make it easier and cleaner to run code before and after functions or to inject new code into script tags @license WTFPL (do WTF you want) @author Original by mildmojo; modified by Sean S. LeBlanc -@version 19.1.2 +@version 19.2.0 @requires Bitsy 7.10 */ @@ -241,7 +241,7 @@ var after = kitsy.after; @file utils @summary miscellaneous bitsy utilities @author Sean S. LeBlanc -@version 19.1.2 +@version 19.2.0 @requires Bitsy 7.10 */ diff --git a/dist/backdrops.js b/dist/backdrops.js index 35cf5a83..89af187d 100644 --- a/dist/backdrops.js +++ b/dist/backdrops.js @@ -4,7 +4,7 @@ @summary makes the game have a backdrop @license MIT @author Cephalopodunk & Sean S. LeBlanc -@version 19.1.2 +@version 19.2.0 @requires Bitsy 7.10 @@ -181,7 +181,7 @@ function applyHook(root, functionName) { @summary Monkey-patching toolkit to make it easier and cleaner to run code before and after functions or to inject new code into script tags @license WTFPL (do WTF you want) @author Original by mildmojo; modified by Sean S. LeBlanc -@version 19.1.2 +@version 19.2.0 @requires Bitsy 7.10 */ @@ -250,7 +250,7 @@ var after = kitsy.after; @summary makes all sprites have transparent backgrounds @license MIT @author Sean S. LeBlanc -@version 19.1.2 +@version 19.2.0 @requires Bitsy 7.10 @@ -302,7 +302,7 @@ after('renderPixelInstruction', function (bufferId, buffer, paletteIndex, x, y) @summary makes the game have a transparent background @license MIT @author Cephalopodunk & Sean S. LeBlanc -@version 19.1.2 +@version 19.2.0 @requires Bitsy 7.10 diff --git a/dist/basic-sfx.js b/dist/basic-sfx.js index 73823455..7b1042e2 100644 --- a/dist/basic-sfx.js +++ b/dist/basic-sfx.js @@ -4,7 +4,7 @@ @summary "walk" and "talk" sound effect support @license MIT @author Sean S. LeBlanc -@version 19.1.2 +@version 19.2.0 @requires Bitsy 7.10 @@ -172,7 +172,7 @@ function applyHook(root, functionName) { @summary Monkey-patching toolkit to make it easier and cleaner to run code before and after functions or to inject new code into script tags @license WTFPL (do WTF you want) @author Original by mildmojo; modified by Sean S. LeBlanc -@version 19.1.2 +@version 19.2.0 @requires Bitsy 7.10 */ @@ -239,7 +239,7 @@ var after = kitsy.after; @file utils @summary miscellaneous bitsy utilities @author Sean S. LeBlanc -@version 19.1.2 +@version 19.2.0 @requires Bitsy 7.10 */ diff --git a/dist/bitsymuse.js b/dist/bitsymuse.js index e19dba37..4ac4cf32 100644 --- a/dist/bitsymuse.js +++ b/dist/bitsymuse.js @@ -4,7 +4,7 @@ @summary A variety of Bitsy sound and music handlers @license MIT @author David Mowatt -@version 19.1.2 +@version 19.2.0 @requires Bitsy 7.10 @@ -206,7 +206,7 @@ function applyHook(root, functionName) { @summary Monkey-patching toolkit to make it easier and cleaner to run code before and after functions or to inject new code into script tags @license WTFPL (do WTF you want) @author Original by mildmojo; modified by Sean S. LeBlanc -@version 19.1.2 +@version 19.2.0 @requires Bitsy 7.10 */ @@ -371,7 +371,7 @@ function addDualDialogTag(tag, fn) { @file utils @summary miscellaneous bitsy utilities @author Sean S. LeBlanc -@version 19.1.2 +@version 19.2.0 @requires Bitsy 7.10 */ diff --git a/dist/canvas-replacement.js b/dist/canvas-replacement.js index a38dd8f9..8e8a6dd1 100644 --- a/dist/canvas-replacement.js +++ b/dist/canvas-replacement.js @@ -4,7 +4,7 @@ @summary WebGLazy bitsy integration (this one's mostly just for me) @license MIT @author Sean S. LeBlanc -@version 19.1.2 +@version 19.2.0 @requires Bitsy 7.10 @@ -201,7 +201,7 @@ function applyHook(root, functionName) { @summary Monkey-patching toolkit to make it easier and cleaner to run code before and after functions or to inject new code into script tags @license WTFPL (do WTF you want) @author Original by mildmojo; modified by Sean S. LeBlanc -@version 19.1.2 +@version 19.2.0 @requires Bitsy 7.10 */ diff --git a/dist/character-portraits-animated.js b/dist/character-portraits-animated.js index 97b9b69c..697ebe57 100644 --- a/dist/character-portraits-animated.js +++ b/dist/character-portraits-animated.js @@ -4,7 +4,7 @@ @summary high quality anime gifs @license MIT @author Sean S. LeBlanc -@version 19.1.2 +@version 19.2.0 @requires Bitsy 7.10 @@ -971,7 +971,7 @@ function applyHook(root, functionName) { @summary Monkey-patching toolkit to make it easier and cleaner to run code before and after functions or to inject new code into script tags @license WTFPL (do WTF you want) @author Original by mildmojo; modified by Sean S. LeBlanc -@version 19.1.2 +@version 19.2.0 @requires Bitsy 7.10 */ @@ -1088,7 +1088,7 @@ function addDialogTag(tag, fn) { @summary high quality anime jpegs (or pngs i guess) @license MIT @author Sean S. LeBlanc -@version 19.1.2 +@version 19.2.0 @requires Bitsy 7.10 diff --git a/dist/character-portraits.js b/dist/character-portraits.js index 2a7aaf93..5a931b33 100644 --- a/dist/character-portraits.js +++ b/dist/character-portraits.js @@ -4,7 +4,7 @@ @summary high quality anime jpegs (or pngs i guess) @license MIT @author Sean S. LeBlanc -@version 19.1.2 +@version 19.2.0 @requires Bitsy 7.10 @@ -200,7 +200,7 @@ function applyHook(root, functionName) { @summary Monkey-patching toolkit to make it easier and cleaner to run code before and after functions or to inject new code into script tags @license WTFPL (do WTF you want) @author Original by mildmojo; modified by Sean S. LeBlanc -@version 19.1.2 +@version 19.2.0 @requires Bitsy 7.10 */ diff --git a/dist/close-on-ending.js b/dist/close-on-ending.js index 2fbca6fa..60200114 100644 --- a/dist/close-on-ending.js +++ b/dist/close-on-ending.js @@ -4,7 +4,7 @@ @summary Prevents from playing past an ending @license MIT @author Sean S. LeBlanc -@version 19.1.2 +@version 19.2.0 @requires Bitsy 7.10 @@ -163,7 +163,7 @@ function applyHook(root, functionName) { @summary Monkey-patching toolkit to make it easier and cleaner to run code before and after functions or to inject new code into script tags @license WTFPL (do WTF you want) @author Original by mildmojo; modified by Sean S. LeBlanc -@version 19.1.2 +@version 19.2.0 @requires Bitsy 7.10 */ diff --git a/dist/corrupt.js b/dist/corrupt.js index 0c15d5ce..be3a2291 100644 --- a/dist/corrupt.js +++ b/dist/corrupt.js @@ -4,7 +4,7 @@ @summary corrupts gamedata at runtime @license MIT @author Sean S. LeBlanc -@version 19.1.2 +@version 19.2.0 @requires Bitsy 7.10 @@ -60,7 +60,7 @@ bitsy = bitsy || /*#__PURE__*/_interopDefaultLegacy(bitsy); @file utils @summary miscellaneous bitsy utilities @author Sean S. LeBlanc -@version 19.1.2 +@version 19.2.0 @requires Bitsy 7.10 */ @@ -122,7 +122,7 @@ function getImage(name, map) { @file edit image at runtime @summary API for updating image data at runtime. @author Sean S. LeBlanc -@version 19.1.2 +@version 19.2.0 @requires Bitsy 7.10 @description @@ -341,7 +341,7 @@ function applyHook(root, functionName) { @summary Monkey-patching toolkit to make it easier and cleaner to run code before and after functions or to inject new code into script tags @license WTFPL (do WTF you want) @author Original by mildmojo; modified by Sean S. LeBlanc -@version 19.1.2 +@version 19.2.0 @requires Bitsy 7.10 */ diff --git a/dist/custom-exit-effects.js b/dist/custom-exit-effects.js index 1260083f..39f76faf 100644 --- a/dist/custom-exit-effects.js +++ b/dist/custom-exit-effects.js @@ -4,7 +4,7 @@ @summary make custom exit transition effects @license MIT @author Sean S. LeBlanc -@version 19.1.2 +@version 19.2.0 @requires Bitsy 7.10 @@ -199,7 +199,7 @@ function applyHook(root, functionName) { @summary Monkey-patching toolkit to make it easier and cleaner to run code before and after functions or to inject new code into script tags @license WTFPL (do WTF you want) @author Original by mildmojo; modified by Sean S. LeBlanc -@version 19.1.2 +@version 19.2.0 @requires Bitsy 7.10 */ diff --git a/dist/custom-keyhandlers.js b/dist/custom-keyhandlers.js index 432aa98d..3fbbd0a9 100644 --- a/dist/custom-keyhandlers.js +++ b/dist/custom-keyhandlers.js @@ -4,7 +4,7 @@ @summary run custom code on key inputs @license MIT @author Sean S. LeBlanc -@version 19.1.2 +@version 19.2.0 @requires Bitsy 7.10 @@ -188,7 +188,7 @@ function applyHook(root, functionName) { @summary Monkey-patching toolkit to make it easier and cleaner to run code before and after functions or to inject new code into script tags @license WTFPL (do WTF you want) @author Original by mildmojo; modified by Sean S. LeBlanc -@version 19.1.2 +@version 19.2.0 @requires Bitsy 7.10 */ diff --git a/dist/custom-text-effect.js b/dist/custom-text-effect.js index 2201b54b..fc83acb6 100644 --- a/dist/custom-text-effect.js +++ b/dist/custom-text-effect.js @@ -4,7 +4,7 @@ @summary make {custom}text effects{custom} @license MIT @author Sean S. LeBlanc -@version 19.1.2 +@version 19.2.0 @requires Bitsy 7.10 @@ -357,7 +357,7 @@ function applyHook(root, functionName) { @summary Monkey-patching toolkit to make it easier and cleaner to run code before and after functions or to inject new code into script tags @license WTFPL (do WTF you want) @author Original by mildmojo; modified by Sean S. LeBlanc -@version 19.1.2 +@version 19.2.0 @requires Bitsy 7.10 */ diff --git a/dist/dialog-audio-vocal-synth.js b/dist/dialog-audio-vocal-synth.js index 334ac04f..f23f5323 100644 --- a/dist/dialog-audio-vocal-synth.js +++ b/dist/dialog-audio-vocal-synth.js @@ -4,7 +4,7 @@ @summary animal crossing-style audio powered by the pink trombone vocal synth @license MIT @author Sean S. LeBlanc -@version 19.1.2 +@version 19.2.0 @requires Bitsy 7.10 @@ -884,7 +884,7 @@ function applyHook(root, functionName) { @summary Monkey-patching toolkit to make it easier and cleaner to run code before and after functions or to inject new code into script tags @license WTFPL (do WTF you want) @author Original by mildmojo; modified by Sean S. LeBlanc -@version 19.1.2 +@version 19.2.0 @requires Bitsy 7.10 */ @@ -1001,7 +1001,7 @@ function addDialogTag(tag, fn) { @summary animal crossing-style audio @license MIT @author Sean S. LeBlanc -@version 19.1.2 +@version 19.2.0 @requires Bitsy 7.10 @@ -1058,7 +1058,7 @@ before('dialogBuffer.DoNextChar', function () { @file utils @summary miscellaneous bitsy utilities @author Sean S. LeBlanc -@version 19.1.2 +@version 19.2.0 @requires Bitsy 7.10 */ diff --git a/dist/dialog-audio.js b/dist/dialog-audio.js index a6b58c80..b7dbc8d1 100644 --- a/dist/dialog-audio.js +++ b/dist/dialog-audio.js @@ -4,7 +4,7 @@ @summary animal crossing-style audio @license MIT @author Sean S. LeBlanc -@version 19.1.2 +@version 19.2.0 @requires Bitsy 7.10 @@ -190,7 +190,7 @@ function applyHook(root, functionName) { @summary Monkey-patching toolkit to make it easier and cleaner to run code before and after functions or to inject new code into script tags @license WTFPL (do WTF you want) @author Original by mildmojo; modified by Sean S. LeBlanc -@version 19.1.2 +@version 19.2.0 @requires Bitsy 7.10 */ diff --git a/dist/dialog-box-transition.js b/dist/dialog-box-transition.js index fc385b27..6b5fa7db 100644 --- a/dist/dialog-box-transition.js +++ b/dist/dialog-box-transition.js @@ -4,7 +4,7 @@ @summary adds an easing transition animation to display the dialog box text @license MIT @author Delacannon -@version 19.1.2 +@version 19.2.0 @requires Bitsy 7.10 @@ -160,7 +160,7 @@ function applyHook(root, functionName) { @summary Monkey-patching toolkit to make it easier and cleaner to run code before and after functions or to inject new code into script tags @license WTFPL (do WTF you want) @author Original by mildmojo; modified by Sean S. LeBlanc -@version 19.1.2 +@version 19.2.0 @requires Bitsy 7.10 */ diff --git a/dist/dialog-choices.js b/dist/dialog-choices.js index fa7e4eba..79eb6dc6 100644 --- a/dist/dialog-choices.js +++ b/dist/dialog-choices.js @@ -1,15 +1,15 @@ /** 🔀 @file dialog choices -@summary binary dialog choices +@summary dialog choices @license MIT @author Sean S. LeBlanc -@version 19.1.2 +@version 19.2.0 @requires Bitsy 7.10 @description -Adds a dialog tag which allows you to present the player with binary dialog choices. +Adds a dialog tag which allows you to present the player with dialog choices. Uses as an arrow cursor by default, but this can be changed in the hackOptions to use a custom bitsy sprite instead. Usage: @@ -47,11 +47,15 @@ constant part of answer{ } """ +This hack includes the "long dialog" hack so that the textbox +automatically expands to allow for more than 2 choices. + Note: it's recommended you combine this hack with the dialog jump hack for complex cases. Limitations: -Each option must fit on a single line, or the interaction will break. +Each option must fit on a single line, or the cursor +may not line up with the selected option. Checking the value of a variable set in an option *immediately after the choice* will not work, @@ -93,6 +97,9 @@ var hackOptions = { y: 1, x: 0, }, + // long dialog options + minRows: 2, + maxRows: 2, }; function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; } @@ -164,12 +171,12 @@ function kitsyInject(searcher, replacer) { // Ex: before('load_game', function run() { alert('Loading!'); }); // before('show_text', function run(text) { return text.toUpperCase(); }); // before('show_text', function run(text, done) { done(text.toUpperCase()); }); -function before(targetFuncName, beforeFn) { +function before$1(targetFuncName, beforeFn) { kitsy.queuedBeforeScripts[targetFuncName] = kitsy.queuedBeforeScripts[targetFuncName] || []; kitsy.queuedBeforeScripts[targetFuncName].push(beforeFn); } // Ex: after('load_game', function run() { alert('Loaded!'); }); -function after(targetFuncName, afterFn) { +function after$1(targetFuncName, afterFn) { kitsy.queuedAfterScripts[targetFuncName] = kitsy.queuedAfterScripts[targetFuncName] || []; kitsy.queuedAfterScripts[targetFuncName].push(afterFn); } @@ -234,7 +241,7 @@ function applyHook(root, functionName) { @summary Monkey-patching toolkit to make it easier and cleaner to run code before and after functions or to inject new code into script tags @license WTFPL (do WTF you want) @author Original by mildmojo; modified by Sean S. LeBlanc -@version 19.1.2 +@version 19.2.0 @requires Bitsy 7.10 */ @@ -243,8 +250,8 @@ var kitsy = (window.kitsy = window.kitsy || { queuedBeforeScripts: {}, queuedAfterScripts: {}, inject: kitsyInject, - before, - after, + before: before$1, + after: after$1, /** * Applies all queued `inject` calls. * @@ -293,9 +300,107 @@ if (!hooked) { /** @see kitsy.inject */ var inject = kitsy.inject; /** @see kitsy.before */ -kitsy.before; +var before = kitsy.before; /** @see kitsy.after */ -kitsy.after; +var after = kitsy.after; + +// Rewrite custom functions' parentheses to curly braces for Bitsy's +// interpreter. Unescape escaped parentheticals, too. +function convertDialogTags(input, tag) { + return input.replace(new RegExp('\\\\?\\((' + tag + '(\\s+(".*?"|.+?))?)\\\\?\\)', 'g'), function (match, group) { + if (match.substr(0, 1) === '\\') { + return '(' + group + ')'; // Rewrite \(tag "..."|...\) to (tag "..."|...) + } + return '{' + group + '}'; // Rewrite (tag "..."|...) to {tag "..."|...} + }); +} + +function addDialogFunction(tag, fn) { + kitsy.dialogFunctions = kitsy.dialogFunctions || {}; + if (kitsy.dialogFunctions[tag]) { + console.warn('The dialog function "' + tag + '" already exists.'); + return; + } + + // Hook into game load and rewrite custom functions in game data to Bitsy format. + before('parseWorld', function (gameData) { + return [convertDialogTags(gameData, tag)]; + }); + + kitsy.dialogFunctions[tag] = fn; +} + +function injectDialogTag(tag, code) { + inject(/(var functionMap = \{\};[^]*?)(this.HasFunction)/m, '$1\nfunctionMap["' + tag + '"] = ' + code + ';\n$2'); +} + +/** + * Adds a custom dialog tag which executes the provided function. + * For ease-of-use with the bitsy editor, tags can be written as + * (tagname "parameters") in addition to the standard {tagname "parameters"} + * + * Function is executed immediately when the tag is reached. + * + * @param {string} tag Name of tag + * @param {Function} fn Function to execute, with signature `function(environment, parameters, onReturn){}` + * environment: provides access to SetVariable/GetVariable (among other things, see Environment in the bitsy source for more info) + * parameters: array containing parameters as string in first element (i.e. `parameters[0]`) + * onReturn: function to call with return value (just call `onReturn(null);` at the end of your function if your tag doesn't interact with the logic system) + */ +function addDialogTag(tag, fn) { + addDialogFunction(tag, fn); + injectDialogTag(tag, 'kitsy.dialogFunctions["' + tag + '"]'); +} + +/** + * Adds a custom dialog tag which executes the provided function. + * For ease-of-use with the bitsy editor, tags can be written as + * (tagname "parameters") in addition to the standard {tagname "parameters"} + * + * Function is executed after the dialog box. + * + * @param {string} tag Name of tag + * @param {Function} fn Function to execute, with signature `function(environment, parameters){}` + * environment: provides access to SetVariable/GetVariable (among other things, see Environment in the bitsy source for more info) + * parameters: array containing parameters as string in first element (i.e. `parameters[0]`) + */ +function addDeferredDialogTag(tag, fn) { + addDialogFunction(tag, fn); + bitsy.kitsy.deferredDialogFunctions = bitsy.kitsy.deferredDialogFunctions || {}; + var deferred = (bitsy.kitsy.deferredDialogFunctions[tag] = []); + injectDialogTag(tag, 'function(e, p, o){ kitsy.deferredDialogFunctions["' + tag + '"].push({e:e,p:p}); o(null); }'); + // Hook into the dialog finish event and execute the actual function + after('onExitDialog', function () { + while (deferred.length) { + var args = deferred.shift(); + bitsy.kitsy.dialogFunctions[tag](args.e, args.p, args.o); + } + }); + // Hook into the game reset and make sure data gets cleared + after('clearGameData', function () { + deferred.length = 0; + }); +} + +/** + * Adds two custom dialog tags which execute the provided function, + * one with the provided tagname executed after the dialog box, + * and one suffixed with 'Now' executed immediately when the tag is reached. + * + * i.e. helper for the (exit)/(exitNow) pattern. + * + * @param {string} tag Name of tag + * @param {Function} fn Function to execute, with signature `function(environment, parameters){}` + * environment: provides access to SetVariable/GetVariable (among other things, see Environment in the bitsy source for more info) + * parameters: array containing parameters as string in first element (i.e. `parameters[0]`) + */ +function addDualDialogTag(tag, fn) { + addDialogTag(tag + 'Now', function (environment, parameters, onReturn) { + fn(environment, parameters); + onReturn(null); + }); + addDeferredDialogTag(tag, fn); +} /** * Helper for printing a paragraph break inside of a dialog function. @@ -304,9 +409,131 @@ kitsy.after; inject(/(this\.AddLinebreak = )/, 'this.AddParagraphBreak = function() { buffer.push( [[]] ); isActive = true; };\n$1'); +/** +📃 +@file paragraph-break +@summary Adds paragraph breaks to the dialogue parser +@license WTFPL (do WTF you want) +@author Sean S. LeBlanc, David Mowatt +@version 19.2.0 +@requires Bitsy 7.10 + + +@description +Adds a (p) tag to the dialogue parser that forces the following text to +start on a fresh dialogue screen, eliminating the need to spend hours testing +line lengths or adding multiple line breaks that then have to be reviewed +when you make edits or change the font size. + +Note: Bitsy has a built-in implementation of paragraph-break as of 7.0; +before using this, you may want to check if it fulfills your needs. + +Usage: (p) + +Example: I am a cat(p)and my dialogue contains multitudes + +HOW TO USE: + 1. Copy-paste this script into a new script tag after the Bitsy source code. + It should appear *before* any other mods that handle loading your game + data so it executes *after* them (last-in first-out). + +NOTE: This uses parentheses "()" instead of curly braces "{}" around function + calls because the Bitsy editor's fancy dialog window strips unrecognized + curly-brace functions from dialog text. To keep from losing data, write + these function calls with parentheses like the examples above. + + For full editor integration, you'd *probably* also need to paste this + code at the end of the editor's `bitsy.js` file. Untested. +*/ + +// Adds the actual dialogue tag. No deferred version is required. +addDialogTag('p', function (environment, parameters, onReturn) { + environment.GetDialogBuffer().AddParagraphBreak(); + onReturn(null); +}); +// End of (p) paragraph break mod + +/** +📜 +@file long dialog +@summary put more words onscreen +@license MIT +@author Sean S. LeBlanc +@version 19.2.0 +@requires Bitsy 7.10 + + +@description +Makes the dialog box variable in height, allowing it to expand as needed. + +Minimum and maximum size are configurable. +Cheat sheet: + 2: bitsy default + 8: reaches just below the halfway mark + 16: roughly the max of the original bitsy margins + 19: max before cutting off text + +Note: this hack also includes the paragraph break hack +A common pattern in bitsy is using intentional whitespace to force new dialog pages, +but the long dialog hack makes that look awkward since the text box expands. +The paragraph break hack lets you get around this by using a (p) tag to immediately end the current page. + +There is also a dialog tag that lets you change the size ingame. + +Usage: + (textboxsize ",") + (textboxsizeNow ",") + +Examples: + (textboxsize "2,6") + (textboxsizeNow "2,2") + +HOW TO USE: + 1. Copy-paste this script into a new script tag after the Bitsy source code. + 2. edit hackOptions below as needed +*/ + +var hackOptions$1 = { + minRows: 2, + maxRows: 4, +}; + +kitsy.longDialogOptions = hackOptions$1; + +// override textbox height +inject( + /textboxInfo\.height = .+;/, + `Object.defineProperty(textboxInfo, 'height', { + get() { return textboxInfo.padding_vert + (textboxInfo.padding_vert + relativeFontHeight()) * Math.max(window.kitsy.longDialogOptions.minRows, dialogBuffer.CurPage().indexOf(dialogBuffer.CurRow())+Math.sign(dialogBuffer.CurCharCount())) + textboxInfo.arrow_height; } +})` +); +// export textbox info +inject(/(var font = null;)/, 'this.textboxInfo = textboxInfo;$1'); +before('renderDrawingBuffer', function (bufferId, buffer) { + if (bufferId !== bitsy.textboxBufferId) return; + buffer.height = bitsy.dialogRenderer.textboxInfo.height / bitsy.dialogRenderer.textboxInfo.font_scale; +}); +// rewrite hard-coded row limit +inject(/(else if \(curRowIndex )== 0/g, '$1 < window.kitsy.longDialogOptions.maxRows - 1'); +inject(/(if \(lastPage\.length) <= 1/, '$1 < window.kitsy.longDialogOptions.maxRows'); + +addDualDialogTag('textboxsize', function (environment, parameters) { + if (!parameters[0]) { + throw new Error('{textboxsize} was missing parameters! Usage: {textboxsize "minrows, maxrows"}'); + } + // parse parameters + var params = parameters[0].split(/,\s?/); + var min = parseInt(params[0], 10); + var max = parseInt(params[1], 10); + hackOptions$1.minRows = min; + hackOptions$1.maxRows = max; +}); + +hackOptions$1.minRows = hackOptions.minRows; +hackOptions$1.maxRows = hackOptions.maxRows; var dialogChoices = { choice: 0, @@ -410,6 +637,8 @@ var ChoiceNode = function(options) { this.Eval = function(environment,onReturn) { var lastVal = null; var i = 0; + var prevRows = window.kitsy.longDialogOptions.maxRows; + window.kitsy.longDialogOptions.maxRows = Infinity; function evalChildren(children,done) { if(i < children.length) { children[i].Eval(environment, function(val) { @@ -432,6 +661,7 @@ var ChoiceNode = function(options) { } window.dialogChoices.choices = this.options.map(function(option){ return function(){ + window.kitsy.longDialogOptions.maxRows = prevRows; option.onSelect.forEach(function(child){ child.Eval(environment, function(){}); }); diff --git a/dist/dialog-jump.js b/dist/dialog-jump.js index 7e69f1fa..a3d53248 100644 --- a/dist/dialog-jump.js +++ b/dist/dialog-jump.js @@ -4,7 +4,7 @@ @summary jump from one dialog entry to another @license MIT @author Sean S. LeBlanc -@version 19.1.2 +@version 19.2.0 @requires Bitsy 7.10 @@ -174,7 +174,7 @@ function applyHook(root, functionName) { @summary Monkey-patching toolkit to make it easier and cleaner to run code before and after functions or to inject new code into script tags @license WTFPL (do WTF you want) @author Original by mildmojo; modified by Sean S. LeBlanc -@version 19.1.2 +@version 19.2.0 @requires Bitsy 7.10 */ diff --git a/dist/dialog-pause.js b/dist/dialog-pause.js index 5b964426..3c317644 100644 --- a/dist/dialog-pause.js +++ b/dist/dialog-pause.js @@ -4,7 +4,7 @@ @summary add pauses in between printing text @license MIT @author Sean S. LeBlanc -@version 19.1.2 +@version 19.2.0 @requires Bitsy 7.10 @@ -160,7 +160,7 @@ function applyHook(root, functionName) { @summary Monkey-patching toolkit to make it easier and cleaner to run code before and after functions or to inject new code into script tags @license WTFPL (do WTF you want) @author Original by mildmojo; modified by Sean S. LeBlanc -@version 19.1.2 +@version 19.2.0 @requires Bitsy 7.10 */ diff --git a/dist/dialog-prompt.js b/dist/dialog-prompt.js index 2ae6f8aa..6dac59b9 100644 --- a/dist/dialog-prompt.js +++ b/dist/dialog-prompt.js @@ -4,7 +4,7 @@ @summary prompt the user for text input in dialog @license MIT @author Sean S. LeBlanc -@version 19.1.2 +@version 19.2.0 @requires Bitsy 7.10 @@ -197,7 +197,7 @@ function applyHook(root, functionName) { @summary Monkey-patching toolkit to make it easier and cleaner to run code before and after functions or to inject new code into script tags @license WTFPL (do WTF you want) @author Original by mildmojo; modified by Sean S. LeBlanc -@version 19.1.2 +@version 19.2.0 @requires Bitsy 7.10 */ @@ -321,7 +321,7 @@ inject(/(this\.AddLinebreak = )/, 'this.AddParagraphBreak = function() { buffer. @summary Adds paragraph breaks to the dialogue parser @license WTFPL (do WTF you want) @author Sean S. LeBlanc, David Mowatt -@version 19.1.2 +@version 19.2.0 @requires Bitsy 7.10 diff --git a/dist/direction-in-dialog.js b/dist/direction-in-dialog.js index 2289a165..1873c283 100644 --- a/dist/direction-in-dialog.js +++ b/dist/direction-in-dialog.js @@ -4,7 +4,7 @@ @summary provides a variable with player direction @license MIT @author Sean S. LeBlanc -@version 19.1.2 +@version 19.2.0 @requires Bitsy 7.10 @@ -166,7 +166,7 @@ function applyHook(root, functionName) { @summary Monkey-patching toolkit to make it easier and cleaner to run code before and after functions or to inject new code into script tags @license WTFPL (do WTF you want) @author Original by mildmojo; modified by Sean S. LeBlanc -@version 19.1.2 +@version 19.2.0 @requires Bitsy 7.10 */ diff --git a/dist/directional-avatar.js b/dist/directional-avatar.js index eb79e8b3..4ddc8687 100644 --- a/dist/directional-avatar.js +++ b/dist/directional-avatar.js @@ -4,7 +4,7 @@ @summary flips the player's sprite based on directional movement @license MIT @author Sean S. LeBlanc -@version 19.1.2 +@version 19.2.0 @requires Bitsy 7.10 @@ -41,7 +41,7 @@ bitsy = bitsy || /*#__PURE__*/_interopDefaultLegacy(bitsy); @file utils @summary miscellaneous bitsy utilities @author Sean S. LeBlanc -@version 19.1.2 +@version 19.2.0 @requires Bitsy 7.10 */ @@ -103,7 +103,7 @@ function getImage(name, map) { @file edit image at runtime @summary API for updating image data at runtime. @author Sean S. LeBlanc -@version 19.1.2 +@version 19.2.0 @requires Bitsy 7.10 @description @@ -306,7 +306,7 @@ function applyHook(root, functionName) { @summary Monkey-patching toolkit to make it easier and cleaner to run code before and after functions or to inject new code into script tags @license WTFPL (do WTF you want) @author Original by mildmojo; modified by Sean S. LeBlanc -@version 19.1.2 +@version 19.2.0 @requires Bitsy 7.10 */ diff --git a/dist/dynamic-background.js b/dist/dynamic-background.js index fcf5c498..552382af 100644 --- a/dist/dynamic-background.js +++ b/dist/dynamic-background.js @@ -4,7 +4,7 @@ @summary HTML background matching bitsy background @license MIT @author Sean S. LeBlanc -@version 19.1.2 +@version 19.2.0 @requires Bitsy 7.10 @@ -170,7 +170,7 @@ function applyHook(root, functionName) { @summary Monkey-patching toolkit to make it easier and cleaner to run code before and after functions or to inject new code into script tags @license WTFPL (do WTF you want) @author Original by mildmojo; modified by Sean S. LeBlanc -@version 19.1.2 +@version 19.2.0 @requires Bitsy 7.10 */ @@ -237,7 +237,7 @@ var after = kitsy.after; @file utils @summary miscellaneous bitsy utilities @author Sean S. LeBlanc -@version 19.1.2 +@version 19.2.0 @requires Bitsy 7.10 */ diff --git a/dist/edit-dialog-from-dialog.js b/dist/edit-dialog-from-dialog.js index a09227dc..896b29d9 100644 --- a/dist/edit-dialog-from-dialog.js +++ b/dist/edit-dialog-from-dialog.js @@ -4,7 +4,7 @@ @summary edit dialog from dialog (yes really) @license MIT @author Sean S. LeBlanc -@version 19.1.2 +@version 19.2.0 @requires Bitsy 7.10 @@ -169,7 +169,7 @@ function applyHook(root, functionName) { @summary Monkey-patching toolkit to make it easier and cleaner to run code before and after functions or to inject new code into script tags @license WTFPL (do WTF you want) @author Original by mildmojo; modified by Sean S. LeBlanc -@version 19.1.2 +@version 19.2.0 @requires Bitsy 7.10 */ @@ -296,7 +296,7 @@ function addDeferredDialogTag(tag, fn) { @file utils @summary miscellaneous bitsy utilities @author Sean S. LeBlanc -@version 19.1.2 +@version 19.2.0 @requires Bitsy 7.10 */ diff --git a/dist/edit-image-from-dialog.js b/dist/edit-image-from-dialog.js index b2302a72..fa5429d0 100644 --- a/dist/edit-image-from-dialog.js +++ b/dist/edit-image-from-dialog.js @@ -4,7 +4,7 @@ @summary edit sprites, items, and tiles from dialog @license MIT @author Sean S. LeBlanc -@version 19.1.2 +@version 19.2.0 @requires Bitsy 7.10 @@ -67,7 +67,7 @@ bitsy = bitsy || /*#__PURE__*/_interopDefaultLegacy(bitsy); @file utils @summary miscellaneous bitsy utilities @author Sean S. LeBlanc -@version 19.1.2 +@version 19.2.0 @requires Bitsy 7.10 */ @@ -129,7 +129,7 @@ function getImage(name, map) { @file edit image at runtime @summary API for updating image data at runtime. @author Sean S. LeBlanc -@version 19.1.2 +@version 19.2.0 @requires Bitsy 7.10 @description @@ -324,7 +324,7 @@ function applyHook(root, functionName) { @summary Monkey-patching toolkit to make it easier and cleaner to run code before and after functions or to inject new code into script tags @license WTFPL (do WTF you want) @author Original by mildmojo; modified by Sean S. LeBlanc -@version 19.1.2 +@version 19.2.0 @requires Bitsy 7.10 */ diff --git a/dist/edit-player-from-dialog.js b/dist/edit-player-from-dialog.js index 2cc60378..fd352c02 100644 --- a/dist/edit-player-from-dialog.js +++ b/dist/edit-player-from-dialog.js @@ -4,7 +4,7 @@ @summary change which sprite is controlled by the player @license MIT @author Sean S. LeBlanc -@version 19.1.2 +@version 19.2.0 @requires Bitsy 7.10 @@ -171,7 +171,7 @@ function applyHook(root, functionName) { @summary Monkey-patching toolkit to make it easier and cleaner to run code before and after functions or to inject new code into script tags @license WTFPL (do WTF you want) @author Original by mildmojo; modified by Sean S. LeBlanc -@version 19.1.2 +@version 19.2.0 @requires Bitsy 7.10 */ @@ -336,7 +336,7 @@ function addDualDialogTag(tag, fn) { @file utils @summary miscellaneous bitsy utilities @author Sean S. LeBlanc -@version 19.1.2 +@version 19.2.0 @requires Bitsy 7.10 */ diff --git a/dist/edit-room-from-dialog.js b/dist/edit-room-from-dialog.js index 92a16995..b8fd489c 100644 --- a/dist/edit-room-from-dialog.js +++ b/dist/edit-room-from-dialog.js @@ -4,7 +4,7 @@ @summary modify the content of a room from dialog @license MIT @author Dana Holdampf -@version 19.1.2 +@version 19.2.0 @requires Bitsy 7.10 @@ -290,7 +290,7 @@ function applyHook(root, functionName) { @summary Monkey-patching toolkit to make it easier and cleaner to run code before and after functions or to inject new code into script tags @license WTFPL (do WTF you want) @author Original by mildmojo; modified by Sean S. LeBlanc -@version 19.1.2 +@version 19.2.0 @requires Bitsy 7.10 */ @@ -455,7 +455,7 @@ function addDualDialogTag(tag, fn) { @file utils @summary miscellaneous bitsy utilities @author Sean S. LeBlanc -@version 19.1.2 +@version 19.2.0 @requires Bitsy 7.10 */ diff --git a/dist/end-from-dialog.js b/dist/end-from-dialog.js index ab01849c..40231cd6 100644 --- a/dist/end-from-dialog.js +++ b/dist/end-from-dialog.js @@ -4,7 +4,7 @@ @summary trigger an ending from dialog, including narration text @license WTFPL (do WTF you want) @author @mildmojo -@version 19.1.2 +@version 19.2.0 @requires Bitsy 7.10 @@ -194,7 +194,7 @@ function applyHook(root, functionName) { @summary Monkey-patching toolkit to make it easier and cleaner to run code before and after functions or to inject new code into script tags @license WTFPL (do WTF you want) @author Original by mildmojo; modified by Sean S. LeBlanc -@version 19.1.2 +@version 19.2.0 @requires Bitsy 7.10 */ diff --git a/dist/exit-from-dialog.js b/dist/exit-from-dialog.js index a1acbfbf..83ed56dc 100644 --- a/dist/exit-from-dialog.js +++ b/dist/exit-from-dialog.js @@ -4,7 +4,7 @@ @summary exit to another room from dialog, including conditionals @license WTFPL (do WTF you want) @author @mildmojo -@version 19.1.2 +@version 19.2.0 @requires Bitsy 7.10 @@ -194,7 +194,7 @@ function applyHook(root, functionName) { @summary Monkey-patching toolkit to make it easier and cleaner to run code before and after functions or to inject new code into script tags @license WTFPL (do WTF you want) @author Original by mildmojo; modified by Sean S. LeBlanc -@version 19.1.2 +@version 19.2.0 @requires Bitsy 7.10 */ @@ -359,7 +359,7 @@ function addDualDialogTag(tag, fn) { @file utils @summary miscellaneous bitsy utilities @author Sean S. LeBlanc -@version 19.1.2 +@version 19.2.0 @requires Bitsy 7.10 */ diff --git a/dist/external-game-data.js b/dist/external-game-data.js index 691ee62f..f6d185cd 100644 --- a/dist/external-game-data.js +++ b/dist/external-game-data.js @@ -4,7 +4,7 @@ @summary separate Bitsy game data from your (modded) HTML for easier development @license WTFPL (do WTF you want) @author @mildmojo -@version 19.1.2 +@version 19.2.0 @requires Bitsy 7.10 @@ -182,7 +182,7 @@ function applyHook(root, functionName) { @summary Monkey-patching toolkit to make it easier and cleaner to run code before and after functions or to inject new code into script tags @license WTFPL (do WTF you want) @author Original by mildmojo; modified by Sean S. LeBlanc -@version 19.1.2 +@version 19.2.0 @requires Bitsy 7.10 */ diff --git a/dist/favicon-from-sprite.js b/dist/favicon-from-sprite.js index bfce13d4..bb16ccfd 100644 --- a/dist/favicon-from-sprite.js +++ b/dist/favicon-from-sprite.js @@ -4,7 +4,7 @@ @summary generate a browser favicon (tab icon) from a Bitsy sprite, including animation! @license WTFPL (do WTF you want) @author @mildmojo -@version 19.1.2 +@version 19.2.0 @requires Bitsy 7.10 @@ -170,7 +170,7 @@ function applyHook(root, functionName) { @summary Monkey-patching toolkit to make it easier and cleaner to run code before and after functions or to inject new code into script tags @license WTFPL (do WTF you want) @author Original by mildmojo; modified by Sean S. LeBlanc -@version 19.1.2 +@version 19.2.0 @requires Bitsy 7.10 */ @@ -237,7 +237,7 @@ var after = kitsy.after; @file utils @summary miscellaneous bitsy utilities @author Sean S. LeBlanc -@version 19.1.2 +@version 19.2.0 @requires Bitsy 7.10 */ diff --git a/dist/follower.js b/dist/follower.js index da398217..3801bf8e 100644 --- a/dist/follower.js +++ b/dist/follower.js @@ -4,7 +4,7 @@ @summary make sprites follow the player @license MIT @author Sean S. LeBlanc -@version 19.1.2 +@version 19.2.0 @requires Bitsy 7.10 @@ -193,7 +193,7 @@ function applyHook(root, functionName) { @summary Monkey-patching toolkit to make it easier and cleaner to run code before and after functions or to inject new code into script tags @license WTFPL (do WTF you want) @author Original by mildmojo; modified by Sean S. LeBlanc -@version 19.1.2 +@version 19.2.0 @requires Bitsy 7.10 */ @@ -358,7 +358,7 @@ function addDualDialogTag(tag, fn) { @file utils @summary miscellaneous bitsy utilities @author Sean S. LeBlanc -@version 19.1.2 +@version 19.2.0 @requires Bitsy 7.10 */ diff --git a/dist/gamepad-input.js b/dist/gamepad-input.js index 587d852b..512f64c6 100644 --- a/dist/gamepad-input.js +++ b/dist/gamepad-input.js @@ -4,7 +4,7 @@ @summary HTML5 gamepad support @license MIT @author Sean S. LeBlanc -@version 19.1.2 +@version 19.2.0 @requires Bitsy 7.10 @@ -489,7 +489,7 @@ function applyHook(root, functionName) { @summary Monkey-patching toolkit to make it easier and cleaner to run code before and after functions or to inject new code into script tags @license WTFPL (do WTF you want) @author Original by mildmojo; modified by Sean S. LeBlanc -@version 19.1.2 +@version 19.2.0 @requires Bitsy 7.10 */ diff --git a/dist/gravity.js b/dist/gravity.js index 93d8aa24..7b2e50de 100644 --- a/dist/gravity.js +++ b/dist/gravity.js @@ -4,7 +4,7 @@ @summary Pseudo-platforming/gravity/physics @license MIT @author Cole Sea -@version 19.1.2 +@version 19.2.0 @requires Bitsy 7.10 @@ -122,7 +122,7 @@ bitsy = bitsy || /*#__PURE__*/_interopDefaultLegacy(bitsy); @file utils @summary miscellaneous bitsy utilities @author Sean S. LeBlanc -@version 19.1.2 +@version 19.2.0 @requires Bitsy 7.10 */ @@ -184,7 +184,7 @@ function getImage(name, map) { @file edit image at runtime @summary API for updating image data at runtime. @author Sean S. LeBlanc -@version 19.1.2 +@version 19.2.0 @requires Bitsy 7.10 @description @@ -387,7 +387,7 @@ function applyHook(root, functionName) { @summary Monkey-patching toolkit to make it easier and cleaner to run code before and after functions or to inject new code into script tags @license WTFPL (do WTF you want) @author Original by mildmojo; modified by Sean S. LeBlanc -@version 19.1.2 +@version 19.2.0 @requires Bitsy 7.10 */ diff --git a/dist/itsy-bitsy.js b/dist/itsy-bitsy.js index e01b7de1..e7069877 100644 --- a/dist/itsy-bitsy.js +++ b/dist/itsy-bitsy.js @@ -4,7 +4,7 @@ @summary for when bitsy's not small enough @license MIT @author Sean S. LeBlanc -@version 19.1.2 +@version 19.2.0 @requires Bitsy 7.10 @@ -171,7 +171,7 @@ function applyHook(root, functionName) { @summary Monkey-patching toolkit to make it easier and cleaner to run code before and after functions or to inject new code into script tags @license WTFPL (do WTF you want) @author Original by mildmojo; modified by Sean S. LeBlanc -@version 19.1.2 +@version 19.2.0 @requires Bitsy 7.10 */ diff --git a/dist/javascript-dialog.js b/dist/javascript-dialog.js index b471b627..a6efc3a1 100644 --- a/dist/javascript-dialog.js +++ b/dist/javascript-dialog.js @@ -4,7 +4,7 @@ @summary execute arbitrary javascript from dialog @license MIT @author Sean S. LeBlanc -@version 19.1.2 +@version 19.2.0 @requires Bitsy 7.10 @@ -181,7 +181,7 @@ function applyHook(root, functionName) { @summary Monkey-patching toolkit to make it easier and cleaner to run code before and after functions or to inject new code into script tags @license WTFPL (do WTF you want) @author Original by mildmojo; modified by Sean S. LeBlanc -@version 19.1.2 +@version 19.2.0 @requires Bitsy 7.10 */ diff --git a/dist/logic-operators-extended.js b/dist/logic-operators-extended.js index c16bdb2f..cd4f3850 100644 --- a/dist/logic-operators-extended.js +++ b/dist/logic-operators-extended.js @@ -3,7 +3,7 @@ @file logic-operators-extended @summary adds conditional logic operators @author @mildmojo -@version 19.1.2 +@version 19.2.0 @requires Bitsy 7.10 @@ -168,7 +168,7 @@ function applyHook(root, functionName) { @summary Monkey-patching toolkit to make it easier and cleaner to run code before and after functions or to inject new code into script tags @license WTFPL (do WTF you want) @author Original by mildmojo; modified by Sean S. LeBlanc -@version 19.1.2 +@version 19.2.0 @requires Bitsy 7.10 */ diff --git a/dist/long-dialog.js b/dist/long-dialog.js index d9e73d69..c0f0f234 100644 --- a/dist/long-dialog.js +++ b/dist/long-dialog.js @@ -4,7 +4,7 @@ @summary put more words onscreen @license MIT @author Sean S. LeBlanc -@version 19.1.2 +@version 19.2.0 @requires Bitsy 7.10 @@ -23,6 +23,16 @@ A common pattern in bitsy is using intentional whitespace to force new dialog pa but the long dialog hack makes that look awkward since the text box expands. The paragraph break hack lets you get around this by using a (p) tag to immediately end the current page. +There is also a dialog tag that lets you change the size ingame. + +Usage: + (textboxsize ",") + (textboxsizeNow ",") + +Examples: + (textboxsize "2,6") + (textboxsizeNow "2,2") + HOW TO USE: 1. Copy-paste this script into a new script tag after the Bitsy source code. 2. edit hackOptions below as needed @@ -109,7 +119,7 @@ function before$1(targetFuncName, beforeFn) { kitsy.queuedBeforeScripts[targetFuncName].push(beforeFn); } // Ex: after('load_game', function run() { alert('Loaded!'); }); -function after(targetFuncName, afterFn) { +function after$1(targetFuncName, afterFn) { kitsy.queuedAfterScripts[targetFuncName] = kitsy.queuedAfterScripts[targetFuncName] || []; kitsy.queuedAfterScripts[targetFuncName].push(afterFn); } @@ -174,7 +184,7 @@ function applyHook(root, functionName) { @summary Monkey-patching toolkit to make it easier and cleaner to run code before and after functions or to inject new code into script tags @license WTFPL (do WTF you want) @author Original by mildmojo; modified by Sean S. LeBlanc -@version 19.1.2 +@version 19.2.0 @requires Bitsy 7.10 */ @@ -184,7 +194,7 @@ var kitsy = (window.kitsy = window.kitsy || { queuedAfterScripts: {}, inject: kitsyInject, before: before$1, - after, + after: after$1, /** * Applies all queued `inject` calls. * @@ -235,7 +245,7 @@ var inject = kitsy.inject; /** @see kitsy.before */ var before = kitsy.before; /** @see kitsy.after */ -kitsy.after; +var after = kitsy.after; // Rewrite custom functions' parentheses to curly braces for Bitsy's // interpreter. Unescape escaped parentheticals, too. @@ -285,6 +295,56 @@ function addDialogTag(tag, fn) { injectDialogTag(tag, 'kitsy.dialogFunctions["' + tag + '"]'); } +/** + * Adds a custom dialog tag which executes the provided function. + * For ease-of-use with the bitsy editor, tags can be written as + * (tagname "parameters") in addition to the standard {tagname "parameters"} + * + * Function is executed after the dialog box. + * + * @param {string} tag Name of tag + * @param {Function} fn Function to execute, with signature `function(environment, parameters){}` + * environment: provides access to SetVariable/GetVariable (among other things, see Environment in the bitsy source for more info) + * parameters: array containing parameters as string in first element (i.e. `parameters[0]`) + */ +function addDeferredDialogTag(tag, fn) { + addDialogFunction(tag, fn); + bitsy.kitsy.deferredDialogFunctions = bitsy.kitsy.deferredDialogFunctions || {}; + var deferred = (bitsy.kitsy.deferredDialogFunctions[tag] = []); + injectDialogTag(tag, 'function(e, p, o){ kitsy.deferredDialogFunctions["' + tag + '"].push({e:e,p:p}); o(null); }'); + // Hook into the dialog finish event and execute the actual function + after('onExitDialog', function () { + while (deferred.length) { + var args = deferred.shift(); + bitsy.kitsy.dialogFunctions[tag](args.e, args.p, args.o); + } + }); + // Hook into the game reset and make sure data gets cleared + after('clearGameData', function () { + deferred.length = 0; + }); +} + +/** + * Adds two custom dialog tags which execute the provided function, + * one with the provided tagname executed after the dialog box, + * and one suffixed with 'Now' executed immediately when the tag is reached. + * + * i.e. helper for the (exit)/(exitNow) pattern. + * + * @param {string} tag Name of tag + * @param {Function} fn Function to execute, with signature `function(environment, parameters){}` + * environment: provides access to SetVariable/GetVariable (among other things, see Environment in the bitsy source for more info) + * parameters: array containing parameters as string in first element (i.e. `parameters[0]`) + */ +function addDualDialogTag(tag, fn) { + addDialogTag(tag + 'Now', function (environment, parameters, onReturn) { + fn(environment, parameters); + onReturn(null); + }); + addDeferredDialogTag(tag, fn); +} + /** * Helper for printing a paragraph break inside of a dialog function. * Adds the function `AddParagraphBreak` to `DialogBuffer` @@ -298,7 +358,7 @@ inject(/(this\.AddLinebreak = )/, 'this.AddParagraphBreak = function() { buffer. @summary Adds paragraph breaks to the dialogue parser @license WTFPL (do WTF you want) @author Sean S. LeBlanc, David Mowatt -@version 19.1.2 +@version 19.2.0 @requires Bitsy 7.10 @@ -340,11 +400,13 @@ addDialogTag('p', function (environment, parameters, onReturn) { +kitsy.longDialogOptions = hackOptions; + // override textbox height inject( /textboxInfo\.height = .+;/, `Object.defineProperty(textboxInfo, 'height', { - get() { return textboxInfo.padding_vert + (textboxInfo.padding_vert + relativeFontHeight()) * Math.max(${hackOptions.minRows}, dialogBuffer.CurPage().indexOf(dialogBuffer.CurRow())+Math.sign(dialogBuffer.CurCharCount())) + textboxInfo.arrow_height; } + get() { return textboxInfo.padding_vert + (textboxInfo.padding_vert + relativeFontHeight()) * Math.max(window.kitsy.longDialogOptions.minRows, dialogBuffer.CurPage().indexOf(dialogBuffer.CurRow())+Math.sign(dialogBuffer.CurCharCount())) + textboxInfo.arrow_height; } })` ); // export textbox info @@ -354,8 +416,20 @@ before('renderDrawingBuffer', function (bufferId, buffer) { buffer.height = bitsy.dialogRenderer.textboxInfo.height / bitsy.dialogRenderer.textboxInfo.font_scale; }); // rewrite hard-coded row limit -inject(/(else if \(curRowIndex )== 0/g, '$1< ' + hackOptions.maxRows + ' - 1'); -inject(/(if \(lastPage\.length) <= 1/, '$1 < ' + hackOptions.maxRows); +inject(/(else if \(curRowIndex )== 0/g, '$1 < window.kitsy.longDialogOptions.maxRows - 1'); +inject(/(if \(lastPage\.length) <= 1/, '$1 < window.kitsy.longDialogOptions.maxRows'); + +addDualDialogTag('textboxsize', function (environment, parameters) { + if (!parameters[0]) { + throw new Error('{textboxsize} was missing parameters! Usage: {textboxsize "minrows, maxrows"}'); + } + // parse parameters + var params = parameters[0].split(/,\s?/); + var min = parseInt(params[0], 10); + var max = parseInt(params[1], 10); + hackOptions.minRows = min; + hackOptions.maxRows = max; +}); exports.hackOptions = hackOptions; diff --git a/dist/multi-sprite-avatar.js b/dist/multi-sprite-avatar.js index 2a757747..de59c571 100644 --- a/dist/multi-sprite-avatar.js +++ b/dist/multi-sprite-avatar.js @@ -4,7 +4,7 @@ @summary make the player big @license MIT @author Sean S. LeBlanc -@version 19.1.2 +@version 19.2.0 @requires Bitsy 7.10 @@ -193,7 +193,7 @@ function applyHook(root, functionName) { @summary Monkey-patching toolkit to make it easier and cleaner to run code before and after functions or to inject new code into script tags @license WTFPL (do WTF you want) @author Original by mildmojo; modified by Sean S. LeBlanc -@version 19.1.2 +@version 19.2.0 @requires Bitsy 7.10 */ @@ -260,7 +260,7 @@ var after = kitsy.after; @file utils @summary miscellaneous bitsy utilities @author Sean S. LeBlanc -@version 19.1.2 +@version 19.2.0 @requires Bitsy 7.10 */ diff --git a/dist/noclip.js b/dist/noclip.js index d289699e..bacd60b0 100644 --- a/dist/noclip.js +++ b/dist/noclip.js @@ -4,7 +4,7 @@ @summary walk through wall tiles, sprites, items, exits, and endings @license MIT @author Sean S. LeBlanc -@version 19.1.2 +@version 19.2.0 @requires Bitsy 7.10 @@ -182,7 +182,7 @@ function applyHook(root, functionName) { @summary Monkey-patching toolkit to make it easier and cleaner to run code before and after functions or to inject new code into script tags @license WTFPL (do WTF you want) @author Original by mildmojo; modified by Sean S. LeBlanc -@version 19.1.2 +@version 19.2.0 @requires Bitsy 7.10 */ @@ -251,7 +251,7 @@ var after = kitsy.after; @summary run custom code on key inputs @license MIT @author Sean S. LeBlanc -@version 19.1.2 +@version 19.2.0 @requires Bitsy 7.10 diff --git a/dist/online.js b/dist/online.js index f7cc8651..3e6d2ff1 100644 --- a/dist/online.js +++ b/dist/online.js @@ -4,7 +4,7 @@ @summary multiplayer bitsy @license MIT @author Sean S. LeBlanc -@version 19.1.2 +@version 19.2.0 @requires Bitsy 7.10 @description @@ -182,7 +182,7 @@ function applyHook(root, functionName) { @summary Monkey-patching toolkit to make it easier and cleaner to run code before and after functions or to inject new code into script tags @license WTFPL (do WTF you want) @author Original by mildmojo; modified by Sean S. LeBlanc -@version 19.1.2 +@version 19.2.0 @requires Bitsy 7.10 */ @@ -347,7 +347,7 @@ function addDualDialogTag(tag, fn) { @file utils @summary miscellaneous bitsy utilities @author Sean S. LeBlanc -@version 19.1.2 +@version 19.2.0 @requires Bitsy 7.10 */ @@ -411,7 +411,7 @@ function getImage(name, map) { @summary edit dialog from dialog (yes really) @license MIT @author Sean S. LeBlanc -@version 19.1.2 +@version 19.2.0 @requires Bitsy 7.10 @@ -478,7 +478,7 @@ addDeferredDialogTag('dialog', editDialog); @file edit image at runtime @summary API for updating image data at runtime. @author Sean S. LeBlanc -@version 19.1.2 +@version 19.2.0 @requires Bitsy 7.10 @description @@ -548,7 +548,7 @@ function setSpriteData(id, frame, newData) { @summary edit sprites, items, and tiles from dialog @license MIT @author Sean S. LeBlanc -@version 19.1.2 +@version 19.2.0 @requires Bitsy 7.10 @@ -693,7 +693,7 @@ addDualDialogTag('imagePal', editPalette); @summary execute arbitrary javascript from dialog @license MIT @author Sean S. LeBlanc -@version 19.1.2 +@version 19.2.0 @requires Bitsy 7.10 diff --git a/dist/opaque-tiles.js b/dist/opaque-tiles.js index 4d6defc6..238cfab8 100644 --- a/dist/opaque-tiles.js +++ b/dist/opaque-tiles.js @@ -4,7 +4,7 @@ @summary tiles which hide the player @license MIT @author Sean S. LeBlanc -@version 19.1.2 +@version 19.2.0 @requires Bitsy 7.10 @@ -169,7 +169,7 @@ function applyHook(root, functionName) { @summary Monkey-patching toolkit to make it easier and cleaner to run code before and after functions or to inject new code into script tags @license WTFPL (do WTF you want) @author Original by mildmojo; modified by Sean S. LeBlanc -@version 19.1.2 +@version 19.2.0 @requires Bitsy 7.10 */ diff --git a/dist/paragraph-break.js b/dist/paragraph-break.js index 6fd94bd5..899b03d0 100644 --- a/dist/paragraph-break.js +++ b/dist/paragraph-break.js @@ -4,7 +4,7 @@ @summary Adds paragraph breaks to the dialogue parser @license WTFPL (do WTF you want) @author Sean S. LeBlanc, David Mowatt -@version 19.1.2 +@version 19.2.0 @requires Bitsy 7.10 @@ -176,7 +176,7 @@ function applyHook(root, functionName) { @summary Monkey-patching toolkit to make it easier and cleaner to run code before and after functions or to inject new code into script tags @license WTFPL (do WTF you want) @author Original by mildmojo; modified by Sean S. LeBlanc -@version 19.1.2 +@version 19.2.0 @requires Bitsy 7.10 */ diff --git a/dist/permanent-items.js b/dist/permanent-items.js index 0e0b4393..74b0bd78 100644 --- a/dist/permanent-items.js +++ b/dist/permanent-items.js @@ -4,7 +4,7 @@ @summary prevent some items from being picked up @license MIT @author Sean S. LeBlanc -@version 19.1.2 +@version 19.2.0 @requires Bitsy 7.10 @@ -166,7 +166,7 @@ function applyHook(root, functionName) { @summary Monkey-patching toolkit to make it easier and cleaner to run code before and after functions or to inject new code into script tags @license WTFPL (do WTF you want) @author Original by mildmojo; modified by Sean S. LeBlanc -@version 19.1.2 +@version 19.2.0 @requires Bitsy 7.10 */ diff --git a/dist/push-sprites.js b/dist/push-sprites.js index e237145e..e93e84b7 100644 --- a/dist/push-sprites.js +++ b/dist/push-sprites.js @@ -4,7 +4,7 @@ @summary sokoban-style sprite pushing @license MIT @author jan0sc -@version 19.1.2 +@version 19.2.0 @requires Bitsy 7.10 @@ -198,7 +198,7 @@ bitsy = bitsy || /*#__PURE__*/_interopDefaultLegacy(bitsy); @file utils @summary miscellaneous bitsy utilities @author Sean S. LeBlanc -@version 19.1.2 +@version 19.2.0 @requires Bitsy 7.10 */ @@ -260,7 +260,7 @@ function getImage(name, map) { @file edit image at runtime @summary API for updating image data at runtime. @author Sean S. LeBlanc -@version 19.1.2 +@version 19.2.0 @requires Bitsy 7.10 @description @@ -463,7 +463,7 @@ function applyHook(root, functionName) { @summary Monkey-patching toolkit to make it easier and cleaner to run code before and after functions or to inject new code into script tags @license WTFPL (do WTF you want) @author Original by mildmojo; modified by Sean S. LeBlanc -@version 19.1.2 +@version 19.2.0 @requires Bitsy 7.10 */ diff --git a/dist/replace-drawing.js b/dist/replace-drawing.js index e7c977ea..3bb31cbd 100644 --- a/dist/replace-drawing.js +++ b/dist/replace-drawing.js @@ -4,7 +4,7 @@ @summary add name-tags to replace drawings when the game is loading @license MIT @author Elkie Nova -@version 19.1.2 +@version 19.2.0 @requires Bitsy 7.10 @@ -177,7 +177,7 @@ function applyHook(root, functionName) { @summary Monkey-patching toolkit to make it easier and cleaner to run code before and after functions or to inject new code into script tags @license WTFPL (do WTF you want) @author Original by mildmojo; modified by Sean S. LeBlanc -@version 19.1.2 +@version 19.2.0 @requires Bitsy 7.10 */ diff --git a/dist/save.js b/dist/save.js index b013a9c2..0fc15708 100644 --- a/dist/save.js +++ b/dist/save.js @@ -4,7 +4,7 @@ @summary save/load your game @license MIT @author Sean S. LeBlanc -@version 19.1.2 +@version 19.2.0 @requires Bitsy 7.10 @@ -195,7 +195,7 @@ function applyHook(root, functionName) { @summary Monkey-patching toolkit to make it easier and cleaner to run code before and after functions or to inject new code into script tags @license WTFPL (do WTF you want) @author Original by mildmojo; modified by Sean S. LeBlanc -@version 19.1.2 +@version 19.2.0 @requires Bitsy 7.10 */ @@ -360,7 +360,7 @@ function addDualDialogTag(tag, fn) { @file utils @summary miscellaneous bitsy utilities @author Sean S. LeBlanc -@version 19.1.2 +@version 19.2.0 @requires Bitsy 7.10 */ diff --git a/dist/smooth-moves.js b/dist/smooth-moves.js index 1955ce46..208469d5 100644 --- a/dist/smooth-moves.js +++ b/dist/smooth-moves.js @@ -4,7 +4,7 @@ @summary ease the player's movement @license MIT @author Sean S. LeBlanc -@version 19.1.2 +@version 19.2.0 @requires Bitsy 7.10 @@ -170,7 +170,7 @@ function applyHook(root, functionName) { @summary Monkey-patching toolkit to make it easier and cleaner to run code before and after functions or to inject new code into script tags @license WTFPL (do WTF you want) @author Original by mildmojo; modified by Sean S. LeBlanc -@version 19.1.2 +@version 19.2.0 @requires Bitsy 7.10 */ diff --git a/dist/solid-items.js b/dist/solid-items.js index b981a4ba..8547dad8 100644 --- a/dist/solid-items.js +++ b/dist/solid-items.js @@ -4,7 +4,7 @@ @summary treat some items like sprites that can be placed multiple times @license MIT @author Sean S. LeBlanc -@version 19.1.2 +@version 19.2.0 @requires Bitsy 7.10 @@ -167,7 +167,7 @@ function applyHook(root, functionName) { @summary Monkey-patching toolkit to make it easier and cleaner to run code before and after functions or to inject new code into script tags @license WTFPL (do WTF you want) @author Original by mildmojo; modified by Sean S. LeBlanc -@version 19.1.2 +@version 19.2.0 @requires Bitsy 7.10 */ diff --git a/dist/sprite-effects.js b/dist/sprite-effects.js index cac1f8a0..92dcb401 100644 --- a/dist/sprite-effects.js +++ b/dist/sprite-effects.js @@ -4,7 +4,7 @@ @summary like text effects, but for sprites @license MIT @author Sean S. LeBlanc -@version 19.1.2 +@version 19.2.0 @requires Bitsy 7.10 @@ -215,7 +215,7 @@ function applyHook(root, functionName) { @summary Monkey-patching toolkit to make it easier and cleaner to run code before and after functions or to inject new code into script tags @license WTFPL (do WTF you want) @author Original by mildmojo; modified by Sean S. LeBlanc -@version 19.1.2 +@version 19.2.0 @requires Bitsy 7.10 */ @@ -380,7 +380,7 @@ function addDualDialogTag(tag, fn) { @file utils @summary miscellaneous bitsy utilities @author Sean S. LeBlanc -@version 19.1.2 +@version 19.2.0 @requires Bitsy 7.10 */ diff --git a/dist/stopwatch.js b/dist/stopwatch.js index 08fa0567..35cecb36 100644 --- a/dist/stopwatch.js +++ b/dist/stopwatch.js @@ -4,7 +4,7 @@ @summary time player actions @license MIT @author Lenny Magner -@version 19.1.2 +@version 19.2.0 @requires Bitsy 7.10 @@ -202,7 +202,7 @@ function applyHook(root, functionName) { @summary Monkey-patching toolkit to make it easier and cleaner to run code before and after functions or to inject new code into script tags @license WTFPL (do WTF you want) @author Original by mildmojo; modified by Sean S. LeBlanc -@version 19.1.2 +@version 19.2.0 @requires Bitsy 7.10 */ @@ -367,7 +367,7 @@ function addDualDialogTag(tag, fn) { @file utils @summary miscellaneous bitsy utilities @author Sean S. LeBlanc -@version 19.1.2 +@version 19.2.0 @requires Bitsy 7.10 */ diff --git a/dist/text-to-speech.js b/dist/text-to-speech.js index fc164e08..62b66c67 100644 --- a/dist/text-to-speech.js +++ b/dist/text-to-speech.js @@ -4,7 +4,7 @@ @summary text-to-speech for bitsy dialog @license MIT @author Sean S. LeBlanc -@version 19.1.2 +@version 19.2.0 @requires Bitsy 7.10 @@ -192,7 +192,7 @@ function applyHook(root, functionName) { @summary Monkey-patching toolkit to make it easier and cleaner to run code before and after functions or to inject new code into script tags @license WTFPL (do WTF you want) @author Original by mildmojo; modified by Sean S. LeBlanc -@version 19.1.2 +@version 19.2.0 @requires Bitsy 7.10 */ diff --git a/dist/tracery-processing.js b/dist/tracery-processing.js index 3f21dbaf..d0eb8e28 100644 --- a/dist/tracery-processing.js +++ b/dist/tracery-processing.js @@ -4,7 +4,7 @@ @summary process all dialog text with a tracery grammar @license MIT @author Sean S. LeBlanc -@version 19.1.2 +@version 19.2.0 @requires Bitsy 7.10 @@ -1036,7 +1036,7 @@ function applyHook(root, functionName) { @summary Monkey-patching toolkit to make it easier and cleaner to run code before and after functions or to inject new code into script tags @license WTFPL (do WTF you want) @author Original by mildmojo; modified by Sean S. LeBlanc -@version 19.1.2 +@version 19.2.0 @requires Bitsy 7.10 */ diff --git a/dist/transitions.js b/dist/transitions.js index 9df886f6..186da0d6 100644 --- a/dist/transitions.js +++ b/dist/transitions.js @@ -4,7 +4,7 @@ @summary customizable WebGL transitions @license MIT @author Sean S. LeBlanc -@version 19.1.2 +@version 19.2.0 @requires Bitsy 7.10 @@ -223,7 +223,7 @@ function applyHook(root, functionName) { @summary Monkey-patching toolkit to make it easier and cleaner to run code before and after functions or to inject new code into script tags @license WTFPL (do WTF you want) @author Original by mildmojo; modified by Sean S. LeBlanc -@version 19.1.2 +@version 19.2.0 @requires Bitsy 7.10 */ @@ -292,7 +292,7 @@ var after = kitsy.after; @summary WebGLazy bitsy integration (this one's mostly just for me) @license MIT @author Sean S. LeBlanc -@version 19.1.2 +@version 19.2.0 @requires Bitsy 7.10 diff --git a/dist/transparent-background.js b/dist/transparent-background.js index 37cff746..cdb85c8e 100644 --- a/dist/transparent-background.js +++ b/dist/transparent-background.js @@ -4,7 +4,7 @@ @summary makes the game have a transparent background @license MIT @author Cephalopodunk & Sean S. LeBlanc -@version 19.1.2 +@version 19.2.0 @requires Bitsy 7.10 @@ -169,7 +169,7 @@ function applyHook(root, functionName) { @summary Monkey-patching toolkit to make it easier and cleaner to run code before and after functions or to inject new code into script tags @license WTFPL (do WTF you want) @author Original by mildmojo; modified by Sean S. LeBlanc -@version 19.1.2 +@version 19.2.0 @requires Bitsy 7.10 */ @@ -238,7 +238,7 @@ var after = kitsy.after; @summary makes all sprites have transparent backgrounds @license MIT @author Sean S. LeBlanc -@version 19.1.2 +@version 19.2.0 @requires Bitsy 7.10 diff --git a/dist/transparent-dialog.js b/dist/transparent-dialog.js index 7b45ff28..c21d112c 100644 --- a/dist/transparent-dialog.js +++ b/dist/transparent-dialog.js @@ -4,7 +4,7 @@ @summary makes the dialog box have a transparent background @license MIT @author Sean S. LeBlanc -@version 19.1.2 +@version 19.2.0 @requires Bitsy 7.10 @@ -156,7 +156,7 @@ function applyHook(root, functionName) { @summary Monkey-patching toolkit to make it easier and cleaner to run code before and after functions or to inject new code into script tags @license WTFPL (do WTF you want) @author Original by mildmojo; modified by Sean S. LeBlanc -@version 19.1.2 +@version 19.2.0 @requires Bitsy 7.10 */ diff --git a/dist/transparent-sprites.js b/dist/transparent-sprites.js index 16c1696f..adc47531 100644 --- a/dist/transparent-sprites.js +++ b/dist/transparent-sprites.js @@ -4,7 +4,7 @@ @summary makes all sprites have transparent backgrounds @license MIT @author Sean S. LeBlanc -@version 19.1.2 +@version 19.2.0 @requires Bitsy 7.10 @@ -167,7 +167,7 @@ function applyHook(root, functionName) { @summary Monkey-patching toolkit to make it easier and cleaner to run code before and after functions or to inject new code into script tags @license WTFPL (do WTF you want) @author Original by mildmojo; modified by Sean S. LeBlanc -@version 19.1.2 +@version 19.2.0 @requires Bitsy 7.10 */ diff --git a/dist/twine-bitsy-comms.js b/dist/twine-bitsy-comms.js index 99bd93a9..2b248d76 100644 --- a/dist/twine-bitsy-comms.js +++ b/dist/twine-bitsy-comms.js @@ -4,7 +4,7 @@ @summary interprocess communication for twine and bitsy @license MIT @author Sean S. LeBlanc -@version 19.1.2 +@version 19.2.0 @requires Bitsy 7.10 @@ -238,7 +238,7 @@ function applyHook(root, functionName) { @summary Monkey-patching toolkit to make it easier and cleaner to run code before and after functions or to inject new code into script tags @license WTFPL (do WTF you want) @author Original by mildmojo; modified by Sean S. LeBlanc -@version 19.1.2 +@version 19.2.0 @requires Bitsy 7.10 */ diff --git a/dist/unique-items.js b/dist/unique-items.js index 22407260..a5232049 100644 --- a/dist/unique-items.js +++ b/dist/unique-items.js @@ -4,7 +4,7 @@ @summary items which, when picked up, remove all other instances of that item from the game @license MIT @author Sean S. LeBlanc -@version 19.1.2 +@version 19.2.0 @requires Bitsy 7.10 @@ -167,7 +167,7 @@ function applyHook(root, functionName) { @summary Monkey-patching toolkit to make it easier and cleaner to run code before and after functions or to inject new code into script tags @license WTFPL (do WTF you want) @author Original by mildmojo; modified by Sean S. LeBlanc -@version 19.1.2 +@version 19.2.0 @requires Bitsy 7.10 */ diff --git a/package-lock.json b/package-lock.json index f2d28e96..8181a8ce 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "@bitsy/hecks", - "version": "19.1.2", + "version": "19.2.0", "lockfileVersion": 2, "requires": true, "packages": { diff --git a/package.json b/package.json index e6ebfb04..5c5c4cc5 100644 --- a/package.json +++ b/package.json @@ -6,7 +6,7 @@ "hacks" ], "main": "index.mjs", - "version": "19.1.2", + "version": "19.2.0", "bitsyVersion": "7.10", "scripts": { "build": "rollup -c",