diff --git a/CHANGELOG.md b/CHANGELOG.md index cbc6987f..0cbc7978 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,17 @@ +# [20.2.0](https://github.com/seleb/bitsy-hacks/compare/v20.1.2...v20.2.0) (2022-04-08) + + +### Bug Fixes + +* **avatar by room:** multi-sprite avatar not resetting ([d46cc55](https://github.com/seleb/bitsy-hacks/commit/d46cc558d2c5feab1bd69dacca60c8d5b00ed156)) + + +### Features + +* **avatar by room:** add multi-sprite avatar support ([588c68a](https://github.com/seleb/bitsy-hacks/commit/588c68ae0030c24e480ae0b827d8516cd43225d1)) +* **multi-sprite avatar:** add dialog tags ([fd5fc90](https://github.com/seleb/bitsy-hacks/commit/fd5fc902f1a2edb56f5c396026e80ef715e74af8)) +* **multi-sprite avatar:** export functions for other hack access ([9cf7cea](https://github.com/seleb/bitsy-hacks/commit/9cf7cea4ec81f05ac2ca13416c5ba521531600f9)) + ## [20.1.2](https://github.com/seleb/bitsy-hacks/compare/v20.1.1...v20.1.2) (2022-04-04) diff --git a/dist/avatar-by-room.js b/dist/avatar-by-room.js index b323360c..872cd28e 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 20.1.2 +@version 20.2.0 @requires Bitsy 7.12 @@ -17,6 +17,9 @@ HOW TO USE: By default, the avatar will reset to the default if you enter a room without a sprite defined. This can also be changed in the hackOptions below to instead apply avatar changes permanently. + +Note: This hack is compatible with multi-sprite avatar. In order to use both of them together, +fill out the `avatarByRoom` values using the `pieces` format instead of individual sprites. */ this.hacks = this.hacks || {}; (function (exports, bitsy) { @@ -174,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 20.1.2 +@version 20.2.0 @requires Bitsy 7.12 */ @@ -241,7 +244,7 @@ var after = kitsy.after; @file utils @summary miscellaneous bitsy utilities @author Sean S. LeBlanc -@version 20.1.2 +@version 20.2.0 @requires Bitsy 7.12 */ @@ -297,25 +300,35 @@ after('load_game', function () { var currentRoom; before('drawRoom', function () { var player = bitsy.player(); - if (bitsy.player().room === currentRoom) { + if (player.room === currentRoom) { return; } currentRoom = player.room; var newAvatarId = hackOptions.avatarByRoom[currentRoom]; - if ( + var shouldReset = (!newAvatarId && !hackOptions.permanent) || // if no sprite defined + not permanent, reset - newAvatarId === player.id // manual reset - ) { - player.drw = originalDrw; - player.animation = originalAnimation; - return; - } - var newAvatar = getImage(newAvatarId, bitsy.sprite); - if (!newAvatar) { - throw new Error('Could not find sprite "' + newAvatarId + '" for room "' + currentRoom + '"'); + newAvatarId === player.id; // manual reset + + if (window.hacks && window.hacks['multi-sprite_avatar'] && window.hacks['multi-sprite_avatar'].enableBig) { + // HACK: support multi-sprite avatar by room + if (shouldReset) { + window.hacks['multi-sprite_avatar'].enableBig(); + } else { + window.hacks['multi-sprite_avatar'].enableBig(newAvatarId); + } + } else { + if (shouldReset) { + player.drw = originalDrw; + player.animation = originalAnimation; + return; + } + var newAvatar = getImage(newAvatarId, bitsy.sprite); + if (!newAvatar) { + throw new Error('Could not find sprite "' + newAvatarId + '" for room "' + currentRoom + '"'); + } + player.drw = newAvatar.drw; + player.animation = Object.assign({}, newAvatar.animation); } - player.drw = newAvatar.drw; - player.animation = Object.assign({}, newAvatar.animation); }); exports.hackOptions = hackOptions; diff --git a/dist/backdrops.js b/dist/backdrops.js index c9706961..2b3d7c12 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 20.1.2 +@version 20.2.0 @requires Bitsy 7.12 @@ -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 20.1.2 +@version 20.2.0 @requires Bitsy 7.12 */ @@ -250,7 +250,7 @@ var after = kitsy.after; @summary makes all sprites have transparent backgrounds @license MIT @author Sean S. LeBlanc -@version 20.1.2 +@version 20.2.0 @requires Bitsy 7.12 @@ -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 20.1.2 +@version 20.2.0 @requires Bitsy 7.12 diff --git a/dist/basic-sfx.js b/dist/basic-sfx.js index cc567366..d1d075b2 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 20.1.2 +@version 20.2.0 @requires Bitsy 7.12 @@ -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 20.1.2 +@version 20.2.0 @requires Bitsy 7.12 */ @@ -239,7 +239,7 @@ var after = kitsy.after; @file utils @summary miscellaneous bitsy utilities @author Sean S. LeBlanc -@version 20.1.2 +@version 20.2.0 @requires Bitsy 7.12 */ diff --git a/dist/bitsymuse.js b/dist/bitsymuse.js index 622265a2..231de8fa 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 20.1.2 +@version 20.2.0 @requires Bitsy 7.12 @@ -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 20.1.2 +@version 20.2.0 @requires Bitsy 7.12 */ @@ -371,7 +371,7 @@ function addDualDialogTag(tag, fn) { @file utils @summary miscellaneous bitsy utilities @author Sean S. LeBlanc -@version 20.1.2 +@version 20.2.0 @requires Bitsy 7.12 */ diff --git a/dist/canvas-replacement.js b/dist/canvas-replacement.js index 44a4c859..b6bedc3a 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 20.1.2 +@version 20.2.0 @requires Bitsy 7.12 @@ -203,7 +203,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 20.1.2 +@version 20.2.0 @requires Bitsy 7.12 */ diff --git a/dist/character-portraits-animated.js b/dist/character-portraits-animated.js index cc2ce2cb..f028206c 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 20.1.2 +@version 20.2.0 @requires Bitsy 7.12 @@ -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 20.1.2 +@version 20.2.0 @requires Bitsy 7.12 */ @@ -1088,7 +1088,7 @@ function addDialogTag(tag, fn) { @summary high quality anime jpegs (or pngs i guess) @license MIT @author Sean S. LeBlanc -@version 20.1.2 +@version 20.2.0 @requires Bitsy 7.12 diff --git a/dist/character-portraits.js b/dist/character-portraits.js index 9f204688..c90469e3 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 20.1.2 +@version 20.2.0 @requires Bitsy 7.12 @@ -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 20.1.2 +@version 20.2.0 @requires Bitsy 7.12 */ diff --git a/dist/close-on-ending.js b/dist/close-on-ending.js index 362e2560..985ff350 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 20.1.2 +@version 20.2.0 @requires Bitsy 7.12 @@ -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 20.1.2 +@version 20.2.0 @requires Bitsy 7.12 */ diff --git a/dist/corrupt.js b/dist/corrupt.js index 6f1a335a..d8780e28 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 20.1.2 +@version 20.2.0 @requires Bitsy 7.12 @@ -60,7 +60,7 @@ bitsy = bitsy || /*#__PURE__*/_interopDefaultLegacy(bitsy); @file utils @summary miscellaneous bitsy utilities @author Sean S. LeBlanc -@version 20.1.2 +@version 20.2.0 @requires Bitsy 7.12 */ @@ -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 20.1.2 +@version 20.2.0 @requires Bitsy 7.12 @description @@ -340,7 +340,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 20.1.2 +@version 20.2.0 @requires Bitsy 7.12 */ diff --git a/dist/custom-exit-effects.js b/dist/custom-exit-effects.js index 76c3cfde..1b011cc2 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 20.1.2 +@version 20.2.0 @requires Bitsy 7.12 @@ -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 20.1.2 +@version 20.2.0 @requires Bitsy 7.12 */ diff --git a/dist/custom-keyhandlers.js b/dist/custom-keyhandlers.js index 63d2f021..e72496ff 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 20.1.2 +@version 20.2.0 @requires Bitsy 7.12 @@ -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 20.1.2 +@version 20.2.0 @requires Bitsy 7.12 */ diff --git a/dist/custom-text-effect.js b/dist/custom-text-effect.js index 2e48d6fa..9f039ace 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 20.1.2 +@version 20.2.0 @requires Bitsy 7.12 @@ -351,7 +351,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 20.1.2 +@version 20.2.0 @requires Bitsy 7.12 */ diff --git a/dist/dialog-audio-vocal-synth.js b/dist/dialog-audio-vocal-synth.js index c1f39217..cbfd5560 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 20.1.2 +@version 20.2.0 @requires Bitsy 7.12 @@ -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 20.1.2 +@version 20.2.0 @requires Bitsy 7.12 */ @@ -1001,7 +1001,7 @@ function addDialogTag(tag, fn) { @summary animal crossing-style audio @license MIT @author Sean S. LeBlanc -@version 20.1.2 +@version 20.2.0 @requires Bitsy 7.12 @@ -1058,7 +1058,7 @@ before('dialogBuffer.DoNextChar', function () { @file utils @summary miscellaneous bitsy utilities @author Sean S. LeBlanc -@version 20.1.2 +@version 20.2.0 @requires Bitsy 7.12 */ diff --git a/dist/dialog-audio.js b/dist/dialog-audio.js index b503fadb..e3ccbd6b 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 20.1.2 +@version 20.2.0 @requires Bitsy 7.12 @@ -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 20.1.2 +@version 20.2.0 @requires Bitsy 7.12 */ diff --git a/dist/dialog-box-transition.js b/dist/dialog-box-transition.js index 4e52b942..d9696a40 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 20.1.2 +@version 20.2.0 @requires Bitsy 7.12 @@ -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 20.1.2 +@version 20.2.0 @requires Bitsy 7.12 */ diff --git a/dist/dialog-choices.js b/dist/dialog-choices.js index 60060ee5..ffb625b1 100644 --- a/dist/dialog-choices.js +++ b/dist/dialog-choices.js @@ -4,7 +4,7 @@ @summary dialog choices @license MIT @author Sean S. LeBlanc -@version 20.1.2 +@version 20.2.0 @requires Bitsy 7.12 @@ -241,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 20.1.2 +@version 20.2.0 @requires Bitsy 7.12 */ @@ -415,7 +415,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 20.1.2 +@version 20.2.0 @requires Bitsy 7.12 @@ -459,7 +459,7 @@ addDialogTag('p', function (environment, parameters, onReturn) { @summary put more words onscreen @license MIT @author Sean S. LeBlanc -@version 20.1.2 +@version 20.2.0 @requires Bitsy 7.12 diff --git a/dist/dialog-jump.js b/dist/dialog-jump.js index 79762864..59f45a5e 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 20.1.2 +@version 20.2.0 @requires Bitsy 7.12 @@ -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 20.1.2 +@version 20.2.0 @requires Bitsy 7.12 */ diff --git a/dist/dialog-pause.js b/dist/dialog-pause.js index f1caee1d..2f8a5476 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 20.1.2 +@version 20.2.0 @requires Bitsy 7.12 @@ -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 20.1.2 +@version 20.2.0 @requires Bitsy 7.12 */ diff --git a/dist/dialog-prompt.js b/dist/dialog-prompt.js index c5686ce1..c04c08e5 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 20.1.2 +@version 20.2.0 @requires Bitsy 7.12 @@ -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 20.1.2 +@version 20.2.0 @requires Bitsy 7.12 */ @@ -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 20.1.2 +@version 20.2.0 @requires Bitsy 7.12 diff --git a/dist/direction-in-dialog.js b/dist/direction-in-dialog.js index ae9ff178..67977f7e 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 20.1.2 +@version 20.2.0 @requires Bitsy 7.12 @@ -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 20.1.2 +@version 20.2.0 @requires Bitsy 7.12 */ diff --git a/dist/directional-avatar.js b/dist/directional-avatar.js index 46cae427..ba8e6690 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 20.1.2 +@version 20.2.0 @requires Bitsy 7.12 @@ -41,7 +41,7 @@ bitsy = bitsy || /*#__PURE__*/_interopDefaultLegacy(bitsy); @file utils @summary miscellaneous bitsy utilities @author Sean S. LeBlanc -@version 20.1.2 +@version 20.2.0 @requires Bitsy 7.12 */ @@ -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 20.1.2 +@version 20.2.0 @requires Bitsy 7.12 @description @@ -305,7 +305,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 20.1.2 +@version 20.2.0 @requires Bitsy 7.12 */ diff --git a/dist/dynamic-background.js b/dist/dynamic-background.js index 9c11eeee..4d58a155 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 20.1.2 +@version 20.2.0 @requires Bitsy 7.12 @@ -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 20.1.2 +@version 20.2.0 @requires Bitsy 7.12 */ @@ -237,7 +237,7 @@ var after = kitsy.after; @file utils @summary miscellaneous bitsy utilities @author Sean S. LeBlanc -@version 20.1.2 +@version 20.2.0 @requires Bitsy 7.12 */ diff --git a/dist/edit-dialog-from-dialog.js b/dist/edit-dialog-from-dialog.js index c2f02042..9e894d11 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 20.1.2 +@version 20.2.0 @requires Bitsy 7.12 @@ -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 20.1.2 +@version 20.2.0 @requires Bitsy 7.12 */ @@ -296,7 +296,7 @@ function addDeferredDialogTag(tag, fn) { @file utils @summary miscellaneous bitsy utilities @author Sean S. LeBlanc -@version 20.1.2 +@version 20.2.0 @requires Bitsy 7.12 */ diff --git a/dist/edit-image-from-dialog.js b/dist/edit-image-from-dialog.js index 20ce5cbb..3bd1cdf4 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 20.1.2 +@version 20.2.0 @requires Bitsy 7.12 @@ -67,7 +67,7 @@ bitsy = bitsy || /*#__PURE__*/_interopDefaultLegacy(bitsy); @file utils @summary miscellaneous bitsy utilities @author Sean S. LeBlanc -@version 20.1.2 +@version 20.2.0 @requires Bitsy 7.12 */ @@ -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 20.1.2 +@version 20.2.0 @requires Bitsy 7.12 @description @@ -323,7 +323,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 20.1.2 +@version 20.2.0 @requires Bitsy 7.12 */ diff --git a/dist/edit-player-from-dialog.js b/dist/edit-player-from-dialog.js index 9edc1f45..7dfd727c 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 20.1.2 +@version 20.2.0 @requires Bitsy 7.12 @@ -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 20.1.2 +@version 20.2.0 @requires Bitsy 7.12 */ @@ -336,7 +336,7 @@ function addDualDialogTag(tag, fn) { @file utils @summary miscellaneous bitsy utilities @author Sean S. LeBlanc -@version 20.1.2 +@version 20.2.0 @requires Bitsy 7.12 */ diff --git a/dist/edit-room-from-dialog.js b/dist/edit-room-from-dialog.js index 30dbccdf..aba0297d 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 20.1.2 +@version 20.2.0 @requires Bitsy 7.12 @@ -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 20.1.2 +@version 20.2.0 @requires Bitsy 7.12 */ @@ -455,7 +455,7 @@ function addDualDialogTag(tag, fn) { @file utils @summary miscellaneous bitsy utilities @author Sean S. LeBlanc -@version 20.1.2 +@version 20.2.0 @requires Bitsy 7.12 */ diff --git a/dist/end-from-dialog.js b/dist/end-from-dialog.js index fb1d31ba..a363b3a8 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 20.1.2 +@version 20.2.0 @requires Bitsy 7.12 @@ -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 20.1.2 +@version 20.2.0 @requires Bitsy 7.12 */ diff --git a/dist/exit-from-dialog.js b/dist/exit-from-dialog.js index e8c6f8bc..25d780c5 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 20.1.2 +@version 20.2.0 @requires Bitsy 7.12 @@ -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 20.1.2 +@version 20.2.0 @requires Bitsy 7.12 */ @@ -359,7 +359,7 @@ function addDualDialogTag(tag, fn) { @file utils @summary miscellaneous bitsy utilities @author Sean S. LeBlanc -@version 20.1.2 +@version 20.2.0 @requires Bitsy 7.12 */ diff --git a/dist/external-game-data.js b/dist/external-game-data.js index fbc5410d..e551fdee 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 20.1.2 +@version 20.2.0 @requires Bitsy 7.12 @@ -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 20.1.2 +@version 20.2.0 @requires Bitsy 7.12 */ diff --git a/dist/favicon-from-sprite.js b/dist/favicon-from-sprite.js index 2b82a44e..6c1d225e 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 20.1.2 +@version 20.2.0 @requires Bitsy 7.12 @@ -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 20.1.2 +@version 20.2.0 @requires Bitsy 7.12 */ @@ -237,7 +237,7 @@ var after = kitsy.after; @file utils @summary miscellaneous bitsy utilities @author Sean S. LeBlanc -@version 20.1.2 +@version 20.2.0 @requires Bitsy 7.12 */ diff --git a/dist/follower.js b/dist/follower.js index a90df3a9..00a52b71 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 20.1.2 +@version 20.2.0 @requires Bitsy 7.12 @@ -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 20.1.2 +@version 20.2.0 @requires Bitsy 7.12 */ @@ -358,7 +358,7 @@ function addDualDialogTag(tag, fn) { @file utils @summary miscellaneous bitsy utilities @author Sean S. LeBlanc -@version 20.1.2 +@version 20.2.0 @requires Bitsy 7.12 */ diff --git a/dist/gamepad-input.js b/dist/gamepad-input.js index b712354d..15c2303f 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 20.1.2 +@version 20.2.0 @requires Bitsy 7.12 @@ -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 20.1.2 +@version 20.2.0 @requires Bitsy 7.12 */ diff --git a/dist/gravity.js b/dist/gravity.js index d03dc690..179a1809 100644 --- a/dist/gravity.js +++ b/dist/gravity.js @@ -4,7 +4,7 @@ @summary Pseudo-platforming/gravity/physics @license MIT @author Cole Sea -@version 20.1.2 +@version 20.2.0 @requires Bitsy 7.12 @@ -122,7 +122,7 @@ bitsy = bitsy || /*#__PURE__*/_interopDefaultLegacy(bitsy); @file utils @summary miscellaneous bitsy utilities @author Sean S. LeBlanc -@version 20.1.2 +@version 20.2.0 @requires Bitsy 7.12 */ @@ -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 20.1.2 +@version 20.2.0 @requires Bitsy 7.12 @description @@ -386,7 +386,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 20.1.2 +@version 20.2.0 @requires Bitsy 7.12 */ diff --git a/dist/itsy-bitsy.js b/dist/itsy-bitsy.js index 9440c91e..c260179d 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 20.1.2 +@version 20.2.0 @requires Bitsy 7.12 @@ -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 20.1.2 +@version 20.2.0 @requires Bitsy 7.12 */ diff --git a/dist/javascript-dialog.js b/dist/javascript-dialog.js index 64e256e5..db8af88c 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 20.1.2 +@version 20.2.0 @requires Bitsy 7.12 @@ -196,7 +196,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 20.1.2 +@version 20.2.0 @requires Bitsy 7.12 */ diff --git a/dist/logic-operators-extended.js b/dist/logic-operators-extended.js index 017606c9..dd3f945c 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 20.1.2 +@version 20.2.0 @requires Bitsy 7.12 @@ -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 20.1.2 +@version 20.2.0 @requires Bitsy 7.12 */ diff --git a/dist/long-dialog.js b/dist/long-dialog.js index dabb88ae..47d9d278 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 20.1.2 +@version 20.2.0 @requires Bitsy 7.12 @@ -184,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 20.1.2 +@version 20.2.0 @requires Bitsy 7.12 */ @@ -358,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 20.1.2 +@version 20.2.0 @requires Bitsy 7.12 diff --git a/dist/multi-sprite-avatar.js b/dist/multi-sprite-avatar.js index c5b5ae3a..5a6c7808 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 20.1.2 +@version 20.2.0 @requires Bitsy 7.12 @@ -15,6 +15,14 @@ to create the illusion of a larger avatar. Provided example is a 2x2 square for simplicity, but multi-sprite avatar's shape can be arbitrary. +Dialog tags are also available to allow changing the avatar at runtime + +Usage: + {disableBig} - reverts to original avatar + {enableBig} - re-enables multi-sprite avatar + {enableBig "0,0,f" "1,0,e" "0,1,d" "1,1,c"} - enables multi-sprite avatar using the provided pieces + {disableBigNow}/{enableBigNow} - save as above but executes immediately when reached in dialog + Notes: - will probably break any other hacks involving moving other sprites around (they'll probably use the player's modified collision) - the original avatar sprite isn't changed, but will be covered by a piece at x:0,y:0 @@ -67,7 +75,7 @@ bitsy = bitsy || /*#__PURE__*/_interopDefaultLegacy(bitsy); * @param searcher Regex to search and replace * @param replacer Replacer string/fn */ -function inject(searcher, replacer) { +function inject$1(searcher, replacer) { // find the relevant script tag var scriptTags = document.getElementsByTagName('script'); var scriptTag; @@ -134,7 +142,7 @@ function after$1(targetFuncName, afterFn) { } function applyInjects() { kitsy.queuedInjectScripts.forEach(function (injectScript) { - inject(injectScript.searcher, injectScript.replacer); + inject$1(injectScript.searcher, injectScript.replacer); }); } function applyHooks(root) { @@ -193,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 20.1.2 +@version 20.2.0 @requires Bitsy 7.12 */ @@ -250,17 +258,115 @@ if (!hooked) { } /** @see kitsy.inject */ -kitsy.inject; +var inject = kitsy.inject; /** @see kitsy.before */ var before = kitsy.before; /** @see 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) { + var result = fn(environment, parameters); + onReturn(result === undefined ? null : result); + }); + addDeferredDialogTag(tag, fn); +} + /** @file utils @summary miscellaneous bitsy utilities @author Sean S. LeBlanc -@version 20.1.2 +@version 20.2.0 @requires Bitsy 7.12 */ @@ -413,7 +519,24 @@ after('startExportedGame', function () { }; }); +addDualDialogTag('enableBig', function (environment, parameters) { + enableBig( + parameters.length + ? parameters.map(function (param) { + var props = param.split(/,\s*/); + return { x: parseInt(props[0], 10), y: parseInt(props[1], 10), spr: props[2] }; + }) + : undefined + ); +}); +addDualDialogTag('disableBig', function (environment, parameters) { + disableBig(); +}); + +exports.disableBig = disableBig; +exports.enableBig = enableBig; exports.hackOptions = hackOptions; +exports.syncPieces = syncPieces; Object.defineProperty(exports, '__esModule', { value: true }); diff --git a/dist/noclip.js b/dist/noclip.js index de79b129..0c8f95a7 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 20.1.2 +@version 20.2.0 @requires Bitsy 7.12 @@ -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 20.1.2 +@version 20.2.0 @requires Bitsy 7.12 */ @@ -251,7 +251,7 @@ var after = kitsy.after; @summary run custom code on key inputs @license MIT @author Sean S. LeBlanc -@version 20.1.2 +@version 20.2.0 @requires Bitsy 7.12 diff --git a/dist/online.js b/dist/online.js index cb220e66..f126a0e0 100644 --- a/dist/online.js +++ b/dist/online.js @@ -4,7 +4,7 @@ @summary multiplayer bitsy @license MIT @author Sean S. LeBlanc -@version 20.1.2 +@version 20.2.0 @requires Bitsy 7.12 @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 20.1.2 +@version 20.2.0 @requires Bitsy 7.12 */ @@ -347,7 +347,7 @@ function addDualDialogTag(tag, fn) { @file utils @summary miscellaneous bitsy utilities @author Sean S. LeBlanc -@version 20.1.2 +@version 20.2.0 @requires Bitsy 7.12 */ @@ -411,7 +411,7 @@ function getImage(name, map) { @summary edit dialog from dialog (yes really) @license MIT @author Sean S. LeBlanc -@version 20.1.2 +@version 20.2.0 @requires Bitsy 7.12 @@ -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 20.1.2 +@version 20.2.0 @requires Bitsy 7.12 @description @@ -547,7 +547,7 @@ function setSpriteData(id, frame, newData) { @summary edit sprites, items, and tiles from dialog @license MIT @author Sean S. LeBlanc -@version 20.1.2 +@version 20.2.0 @requires Bitsy 7.12 @@ -692,7 +692,7 @@ addDualDialogTag('imagePal', editPalette); @summary execute arbitrary javascript from dialog @license MIT @author Sean S. LeBlanc -@version 20.1.2 +@version 20.2.0 @requires Bitsy 7.12 diff --git a/dist/opaque-tiles.js b/dist/opaque-tiles.js index 8bf88fcf..e209b9d5 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 20.1.2 +@version 20.2.0 @requires Bitsy 7.12 @@ -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 20.1.2 +@version 20.2.0 @requires Bitsy 7.12 */ diff --git a/dist/paragraph-break.js b/dist/paragraph-break.js index 7aaf5534..0ab3df65 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 20.1.2 +@version 20.2.0 @requires Bitsy 7.12 @@ -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 20.1.2 +@version 20.2.0 @requires Bitsy 7.12 */ diff --git a/dist/permanent-items.js b/dist/permanent-items.js index 74a52c0d..51529786 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 20.1.2 +@version 20.2.0 @requires Bitsy 7.12 @@ -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 20.1.2 +@version 20.2.0 @requires Bitsy 7.12 */ diff --git a/dist/push-sprites.js b/dist/push-sprites.js index 863a5553..d4e18456 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 20.1.2 +@version 20.2.0 @requires Bitsy 7.12 @@ -198,7 +198,7 @@ bitsy = bitsy || /*#__PURE__*/_interopDefaultLegacy(bitsy); @file utils @summary miscellaneous bitsy utilities @author Sean S. LeBlanc -@version 20.1.2 +@version 20.2.0 @requires Bitsy 7.12 */ @@ -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 20.1.2 +@version 20.2.0 @requires Bitsy 7.12 @description @@ -462,7 +462,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 20.1.2 +@version 20.2.0 @requires Bitsy 7.12 */ diff --git a/dist/replace-drawing.js b/dist/replace-drawing.js index 7229fbbf..b7d8ddc8 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 20.1.2 +@version 20.2.0 @requires Bitsy 7.12 @@ -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 20.1.2 +@version 20.2.0 @requires Bitsy 7.12 */ diff --git a/dist/save.js b/dist/save.js index f3fddf0b..0b45875c 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 20.1.2 +@version 20.2.0 @requires Bitsy 7.12 @@ -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 20.1.2 +@version 20.2.0 @requires Bitsy 7.12 */ @@ -360,7 +360,7 @@ function addDualDialogTag(tag, fn) { @file utils @summary miscellaneous bitsy utilities @author Sean S. LeBlanc -@version 20.1.2 +@version 20.2.0 @requires Bitsy 7.12 */ diff --git a/dist/smooth-moves.js b/dist/smooth-moves.js index 2ac60403..3ab0fd77 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 20.1.2 +@version 20.2.0 @requires Bitsy 7.12 @@ -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 20.1.2 +@version 20.2.0 @requires Bitsy 7.12 */ diff --git a/dist/solid-items.js b/dist/solid-items.js index 5291aefa..6bbd5585 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 20.1.2 +@version 20.2.0 @requires Bitsy 7.12 @@ -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 20.1.2 +@version 20.2.0 @requires Bitsy 7.12 */ diff --git a/dist/sprite-effects.js b/dist/sprite-effects.js index eb93e9cf..9610aaed 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 20.1.2 +@version 20.2.0 @requires Bitsy 7.12 @@ -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 20.1.2 +@version 20.2.0 @requires Bitsy 7.12 */ @@ -380,7 +380,7 @@ function addDualDialogTag(tag, fn) { @file utils @summary miscellaneous bitsy utilities @author Sean S. LeBlanc -@version 20.1.2 +@version 20.2.0 @requires Bitsy 7.12 */ diff --git a/dist/stopwatch.js b/dist/stopwatch.js index f1cdbc13..0fffbfb3 100644 --- a/dist/stopwatch.js +++ b/dist/stopwatch.js @@ -4,7 +4,7 @@ @summary time player actions @license MIT @author Lenny Magner -@version 20.1.2 +@version 20.2.0 @requires Bitsy 7.12 @@ -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 20.1.2 +@version 20.2.0 @requires Bitsy 7.12 */ @@ -367,7 +367,7 @@ function addDualDialogTag(tag, fn) { @file utils @summary miscellaneous bitsy utilities @author Sean S. LeBlanc -@version 20.1.2 +@version 20.2.0 @requires Bitsy 7.12 */ diff --git a/dist/text-to-speech.js b/dist/text-to-speech.js index 36983968..5a36d299 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 20.1.2 +@version 20.2.0 @requires Bitsy 7.12 @@ -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 20.1.2 +@version 20.2.0 @requires Bitsy 7.12 */ diff --git a/dist/tracery-processing.js b/dist/tracery-processing.js index 649dcf0f..4b928144 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 20.1.2 +@version 20.2.0 @requires Bitsy 7.12 @@ -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 20.1.2 +@version 20.2.0 @requires Bitsy 7.12 */ diff --git a/dist/transitions.js b/dist/transitions.js index 2cd79439..c7a94e8d 100644 --- a/dist/transitions.js +++ b/dist/transitions.js @@ -4,7 +4,7 @@ @summary customizable WebGL transitions @license MIT @author Sean S. LeBlanc -@version 20.1.2 +@version 20.2.0 @requires Bitsy 7.12 @@ -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 20.1.2 +@version 20.2.0 @requires Bitsy 7.12 */ @@ -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 20.1.2 +@version 20.2.0 @requires Bitsy 7.12 diff --git a/dist/transparent-background.js b/dist/transparent-background.js index 88181861..9b99e06e 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 20.1.2 +@version 20.2.0 @requires Bitsy 7.12 @@ -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 20.1.2 +@version 20.2.0 @requires Bitsy 7.12 */ @@ -240,7 +240,7 @@ var after = kitsy.after; @summary makes all sprites have transparent backgrounds @license MIT @author Sean S. LeBlanc -@version 20.1.2 +@version 20.2.0 @requires Bitsy 7.12 diff --git a/dist/transparent-dialog.js b/dist/transparent-dialog.js index e4214e54..8f09ec40 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 20.1.2 +@version 20.2.0 @requires Bitsy 7.12 @@ -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 20.1.2 +@version 20.2.0 @requires Bitsy 7.12 */ diff --git a/dist/transparent-sprites.js b/dist/transparent-sprites.js index 6c264dd2..52fc6849 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 20.1.2 +@version 20.2.0 @requires Bitsy 7.12 @@ -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 20.1.2 +@version 20.2.0 @requires Bitsy 7.12 */ diff --git a/dist/twine-bitsy-comms.js b/dist/twine-bitsy-comms.js index 90ae83e7..4ba40697 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 20.1.2 +@version 20.2.0 @requires Bitsy 7.12 @@ -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 20.1.2 +@version 20.2.0 @requires Bitsy 7.12 */ diff --git a/dist/unique-items.js b/dist/unique-items.js index 216f2f1d..a29ae6df 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 20.1.2 +@version 20.2.0 @requires Bitsy 7.12 @@ -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 20.1.2 +@version 20.2.0 @requires Bitsy 7.12 */ diff --git a/package-lock.json b/package-lock.json index 29e6900b..a080d658 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "@bitsy/hecks", - "version": "20.1.2", + "version": "20.2.0", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "@bitsy/hecks", - "version": "20.1.2", + "version": "20.2.0", "license": "MIT (individual hacks have their own license specified)", "dependencies": { "@seansleblanc/pink-trombone": "^1.0.1", diff --git a/package.json b/package.json index 90dca34a..3a6f07a9 100644 --- a/package.json +++ b/package.json @@ -6,7 +6,7 @@ "hacks" ], "main": "index.mjs", - "version": "20.1.2", + "version": "20.2.0", "bitsyVersion": "7.12", "scripts": { "build": "rollup -c",