From 3532680b0ec76b11ae378875b11ca1c054b8b9ab Mon Sep 17 00:00:00 2001 From: wizguin <16276645+wizguin@users.noreply.github.com> Date: Mon, 27 Feb 2023 13:54:14 +0000 Subject: [PATCH 001/200] Added ignore directories to webpack config --- webpack.config.js | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/webpack.config.js b/webpack.config.js index a4122eae..7517b6ef 100644 --- a/webpack.config.js +++ b/webpack.config.js @@ -24,8 +24,14 @@ let config = { }, devServer: { static: { - directory: path.join(__dirname), - publicPath: '/' + directory: path.resolve(__dirname), + publicPath: '/', + watch: { + ignored: [ + path.resolve(__dirname, '.git'), + path.resolve(__dirname, 'node_modules') + ] + } }, devMiddleware: { writeToDisk: true From e01684429b3deda12a612f7c6b31626d2ffe1f3e Mon Sep 17 00:00:00 2001 From: wizguin <16276645+wizguin@users.noreply.github.com> Date: Mon, 27 Feb 2023 13:54:50 +0000 Subject: [PATCH 002/200] mancala: Add room triggers --- src/scenes/rooms/book/Book.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/scenes/rooms/book/Book.js b/src/scenes/rooms/book/Book.js index 71fb0c59..14aa7b49 100644 --- a/src/scenes/rooms/book/Book.js +++ b/src/scenes/rooms/book/Book.js @@ -17,7 +17,12 @@ export default class Book extends RoomScene { /* START-USER-CTR-CODE */ this.roomTriggers = { - 'coffee': () => this.triggerRoom(110, 1120, 800) + 'coffee': () => this.triggerRoom(110, 1120, 800), + 'table100': () => this.triggerTable('mancala', 100), + 'table101': () => this.triggerTable('mancala', 101), + 'table102': () => this.triggerTable('mancala', 102), + 'table103': () => this.triggerTable('mancala', 103), + 'table104': () => this.triggerTable('mancala', 104) } this.music = '1' From dc60d2473946717b9f29c3874fcf52c67a71aed0 Mon Sep 17 00:00:00 2001 From: wizguin <16276645+wizguin@users.noreply.github.com> Date: Mon, 27 Feb 2023 13:56:30 +0000 Subject: [PATCH 003/200] mancala: Update Table to load different tables --- src/engine/network/plugins/plugins/Table.js | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/engine/network/plugins/plugins/Table.js b/src/engine/network/plugins/plugins/Table.js index e82edccf..f144faf6 100644 --- a/src/engine/network/plugins/plugins/Table.js +++ b/src/engine/network/plugins/plugins/Table.js @@ -10,6 +10,11 @@ export default class Table extends Plugin { 'join_table': this.joinTable, 'update_table': this.updateTable } + + this.types = { + 'four': 'FindFour', + 'mancala': 'Mancala' + } } getTables(args) { @@ -19,8 +24,7 @@ export default class Table extends Plugin { joinTable(args) { this.world.client.sendMoveToSeat(args.table, args.seat) - // Todo: load different tables - this.interface.loadWidget('FindFour', true) + this.interface.loadWidget(this.types[args.game], true) } updateTable(args) { From 08b6c06d11d548fcc1dbbfdfcb3af5bc51dd2b6a Mon Sep 17 00:00:00 2001 From: wizguin <16276645+wizguin@users.noreply.github.com> Date: Mon, 27 Feb 2023 14:07:04 +0000 Subject: [PATCH 004/200] mancala: Add scene files --- src/scenes/games/mancala/Mancala.js | 441 +++++++++++++++++++ src/scenes/games/mancala/Mancala.scene | 379 ++++++++++++++++ src/scenes/games/mancala/MancalaHint.js | 69 +++ src/scenes/games/mancala/MancalaHint.scene | 63 +++ src/scenes/games/mancala/MancalaPlayer.js | 111 +++++ src/scenes/games/mancala/MancalaPlayer.scene | 108 +++++ 6 files changed, 1171 insertions(+) create mode 100644 src/scenes/games/mancala/Mancala.js create mode 100644 src/scenes/games/mancala/Mancala.scene create mode 100644 src/scenes/games/mancala/MancalaHint.js create mode 100644 src/scenes/games/mancala/MancalaHint.scene create mode 100644 src/scenes/games/mancala/MancalaPlayer.js create mode 100644 src/scenes/games/mancala/MancalaPlayer.scene diff --git a/src/scenes/games/mancala/Mancala.js b/src/scenes/games/mancala/Mancala.js new file mode 100644 index 00000000..126d7d0e --- /dev/null +++ b/src/scenes/games/mancala/Mancala.js @@ -0,0 +1,441 @@ +import BaseContainer from '@scenes/base/BaseContainer' + +import { DraggableContainer, SimpleButton } from '@components/components' + +import MancalaHint from './MancalaHint' +import MancalaPlayer from './MancalaPlayer' + + +export const preload = { + key: 'mancala-pack', + url: 'assets/media/games/mancala/mancala-pack.json', + loadString: 'mancala' +} + +/* START OF COMPILED CODE */ + +export default class Mancala extends BaseContainer { + + constructor(scene, x, y) { + super(scene, x ?? 760, y ?? 480); + + /** @type {MancalaPlayer} */ + this.mancalaPlayer1; + /** @type {MancalaPlayer} */ + this.mancalaPlayer2; + /** @type {Phaser.GameObjects.Sprite} */ + this.popup; + /** @type {MancalaHint} */ + this.hint; + /** @type {Phaser.GameObjects.Image[]} */ + this.holes; + + + // window + const window = scene.add.image(0, 0, "mancala", "window"); + this.add(window); + + // bg2 + const bg2 = scene.add.image(0, 118, "mancala", "player/bg"); + bg2.flipY = true; + this.add(bg2); + + // bg1 + const bg1 = scene.add.image(0, -86, "mancala", "player/bg"); + this.add(bg1); + + // shadow + const shadow = scene.add.image(0, 16, "mancala", "shadow"); + this.add(shadow); + + // board + const board = scene.add.image(0, 10, "mancala", "board"); + this.add(board); + + // hole_13 + const hole_13 = scene.add.image(-200, 11, "mancala", "hole_1"); + hole_13.setOrigin(0.5, 0.5047619047619047); + this.add(hole_13); + + // hole_12 + const hole_12 = scene.add.image(-144, -20, "mancala", "hole"); + hole_12.setOrigin(0.5102040816326531, 0.5102040816326531); + this.add(hole_12); + + // hole_11 + const hole_11 = scene.add.image(-86, -20, "mancala", "hole"); + hole_11.setOrigin(0.5102040816326531, 0.5102040816326531); + this.add(hole_11); + + // hole_10 + const hole_10 = scene.add.image(-28, -20, "mancala", "hole"); + hole_10.setOrigin(0.5102040816326531, 0.5102040816326531); + this.add(hole_10); + + // hole_9 + const hole_9 = scene.add.image(30, -20, "mancala", "hole"); + hole_9.setOrigin(0.5102040816326531, 0.5102040816326531); + this.add(hole_9); + + // hole_8 + const hole_8 = scene.add.image(88, -20, "mancala", "hole"); + hole_8.setOrigin(0.5102040816326531, 0.5102040816326531); + this.add(hole_8); + + // hole_7 + const hole_7 = scene.add.image(146, -20, "mancala", "hole"); + hole_7.setOrigin(0.5102040816326531, 0.5102040816326531); + this.add(hole_7); + + // hole_6 + const hole_6 = scene.add.image(200, 11, "mancala", "hole_2"); + hole_6.setOrigin(0.5, 0.5047619047619047); + this.add(hole_6); + + // hole_5 + const hole_5 = scene.add.image(146, 40, "mancala", "hole"); + hole_5.setOrigin(0.5102040816326531, 0.5102040816326531); + this.add(hole_5); + + // hole_4 + const hole_4 = scene.add.image(88, 40, "mancala", "hole"); + hole_4.setOrigin(0.5102040816326531, 0.5102040816326531); + this.add(hole_4); + + // hole_3 + const hole_3 = scene.add.image(30, 40, "mancala", "hole"); + hole_3.setOrigin(0.5102040816326531, 0.5102040816326531); + this.add(hole_3); + + // hole_2 + const hole_2 = scene.add.image(-28, 40, "mancala", "hole"); + hole_2.setOrigin(0.5102040816326531, 0.5102040816326531); + this.add(hole_2); + + // hole_1 + const hole_1 = scene.add.image(-86, 40, "mancala", "hole"); + hole_1.setOrigin(0.5102040816326531, 0.5102040816326531); + this.add(hole_1); + + // hole_0 + const hole_0 = scene.add.image(-144, 40, "mancala", "hole"); + hole_0.setOrigin(0.5102040816326531, 0.5102040816326531); + this.add(hole_0); + + // mancalaPlayer1 + const mancalaPlayer1 = new MancalaPlayer(scene, -193, 136); + this.add(mancalaPlayer1); + + // mancalaPlayer2 + const mancalaPlayer2 = new MancalaPlayer(scene, -193, -104); + this.add(mancalaPlayer2); + + // popup + const popup = scene.add.sprite(4, 16, "mancala", "popup/popup0005"); + popup.visible = false; + this.add(popup); + + // hint + const hint = new MancalaHint(scene, -144, -20); + hint.visible = false; + this.add(hint); + + // lists + const holes = [hole_0, hole_1, hole_2, hole_3, hole_4, hole_5, hole_6, hole_7, hole_8, hole_9, hole_10, hole_11, hole_12, hole_13]; + + // this (components) + const thisDraggableContainer = new DraggableContainer(this); + thisDraggableContainer.handle = window; + + // mancalaPlayer1 (prefab fields) + mancalaPlayer1.bg = bg2; + mancalaPlayer1.mancala = hole_6; + + // mancalaPlayer2 (prefab fields) + mancalaPlayer2.bg = bg1; + mancalaPlayer2.mancala = hole_13; + + this.mancalaPlayer1 = mancalaPlayer1; + this.mancalaPlayer2 = mancalaPlayer2; + this.popup = popup; + this.hint = hint; + this.holes = holes; + + /* START-USER-CTR-CODE */ + + this.scene = scene + + this.map + this.board = [] + this.currentTurn = 1 + this.myTurn + + // Waiting for turn to finish + this.wait = false + + this.maxStoneColor = 5 + this.holeSize = 49 + this.dropDelay = 168 + this.captureDelay = 130 + + popup.setInteractive() + popup.on('animationcomplete', (animation) => this.onPopupComplete(animation)) + + this.setUpGame() + + /* END-USER-CTR-CODE */ + } + + + /* START-USER-CODE */ + + get isMyTurn() { + return this.currentTurn === this.myTurn + } + + get mancalas() { + return [this.mancalaPlayer1.mancala, this.mancalaPlayer2.mancala] + } + + get currentPlayer() { + return this[`mancalaPlayer${this.currentTurn}`] + } + + isMancala(hole) { + return this.mancalas.includes(hole) + } + + setUpGame() { + + } + + handleGetGame(map) { + this.map = map + } + + handleJoinGame(turnId) { + // Setting my turn + this.myTurn = turnId + } + + handleAddPlayer(username, turnId) { + let player = this[`mancalaPlayer${turnId}`] + player.turnId = turnId + + player.spinner.visible = false + player.waiting.visible = false + + player.username.text = username.toUpperCase() + player.username.visible = true + player.score.visible = true + + player.setActive() + } + + handleStartGame() { + let currentColor = 1 + + for (let i = 0; i < this.map.length; i++) { + let count = this.map[i] + + // Create initial stones + for (let j = 0; j < count; j++) { + this.createStone(i, currentColor) + + currentColor = (currentColor >= this.maxStoneColor) + ? 1 + : currentColor + 1 + } + } + + this.updateScore() + } + + createStone(index, color) { + let hole = this.holes[index] + let stone = this.scene.add.sprite(hole.x, hole.y, 'mancala', `stone/${color}/placed`) + + stone.color = color + + this.updateStonePos(stone, hole) + this.add(stone) + } + + onHoleClick(hole) { + if (!this.isMyTurn) { + return + } + + this.hint.hideHint() + + if (!this.wait && this.currentPlayer.holes.includes(hole) && hole.stones.length) { + + } + } + + onHoleOver(hole) { + if (!this.wait) { + this.bringToTop(this.hint) + + this.hint.showHint(hole, this.currentPlayer.holes.includes(hole) && this.isMyTurn) + } + } + + onHoleOut() { + this.hint.hideHint() + } + + handleSendMove(turn, hole, move) { + this.currentTurn = turn + hole = this.holes[hole] + + this.wait = true + + hole.stones.map(stone => this.pickUpStone(stone)) + + // Update depths + hole.stones.slice(0).reverse().map(stone => this.bringToTop(stone)) + + let nextHole = hole.index + let i = 1 + + // Move stones + while (hole.stones.length > 0) { + nextHole = this.getNextHole(nextHole) + let stone = hole.stones.shift() + + this.dropStone(i, stone, this.holes[nextHole]) + + if (hole.stones.length === 0) { + this.scene.time.delayedCall(i * this.dropDelay, () => { + this.updateTurn(nextHole, move) + }) + } + + i++ + } + } + + pickUpStone(stone) { + stone.anims.play(`mancala/stone/${stone.color}/hand`) + } + + getNextHole(hole) { + hole++ + let opponentMancala = (this.currentTurn === 1) ? 13 : 6 + + if (hole === opponentMancala) { + hole++ + } + + if (hole > this.holes.length - 1) { + hole = 0 + } + + return hole + } + + dropStone(i, stone, hole, delay = this.dropDelay) { + this.scene.time.delayedCall(i * delay, () => { + stone.anims.play(`mancala/stone/${stone.color}/drop`) + + // Mancala holes play louder sound + if (this.isMancala(hole)) { + this.scene.sound.play('drop', { volume: 0.5 }) + } else { + this.scene.sound.play('drop', { volume: 0.2 }) + } + + this.updateStonePos(stone, hole) + }) + } + + updateStonePos(stone, hole) { + let randomNum = Math.random() * 6.283185307179586 + + // Randomize position in hole + stone.x = hole.x + Math.sin(randomNum) * Phaser.Math.Between(0, this.holeSize / 4) + stone.y = hole.y + Math.cos(randomNum) * Phaser.Math.Between(0, this.holeSize / 4) + + hole.stones.push(stone) + } + + updateTurn(lastHole = null, move = '') { + if (lastHole) { + this.checkLastHole(lastHole, move) + } + + if (move !== 'capture') { + this.updateScore() + } + + if (!move) { + this.currentTurn = (this.currentTurn === 1) ? 2 : 1 + + this.mancalaPlayer1.setActive() + this.mancalaPlayer2.setActive() + + this.wait = false + } + } + + checkLastHole(lastHole, move) { + switch (move) { + case 'free': + this.showPopup('free') + break + + case 'capture': + this.captureStones(lastHole) + break + + default: + break + } + } + + captureStones(hole) { + let captureHole = this.holes[12 - hole] + let currentMancala = this.currentPlayer.mancala + + let i = 1 + + // Move stones + while (captureHole.stones.length > 0) { + let stone = captureHole.stones.shift() + + this.dropStone(i, stone, currentMancala, this.captureDelay) + + i++ + } + + this.dropStone(i, this.holes[hole].stones.shift(), currentMancala, this.captureDelay) + + this.scene.time.delayedCall(i * this.captureDelay, () => { + this.showPopup('capture') + }) + } + + updateScore() { + this.mancalaPlayer1.updateScore() + this.mancalaPlayer2.updateScore() + } + + showPopup(type) { + this.bringToTop(this.popup) + this.popup.anims.play(`mancala/popup/${type}`) + } + + onPopupComplete(animation) { + // End of capture popup moves to next turn + if (animation.key === 'mancala/popup/capture') { + return this.updateTurn() + } + + this.wait = false + } + + /* END-USER-CODE */ +} + +/* END OF COMPILED CODE */ diff --git a/src/scenes/games/mancala/Mancala.scene b/src/scenes/games/mancala/Mancala.scene new file mode 100644 index 00000000..1a235a36 --- /dev/null +++ b/src/scenes/games/mancala/Mancala.scene @@ -0,0 +1,379 @@ +{ + "id": "f4fdbbc7-bf40-42c0-92c9-e80824c1e652", + "sceneType": "PREFAB", + "settings": { + "compilerInsertSpaces": true, + "snapWidth": 58, + "snapHeight": 60, + "javaScriptInitFieldsInConstructor": true, + "exportClass": true, + "superClassName": "BaseContainer", + "preloadMethodName": "", + "preloadPackFiles": [], + "createMethodName": "", + "borderWidth": 1520, + "borderHeight": 960 + }, + "displayList": [ + { + "type": "Container", + "id": "2e89319d-c037-4f9f-8b8c-a4af45dadf38", + "label": "container_1", + "components": [ + "DraggableContainer" + ], + "DraggableContainer.handle": "window", + "x": 760, + "y": 480, + "list": [ + { + "type": "Image", + "id": "55d91bff-c9af-40fd-ad97-0bdc375a99d4", + "label": "window", + "components": [], + "texture": { + "key": "mancala", + "frame": "window" + } + }, + { + "type": "Image", + "id": "76bf3f20-f10a-45ab-b2c6-76fe7a7ba86a", + "label": "bg2", + "components": [], + "texture": { + "key": "mancala", + "frame": "player/bg" + }, + "y": 118, + "flipY": true + }, + { + "type": "Image", + "id": "001894b7-e6e0-4caf-b9cc-04ce634e5282", + "label": "bg1", + "components": [], + "texture": { + "key": "mancala", + "frame": "player/bg" + }, + "y": -86 + }, + { + "type": "Image", + "id": "029699bc-46a0-4c39-8794-64b9bac2700a", + "label": "shadow", + "components": [], + "texture": { + "key": "mancala", + "frame": "shadow" + }, + "y": 16 + }, + { + "type": "Image", + "id": "8a60289b-06e8-4dae-a743-3da28ce00a85", + "label": "board", + "components": [], + "texture": { + "key": "mancala", + "frame": "board" + }, + "y": 10 + }, + { + "type": "Image", + "id": "d6000b2f-67d1-49df-91c3-49711c59fc64", + "label": "hole_13", + "components": [], + "texture": { + "key": "mancala", + "frame": "hole_1" + }, + "x": -200, + "y": 11, + "originY": 0.5047619047619047 + }, + { + "type": "Image", + "id": "152805b6-0b3d-4b6c-bee7-378c9c5d726f", + "label": "hole_12", + "components": [], + "texture": { + "key": "mancala", + "frame": "hole" + }, + "x": -144, + "y": -20, + "originX": 0.5102040816326531, + "originY": 0.5102040816326531 + }, + { + "type": "Image", + "id": "36432eed-487c-415d-85b8-fb68cab93e36", + "label": "hole_11", + "components": [], + "texture": { + "key": "mancala", + "frame": "hole" + }, + "x": -86, + "y": -20, + "originX": 0.5102040816326531, + "originY": 0.5102040816326531 + }, + { + "type": "Image", + "id": "2c5d315e-9b9e-416d-b814-724181ec2064", + "label": "hole_10", + "components": [], + "texture": { + "key": "mancala", + "frame": "hole" + }, + "x": -28, + "y": -20, + "originX": 0.5102040816326531, + "originY": 0.5102040816326531 + }, + { + "type": "Image", + "id": "ee42fdb0-7cdd-45a7-879a-77f2db75ba4c", + "label": "hole_9", + "components": [], + "texture": { + "key": "mancala", + "frame": "hole" + }, + "x": 30, + "y": -20, + "originX": 0.5102040816326531, + "originY": 0.5102040816326531 + }, + { + "type": "Image", + "id": "c11152e4-188c-4cbf-a6c3-fdc8945f4151", + "label": "hole_8", + "components": [], + "texture": { + "key": "mancala", + "frame": "hole" + }, + "x": 88, + "y": -20, + "originX": 0.5102040816326531, + "originY": 0.5102040816326531 + }, + { + "type": "Image", + "id": "12f66ea0-f7b9-47b9-9c6e-76ea297e9495", + "label": "hole_7", + "components": [], + "texture": { + "key": "mancala", + "frame": "hole" + }, + "x": 146, + "y": -20, + "originX": 0.5102040816326531, + "originY": 0.5102040816326531 + }, + { + "type": "Image", + "id": "6aac4be8-f26c-47fe-ba0c-52d28eefa127", + "label": "hole_6", + "components": [], + "texture": { + "key": "mancala", + "frame": "hole_2" + }, + "x": 200, + "y": 11, + "originY": 0.5047619047619047 + }, + { + "type": "Image", + "id": "0202ccd0-af01-44bb-a24d-0a2bb9384aa8", + "label": "hole_5", + "components": [], + "texture": { + "key": "mancala", + "frame": "hole" + }, + "x": 146, + "y": 40, + "originX": 0.5102040816326531, + "originY": 0.5102040816326531 + }, + { + "type": "Image", + "id": "efae5d11-1f07-4f2a-b36c-1dbec458382e", + "label": "hole_4", + "components": [], + "texture": { + "key": "mancala", + "frame": "hole" + }, + "x": 88, + "y": 40, + "originX": 0.5102040816326531, + "originY": 0.5102040816326531 + }, + { + "type": "Image", + "id": "e713e514-0694-489b-a3a2-cfd099f34187", + "label": "hole_3", + "components": [], + "texture": { + "key": "mancala", + "frame": "hole" + }, + "x": 30, + "y": 40, + "originX": 0.5102040816326531, + "originY": 0.5102040816326531 + }, + { + "type": "Image", + "id": "9f44682c-679f-495b-ae2b-674d1a589c4b", + "label": "hole_2", + "components": [], + "texture": { + "key": "mancala", + "frame": "hole" + }, + "x": -28, + "y": 40, + "originX": 0.5102040816326531, + "originY": 0.5102040816326531 + }, + { + "type": "Image", + "id": "b8baf473-a75f-4135-a894-537390a919a9", + "label": "hole_1", + "components": [], + "texture": { + "key": "mancala", + "frame": "hole" + }, + "x": -86, + "y": 40, + "originX": 0.5102040816326531, + "originY": 0.5102040816326531 + }, + { + "type": "Image", + "id": "9389f3d3-994d-43d1-92c5-4024661b79f4", + "label": "hole_0", + "components": [], + "texture": { + "key": "mancala", + "frame": "hole" + }, + "x": -144, + "y": 40, + "originX": 0.5102040816326531, + "originY": 0.5102040816326531 + }, + { + "prefabId": "bb969ff5-2103-4d09-a09b-4cad958047d4", + "id": "f52d5978-c409-4410-b4ab-487c7096d3cb", + "unlock": [ + "x", + "y", + "bg", + "mancala" + ], + "label": "mancalaPlayer1", + "scope": "CLASS", + "bg": "bg2", + "mancala": "hole_6", + "components": [], + "x": -193, + "y": 136, + "nestedPrefabs": [], + "list": [] + }, + { + "prefabId": "bb969ff5-2103-4d09-a09b-4cad958047d4", + "id": "ad4829d1-d06f-453a-a05e-aa2401544ad2", + "unlock": [ + "x", + "y", + "bg", + "mancala" + ], + "label": "mancalaPlayer2", + "scope": "CLASS", + "bg": "bg1", + "mancala": "hole_13", + "components": [], + "x": -193, + "y": -104, + "nestedPrefabs": [], + "list": [] + }, + { + "type": "Sprite", + "id": "09ec3328-6878-41df-9d53-721df330da61", + "label": "popup", + "scope": "CLASS", + "components": [], + "texture": { + "key": "mancala", + "frame": "popup/popup0005" + }, + "x": 4, + "y": 16, + "visible": false + }, + { + "prefabId": "325c2f02-83fe-4592-9a90-32228cab6f13", + "id": "e864d2f5-b71b-4106-ace2-d974512d3eff", + "unlock": [ + "x", + "y", + "visible" + ], + "label": "hint", + "scope": "CLASS", + "components": [], + "x": -144, + "y": -20, + "visible": false, + "nestedPrefabs": [], + "list": [] + } + ] + } + ], + "plainObjects": [], + "meta": { + "app": "Phaser Editor 2D - Scene Editor", + "url": "https://phasereditor2d.com", + "contentType": "phasereditor2d.core.scene.SceneContentType", + "version": 3 + }, + "lists": [ + { + "id": "0cc252c2-494b-4324-baf9-ad1f2bf25c77", + "label": "holes", + "objectIds": [ + "9389f3d3-994d-43d1-92c5-4024661b79f4", + "b8baf473-a75f-4135-a894-537390a919a9", + "9f44682c-679f-495b-ae2b-674d1a589c4b", + "e713e514-0694-489b-a3a2-cfd099f34187", + "efae5d11-1f07-4f2a-b36c-1dbec458382e", + "0202ccd0-af01-44bb-a24d-0a2bb9384aa8", + "6aac4be8-f26c-47fe-ba0c-52d28eefa127", + "12f66ea0-f7b9-47b9-9c6e-76ea297e9495", + "c11152e4-188c-4cbf-a6c3-fdc8945f4151", + "ee42fdb0-7cdd-45a7-879a-77f2db75ba4c", + "2c5d315e-9b9e-416d-b814-724181ec2064", + "36432eed-487c-415d-85b8-fb68cab93e36", + "152805b6-0b3d-4b6c-bee7-378c9c5d726f", + "d6000b2f-67d1-49df-91c3-49711c59fc64" + ] + } + ] +} \ No newline at end of file diff --git a/src/scenes/games/mancala/MancalaHint.js b/src/scenes/games/mancala/MancalaHint.js new file mode 100644 index 00000000..faebee99 --- /dev/null +++ b/src/scenes/games/mancala/MancalaHint.js @@ -0,0 +1,69 @@ +/* START OF COMPILED CODE */ + +export default class MancalaHint extends Phaser.GameObjects.Container { + + constructor(scene, x, y) { + super(scene, x ?? 760, y ?? 480); + + /** @type {Phaser.GameObjects.Sprite} */ + this.hint; + /** @type {Phaser.GameObjects.Text} */ + this.text; + + + // hint + const hint = scene.add.sprite(0, 0, "mancala", "hint/hint0011"); + hint.setOrigin(0.49056603773584906, 0.9294117647058824); + this.add(hint); + + // text + const text = scene.add.text(0, -39, "", {}); + text.setOrigin(0.5, 0.5); + text.visible = false; + text.text = "99"; + text.setStyle({ "align": "center", "color": "#000", "fixedWidth":64,"fontFamily": "Arial", "fontSize": "32px" }); + this.add(text); + + this.hint = hint; + this.text = text; + + /* START-USER-CTR-CODE */ + + hint.on('animationcomplete', () => this.text.visible = true) + + /* END-USER-CTR-CODE */ + } + + + /* START-USER-CODE */ + + showHint(hole, enabled) { + if (!hole.stones.length) { + return + } + + this.x = hole.x + this.y = hole.y + + let color = (enabled) ? '#000' : '#fff' + this.text.text = hole.stones.length + this.text.setColor(color) + + this.visible = true + + let anim = (enabled) ? 'enabled' : 'disabled' + this.hint.anims.play(`hint/${anim}`) + + } + + hideHint() { + this.hint.anims.stop() + + this.visible = false + this.text.visible = false + } + + /* END-USER-CODE */ +} + +/* END OF COMPILED CODE */ diff --git a/src/scenes/games/mancala/MancalaHint.scene b/src/scenes/games/mancala/MancalaHint.scene new file mode 100644 index 00000000..b3d46a51 --- /dev/null +++ b/src/scenes/games/mancala/MancalaHint.scene @@ -0,0 +1,63 @@ +{ + "id": "325c2f02-83fe-4592-9a90-32228cab6f13", + "sceneType": "PREFAB", + "settings": { + "compilerInsertSpaces": true, + "javaScriptInitFieldsInConstructor": true, + "exportClass": true, + "preloadMethodName": "", + "preloadPackFiles": [], + "createMethodName": "", + "borderWidth": 1520, + "borderHeight": 960 + }, + "displayList": [ + { + "type": "Container", + "id": "b003f2ee-88af-4169-8a8d-f5a41c5b3fbf", + "label": "container_1", + "components": [], + "x": 760, + "y": 480, + "list": [ + { + "type": "Sprite", + "id": "ce3caf58-2a72-44b9-8734-38eb48372b37", + "label": "hint", + "scope": "CLASS", + "components": [], + "texture": { + "key": "mancala", + "frame": "hint/hint0011" + }, + "originX": 0.49056603773584906, + "originY": 0.9294117647058824 + }, + { + "type": "Text", + "id": "fb2c6be3-4511-45b7-940c-f8ca7be5bd09", + "label": "text", + "scope": "CLASS", + "components": [], + "y": -39, + "originX": 0.5, + "originY": 0.5, + "visible": false, + "text": "99", + "fixedWidth": 64, + "align": "center", + "fontFamily": "Arial", + "fontSize": "32px", + "color": "#000" + } + ] + } + ], + "plainObjects": [], + "meta": { + "app": "Phaser Editor 2D - Scene Editor", + "url": "https://phasereditor2d.com", + "contentType": "phasereditor2d.core.scene.SceneContentType", + "version": 3 + } +} \ No newline at end of file diff --git a/src/scenes/games/mancala/MancalaPlayer.js b/src/scenes/games/mancala/MancalaPlayer.js new file mode 100644 index 00000000..ee641fe8 --- /dev/null +++ b/src/scenes/games/mancala/MancalaPlayer.js @@ -0,0 +1,111 @@ +/* START OF COMPILED CODE */ + +export default class MancalaPlayer extends Phaser.GameObjects.Container { + + constructor(scene, x, y) { + super(scene, x ?? 760, y ?? 480); + + /** @type {Phaser.GameObjects.Image} */ + this.spinner; + /** @type {Phaser.GameObjects.Text} */ + this.waiting; + /** @type {Phaser.GameObjects.Text} */ + this.username; + /** @type {Phaser.GameObjects.Text} */ + this.score; + /** @type {any} */ + this.bg; + /** @type {any} */ + this.mancala; + + + // spinner + const spinner = scene.add.image(0, 0, "mancala", "player/spinner"); + this.add(spinner); + + // waiting + const waiting = scene.add.text(52, 0, "", {}); + waiting.setOrigin(0, 0.5); + waiting.text = "Waiting for Player"; + waiting.setStyle({ "fontFamily": "Arial", "fontSize": "24px" }); + this.add(waiting); + + // username + const username = scene.add.text(-47, -30, "", {}); + username.visible = false; + username.text = "USERNAME"; + username.setStyle({ "fontSize": "32px" }); + this.add(username); + + // score + const score = scene.add.text(432, 0, "", {}); + score.setOrigin(1, 0.5); + score.visible = false; + score.text = "Score: 0"; + score.setStyle({ "align": "right", "color": "#000", "fontFamily": "Arial", "fontSize": "24px" }); + this.add(score); + + this.spinner = spinner; + this.waiting = waiting; + this.username = username; + this.score = score; + + /* START-USER-CTR-CODE */ + + this.turnId + + // Spinner + this.spinnerTween = scene.tweens.add({ + targets: spinner, + angle: { from: 0, to: 180 }, + duration: 900, + repeat: -1, + ease: 'Cubic' + }) + + /* END-USER-CTR-CODE */ + } + + + /* START-USER-CODE */ + + get holes() { + if (this.turnId === 1) { + return this.parentContainer.holes.slice(0, 7) + + } else if (this.turnId === 2) { + return this.parentContainer.holes.slice(7, 14) + } + } + + get stones() { + return this.holes.map(hole => hole.stones) + } + + setActive() { + let active = this.turnId === this.parentContainer.currentTurn + + let alpha = active ? 1 : 0.5 + let bgFrame = active ? '_turn' : '' + + this.username.alpha = alpha + this.bg.setFrame(`player/bg${bgFrame}`) + } + + updateScore() { + if (!this.turnId) { + return + } + + let score = 0 + for (let stones of this.stones) { + score += stones.length + } + + this.score.text = `Score: ${score}` + } + + /* END-USER-CODE */ +} + +/* END OF COMPILED CODE */ diff --git a/src/scenes/games/mancala/MancalaPlayer.scene b/src/scenes/games/mancala/MancalaPlayer.scene new file mode 100644 index 00000000..de56e55d --- /dev/null +++ b/src/scenes/games/mancala/MancalaPlayer.scene @@ -0,0 +1,108 @@ +{ + "id": "bb969ff5-2103-4d09-a09b-4cad958047d4", + "sceneType": "PREFAB", + "settings": { + "compilerInsertSpaces": true, + "javaScriptInitFieldsInConstructor": true, + "exportClass": true, + "preloadMethodName": "", + "preloadPackFiles": [], + "createMethodName": "", + "borderWidth": 1520, + "borderHeight": 960 + }, + "displayList": [ + { + "type": "Container", + "id": "fbe440e4-3c46-44fd-a3df-22cbec77387c", + "label": "container_1", + "components": [], + "x": 760, + "y": 480, + "list": [ + { + "type": "Image", + "id": "145c1cb0-bf8b-4f3e-9476-356a8b9170ec", + "label": "spinner", + "scope": "CLASS", + "components": [], + "texture": { + "key": "mancala", + "frame": "player/spinner" + } + }, + { + "type": "Text", + "id": "f47ca1f1-d476-415e-9191-c59c11b8937c", + "label": "waiting", + "scope": "CLASS", + "components": [], + "x": 52, + "originY": 0.5, + "text": "Waiting for Player", + "fontFamily": "Arial", + "fontSize": "24px" + }, + { + "type": "Text", + "id": "922fa1fd-ccd9-4ddb-a9d4-3b871943b0f4", + "label": "username", + "scope": "CLASS", + "components": [], + "x": -47, + "y": -30, + "visible": false, + "text": "USERNAME", + "fontSize": "32px" + }, + { + "type": "Text", + "id": "9dc99cde-1ca7-4fd4-b015-73c17698ffe2", + "label": "score", + "scope": "CLASS", + "components": [], + "x": 432, + "originX": 1, + "originY": 0.5, + "visible": false, + "text": "Score: 0", + "align": "right", + "fontFamily": "Arial", + "fontSize": "24px", + "color": "#000" + } + ] + } + ], + "plainObjects": [], + "meta": { + "app": "Phaser Editor 2D - Scene Editor", + "url": "https://phasereditor2d.com", + "contentType": "phasereditor2d.core.scene.SceneContentType", + "version": 3 + }, + "prefabProperties": [ + { + "name": "bg", + "label": "bg", + "tooltip": "bg", + "defValue": "", + "customDefinition": false, + "type": { + "id": "expression", + "expressionType": "any" + } + }, + { + "name": "mancala", + "label": "mancala", + "tooltip": "mancala", + "defValue": "", + "customDefinition": false, + "type": { + "id": "expression", + "expressionType": "any" + } + } + ] +} \ No newline at end of file From 3ba4fd8b6be19d667daa0cadc869f9522afce5a7 Mon Sep 17 00:00:00 2001 From: wizguin <16276645+wizguin@users.noreply.github.com> Date: Mon, 27 Feb 2023 14:07:21 +0000 Subject: [PATCH 005/200] mancala: Add to widgets.js --- src/data/widgets.js | 1 + 1 file changed, 1 insertion(+) diff --git a/src/data/widgets.js b/src/data/widgets.js index f3fc82eb..a920523f 100644 --- a/src/data/widgets.js +++ b/src/data/widgets.js @@ -4,6 +4,7 @@ const widgets = { 'IglooCatalog': require('@scenes/interface/catalogs/igloo/IglooCatalog'), 'FindFour': require('@scenes/games/four/FindFour'), + 'Mancala': require('@scenes/games/mancala/Mancala'), 'Map': require('@scenes/interface/game/map/Map') } From b670f830e0567bae2abaa7c9a5cf97b2d308d161 Mon Sep 17 00:00:00 2001 From: wizguin <16276645+wizguin@users.noreply.github.com> Date: Mon, 27 Feb 2023 14:12:12 +0000 Subject: [PATCH 006/200] mancala: Add close button --- src/scenes/games/mancala/Mancala.js | 15 +++++++++++++- src/scenes/games/mancala/Mancala.scene | 28 ++++++++++++++++++++++++++ 2 files changed, 42 insertions(+), 1 deletion(-) diff --git a/src/scenes/games/mancala/Mancala.js b/src/scenes/games/mancala/Mancala.js index 126d7d0e..18e67129 100644 --- a/src/scenes/games/mancala/Mancala.js +++ b/src/scenes/games/mancala/Mancala.js @@ -1,6 +1,6 @@ import BaseContainer from '@scenes/base/BaseContainer' -import { DraggableContainer, SimpleButton } from '@components/components' +import { Button, DraggableContainer, SimpleButton } from '@components/components' import MancalaHint from './MancalaHint' import MancalaPlayer from './MancalaPlayer' @@ -140,6 +140,14 @@ export default class Mancala extends BaseContainer { hint.visible = false; this.add(hint); + // x_button + const x_button = scene.add.image(252, -160, "main", "blue-button"); + this.add(x_button); + + // blue_x + const blue_x = scene.add.image(252, -162, "main", "blue-x"); + this.add(blue_x); + // lists const holes = [hole_0, hole_1, hole_2, hole_3, hole_4, hole_5, hole_6, hole_7, hole_8, hole_9, hole_10, hole_11, hole_12, hole_13]; @@ -155,6 +163,11 @@ export default class Mancala extends BaseContainer { mancalaPlayer2.bg = bg1; mancalaPlayer2.mancala = hole_13; + // x_button (components) + const x_buttonButton = new Button(x_button); + x_buttonButton.spriteName = "blue-button"; + x_buttonButton.callback = () => this.close(); + this.mancalaPlayer1 = mancalaPlayer1; this.mancalaPlayer2 = mancalaPlayer2; this.popup = popup; diff --git a/src/scenes/games/mancala/Mancala.scene b/src/scenes/games/mancala/Mancala.scene index 1a235a36..af16ddf0 100644 --- a/src/scenes/games/mancala/Mancala.scene +++ b/src/scenes/games/mancala/Mancala.scene @@ -343,6 +343,34 @@ "visible": false, "nestedPrefabs": [], "list": [] + }, + { + "type": "Image", + "id": "f0061852-6a3b-4abe-b30f-17ab057412d8", + "label": "x_button", + "components": [ + "Button" + ], + "Button.spriteName": "blue-button", + "Button.callback": "() => this.close()", + "texture": { + "key": "main", + "frame": "blue-button" + }, + "x": 252, + "y": -160 + }, + { + "type": "Image", + "id": "50799ffa-d7f7-4746-9483-ea71c5beeedd", + "label": "blue_x", + "components": [], + "texture": { + "key": "main", + "frame": "blue-x" + }, + "x": 252, + "y": -162 } ] } From 32d606bf6efa40890b44ea4436faa100001fd241 Mon Sep 17 00:00:00 2001 From: wizguin <16276645+wizguin@users.noreply.github.com> Date: Mon, 27 Feb 2023 16:33:58 +0000 Subject: [PATCH 007/200] mancala: Added table prefab --- .../tables/mancala/MancalaTable.js | 78 ++++++++++ .../tables/mancala/MancalaTable.scene | 135 ++++++++++++++++++ 2 files changed, 213 insertions(+) create mode 100644 src/scenes/shared_prefabs/tables/mancala/MancalaTable.js create mode 100644 src/scenes/shared_prefabs/tables/mancala/MancalaTable.scene diff --git a/src/scenes/shared_prefabs/tables/mancala/MancalaTable.js b/src/scenes/shared_prefabs/tables/mancala/MancalaTable.js new file mode 100644 index 00000000..e70cff2a --- /dev/null +++ b/src/scenes/shared_prefabs/tables/mancala/MancalaTable.js @@ -0,0 +1,78 @@ +import { Button, MoveTo, ShowHint } from '@components/components' + +import SeatPoint from '@scenes/shared_prefabs/seat/SeatPoint' + + +/* START OF COMPILED CODE */ + +export default class MancalaTable extends Phaser.GameObjects.Container { + + constructor(scene, x, y) { + super(scene, x ?? 760, y ?? 480); + + /** @type {Phaser.GameObjects.Image} */ + this.game; + /** @type {SeatPoint} */ + this.seat2; + /** @type {SeatPoint} */ + this.seat1; + + + // table + const table = scene.add.image(0, 0, "book", "table/table"); + table.setOrigin(0.5043478260869565, 0.4838709677419355); + this.add(table); + + // game + const game = scene.add.image(-2, -29, "book", "table/game"); + game.setOrigin(0.5046728971962616, 0.5102040816326531); + this.add(game); + + // done2 + const done2 = new SeatPoint(scene, -8, 89); + this.add(done2); + + // done1 + const done1 = new SeatPoint(scene, -114, 47); + this.add(done1); + + // seat2 + const seat2 = new SeatPoint(scene, 73, 22); + this.add(seat2); + + // seat1 + const seat1 = new SeatPoint(scene, -66, -29); + this.add(seat1); + + // game (components) + const gameButton = new Button(game); + gameButton.spriteName = "table/game"; + gameButton.activeFrame = false; + const gameMoveTo = new MoveTo(game); + gameMoveTo.x = this.x; + gameMoveTo.y = this.y; + const gameShowHint = new ShowHint(game); + gameShowHint.text = "mancala_hint"; + + // seat2 (prefab fields) + seat2.sitFrame = 20; + seat2.donePoint = done2; + + // seat1 (prefab fields) + seat1.sitFrame = 24; + seat1.donePoint = done1; + + this.game = game; + this.seat2 = seat2; + this.seat1 = seat1; + + /* START-USER-CTR-CODE */ + /* END-USER-CTR-CODE */ + } + + + /* START-USER-CODE */ + /* END-USER-CODE */ +} + +/* END OF COMPILED CODE */ diff --git a/src/scenes/shared_prefabs/tables/mancala/MancalaTable.scene b/src/scenes/shared_prefabs/tables/mancala/MancalaTable.scene new file mode 100644 index 00000000..87b9ef19 --- /dev/null +++ b/src/scenes/shared_prefabs/tables/mancala/MancalaTable.scene @@ -0,0 +1,135 @@ +{ + "id": "a31bdfcd-9fee-4e6e-b421-7edb8b8c7008", + "sceneType": "PREFAB", + "settings": { + "compilerInsertSpaces": true, + "javaScriptInitFieldsInConstructor": true, + "exportClass": true, + "preloadMethodName": "", + "preloadPackFiles": [], + "createMethodName": "", + "borderWidth": 1520, + "borderHeight": 960 + }, + "displayList": [ + { + "type": "Container", + "id": "1ea9b4a8-891e-41b1-9e51-dc480b7d635c", + "label": "container_1", + "components": [], + "x": 760, + "y": 480, + "list": [ + { + "type": "Image", + "id": "1be28fd3-9b42-4599-84e2-c2a1f87246a2", + "label": "table", + "components": [], + "texture": { + "key": "book", + "frame": "table/table" + }, + "originX": 0.5043478260869565, + "originY": 0.4838709677419355 + }, + { + "type": "Image", + "id": "e5ab1cc4-03c9-4f3f-af98-c434b0b7d459", + "label": "game", + "scope": "CLASS", + "components": [ + "Button", + "MoveTo", + "ShowHint" + ], + "Button.spriteName": "table/game", + "Button.activeFrame": false, + "MoveTo.x": "this.x", + "MoveTo.y": "this.y", + "ShowHint.text": "mancala_hint", + "texture": { + "key": "book", + "frame": "table/game" + }, + "x": -2, + "y": -29, + "originX": 0.5046728971962616, + "originY": 0.5102040816326531 + }, + { + "prefabId": "3d402c83-0ef8-4993-bf56-3e076074ec9e", + "id": "6912ed84-8287-4eb7-9cb7-18e74c7e37a8", + "unlock": [ + "x", + "y" + ], + "label": "done2", + "components": [], + "x": -8, + "y": 89, + "nestedPrefabs": [], + "list": [] + }, + { + "prefabId": "3d402c83-0ef8-4993-bf56-3e076074ec9e", + "id": "6bd50828-cf73-4817-ac81-da6521228aa6", + "unlock": [ + "x", + "y" + ], + "label": "done1", + "components": [], + "x": -114, + "y": 47, + "nestedPrefabs": [], + "list": [] + }, + { + "prefabId": "3d402c83-0ef8-4993-bf56-3e076074ec9e", + "id": "1977c67d-f603-4e04-aca6-72a5efe07015", + "unlock": [ + "x", + "y", + "sitFrame", + "donePoint" + ], + "label": "seat2", + "scope": "CLASS", + "sitFrame": 20, + "donePoint": "done2", + "components": [], + "x": 73, + "y": 22, + "nestedPrefabs": [], + "list": [] + }, + { + "prefabId": "3d402c83-0ef8-4993-bf56-3e076074ec9e", + "id": "2134e9a9-d340-4e4d-a453-d487de816890", + "unlock": [ + "x", + "y", + "sitFrame", + "donePoint" + ], + "label": "seat1", + "scope": "CLASS", + "sitFrame": 24, + "donePoint": "done1", + "components": [], + "x": -66, + "y": -29, + "nestedPrefabs": [], + "list": [] + } + ] + } + ], + "plainObjects": [], + "meta": { + "app": "Phaser Editor 2D - Scene Editor", + "url": "https://phasereditor2d.com", + "contentType": "phasereditor2d.core.scene.SceneContentType", + "version": 3 + } +} \ No newline at end of file From 16b135bf2b2a0df4e33290371f80f06b8bfe72d5 Mon Sep 17 00:00:00 2001 From: wizguin <16276645+wizguin@users.noreply.github.com> Date: Mon, 27 Feb 2023 16:52:51 +0000 Subject: [PATCH 008/200] mancala: Updated tables in book room --- src/scenes/rooms/book/Book.js | 102 +++++++----------- src/scenes/rooms/book/Book.scene | 173 +++++++++++++------------------ 2 files changed, 112 insertions(+), 163 deletions(-) diff --git a/src/scenes/rooms/book/Book.js b/src/scenes/rooms/book/Book.js index 14aa7b49..37e97536 100644 --- a/src/scenes/rooms/book/Book.js +++ b/src/scenes/rooms/book/Book.js @@ -1,6 +1,8 @@ import RoomScene from '../RoomScene' -import { Button, MoveTo, ShowHint } from '@components/components' +import { Button } from '@components/components' + +import MancalaTable from '@scenes/shared_prefabs/tables/mancala/MancalaTable' /* START OF COMPILED CODE */ @@ -10,7 +12,17 @@ export default class Book extends RoomScene { constructor() { super("Book"); - /** @type {Phaser.GameObjects.Image[]} */ + /** @type {MancalaTable} */ + this.table104; + /** @type {MancalaTable} */ + this.table103; + /** @type {MancalaTable} */ + this.table102; + /** @type {MancalaTable} */ + this.table101; + /** @type {MancalaTable} */ + this.table100; + /** @type {Array} */ this.sort; @@ -62,28 +74,32 @@ export default class Book extends RoomScene { const poster = this.add.image(720, 97, "book", "poster"); poster.setOrigin(0, 0); - // table - const table = this.add.image(951, 446, "book", "table"); - table.setOrigin(0.5043478260869565, 0.46); + // table104 + const table104 = new MancalaTable(this, 1208, 755); + this.add.existing(table104); + table104.visible = true; - // table_1 - const table_1 = this.add.image(652, 444, "book", "table"); - table_1.setOrigin(0.5043478260869565, 0.46); + // table103 + const table103 = new MancalaTable(this, 806, 690); + this.add.existing(table103); + table103.visible = true; - // table_2 - const table_2 = this.add.image(426, 646, "book", "table"); - table_2.setOrigin(0.5043478260869565, 0.46); + // table102 + const table102 = new MancalaTable(this, 426, 652); + this.add.existing(table102); + table102.visible = true; - // table_3 - const table_3 = this.add.image(806, 684, "book", "table"); - table_3.setOrigin(0.5043478260869565, 0.46); + // table101 + const table101 = new MancalaTable(this, 951, 453); + this.add.existing(table101); + table101.visible = true; - // table_4 - const table_4 = this.add.image(1208, 748, "book", "table"); - table_4.setOrigin(0.5043478260869565, 0.46); + // table100 + const table100 = new MancalaTable(this, 651, 450); + this.add.existing(table100); // lists - const sort = [table_4, table_3, table_2, table_1, table, chair_table, chair_front, chair_back]; + const sort = [chair_table, chair_front, chair_back, table100, table101, table102, table103, table104]; // books (components) const booksButton = new Button(books); @@ -96,51 +112,11 @@ export default class Book extends RoomScene { posterButton.activeFrame = false; posterButton.pixelPerfect = true; - // table (components) - const tableButton = new Button(table); - tableButton.spriteName = "table"; - tableButton.activeFrame = false; - tableButton.pixelPerfect = true; - new MoveTo(table); - const tableShowHint = new ShowHint(table); - tableShowHint.text = "mancala_hint"; - - // table_1 (components) - const table_1Button = new Button(table_1); - table_1Button.spriteName = "table"; - table_1Button.activeFrame = false; - table_1Button.pixelPerfect = true; - new MoveTo(table_1); - const table_1ShowHint = new ShowHint(table_1); - table_1ShowHint.text = "mancala_hint"; - - // table_2 (components) - const table_2Button = new Button(table_2); - table_2Button.spriteName = "table"; - table_2Button.activeFrame = false; - table_2Button.pixelPerfect = true; - new MoveTo(table_2); - const table_2ShowHint = new ShowHint(table_2); - table_2ShowHint.text = "mancala_hint"; - - // table_3 (components) - const table_3Button = new Button(table_3); - table_3Button.spriteName = "table"; - table_3Button.activeFrame = false; - table_3Button.pixelPerfect = true; - new MoveTo(table_3); - const table_3ShowHint = new ShowHint(table_3); - table_3ShowHint.text = "mancala_hint"; - - // table_4 (components) - const table_4Button = new Button(table_4); - table_4Button.spriteName = "table"; - table_4Button.activeFrame = false; - table_4Button.pixelPerfect = true; - new MoveTo(table_4); - const table_4ShowHint = new ShowHint(table_4); - table_4ShowHint.text = "mancala_hint"; - + this.table104 = table104; + this.table103 = table103; + this.table102 = table102; + this.table101 = table101; + this.table100 = table100; this.sort = sort; this.events.emit("scene-awake"); diff --git a/src/scenes/rooms/book/Book.scene b/src/scenes/rooms/book/Book.scene index 23adf885..797369e6 100644 --- a/src/scenes/rooms/book/Book.scene +++ b/src/scenes/rooms/book/Book.scene @@ -109,114 +109,87 @@ "originY": 0 }, { - "type": "Image", - "id": "3121adc6-b8d0-49cc-80b9-fb0f907a2521", - "label": "table", - "components": [ - "Button", - "MoveTo", - "ShowHint" + "prefabId": "a31bdfcd-9fee-4e6e-b421-7edb8b8c7008", + "id": "fd51e368-47f4-47df-a384-50368708110b", + "unlock": [ + "x", + "y", + "visible" ], - "Button.spriteName": "table", - "Button.activeFrame": false, - "Button.pixelPerfect": true, - "ShowHint.text": "mancala_hint", - "texture": { - "key": "book", - "frame": "table" - }, - "x": 951, - "y": 446, - "originX": 0.5043478260869565, - "originY": 0.46 + "label": "table104", + "scope": "CLASS", + "components": [], + "x": 1208, + "y": 755, + "visible": true, + "nestedPrefabs": [], + "list": [] }, { - "type": "Image", - "id": "7c76f0f6-08ce-42ce-95ce-ee2bf30214e8", - "label": "table_1", - "components": [ - "Button", - "MoveTo", - "ShowHint" + "prefabId": "a31bdfcd-9fee-4e6e-b421-7edb8b8c7008", + "id": "62ad80e4-03cd-46be-bc97-88dde203d0d1", + "unlock": [ + "x", + "y", + "visible" ], - "Button.spriteName": "table", - "Button.activeFrame": false, - "Button.pixelPerfect": true, - "ShowHint.text": "mancala_hint", - "texture": { - "key": "book", - "frame": "table" - }, - "x": 652, - "y": 444, - "originX": 0.5043478260869565, - "originY": 0.46 + "label": "table103", + "scope": "CLASS", + "components": [], + "x": 806, + "y": 690, + "visible": true, + "nestedPrefabs": [], + "list": [] }, { - "type": "Image", - "id": "69f50215-4fae-4002-ab73-5ae417038520", - "label": "table_2", - "components": [ - "Button", - "MoveTo", - "ShowHint" + "prefabId": "a31bdfcd-9fee-4e6e-b421-7edb8b8c7008", + "id": "026d8187-0e90-4d76-a2e4-3ab5b5463b36", + "unlock": [ + "x", + "y", + "visible" ], - "Button.spriteName": "table", - "Button.activeFrame": false, - "Button.pixelPerfect": true, - "ShowHint.text": "mancala_hint", - "texture": { - "key": "book", - "frame": "table" - }, + "label": "table102", + "scope": "CLASS", + "components": [], "x": 426, - "y": 646, - "originX": 0.5043478260869565, - "originY": 0.46 + "y": 652, + "visible": true, + "nestedPrefabs": [], + "list": [] }, { - "type": "Image", - "id": "83d3b05f-42f9-41da-afe7-f1970727b41c", - "label": "table_3", - "components": [ - "Button", - "MoveTo", - "ShowHint" + "prefabId": "a31bdfcd-9fee-4e6e-b421-7edb8b8c7008", + "id": "3c0f4d88-d38f-49e0-b90d-2389d36e4d50", + "unlock": [ + "x", + "y", + "visible" ], - "Button.spriteName": "table", - "Button.activeFrame": false, - "Button.pixelPerfect": true, - "ShowHint.text": "mancala_hint", - "texture": { - "key": "book", - "frame": "table" - }, - "x": 806, - "y": 684, - "originX": 0.5043478260869565, - "originY": 0.46 + "label": "table101", + "scope": "CLASS", + "components": [], + "x": 951, + "y": 453, + "visible": true, + "nestedPrefabs": [], + "list": [] }, { - "type": "Image", - "id": "2f6c3924-ae43-4b24-b896-637751ef5008", - "label": "table_4", - "components": [ - "Button", - "MoveTo", - "ShowHint" + "prefabId": "a31bdfcd-9fee-4e6e-b421-7edb8b8c7008", + "id": "641156f5-cc76-4144-8f1a-e4648f3ddfc7", + "unlock": [ + "x", + "y" ], - "Button.spriteName": "table", - "Button.activeFrame": false, - "Button.pixelPerfect": true, - "ShowHint.text": "mancala_hint", - "texture": { - "key": "book", - "frame": "table" - }, - "x": 1208, - "y": 748, - "originX": 0.5043478260869565, - "originY": 0.46 + "label": "table100", + "scope": "CLASS", + "components": [], + "x": 651, + "y": 450, + "nestedPrefabs": [], + "list": [] } ], "plainObjects": [], @@ -231,14 +204,14 @@ "id": "8bce6f73-b3e7-48cf-9a02-7e5412e5397d", "label": "sort", "objectIds": [ - "2f6c3924-ae43-4b24-b896-637751ef5008", - "83d3b05f-42f9-41da-afe7-f1970727b41c", - "69f50215-4fae-4002-ab73-5ae417038520", - "7c76f0f6-08ce-42ce-95ce-ee2bf30214e8", - "3121adc6-b8d0-49cc-80b9-fb0f907a2521", "c9532f84-c85e-4dc4-bae4-aaaf8557e69e", "587577af-f9ef-471a-849a-09a07bc115b1", - "3f068263-f4f5-4b66-88b0-078006583a4c" + "3f068263-f4f5-4b66-88b0-078006583a4c", + "641156f5-cc76-4144-8f1a-e4648f3ddfc7", + "3c0f4d88-d38f-49e0-b90d-2389d36e4d50", + "026d8187-0e90-4d76-a2e4-3ab5b5463b36", + "62ad80e4-03cd-46be-bc97-88dde203d0d1", + "fd51e368-47f4-47df-a384-50368708110b" ] } ] From 50d41d2a92104d4d0ae79db7b26344f3a33deb63 Mon Sep 17 00:00:00 2001 From: wizguin <16276645+wizguin@users.noreply.github.com> Date: Mon, 27 Feb 2023 17:47:44 +0000 Subject: [PATCH 009/200] mancala: Add basic button handling --- src/scenes/games/mancala/Mancala.js | 28 +++++++++++++++++++++++++++- 1 file changed, 27 insertions(+), 1 deletion(-) diff --git a/src/scenes/games/mancala/Mancala.js b/src/scenes/games/mancala/Mancala.js index 18e67129..656f2fae 100644 --- a/src/scenes/games/mancala/Mancala.js +++ b/src/scenes/games/mancala/Mancala.js @@ -194,7 +194,7 @@ export default class Mancala extends BaseContainer { popup.setInteractive() popup.on('animationcomplete', (animation) => this.onPopupComplete(animation)) - this.setUpGame() + this.createButtons() /* END-USER-CTR-CODE */ } @@ -264,6 +264,28 @@ export default class Mancala extends BaseContainer { this.updateScore() } + isMancala(hole) { + return this.mancalas.includes(hole) + } + + createButtons() { + for (let hole of this.holes) { + hole.stones = [] + hole.index = this.holes.indexOf(hole) + + let button = new SimpleButton(hole) + + button.pixelPerfect = false + + if (!this.isMancala(hole)) { + button.callback = () => this.onHoleClick(hole) + } + + button.hoverCallback = () => this.onHoleOver(hole) + button.hoverOutCallback = () => this.onHoleOut(hole) + } + } + createStone(index, color) { let hole = this.holes[index] let stone = this.scene.add.sprite(hole.x, hole.y, 'mancala', `stone/${color}/placed`) @@ -287,6 +309,10 @@ export default class Mancala extends BaseContainer { } onHoleOver(hole) { + if (!this.isMyTurn) { + return + } + if (!this.wait) { this.bringToTop(this.hint) From ad6d2784becfca4da4d98ea27e772dcaffbe0c9f Mon Sep 17 00:00:00 2001 From: wizguin <16276645+wizguin@users.noreply.github.com> Date: Mon, 27 Feb 2023 18:01:59 +0000 Subject: [PATCH 010/200] mancala: Add game start handling --- src/scenes/games/mancala/Mancala.js | 52 ++++++++++++++++------- src/scenes/games/mancala/MancalaPlayer.js | 11 +++++ 2 files changed, 48 insertions(+), 15 deletions(-) diff --git a/src/scenes/games/mancala/Mancala.js b/src/scenes/games/mancala/Mancala.js index 656f2fae..c1431a3c 100644 --- a/src/scenes/games/mancala/Mancala.js +++ b/src/scenes/games/mancala/Mancala.js @@ -214,35 +214,57 @@ export default class Mancala extends BaseContainer { return this[`mancalaPlayer${this.currentTurn}`] } - isMancala(hole) { - return this.mancalas.includes(hole) + addListeners() { + this.network.events.on('get_game', this.handleGetGame, this) + this.network.events.on('join_game', this.handleJoinGame, this) + this.network.events.on('update_game', this.handleUpdateGame, this) + this.network.events.on('start_game', this.handleStartGame, this) + this.network.events.on('send_move', this.handleSendMove, this) + //this.network.events.on('close_game', this.handleCloseGame, this) + } + + removeListeners() { + this.network.events.off('get_game', this.handleGetGame, this) + this.network.events.off('join_game', this.handleJoinGame, this) + this.network.events.off('update_game', this.handleUpdateGame, this) + this.network.events.off('start_game', this.handleStartGame, this) + this.network.events.off('send_move', this.handleSendMove, this) + //this.network.events.off('close_game', this.handleCloseGame, this) } - setUpGame() { + show() { + this.map = null + this.myTurn = null + this.currentTurn = 1 + this.started = false + + super.show() + this.addListeners() + this.network.send('get_game') + } + + close() { + super.close() } handleGetGame(map) { this.map = map + + this.network.send('join_game') } handleJoinGame(turnId) { - // Setting my turn this.myTurn = turnId } - handleAddPlayer(username, turnId) { - let player = this[`mancalaPlayer${turnId}`] - player.turnId = turnId - - player.spinner.visible = false - player.waiting.visible = false - - player.username.text = username.toUpperCase() - player.username.visible = true - player.score.visible = true + handleUpdateGame(args) { + this.setPlayer(args.username, args.turn) + } - player.setActive() + setPlayer(username, turn) { + let player = this[`mancalaPlayer${turn}`] + player.set(username, turn) } handleStartGame() { diff --git a/src/scenes/games/mancala/MancalaPlayer.js b/src/scenes/games/mancala/MancalaPlayer.js index ee641fe8..95aad70d 100644 --- a/src/scenes/games/mancala/MancalaPlayer.js +++ b/src/scenes/games/mancala/MancalaPlayer.js @@ -82,6 +82,17 @@ export default class MancalaPlayer extends Phaser.GameObjects.Container { return this.holes.map(hole => hole.stones) } + set(username, turn) { + this.turnId = turn + + this.spinner.visible = false + this.waiting.visible = false + + this.username.text = username.toUpperCase() + this.username.visible = true + this.score.visible = true + } + setActive() { let active = this.turnId === this.parentContainer.currentTurn From d8eeaf34d2e20a3dba01809ea67ad221bd8b5b95 Mon Sep 17 00:00:00 2001 From: wizguin <16276645+wizguin@users.noreply.github.com> Date: Mon, 27 Feb 2023 18:18:33 +0000 Subject: [PATCH 011/200] mancala: Use args on handle functions --- src/scenes/games/mancala/Mancala.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/scenes/games/mancala/Mancala.js b/src/scenes/games/mancala/Mancala.js index c1431a3c..edd3d658 100644 --- a/src/scenes/games/mancala/Mancala.js +++ b/src/scenes/games/mancala/Mancala.js @@ -248,14 +248,14 @@ export default class Mancala extends BaseContainer { super.close() } - handleGetGame(map) { - this.map = map + handleGetGame(args) { + this.map = args.map this.network.send('join_game') } - handleJoinGame(turnId) { - this.myTurn = turnId + handleJoinGame(args) { + this.myTurn = args.turn } handleUpdateGame(args) { From f7b13409ccbc58da0f0051338c0cef238b7d641e Mon Sep 17 00:00:00 2001 From: wizguin <16276645+wizguin@users.noreply.github.com> Date: Mon, 27 Feb 2023 18:19:06 +0000 Subject: [PATCH 012/200] mancala: Update handle start game --- src/scenes/games/mancala/Mancala.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/scenes/games/mancala/Mancala.js b/src/scenes/games/mancala/Mancala.js index edd3d658..3364dbe0 100644 --- a/src/scenes/games/mancala/Mancala.js +++ b/src/scenes/games/mancala/Mancala.js @@ -268,6 +268,8 @@ export default class Mancala extends BaseContainer { } handleStartGame() { + this.started = true + let currentColor = 1 for (let i = 0; i < this.map.length; i++) { @@ -284,6 +286,9 @@ export default class Mancala extends BaseContainer { } this.updateScore() + + this.mancalaPlayer1.setActive() + this.mancalaPlayer2.setActive() } isMancala(hole) { From a1d35ef8c6e355f0906cc5edaf7c992748d34ac5 Mon Sep 17 00:00:00 2001 From: wizguin <16276645+wizguin@users.noreply.github.com> Date: Mon, 27 Feb 2023 18:31:13 +0000 Subject: [PATCH 013/200] mancala: Use proper fonts --- src/scenes/games/mancala/MancalaPlayer.js | 13 ++++++++++--- src/scenes/games/mancala/MancalaPlayer.scene | 8 +++++++- 2 files changed, 17 insertions(+), 4 deletions(-) diff --git a/src/scenes/games/mancala/MancalaPlayer.js b/src/scenes/games/mancala/MancalaPlayer.js index 95aad70d..28db1f22 100644 --- a/src/scenes/games/mancala/MancalaPlayer.js +++ b/src/scenes/games/mancala/MancalaPlayer.js @@ -34,7 +34,7 @@ export default class MancalaPlayer extends Phaser.GameObjects.Container { const username = scene.add.text(-47, -30, "", {}); username.visible = false; username.text = "USERNAME"; - username.setStyle({ "fontSize": "32px" }); + username.setStyle({ "color": "#D5E1FF", "fixedWidth":330,"fontFamily": "CCFaceFront", "fontSize": "32px", "fontStyle": "bold italic", "stroke": "#006699", "strokeThickness":9}); this.add(username); // score @@ -63,6 +63,9 @@ export default class MancalaPlayer extends Phaser.GameObjects.Container { ease: 'Cubic' }) + this.inactiveColor = username.style.color + this.inactiveStroke = username.style.stroke + /* END-USER-CTR-CODE */ } @@ -96,10 +99,14 @@ export default class MancalaPlayer extends Phaser.GameObjects.Container { setActive() { let active = this.turnId === this.parentContainer.currentTurn - let alpha = active ? 1 : 0.5 + let color = (active) ? '#fff' : this.inactiveColor + let stroke = (active) ? '#000' : this.inactiveStroke + let bgFrame = active ? '_turn' : '' - this.username.alpha = alpha + this.username.setColor(color) + this.username.setStroke(stroke) + this.bg.setFrame(`player/bg${bgFrame}`) } diff --git a/src/scenes/games/mancala/MancalaPlayer.scene b/src/scenes/games/mancala/MancalaPlayer.scene index de56e55d..86b71cb7 100644 --- a/src/scenes/games/mancala/MancalaPlayer.scene +++ b/src/scenes/games/mancala/MancalaPlayer.scene @@ -53,7 +53,13 @@ "y": -30, "visible": false, "text": "USERNAME", - "fontSize": "32px" + "fixedWidth": 330, + "fontFamily": "CCFaceFront", + "fontSize": "32px", + "fontStyle": "bold italic", + "color": "#D5E1FF", + "stroke": "#006699", + "strokeThickness": 9 }, { "type": "Text", From e119c2b4a0d7a06b4e65d1ee98cf8b9abcd4b1bb Mon Sep 17 00:00:00 2001 From: wizguin <16276645+wizguin@users.noreply.github.com> Date: Mon, 27 Feb 2023 19:06:15 +0000 Subject: [PATCH 014/200] mancala: send_move handling --- src/scenes/games/mancala/Mancala.js | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/scenes/games/mancala/Mancala.js b/src/scenes/games/mancala/Mancala.js index 3364dbe0..2cd6c83c 100644 --- a/src/scenes/games/mancala/Mancala.js +++ b/src/scenes/games/mancala/Mancala.js @@ -331,7 +331,7 @@ export default class Mancala extends BaseContainer { this.hint.hideHint() if (!this.wait && this.currentPlayer.holes.includes(hole) && hole.stones.length) { - + this.network.send('send_move', { hole: this.holes.indexOf(hole) }) } } @@ -351,9 +351,9 @@ export default class Mancala extends BaseContainer { this.hint.hideHint() } - handleSendMove(turn, hole, move) { - this.currentTurn = turn - hole = this.holes[hole] + handleSendMove(args) { + this.currentTurn = args.turn + let hole = this.holes[args.hole] this.wait = true @@ -374,7 +374,7 @@ export default class Mancala extends BaseContainer { if (hole.stones.length === 0) { this.scene.time.delayedCall(i * this.dropDelay, () => { - this.updateTurn(nextHole, move) + this.updateTurn(nextHole, args.move) }) } From 83af5f18527ff4ec589d212b4e927f4986b61efa Mon Sep 17 00:00:00 2001 From: wizguin <16276645+wizguin@users.noreply.github.com> Date: Tue, 28 Feb 2023 09:42:51 +0000 Subject: [PATCH 015/200] mancala: Set players on get game --- src/scenes/games/mancala/Mancala.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/scenes/games/mancala/Mancala.js b/src/scenes/games/mancala/Mancala.js index 2cd6c83c..20425766 100644 --- a/src/scenes/games/mancala/Mancala.js +++ b/src/scenes/games/mancala/Mancala.js @@ -251,6 +251,10 @@ export default class Mancala extends BaseContainer { handleGetGame(args) { this.map = args.map + for (let user of args.users) { + this.setPlayer(user, args.users.indexOf(user) + 1) + } + this.network.send('join_game') } From a696bf15ee0fee8e0d59c94f9fef41e91ba73439 Mon Sep 17 00:00:00 2001 From: wizguin <16276645+wizguin@users.noreply.github.com> Date: Tue, 28 Feb 2023 12:36:38 +0000 Subject: [PATCH 016/200] mancala: Fix loading for spectator --- src/scenes/games/mancala/Mancala.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/scenes/games/mancala/Mancala.js b/src/scenes/games/mancala/Mancala.js index 20425766..f301ffe2 100644 --- a/src/scenes/games/mancala/Mancala.js +++ b/src/scenes/games/mancala/Mancala.js @@ -250,11 +250,16 @@ export default class Mancala extends BaseContainer { handleGetGame(args) { this.map = args.map + this.currentTurn = args.currentTurn for (let user of args.users) { this.setPlayer(user, args.users.indexOf(user) + 1) } + if (args.started) { + return this.handleStartGame() + } + this.network.send('join_game') } From 4bcb7eac1eb3a42c01fadc867a2560399f29586e Mon Sep 17 00:00:00 2001 From: wizguin <16276645+wizguin@users.noreply.github.com> Date: Tue, 28 Feb 2023 12:50:46 +0000 Subject: [PATCH 017/200] mancala: Add close game --- src/scenes/games/mancala/Mancala.js | 41 ++++++++++++++++++++++++++--- 1 file changed, 38 insertions(+), 3 deletions(-) diff --git a/src/scenes/games/mancala/Mancala.js b/src/scenes/games/mancala/Mancala.js index f301ffe2..0fc1a6aa 100644 --- a/src/scenes/games/mancala/Mancala.js +++ b/src/scenes/games/mancala/Mancala.js @@ -220,7 +220,7 @@ export default class Mancala extends BaseContainer { this.network.events.on('update_game', this.handleUpdateGame, this) this.network.events.on('start_game', this.handleStartGame, this) this.network.events.on('send_move', this.handleSendMove, this) - //this.network.events.on('close_game', this.handleCloseGame, this) + this.network.events.on('close_game', this.handleCloseGame, this) } removeListeners() { @@ -229,7 +229,7 @@ export default class Mancala extends BaseContainer { this.network.events.off('update_game', this.handleUpdateGame, this) this.network.events.off('start_game', this.handleStartGame, this) this.network.events.off('send_move', this.handleSendMove, this) - //this.network.events.off('close_game', this.handleCloseGame, this) + this.network.events.off('close_game', this.handleCloseGame, this) } show() { @@ -245,7 +245,15 @@ export default class Mancala extends BaseContainer { } close() { - super.close() + if (!this.started) { + return this.sendLeaveTable() + } + + this.interface.prompt.showWindow(this.getString('quit_game_prompt'), 'dual', () => { + this.sendLeaveTable() + + this.interface.prompt.window.visible = false + }) } handleGetGame(args) { @@ -391,6 +399,15 @@ export default class Mancala extends BaseContainer { } } + handleCloseGame(args) { + if (args.username) { + let text = this.getFormatString('player_quit_prompt', args.username) + this.interface.prompt.showWindow(text, 'single') + } + + this.leaveTable() + } + pickUpStone(stone) { stone.anims.play(`mancala/stone/${stone.color}/hand`) } @@ -510,6 +527,24 @@ export default class Mancala extends BaseContainer { this.wait = false } + sendLeaveTable() { + this.network.send('leave_table') + this.leaveTable() + } + + leaveTable() { + this.removeListeners() + this.resetGame() + + super.close() + + this.world.client.sendLeaveSeat() + } + + resetGame() { + + } + /* END-USER-CODE */ } From 7c39baeb84abae8f7e80703e83d3b1d13183c359 Mon Sep 17 00:00:00 2001 From: wizguin <16276645+wizguin@users.noreply.github.com> Date: Tue, 28 Feb 2023 12:56:26 +0000 Subject: [PATCH 018/200] mancala: Move start game function to setupMap --- src/scenes/games/mancala/Mancala.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/scenes/games/mancala/Mancala.js b/src/scenes/games/mancala/Mancala.js index 0fc1a6aa..7aedca04 100644 --- a/src/scenes/games/mancala/Mancala.js +++ b/src/scenes/games/mancala/Mancala.js @@ -265,7 +265,7 @@ export default class Mancala extends BaseContainer { } if (args.started) { - return this.handleStartGame() + return this.setupMap() } this.network.send('join_game') @@ -286,7 +286,10 @@ export default class Mancala extends BaseContainer { handleStartGame() { this.started = true + this.setupMap() + } + setupMap() { let currentColor = 1 for (let i = 0; i < this.map.length; i++) { From 35ff360ad33efc06e228a9c5675e6e5a116a09c9 Mon Sep 17 00:00:00 2001 From: wizguin <16276645+wizguin@users.noreply.github.com> Date: Tue, 28 Feb 2023 13:25:28 +0000 Subject: [PATCH 019/200] mancala: Allow hints when not players turn --- src/scenes/games/mancala/Mancala.js | 4 ---- 1 file changed, 4 deletions(-) diff --git a/src/scenes/games/mancala/Mancala.js b/src/scenes/games/mancala/Mancala.js index 7aedca04..ab4e6ed1 100644 --- a/src/scenes/games/mancala/Mancala.js +++ b/src/scenes/games/mancala/Mancala.js @@ -356,10 +356,6 @@ export default class Mancala extends BaseContainer { } onHoleOver(hole) { - if (!this.isMyTurn) { - return - } - if (!this.wait) { this.bringToTop(this.hint) From d95784055a265f7e8a03f18f2eeca09f2396fb69 Mon Sep 17 00:00:00 2001 From: wizguin <16276645+wizguin@users.noreply.github.com> Date: Tue, 28 Feb 2023 13:26:48 +0000 Subject: [PATCH 020/200] mancala: Add reset game functionality --- src/scenes/games/mancala/Mancala.js | 9 +++++++++ src/scenes/games/mancala/MancalaPlayer.js | 24 +++++++++++++++++++++-- 2 files changed, 31 insertions(+), 2 deletions(-) diff --git a/src/scenes/games/mancala/Mancala.js b/src/scenes/games/mancala/Mancala.js index ab4e6ed1..997c6768 100644 --- a/src/scenes/games/mancala/Mancala.js +++ b/src/scenes/games/mancala/Mancala.js @@ -541,7 +541,16 @@ export default class Mancala extends BaseContainer { } resetGame() { + for (let hole of this.holes) { + for (let stone of hole.stones) { + stone.destroy() + } + + hole.stones = [] + } + this.mancalaPlayer1.reset() + this.mancalaPlayer2.reset() } /* END-USER-CODE */ diff --git a/src/scenes/games/mancala/MancalaPlayer.js b/src/scenes/games/mancala/MancalaPlayer.js index 28db1f22..2644df55 100644 --- a/src/scenes/games/mancala/MancalaPlayer.js +++ b/src/scenes/games/mancala/MancalaPlayer.js @@ -96,8 +96,24 @@ export default class MancalaPlayer extends Phaser.GameObjects.Container { this.score.visible = true } - setActive() { - let active = this.turnId === this.parentContainer.currentTurn + reset() { + this.turnId = null + + this.spinner.visible = true + this.waiting.visible = true + + this.username.text = '' + this.username.visible = false + this.score.visible = false + + this.setActive(true) + this.setScoreText(0) + } + + setActive(reset = false) { + let active = (reset) + ? false + : this.turnId === this.parentContainer.currentTurn let color = (active) ? '#fff' : this.inactiveColor let stroke = (active) ? '#000' : this.inactiveStroke @@ -120,6 +136,10 @@ export default class MancalaPlayer extends Phaser.GameObjects.Container { score += stones.length } + this.setScoreText(score) + } + + setScoreText(score) { this.score.text = `Score: ${score}` } From 2efe4ba5e3e181c6371b1ffad8bd92cd81ac8e17 Mon Sep 17 00:00:00 2001 From: wizguin <16276645+wizguin@users.noreply.github.com> Date: Thu, 2 Mar 2023 15:53:35 +0000 Subject: [PATCH 021/200] mancala: Fixed issue in mancala player --- src/scenes/games/mancala/MancalaPlayer.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/scenes/games/mancala/MancalaPlayer.js b/src/scenes/games/mancala/MancalaPlayer.js index 2644df55..383c41d2 100644 --- a/src/scenes/games/mancala/MancalaPlayer.js +++ b/src/scenes/games/mancala/MancalaPlayer.js @@ -75,10 +75,13 @@ export default class MancalaPlayer extends Phaser.GameObjects.Container { get holes() { if (this.turnId === 1) { return this.parentContainer.holes.slice(0, 7) + } - } else if (this.turnId === 2) { + if (this.turnId === 2) { return this.parentContainer.holes.slice(7, 14) } + + return [] } get stones() { From aca74dbe79e78abdc70596674e0ff5a5616c3b5e Mon Sep 17 00:00:00 2001 From: wizguin <16276645+wizguin@users.noreply.github.com> Date: Thu, 2 Mar 2023 15:58:14 +0000 Subject: [PATCH 022/200] mancala: Add moveQueue & timerEvents/fixes --- src/scenes/games/mancala/Mancala.js | 96 ++++++++++++++++++----------- 1 file changed, 59 insertions(+), 37 deletions(-) diff --git a/src/scenes/games/mancala/Mancala.js b/src/scenes/games/mancala/Mancala.js index 997c6768..dd1b23cf 100644 --- a/src/scenes/games/mancala/Mancala.js +++ b/src/scenes/games/mancala/Mancala.js @@ -176,16 +176,6 @@ export default class Mancala extends BaseContainer { /* START-USER-CTR-CODE */ - this.scene = scene - - this.map - this.board = [] - this.currentTurn = 1 - this.myTurn - - // Waiting for turn to finish - this.wait = false - this.maxStoneColor = 5 this.holeSize = 49 this.dropDelay = 168 @@ -234,10 +224,17 @@ export default class Mancala extends BaseContainer { show() { this.map = null - this.myTurn = null this.currentTurn = 1 + this.myTurn = null this.started = false + // Waiting for turn to finish + this.wait = false + + this.moveQueue = [] + this.timerEvents = [] + this.stones = [] + super.show() this.addListeners() @@ -279,16 +276,35 @@ export default class Mancala extends BaseContainer { this.setPlayer(args.username, args.turn) } - setPlayer(username, turn) { - let player = this[`mancalaPlayer${turn}`] - player.set(username, turn) - } - handleStartGame() { this.started = true this.setupMap() } + handleSendMove(args) { + this.moveQueue.push(args) + + if (this.moveQueue.length > 1) { + return + } + + this.moveStones(args) + } + + handleCloseGame(args) { + if (args.username) { + let text = this.getFormatString('player_quit_prompt', args.username) + this.interface.prompt.showWindow(text, 'single') + } + + this.leaveTable() + } + + setPlayer(username, turn) { + let player = this[`mancalaPlayer${turn}`] + player.set(username, turn) + } + setupMap() { let currentColor = 1 @@ -341,6 +357,8 @@ export default class Mancala extends BaseContainer { this.updateStonePos(stone, hole) this.add(stone) + + this.stones.push(stone) } onHoleClick(hole) { @@ -367,7 +385,7 @@ export default class Mancala extends BaseContainer { this.hint.hideHint() } - handleSendMove(args) { + moveStones(args) { this.currentTurn = args.turn let hole = this.holes[args.hole] @@ -389,7 +407,7 @@ export default class Mancala extends BaseContainer { this.dropStone(i, stone, this.holes[nextHole]) if (hole.stones.length === 0) { - this.scene.time.delayedCall(i * this.dropDelay, () => { + this.delayedCall(i * this.dropDelay, () => { this.updateTurn(nextHole, args.move) }) } @@ -398,15 +416,6 @@ export default class Mancala extends BaseContainer { } } - handleCloseGame(args) { - if (args.username) { - let text = this.getFormatString('player_quit_prompt', args.username) - this.interface.prompt.showWindow(text, 'single') - } - - this.leaveTable() - } - pickUpStone(stone) { stone.anims.play(`mancala/stone/${stone.color}/hand`) } @@ -427,7 +436,7 @@ export default class Mancala extends BaseContainer { } dropStone(i, stone, hole, delay = this.dropDelay) { - this.scene.time.delayedCall(i * delay, () => { + this.delayedCall(i * delay, () => { stone.anims.play(`mancala/stone/${stone.color}/drop`) // Mancala holes play louder sound @@ -466,8 +475,18 @@ export default class Mancala extends BaseContainer { this.mancalaPlayer1.setActive() this.mancalaPlayer2.setActive() - this.wait = false + this.checkMoveQueue() + } + } + + checkMoveQueue() { + this.moveQueue.shift() + + if (this.moveQueue.length) { + return this.moveStones(this.moveQueue[0]) } + + this.wait = false } checkLastHole(lastHole, move) { @@ -502,7 +521,7 @@ export default class Mancala extends BaseContainer { this.dropStone(i, this.holes[hole].stones.shift(), currentMancala, this.captureDelay) - this.scene.time.delayedCall(i * this.captureDelay, () => { + this.delayedCall(i * this.captureDelay, () => { this.showPopup('capture') }) } @@ -523,7 +542,8 @@ export default class Mancala extends BaseContainer { return this.updateTurn() } - this.wait = false + // Free turn + this.checkMoveQueue() } sendLeaveTable() { @@ -541,18 +561,20 @@ export default class Mancala extends BaseContainer { } resetGame() { - for (let hole of this.holes) { - for (let stone of hole.stones) { - stone.destroy() - } + this.scene.time.removeEvent(this.timerEvents) - hole.stones = [] - } + this.stones.map(stone => stone.destroy()) + this.holes.map(hole => hole.stones = []) this.mancalaPlayer1.reset() this.mancalaPlayer2.reset() } + delayedCall(delay, callback) { + let timerEvent = this.scene.time.delayedCall(delay, callback) + this.timerEvents.push(timerEvent) + } + /* END-USER-CODE */ } From 3170f0f580ec0eccfa36b88cc881db8dcea0ea34 Mon Sep 17 00:00:00 2001 From: wizguin <16276645+wizguin@users.noreply.github.com> Date: Thu, 2 Mar 2023 16:45:22 +0000 Subject: [PATCH 023/200] mancala: Fixed sound --- src/scenes/games/mancala/Mancala.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/scenes/games/mancala/Mancala.js b/src/scenes/games/mancala/Mancala.js index dd1b23cf..cdf177cd 100644 --- a/src/scenes/games/mancala/Mancala.js +++ b/src/scenes/games/mancala/Mancala.js @@ -441,9 +441,9 @@ export default class Mancala extends BaseContainer { // Mancala holes play louder sound if (this.isMancala(hole)) { - this.scene.sound.play('drop', { volume: 0.5 }) + this.soundManager.play('drop', { volume: 0.5 }) } else { - this.scene.sound.play('drop', { volume: 0.2 }) + this.soundManager.play('drop', { volume: 0.2 }) } this.updateStonePos(stone, hole) From ff944795fbe153cc2bbcb68beaa2b31a129c8d30 Mon Sep 17 00:00:00 2001 From: wizguin <16276645+wizguin@users.noreply.github.com> Date: Thu, 2 Mar 2023 20:01:15 +0000 Subject: [PATCH 024/200] mancala: Tweak delay --- src/scenes/games/mancala/Mancala.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/scenes/games/mancala/Mancala.js b/src/scenes/games/mancala/Mancala.js index cdf177cd..f625c61c 100644 --- a/src/scenes/games/mancala/Mancala.js +++ b/src/scenes/games/mancala/Mancala.js @@ -406,13 +406,13 @@ export default class Mancala extends BaseContainer { this.dropStone(i, stone, this.holes[nextHole]) + i++ + if (hole.stones.length === 0) { this.delayedCall(i * this.dropDelay, () => { this.updateTurn(nextHole, args.move) }) } - - i++ } } From ece24038e1e7728b586b810ecea696f8131e5571 Mon Sep 17 00:00:00 2001 From: wizguin <16276645+wizguin@users.noreply.github.com> Date: Thu, 2 Mar 2023 20:07:29 +0000 Subject: [PATCH 025/200] mancala: Add wait for turn end on game over --- src/engine/network/plugins/plugins/MiniGame.js | 5 +++++ src/engine/world/penguin/ClientController.js | 1 + src/scenes/games/mancala/Mancala.js | 11 +++++++++++ 3 files changed, 17 insertions(+) diff --git a/src/engine/network/plugins/plugins/MiniGame.js b/src/engine/network/plugins/plugins/MiniGame.js index ad0cf140..0f15f106 100644 --- a/src/engine/network/plugins/plugins/MiniGame.js +++ b/src/engine/network/plugins/plugins/MiniGame.js @@ -11,6 +11,11 @@ export default class MiniGame extends Plugin { } gameOver(args) { + if (this.world.client.activeSeat) { + this.world.events.once('leftseat', () => this.gameOver(args)) + return + } + // Difference in coins = coins earned this.interface.prompt.showCoin(args.coins - this.world.client.coins) diff --git a/src/engine/world/penguin/ClientController.js b/src/engine/world/penguin/ClientController.js index 962d6720..0b797993 100644 --- a/src/engine/world/penguin/ClientController.js +++ b/src/engine/world/penguin/ClientController.js @@ -303,6 +303,7 @@ export default class ClientController { } this.activeSeat = null + this.world.events.emit('leftseat') } getSeatWorldPos(seat) { diff --git a/src/scenes/games/mancala/Mancala.js b/src/scenes/games/mancala/Mancala.js index f625c61c..3686f649 100644 --- a/src/scenes/games/mancala/Mancala.js +++ b/src/scenes/games/mancala/Mancala.js @@ -227,6 +227,7 @@ export default class Mancala extends BaseContainer { this.currentTurn = 1 this.myTurn = null this.started = false + this.gameOver = false // Waiting for turn to finish this.wait = false @@ -297,6 +298,12 @@ export default class Mancala extends BaseContainer { this.interface.prompt.showWindow(text, 'single') } + // Wait for turn to finish + if (args.gameOver) { + this.gameOver = true + return + } + this.leaveTable() } @@ -487,6 +494,10 @@ export default class Mancala extends BaseContainer { } this.wait = false + + if (this.gameOver) { + this.leaveTable() + } } checkLastHole(lastHole, move) { From eb3377f9a2a7329c83b1b684d888b9e70e3bc2ca Mon Sep 17 00:00:00 2001 From: wizguin <16276645+wizguin@users.noreply.github.com> Date: Fri, 17 Mar 2023 21:58:58 +0000 Subject: [PATCH 026/200] cardjitsu: Add basic scene --- src/scenes/games/card/CardJitsu.js | 60 +++++++++++++++ src/scenes/games/card/CardJitsu.scene | 107 ++++++++++++++++++++++++++ 2 files changed, 167 insertions(+) create mode 100644 src/scenes/games/card/CardJitsu.js create mode 100644 src/scenes/games/card/CardJitsu.scene diff --git a/src/scenes/games/card/CardJitsu.js b/src/scenes/games/card/CardJitsu.js new file mode 100644 index 00000000..e67f0d71 --- /dev/null +++ b/src/scenes/games/card/CardJitsu.js @@ -0,0 +1,60 @@ +/* START OF COMPILED CODE */ + +import GameScene from "../GameScene"; +import CardJitsuPlayer from "./CardJitsuPlayer"; +/* START-USER-IMPORTS */ +/* END-USER-IMPORTS */ + +export default class CardJitsu extends GameScene { + + constructor() { + super("CardJitsu"); + + /* START-USER-CTR-CODE */ + /* END-USER-CTR-CODE */ + } + + /** @returns {void} */ + _preload() { + + this.load.pack("cardjitsu-pack", "assets/media/games/card/cardjitsu-pack.json"); + } + + /** @returns {void} */ + _create() { + + // bg + this.add.image(760, 480, "cardjitsu", "bg"); + + // close + this.add.image(1466, 57, "cardjitsu", "close0001"); + + // help + const help = this.add.image(760, 26, "cardjitsu", "help"); + help.setOrigin(0.5005370569280344, 0.5004436557231589); + + // frame + const frame = this.add.image(760, 480, "cardjitsu", "frame"); + frame.setOrigin(0.5003261578604045, 0.5005192107995846); + + // panel + const panel = this.add.image(760, 854, "cardjitsu", "panel"); + panel.setOrigin(0.500351370344343, 0.5); + + // cardJitsuPlayer + const cardJitsuPlayer = new CardJitsuPlayer(this, 760, 315); + this.add.existing(cardJitsuPlayer); + + this.events.emit("scene-awake"); + } + + /* START-USER-CODE */ + + create() { + super.create() + } + + /* END-USER-CODE */ +} + +/* END OF COMPILED CODE */ diff --git a/src/scenes/games/card/CardJitsu.scene b/src/scenes/games/card/CardJitsu.scene new file mode 100644 index 00000000..765121a2 --- /dev/null +++ b/src/scenes/games/card/CardJitsu.scene @@ -0,0 +1,107 @@ +{ + "id": "594505eb-e825-43c4-87c4-a1394daaa2e7", + "sceneType": "SCENE", + "settings": { + "compilerInsertSpaces": true, + "javaScriptInitFieldsInConstructor": true, + "exportClass": true, + "autoImport": true, + "superClassName": "GameScene", + "preloadMethodName": "_preload", + "preloadPackFiles": [ + "yukon/assets/media/games/card/cardjitsu-pack.json" + ], + "createMethodName": "_create", + "sceneKey": "CardJitsu", + "borderWidth": 1520, + "borderHeight": 960 + }, + "displayList": [ + { + "type": "Image", + "id": "c12c3e43-59eb-4f80-ad9a-810a06c53763", + "label": "bg", + "components": [], + "texture": { + "key": "cardjitsu", + "frame": "bg" + }, + "x": 760, + "y": 480 + }, + { + "type": "Image", + "id": "7a0d7dac-7b59-4a80-bc52-f98bbe8639bd", + "label": "close", + "components": [], + "texture": { + "key": "cardjitsu", + "frame": "close0001" + }, + "x": 1466, + "y": 57 + }, + { + "type": "Image", + "id": "a1e810c2-0719-4c82-b4c9-f0d891121829", + "label": "help", + "components": [], + "texture": { + "key": "cardjitsu", + "frame": "help" + }, + "x": 760, + "y": 26, + "originX": 0.5005370569280344, + "originY": 0.5004436557231589 + }, + { + "type": "Image", + "id": "9e6b3a10-20e4-48fb-95b7-8e3259b670c4", + "label": "frame", + "components": [], + "texture": { + "key": "cardjitsu", + "frame": "frame" + }, + "x": 760, + "y": 480, + "originX": 0.5003261578604045, + "originY": 0.5005192107995846 + }, + { + "type": "Image", + "id": "db30b7ad-1640-42d2-836d-9ac3e76bee29", + "label": "panel", + "components": [], + "texture": { + "key": "cardjitsu", + "frame": "panel" + }, + "x": 760, + "y": 854, + "originX": 0.500351370344343 + }, + { + "prefabId": "2c95b708-e07e-4a6b-ad34-afb595594583", + "id": "6fd982c9-843f-4778-899e-de82fbcde04d", + "unlock": [ + "x", + "y" + ], + "label": "cardJitsuPlayer", + "components": [], + "x": 760, + "y": 315, + "nestedPrefabs": [], + "list": [] + } + ], + "plainObjects": [], + "meta": { + "app": "Phaser Editor 2D - Scene Editor", + "url": "https://phasereditor2d.com", + "contentType": "phasereditor2d.core.scene.SceneContentType", + "version": 3 + } +} \ No newline at end of file From 788fd02bb3f31e7d4f8826e87f9da9f30bb592af Mon Sep 17 00:00:00 2001 From: wizguin <16276645+wizguin@users.noreply.github.com> Date: Fri, 17 Mar 2023 22:00:29 +0000 Subject: [PATCH 027/200] cardjitsu: Add CardJitsuPlayer --- src/scenes/games/card/CardJitsuPlayer.js | 33 ++++++++++++++++++++ src/scenes/games/card/CardJitsuPlayer.scene | 34 +++++++++++++++++++++ 2 files changed, 67 insertions(+) create mode 100644 src/scenes/games/card/CardJitsuPlayer.js create mode 100644 src/scenes/games/card/CardJitsuPlayer.scene diff --git a/src/scenes/games/card/CardJitsuPlayer.js b/src/scenes/games/card/CardJitsuPlayer.js new file mode 100644 index 00000000..d7fb2bc3 --- /dev/null +++ b/src/scenes/games/card/CardJitsuPlayer.js @@ -0,0 +1,33 @@ +/* START OF COMPILED CODE */ + +import BaseContainer from "../../base/BaseContainer"; +/* START-USER-IMPORTS */ + +import CardJitsuBattle from './CardJitsuBattle' + +/* END-USER-IMPORTS */ + +export default class CardJitsuPlayer extends BaseContainer { + + constructor(scene, x, y) { + super(scene, x ?? 760, y ?? 480); + + /* START-USER-CTR-CODE */ + + this.battle = new CardJitsuBattle(this) + + this.playBattle('ambient') + + /* END-USER-CTR-CODE */ + } + + /* START-USER-CODE */ + + playBattle(battle) { + this.battle.play(battle) + } + + /* END-USER-CODE */ +} + +/* END OF COMPILED CODE */ diff --git a/src/scenes/games/card/CardJitsuPlayer.scene b/src/scenes/games/card/CardJitsuPlayer.scene new file mode 100644 index 00000000..0f3c8429 --- /dev/null +++ b/src/scenes/games/card/CardJitsuPlayer.scene @@ -0,0 +1,34 @@ +{ + "id": "2c95b708-e07e-4a6b-ad34-afb595594583", + "sceneType": "PREFAB", + "settings": { + "compilerInsertSpaces": true, + "javaScriptInitFieldsInConstructor": true, + "exportClass": true, + "autoImport": true, + "superClassName": "BaseContainer", + "preloadMethodName": "", + "preloadPackFiles": [], + "createMethodName": "", + "borderWidth": 1520, + "borderHeight": 960 + }, + "displayList": [ + { + "type": "Container", + "id": "b231576b-de89-413b-8255-8a717b8986e4", + "label": "container_1", + "components": [], + "x": 760, + "y": 480, + "list": [] + } + ], + "plainObjects": [], + "meta": { + "app": "Phaser Editor 2D - Scene Editor", + "url": "https://phasereditor2d.com", + "contentType": "phasereditor2d.core.scene.SceneContentType", + "version": 3 + } +} \ No newline at end of file From e1a06ef600d24d9d3a28288b0123ff7077837d57 Mon Sep 17 00:00:00 2001 From: wizguin <16276645+wizguin@users.noreply.github.com> Date: Fri, 17 Mar 2023 22:04:09 +0000 Subject: [PATCH 028/200] cardjitsu: Added battle loading --- src/scenes/games/card/CardJitsuBattle.js | 104 +++++++++++++++++++++++ 1 file changed, 104 insertions(+) create mode 100644 src/scenes/games/card/CardJitsuBattle.js diff --git a/src/scenes/games/card/CardJitsuBattle.js b/src/scenes/games/card/CardJitsuBattle.js new file mode 100644 index 00000000..eba91e6b --- /dev/null +++ b/src/scenes/games/card/CardJitsuBattle.js @@ -0,0 +1,104 @@ +export default class CardJitsuBattle { + + constructor(player) { + this.player = player + + this.scene = player.scene + + this.currentBattle + this.list = {} + } + + play(battle) { + this.clear() + + this.currentBattle = battle + + // Sprite names mapped to layer and frames + let config = this.getBattleConfig() + + this.createSprites(config) + this.playAnims() + } + + getBattleConfig() { + let frames = this.scene.textures.get(this.currentBattle).getFrameNames() + + let config = {} + + for (let f of frames) { + let [layer, name, frame] = f.split('_') + + if (!(name in config)) { + config[name] = { + layer: parseInt(layer), + frames: 0 + } + } + + frame = parseInt(frame) + + if (config[name].frames < frame) { + config[name].frames = frame + } + } + + return config + } + + createSprites(config) { + for (let name in config) { + let spriteConfig = config[name] + + let sprite = this.scene.add.sprite(0, 0, this.currentBattle, `${spriteConfig.layer}_${name}_1`) + sprite.layer = spriteConfig.layer + + this.player.add(sprite) + + this.list[name] = sprite + + sprite.anim = this.createAnim(name, spriteConfig) + } + + this.player.sort('layer') + } + + createAnim(name, spriteConfig) { + if (spriteConfig.frames <= 1) { + return + } + + let key = `${this.currentBattle}/${name}` + + if (this.scene.anims.exists(key)) { + return this.scene.anims.get(key) + } + + return this.scene.anims.create({ + key: key, + frames: this.scene.anims.generateFrameNames(this.currentBattle, { + prefix: `${spriteConfig.layer}_${name}_`, + start: 1, + end: spriteConfig.frames + }), + frameRate: 24, + repeat: -1 + }) + } + + playAnims() { + for (let sprite of Object.values(this.list)) { + if (sprite.anim) { + sprite.play(sprite.anim) + } + } + } + + clear() { + for (let child in this.list) { + this.list[child].destroy() + delete this.list[child] + } + } + +} From 47d038a62408e723c74ba7e3c48fc30c8da544b4 Mon Sep 17 00:00:00 2001 From: wizguin <16276645+wizguin@users.noreply.github.com> Date: Fri, 17 Mar 2023 22:04:47 +0000 Subject: [PATCH 029/200] cardjitsu: Add battle get functions --- src/scenes/games/card/CardJitsuBattle.js | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/src/scenes/games/card/CardJitsuBattle.js b/src/scenes/games/card/CardJitsuBattle.js index eba91e6b..4bb7111d 100644 --- a/src/scenes/games/card/CardJitsuBattle.js +++ b/src/scenes/games/card/CardJitsuBattle.js @@ -9,6 +9,30 @@ export default class CardJitsuBattle { this.list = {} } + get body() { + return this.list.body + } + + get frontArm() { + return this.list.frontarm + } + + get backArm() { + return this.list.backarm + } + + get belt() { + return this.list.belt + } + + get beltLine() { + return this.list.beltline + } + + get sensei() { + return this.list.sensei + } + play(battle) { this.clear() From 4c8fe54020dbcfc2da318e969b9e574cae1a13a4 Mon Sep 17 00:00:00 2001 From: wizguin <16276645+wizguin@users.noreply.github.com> Date: Fri, 17 Mar 2023 22:05:49 +0000 Subject: [PATCH 030/200] cardjitsu: Add setColor --- src/scenes/games/card/CardJitsuBattle.js | 14 ++++++++++++++ src/scenes/games/card/CardJitsuPlayer.js | 5 +++++ 2 files changed, 19 insertions(+) diff --git a/src/scenes/games/card/CardJitsuBattle.js b/src/scenes/games/card/CardJitsuBattle.js index 4bb7111d..8b54e0b1 100644 --- a/src/scenes/games/card/CardJitsuBattle.js +++ b/src/scenes/games/card/CardJitsuBattle.js @@ -118,6 +118,20 @@ export default class CardJitsuBattle { } } + setColor(color) { + if (this.body) { + this.body.tint = color + } + + if (this.frontArm) { + this.frontArm.tint = color + } + + if (this.backArm) { + this.backArm.tint = color + } + } + clear() { for (let child in this.list) { this.list[child].destroy() diff --git a/src/scenes/games/card/CardJitsuPlayer.js b/src/scenes/games/card/CardJitsuPlayer.js index d7fb2bc3..57515267 100644 --- a/src/scenes/games/card/CardJitsuPlayer.js +++ b/src/scenes/games/card/CardJitsuPlayer.js @@ -17,6 +17,7 @@ export default class CardJitsuPlayer extends BaseContainer { this.battle = new CardJitsuBattle(this) this.playBattle('ambient') + this.setColor(0x009900) /* END-USER-CTR-CODE */ } @@ -27,6 +28,10 @@ export default class CardJitsuPlayer extends BaseContainer { this.battle.play(battle) } + setColor(color) { + this.battle.setColor(color) + } + /* END-USER-CODE */ } From ea5f473fd32d6ac4d1b8291492584f02b3729ff6 Mon Sep 17 00:00:00 2001 From: wizguin <16276645+wizguin@users.noreply.github.com> Date: Fri, 17 Mar 2023 22:07:58 +0000 Subject: [PATCH 031/200] cardjitsu: Belt color basics --- src/scenes/games/card/CardJitsuBattle.js | 6 ++++++ src/scenes/games/card/CardJitsuPlayer.js | 5 +++++ 2 files changed, 11 insertions(+) diff --git a/src/scenes/games/card/CardJitsuBattle.js b/src/scenes/games/card/CardJitsuBattle.js index 8b54e0b1..a024d713 100644 --- a/src/scenes/games/card/CardJitsuBattle.js +++ b/src/scenes/games/card/CardJitsuBattle.js @@ -132,6 +132,12 @@ export default class CardJitsuBattle { } } + setBeltColor(color) { + if (this.belt) { + this.belt.tint = color + } + } + clear() { for (let child in this.list) { this.list[child].destroy() diff --git a/src/scenes/games/card/CardJitsuPlayer.js b/src/scenes/games/card/CardJitsuPlayer.js index 57515267..684d7250 100644 --- a/src/scenes/games/card/CardJitsuPlayer.js +++ b/src/scenes/games/card/CardJitsuPlayer.js @@ -18,6 +18,7 @@ export default class CardJitsuPlayer extends BaseContainer { this.playBattle('ambient') this.setColor(0x009900) + this.setBeltColor(4473924) /* END-USER-CTR-CODE */ } @@ -32,6 +33,10 @@ export default class CardJitsuPlayer extends BaseContainer { this.battle.setColor(color) } + setBeltColor(color) { + this.battle.setBeltColor(color) + } + /* END-USER-CODE */ } From 52a433f82137e7a8b891ce3c3625d43146cdabff Mon Sep 17 00:00:00 2001 From: wizguin <16276645+wizguin@users.noreply.github.com> Date: Tue, 21 Mar 2023 11:51:40 +0000 Subject: [PATCH 032/200] cardjitsu: Add Dojo --- src/scenes/rooms/dojo/Dojo.js | 56 +++++++++++++++++++++++++ src/scenes/rooms/dojo/Dojo.scene | 64 +++++++++++++++++++++++++++++ src/scenes/rooms/dojoext/DojoExt.js | 2 +- 3 files changed, 121 insertions(+), 1 deletion(-) create mode 100644 src/scenes/rooms/dojo/Dojo.js create mode 100644 src/scenes/rooms/dojo/Dojo.scene diff --git a/src/scenes/rooms/dojo/Dojo.js b/src/scenes/rooms/dojo/Dojo.js new file mode 100644 index 00000000..2a1ddc80 --- /dev/null +++ b/src/scenes/rooms/dojo/Dojo.js @@ -0,0 +1,56 @@ +/* START OF COMPILED CODE */ + +import RoomScene from "../RoomScene"; +import Button from "../../components/Button"; +import MoveTo from "../../components/MoveTo"; +/* START-USER-IMPORTS */ +/* END-USER-IMPORTS */ + +export default class Dojo extends RoomScene { + + constructor() { + super("Dojo"); + + /* START-USER-CTR-CODE */ + + this.roomTriggers = { + 'door': () => this.triggerRoom(321, 780, 640), + } + + /* END-USER-CTR-CODE */ + } + + /** @returns {void} */ + _preload() { + + this.load.pack("dojo-pack", "assets/media/rooms/dojo/dojo-pack.json"); + } + + /** @returns {void} */ + _create() { + + // bg + const bg = this.add.image(-4, -2, "dojo", "bg"); + bg.setOrigin(0, 0); + + // door + const door = this.add.image(358, 421, "dojo", "door"); + door.setOrigin(0, 0); + + // door (components) + const doorButton = new Button(door); + doorButton.spriteName = "door"; + doorButton.activeFrame = false; + doorButton.pixelPerfect = true; + const doorMoveTo = new MoveTo(door); + doorMoveTo.x = 400; + doorMoveTo.y = 570; + + this.events.emit("scene-awake"); + } + + /* START-USER-CODE */ + /* END-USER-CODE */ +} + +/* END OF COMPILED CODE */ diff --git a/src/scenes/rooms/dojo/Dojo.scene b/src/scenes/rooms/dojo/Dojo.scene new file mode 100644 index 00000000..52e91c06 --- /dev/null +++ b/src/scenes/rooms/dojo/Dojo.scene @@ -0,0 +1,64 @@ +{ + "id": "96e2fae2-4efb-453e-b4a7-eb969252c5bd", + "sceneType": "SCENE", + "settings": { + "compilerInsertSpaces": true, + "javaScriptInitFieldsInConstructor": true, + "exportClass": true, + "autoImport": true, + "superClassName": "RoomScene", + "preloadMethodName": "_preload", + "preloadPackFiles": [ + "yukon/assets/media/rooms/dojo/dojo-pack.json" + ], + "createMethodName": "_create", + "sceneKey": "Dojo", + "borderWidth": 1520, + "borderHeight": 960 + }, + "displayList": [ + { + "type": "Image", + "id": "cdad28c5-a6ef-4041-b7a2-d1b67c1d0477", + "label": "bg", + "components": [], + "texture": { + "key": "dojo", + "frame": "bg" + }, + "x": -4, + "y": -2, + "originX": 0, + "originY": 0 + }, + { + "type": "Image", + "id": "33712c63-4115-4d75-9703-cdd091474e6f", + "label": "door", + "components": [ + "Button", + "MoveTo" + ], + "Button.spriteName": "door", + "Button.activeFrame": false, + "Button.pixelPerfect": true, + "MoveTo.x": "400", + "MoveTo.y": "570", + "texture": { + "key": "dojo", + "frame": "door" + }, + "x": 358, + "y": 421, + "originX": 0, + "originY": 0 + } + ], + "plainObjects": [], + "meta": { + "app": "Phaser Editor 2D - Scene Editor", + "url": "https://phasereditor2d.com", + "contentType": "phasereditor2d.core.scene.SceneContentType", + "version": 3 + } +} \ No newline at end of file diff --git a/src/scenes/rooms/dojoext/DojoExt.js b/src/scenes/rooms/dojoext/DojoExt.js index 3a9e3302..ef75ca28 100644 --- a/src/scenes/rooms/dojoext/DojoExt.js +++ b/src/scenes/rooms/dojoext/DojoExt.js @@ -18,7 +18,7 @@ export default class DojoExt extends RoomScene { this.roomTriggers = { 'map': () => this.interface.loadWidget('Map'), - 'dojo': null, + 'dojo': () => this.triggerRoom(320, 400, 660), 'dojohide': null } From 655df566d75601a364113d387563de406237f2d7 Mon Sep 17 00:00:00 2001 From: wizguin <16276645+wizguin@users.noreply.github.com> Date: Tue, 21 Mar 2023 11:52:20 +0000 Subject: [PATCH 033/200] cardjitsu: Update rooms.js --- src/data/rooms.js | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/data/rooms.js b/src/data/rooms.js index 8f1db880..ed5f9e59 100644 --- a/src/data/rooms.js +++ b/src/data/rooms.js @@ -71,6 +71,12 @@ const rooms = { x: 828, y: 520 }, + 320: { + key: 'Dojo', + scene: require('@rooms/dojo/Dojo').default, + x: 400, + y: 680 + }, 321: { key: 'DojoExt', scene: require('@rooms/dojoext/DojoExt').default, @@ -130,6 +136,10 @@ const rooms = { scene: require('@rooms/cove/Cove').default, x: 840, y: 480 + }, + 998: { + key: 'CardJitsu', + scene: require('@rooms/../games/card/CardJitsu').default } } From faf8270cb6a18b092edace4df5081acf117c6bc9 Mon Sep 17 00:00:00 2001 From: wizguin <16276645+wizguin@users.noreply.github.com> Date: Tue, 21 Mar 2023 11:53:05 +0000 Subject: [PATCH 034/200] cardjitsu: Add second player --- src/scenes/games/card/CardJitsu.js | 22 ++++++++++-- src/scenes/games/card/CardJitsu.scene | 48 +++++++++++++++++++-------- 2 files changed, 53 insertions(+), 17 deletions(-) diff --git a/src/scenes/games/card/CardJitsu.js b/src/scenes/games/card/CardJitsu.js index e67f0d71..d0a60d36 100644 --- a/src/scenes/games/card/CardJitsu.js +++ b/src/scenes/games/card/CardJitsu.js @@ -10,6 +10,12 @@ export default class CardJitsu extends GameScene { constructor() { super("CardJitsu"); + /** @type {CardJitsuPlayer} */ + this.player2; + /** @type {CardJitsuPlayer} */ + this.player1; + + /* START-USER-CTR-CODE */ /* END-USER-CTR-CODE */ } @@ -26,6 +32,16 @@ export default class CardJitsu extends GameScene { // bg this.add.image(760, 480, "cardjitsu", "bg"); + // player2 + const player2 = new CardJitsuPlayer(this, 760, 315); + this.add.existing(player2); + + // player1 + const player1 = new CardJitsuPlayer(this, 760, 315); + this.add.existing(player1); + player1.scaleX = -1; + player1.scaleY = 1; + // close this.add.image(1466, 57, "cardjitsu", "close0001"); @@ -41,13 +57,13 @@ export default class CardJitsu extends GameScene { const panel = this.add.image(760, 854, "cardjitsu", "panel"); panel.setOrigin(0.500351370344343, 0.5); - // cardJitsuPlayer - const cardJitsuPlayer = new CardJitsuPlayer(this, 760, 315); - this.add.existing(cardJitsuPlayer); + this.player2 = player2; + this.player1 = player1; this.events.emit("scene-awake"); } + /* START-USER-CODE */ create() { diff --git a/src/scenes/games/card/CardJitsu.scene b/src/scenes/games/card/CardJitsu.scene index 765121a2..c241efe2 100644 --- a/src/scenes/games/card/CardJitsu.scene +++ b/src/scenes/games/card/CardJitsu.scene @@ -29,6 +29,40 @@ "x": 760, "y": 480 }, + { + "prefabId": "2c95b708-e07e-4a6b-ad34-afb595594583", + "id": "3f476cde-316b-42f5-ad18-da70ada1474d", + "unlock": [ + "x", + "y" + ], + "label": "player2", + "scope": "CLASS", + "components": [], + "x": 760, + "y": 315, + "nestedPrefabs": [], + "list": [] + }, + { + "prefabId": "2c95b708-e07e-4a6b-ad34-afb595594583", + "id": "6fd982c9-843f-4778-899e-de82fbcde04d", + "unlock": [ + "x", + "y", + "scaleX", + "scaleY" + ], + "label": "player1", + "scope": "CLASS", + "components": [], + "x": 760, + "y": 315, + "scaleX": -1, + "scaleY": 1, + "nestedPrefabs": [], + "list": [] + }, { "type": "Image", "id": "7a0d7dac-7b59-4a80-bc52-f98bbe8639bd", @@ -81,20 +115,6 @@ "x": 760, "y": 854, "originX": 0.500351370344343 - }, - { - "prefabId": "2c95b708-e07e-4a6b-ad34-afb595594583", - "id": "6fd982c9-843f-4778-899e-de82fbcde04d", - "unlock": [ - "x", - "y" - ], - "label": "cardJitsuPlayer", - "components": [], - "x": 760, - "y": 315, - "nestedPrefabs": [], - "list": [] } ], "plainObjects": [], From 117118dc0f32a178b6bcea062ea69440ae42f141 Mon Sep 17 00:00:00 2001 From: wizguin <16276645+wizguin@users.noreply.github.com> Date: Tue, 21 Mar 2023 12:15:11 +0000 Subject: [PATCH 035/200] cardjitsu: Update ui --- src/scenes/games/card/CardJitsu.js | 41 +++++++--- src/scenes/games/card/CardJitsu.scene | 111 ++++++++++++++++++-------- 2 files changed, 108 insertions(+), 44 deletions(-) diff --git a/src/scenes/games/card/CardJitsu.js b/src/scenes/games/card/CardJitsu.js index d0a60d36..f76bc288 100644 --- a/src/scenes/games/card/CardJitsu.js +++ b/src/scenes/games/card/CardJitsu.js @@ -10,6 +10,12 @@ export default class CardJitsu extends GameScene { constructor() { super("CardJitsu"); + /** @type {Phaser.GameObjects.Image} */ + this.clock; + /** @type {Phaser.GameObjects.Text} */ + this.username2; + /** @type {Phaser.GameObjects.Text} */ + this.username1; /** @type {CardJitsuPlayer} */ this.player2; /** @type {CardJitsuPlayer} */ @@ -32,16 +38,6 @@ export default class CardJitsu extends GameScene { // bg this.add.image(760, 480, "cardjitsu", "bg"); - // player2 - const player2 = new CardJitsuPlayer(this, 760, 315); - this.add.existing(player2); - - // player1 - const player1 = new CardJitsuPlayer(this, 760, 315); - this.add.existing(player1); - player1.scaleX = -1; - player1.scaleY = 1; - // close this.add.image(1466, 57, "cardjitsu", "close0001"); @@ -57,6 +53,31 @@ export default class CardJitsu extends GameScene { const panel = this.add.image(760, 854, "cardjitsu", "panel"); panel.setOrigin(0.500351370344343, 0.5); + // clock + const clock = this.add.image(760, 676, "cardjitsu", "clock/clock0001"); + + // username2 + const username2 = this.add.text(1420, 736, "", {}); + username2.setOrigin(1, 0); + username2.setStyle({ "align": "right", "color": "#000", "fixedWidth":410,"fontFamily": "CCComiccrazy", "fontSize": "28px", "fontStyle": "bold" }); + + // username1 + const username1 = this.add.text(100, 736, "", {}); + username1.setStyle({ "color": "#000", "fixedWidth":410,"fontFamily": "CCComiccrazy", "fontSize": "28px", "fontStyle": "bold" }); + + // player2 + const player2 = new CardJitsuPlayer(this, 760, 315); + this.add.existing(player2); + + // player1 + const player1 = new CardJitsuPlayer(this, 760, 315); + this.add.existing(player1); + player1.scaleX = -1; + player1.scaleY = 1; + + this.clock = clock; + this.username2 = username2; + this.username1 = username1; this.player2 = player2; this.player1 = player1; diff --git a/src/scenes/games/card/CardJitsu.scene b/src/scenes/games/card/CardJitsu.scene index c241efe2..496f2337 100644 --- a/src/scenes/games/card/CardJitsu.scene +++ b/src/scenes/games/card/CardJitsu.scene @@ -29,40 +29,6 @@ "x": 760, "y": 480 }, - { - "prefabId": "2c95b708-e07e-4a6b-ad34-afb595594583", - "id": "3f476cde-316b-42f5-ad18-da70ada1474d", - "unlock": [ - "x", - "y" - ], - "label": "player2", - "scope": "CLASS", - "components": [], - "x": 760, - "y": 315, - "nestedPrefabs": [], - "list": [] - }, - { - "prefabId": "2c95b708-e07e-4a6b-ad34-afb595594583", - "id": "6fd982c9-843f-4778-899e-de82fbcde04d", - "unlock": [ - "x", - "y", - "scaleX", - "scaleY" - ], - "label": "player1", - "scope": "CLASS", - "components": [], - "x": 760, - "y": 315, - "scaleX": -1, - "scaleY": 1, - "nestedPrefabs": [], - "list": [] - }, { "type": "Image", "id": "7a0d7dac-7b59-4a80-bc52-f98bbe8639bd", @@ -115,6 +81,83 @@ "x": 760, "y": 854, "originX": 0.500351370344343 + }, + { + "type": "Image", + "id": "5ae193e4-747e-4c9e-a9b1-33e45c465696", + "label": "clock", + "scope": "CLASS", + "components": [], + "texture": { + "key": "cardjitsu", + "frame": "clock/clock0001" + }, + "x": 760, + "y": 676 + }, + { + "type": "Text", + "id": "a3698971-d213-46ce-b701-03bf7dd7a7ed", + "label": "username2", + "scope": "CLASS", + "components": [], + "x": 1420, + "y": 736, + "originX": 1, + "fixedWidth": 410, + "align": "right", + "fontFamily": "CCComiccrazy", + "fontSize": "28px", + "fontStyle": "bold", + "color": "#000" + }, + { + "type": "Text", + "id": "c54766f1-4ebc-4dc0-b3a4-b119c06d9faf", + "label": "username1", + "scope": "CLASS", + "components": [], + "x": 100, + "y": 736, + "fixedWidth": 410, + "fontFamily": "CCComiccrazy", + "fontSize": "28px", + "fontStyle": "bold", + "color": "#000" + }, + { + "prefabId": "2c95b708-e07e-4a6b-ad34-afb595594583", + "id": "3f476cde-316b-42f5-ad18-da70ada1474d", + "unlock": [ + "x", + "y" + ], + "label": "player2", + "scope": "CLASS", + "components": [], + "x": 760, + "y": 315, + "nestedPrefabs": [], + "list": [] + }, + { + "prefabId": "2c95b708-e07e-4a6b-ad34-afb595594583", + "id": "6fd982c9-843f-4778-899e-de82fbcde04d", + "unlock": [ + "x", + "y", + "scaleX", + "scaleY" + ], + "label": "player1", + "scope": "CLASS", + "components": [], + "x": 760, + "y": 315, + "scaleX": -1, + "scaleY": 1, + "nestedPrefabs": [], + "list": [] } ], "plainObjects": [], From 05cd1321947ef97ae15ac7345ad8b3f28a2b3335 Mon Sep 17 00:00:00 2001 From: wizguin <16276645+wizguin@users.noreply.github.com> Date: Tue, 21 Mar 2023 16:17:28 +0000 Subject: [PATCH 036/200] cardjitsu: Add spinner --- src/scenes/games/card/CardJitsu.js | 16 ++++++++++++++++ src/scenes/games/card/CardJitsu.scene | 16 +++++++++++++++- src/scenes/games/card/CardJitsuPlayer.js | 4 ---- 3 files changed, 31 insertions(+), 5 deletions(-) diff --git a/src/scenes/games/card/CardJitsu.js b/src/scenes/games/card/CardJitsu.js index f76bc288..9cb133eb 100644 --- a/src/scenes/games/card/CardJitsu.js +++ b/src/scenes/games/card/CardJitsu.js @@ -12,6 +12,8 @@ export default class CardJitsu extends GameScene { /** @type {Phaser.GameObjects.Image} */ this.clock; + /** @type {Phaser.GameObjects.Image} */ + this.spinner; /** @type {Phaser.GameObjects.Text} */ this.username2; /** @type {Phaser.GameObjects.Text} */ @@ -55,6 +57,10 @@ export default class CardJitsu extends GameScene { // clock const clock = this.add.image(760, 676, "cardjitsu", "clock/clock0001"); + clock.visible = false; + + // spinner + const spinner = this.add.image(760, 482, "cardjitsu", "spinner"); // username2 const username2 = this.add.text(1420, 736, "", {}); @@ -76,6 +82,7 @@ export default class CardJitsu extends GameScene { player1.scaleY = 1; this.clock = clock; + this.spinner = spinner; this.username2 = username2; this.username1 = username1; this.player2 = player2; @@ -89,6 +96,15 @@ export default class CardJitsu extends GameScene { create() { super.create() + + // Spinner + this.tweens.add({ + targets: this.spinner, + angle: { from: 0, to: 180 }, + duration: 900, + repeat: -1, + ease: 'Cubic' + }) } /* END-USER-CODE */ diff --git a/src/scenes/games/card/CardJitsu.scene b/src/scenes/games/card/CardJitsu.scene index 496f2337..64ba8dd0 100644 --- a/src/scenes/games/card/CardJitsu.scene +++ b/src/scenes/games/card/CardJitsu.scene @@ -93,7 +93,21 @@ "frame": "clock/clock0001" }, "x": 760, - "y": 676 + "y": 676, + "visible": false + }, + { + "type": "Image", + "id": "0c63a625-f56a-40e1-8863-870ad03ce58f", + "label": "spinner", + "scope": "CLASS", + "components": [], + "texture": { + "key": "cardjitsu", + "frame": "spinner" + }, + "x": 760, + "y": 482 }, { "type": "Text", diff --git a/src/scenes/games/card/CardJitsuPlayer.js b/src/scenes/games/card/CardJitsuPlayer.js index 684d7250..07a8ba2f 100644 --- a/src/scenes/games/card/CardJitsuPlayer.js +++ b/src/scenes/games/card/CardJitsuPlayer.js @@ -16,10 +16,6 @@ export default class CardJitsuPlayer extends BaseContainer { this.battle = new CardJitsuBattle(this) - this.playBattle('ambient') - this.setColor(0x009900) - this.setBeltColor(4473924) - /* END-USER-CTR-CODE */ } From cb3c7b38ff0cec94d34f70f179263065d7a65afc Mon Sep 17 00:00:00 2001 From: wizguin <16276645+wizguin@users.noreply.github.com> Date: Wed, 22 Mar 2023 09:21:24 +0000 Subject: [PATCH 037/200] cardjitsu: username property on player --- src/scenes/games/card/CardJitsu.js | 6 ++++++ src/scenes/games/card/CardJitsu.scene | 8 ++++++-- src/scenes/games/card/CardJitsuPlayer.js | 7 +++++++ src/scenes/games/card/CardJitsuPlayer.scene | 15 ++++++++++++++- 4 files changed, 33 insertions(+), 3 deletions(-) diff --git a/src/scenes/games/card/CardJitsu.js b/src/scenes/games/card/CardJitsu.js index 9cb133eb..548471ec 100644 --- a/src/scenes/games/card/CardJitsu.js +++ b/src/scenes/games/card/CardJitsu.js @@ -81,6 +81,12 @@ export default class CardJitsu extends GameScene { player1.scaleX = -1; player1.scaleY = 1; + // player2 (prefab fields) + player2.username = username2; + + // player1 (prefab fields) + player1.username = username1; + this.clock = clock; this.spinner = spinner; this.username2 = username2; diff --git a/src/scenes/games/card/CardJitsu.scene b/src/scenes/games/card/CardJitsu.scene index 64ba8dd0..89dbbfb0 100644 --- a/src/scenes/games/card/CardJitsu.scene +++ b/src/scenes/games/card/CardJitsu.scene @@ -144,10 +144,12 @@ "id": "3f476cde-316b-42f5-ad18-da70ada1474d", "unlock": [ "x", - "y" + "y", + "username" ], "label": "player2", "scope": "CLASS", + "username": "username2", "components": [], "x": 760, "y": 315, @@ -161,10 +163,12 @@ "x", "y", "scaleX", - "scaleY" + "scaleY", + "username" ], "label": "player1", "scope": "CLASS", + "username": "username1", "components": [], "x": 760, "y": 315, diff --git a/src/scenes/games/card/CardJitsuPlayer.js b/src/scenes/games/card/CardJitsuPlayer.js index 07a8ba2f..986b91fb 100644 --- a/src/scenes/games/card/CardJitsuPlayer.js +++ b/src/scenes/games/card/CardJitsuPlayer.js @@ -12,13 +12,20 @@ export default class CardJitsuPlayer extends BaseContainer { constructor(scene, x, y) { super(scene, x ?? 760, y ?? 480); + /** @type {Phaser.GameObjects.Text} */ + this.username; + + /* START-USER-CTR-CODE */ this.battle = new CardJitsuBattle(this) + this.color + /* END-USER-CTR-CODE */ } + /* START-USER-CODE */ playBattle(battle) { diff --git a/src/scenes/games/card/CardJitsuPlayer.scene b/src/scenes/games/card/CardJitsuPlayer.scene index 0f3c8429..b4641083 100644 --- a/src/scenes/games/card/CardJitsuPlayer.scene +++ b/src/scenes/games/card/CardJitsuPlayer.scene @@ -30,5 +30,18 @@ "url": "https://phasereditor2d.com", "contentType": "phasereditor2d.core.scene.SceneContentType", "version": 3 - } + }, + "prefabProperties": [ + { + "name": "username", + "label": "username", + "tooltip": "username", + "defValue": "", + "customDefinition": false, + "type": { + "id": "object-var", + "expressionType": "Phaser.GameObjects.Text" + } + } + ] } \ No newline at end of file From f2aa0338da24f9582508197da38b298a4bad7fba Mon Sep 17 00:00:00 2001 From: wizguin <16276645+wizguin@users.noreply.github.com> Date: Wed, 22 Mar 2023 09:23:13 +0000 Subject: [PATCH 038/200] cardjitsu: Add setPlayer --- src/scenes/games/card/CardJitsu.js | 5 +++++ src/scenes/games/card/CardJitsuPlayer.js | 9 +++++++++ 2 files changed, 14 insertions(+) diff --git a/src/scenes/games/card/CardJitsu.js b/src/scenes/games/card/CardJitsu.js index 548471ec..8579e4dc 100644 --- a/src/scenes/games/card/CardJitsu.js +++ b/src/scenes/games/card/CardJitsu.js @@ -112,6 +112,11 @@ export default class CardJitsu extends GameScene { ease: 'Cubic' }) } + + setPlayer(user, turn) { + let player = this[`player${turn}`] + player.set(user, turn) + } /* END-USER-CODE */ } diff --git a/src/scenes/games/card/CardJitsuPlayer.js b/src/scenes/games/card/CardJitsuPlayer.js index 986b91fb..8f970e4d 100644 --- a/src/scenes/games/card/CardJitsuPlayer.js +++ b/src/scenes/games/card/CardJitsuPlayer.js @@ -28,8 +28,17 @@ export default class CardJitsuPlayer extends BaseContainer { /* START-USER-CODE */ + set(user, turn) { + this.username.text = user.username.toUpperCase() + this.color = this.world.getColor(user.color) + } + playBattle(battle) { this.battle.play(battle) + + this.battle.sensei.visible = false + + this.setColor(this.color) } setColor(color) { From 2275427e6488d88f05a19dd191d19ac77825e9b9 Mon Sep 17 00:00:00 2001 From: wizguin <16276645+wizguin@users.noreply.github.com> Date: Wed, 22 Mar 2023 09:24:28 +0000 Subject: [PATCH 039/200] Add StateMachine --- src/engine/utils/state_machine/State.js | 19 ++++++++++++ .../utils/state_machine/StateMachine.js | 30 +++++++++++++++++++ 2 files changed, 49 insertions(+) create mode 100644 src/engine/utils/state_machine/State.js create mode 100644 src/engine/utils/state_machine/StateMachine.js diff --git a/src/engine/utils/state_machine/State.js b/src/engine/utils/state_machine/State.js new file mode 100644 index 00000000..6b099095 --- /dev/null +++ b/src/engine/utils/state_machine/State.js @@ -0,0 +1,19 @@ +export default class State { + + constructor() { + this.stateMachine + } + + enter() { + + } + + update() { + + } + + exit() { + + } + +} diff --git a/src/engine/utils/state_machine/StateMachine.js b/src/engine/utils/state_machine/StateMachine.js new file mode 100644 index 00000000..5307b6b0 --- /dev/null +++ b/src/engine/utils/state_machine/StateMachine.js @@ -0,0 +1,30 @@ +export default class StateMachine { + + constructor(states) { + this.states = states + + this.state + + for (let state of Object.values(states)) { + state.stateMachine = this + } + } + + setState(state) { + if (this.isRunningState(state)) { + return + } + + if (this.state) { + this.state.exit() + } + + this.state = this.states[state] + this.state.enter() + } + + isRunningState(state) { + return this.state === this.states[state] + } + +} From 89929798b94ff8be1f24ce69429d8c36a3152265 Mon Sep 17 00:00:00 2001 From: wizguin <16276645+wizguin@users.noreply.github.com> Date: Wed, 22 Mar 2023 09:26:50 +0000 Subject: [PATCH 040/200] cardjitsu: Update anims --- src/scenes/games/card/CardJitsu.js | 11 +++++++++++ src/scenes/games/card/CardJitsuBattle.js | 17 ++++++++++++++++- src/scenes/games/card/CardJitsuPlayer.js | 4 ++++ 3 files changed, 31 insertions(+), 1 deletion(-) diff --git a/src/scenes/games/card/CardJitsu.js b/src/scenes/games/card/CardJitsu.js index 8579e4dc..1c3f3a12 100644 --- a/src/scenes/games/card/CardJitsu.js +++ b/src/scenes/games/card/CardJitsu.js @@ -118,6 +118,17 @@ export default class CardJitsu extends GameScene { player.set(user, turn) } + playBattle(battle) { + this.player1.playBattle(battle) + this.player2.playBattle(battle) + } + + onBattleComplete() { + if (!this.player1.animating && !this.player2.animating) { + this.events.emit('battle_complete') + } + } + /* END-USER-CODE */ } diff --git a/src/scenes/games/card/CardJitsuBattle.js b/src/scenes/games/card/CardJitsuBattle.js index a024d713..0aeffc11 100644 --- a/src/scenes/games/card/CardJitsuBattle.js +++ b/src/scenes/games/card/CardJitsuBattle.js @@ -7,6 +7,8 @@ export default class CardJitsuBattle { this.currentBattle this.list = {} + + this.animating = false } get body() { @@ -98,6 +100,8 @@ export default class CardJitsuBattle { return this.scene.anims.get(key) } + let repeat = (this.currentBattle == 'ambient') ? -1 : 0 + return this.scene.anims.create({ key: key, frames: this.scene.anims.generateFrameNames(this.currentBattle, { @@ -106,7 +110,7 @@ export default class CardJitsuBattle { end: spriteConfig.frames }), frameRate: 24, - repeat: -1 + repeat: repeat }) } @@ -116,6 +120,17 @@ export default class CardJitsuBattle { sprite.play(sprite.anim) } } + + this.animating = true + + // Only add this event to one sprite instead of all + let first = Object.values(this.list)[0] + first.once('animationcomplete', this.onAnimationComplete, this) + } + + onAnimationComplete() { + this.animating = false + this.scene.onBattleComplete() } setColor(color) { diff --git a/src/scenes/games/card/CardJitsuPlayer.js b/src/scenes/games/card/CardJitsuPlayer.js index 8f970e4d..cd2c4c7b 100644 --- a/src/scenes/games/card/CardJitsuPlayer.js +++ b/src/scenes/games/card/CardJitsuPlayer.js @@ -28,6 +28,10 @@ export default class CardJitsuPlayer extends BaseContainer { /* START-USER-CODE */ + get animating() { + return this.battle.animating + } + set(user, turn) { this.username.text = user.username.toUpperCase() this.color = this.world.getColor(user.color) From c0a11db9605f0558967096f25b0e0a33d92cd8c8 Mon Sep 17 00:00:00 2001 From: wizguin <16276645+wizguin@users.noreply.github.com> Date: Fri, 24 Mar 2023 13:34:21 +0000 Subject: [PATCH 041/200] cardjitsu: Add card prefab --- src/scenes/games/card/card/CardJitsuCard.js | 78 +++++++++++ .../games/card/card/CardJitsuCard.scene | 124 ++++++++++++++++++ 2 files changed, 202 insertions(+) create mode 100644 src/scenes/games/card/card/CardJitsuCard.js create mode 100644 src/scenes/games/card/card/CardJitsuCard.scene diff --git a/src/scenes/games/card/card/CardJitsuCard.js b/src/scenes/games/card/card/CardJitsuCard.js new file mode 100644 index 00000000..90fcadf9 --- /dev/null +++ b/src/scenes/games/card/card/CardJitsuCard.js @@ -0,0 +1,78 @@ +/* START OF COMPILED CODE */ + +import BaseContainer from "../../../base/BaseContainer"; +/* START-USER-IMPORTS */ +/* END-USER-IMPORTS */ + +export default class CardJitsuCard extends BaseContainer { + + constructor(scene, x, y) { + super(scene, x ?? 0, y ?? 0); + + /** @type {Phaser.GameObjects.Image} */ + this.shadow; + /** @type {Phaser.GameObjects.Image} */ + this.back; + /** @type {Phaser.GameObjects.Sprite} */ + this.glow; + /** @type {Phaser.GameObjects.Image} */ + this.color; + /** @type {Phaser.GameObjects.Image} */ + this.attribute; + /** @type {Phaser.GameObjects.Image} */ + this.disabled; + + + // shadow + const shadow = scene.add.image(245, 275, "cardjitsu", "card/shadow"); + shadow.setOrigin(0.5010660980810234, 0.500945179584121); + this.add(shadow); + + // back + const back = scene.add.image(235, 265, "cardjitsu", "card/back"); + back.setOrigin(0.5010660980810234, 0.500945179584121); + back.visible = false; + this.add(back); + + // glow + const glow = scene.add.sprite(238, 259, "cardjitsu", "card/glow0001"); + glow.setOrigin(0.5008695652173913, 0.5); + glow.visible = false; + this.add(glow); + + // color + const color = scene.add.image(235, 265, "cardjitsu", "card/color"); + color.setOrigin(0.5010660980810234, 0.500945179584121); + this.add(color); + + // attribute + const attribute = scene.add.image(68, 72, "cardjitsu", "card/fire"); + attribute.setOrigin(0.5, 0.5051546391752577); + this.add(attribute); + + // disabled + const disabled = scene.add.image(235, 265, "cardjitsu", "card/disabled"); + disabled.setOrigin(0.5010660980810234, 0.500945179584121); + disabled.visible = false; + this.add(disabled); + + this.shadow = shadow; + this.back = back; + this.glow = glow; + this.color = color; + this.attribute = attribute; + this.disabled = disabled; + + /* START-USER-CTR-CODE */ + + this.glow.anims.play('card/glow') + + /* END-USER-CTR-CODE */ + } + + + /* START-USER-CODE */ + /* END-USER-CODE */ +} + +/* END OF COMPILED CODE */ diff --git a/src/scenes/games/card/card/CardJitsuCard.scene b/src/scenes/games/card/card/CardJitsuCard.scene new file mode 100644 index 00000000..667e3cf5 --- /dev/null +++ b/src/scenes/games/card/card/CardJitsuCard.scene @@ -0,0 +1,124 @@ +{ + "id": "a407308b-445f-4a78-a4f2-b93495772216", + "sceneType": "PREFAB", + "settings": { + "compilerInsertSpaces": true, + "javaScriptInitFieldsInConstructor": true, + "exportClass": true, + "autoImport": true, + "superClassName": "BaseContainer", + "preloadMethodName": "", + "preloadPackFiles": [], + "createMethodName": "", + "borderWidth": 1520, + "borderHeight": 960 + }, + "displayList": [ + { + "type": "Container", + "id": "6c346f50-1d14-4573-89dc-cad5ae046a9c", + "label": "container_1", + "components": [], + "list": [ + { + "type": "Image", + "id": "61942b80-3e84-485c-9be6-1ec3407c6c04", + "label": "shadow", + "scope": "CLASS", + "components": [], + "texture": { + "key": "cardjitsu", + "frame": "card/shadow" + }, + "x": 245, + "y": 275, + "originX": 0.5010660980810234, + "originY": 0.500945179584121 + }, + { + "type": "Image", + "id": "2ca4c8b6-b5b4-4c42-9d50-485b8caec74f", + "label": "back", + "scope": "CLASS", + "components": [], + "texture": { + "key": "cardjitsu", + "frame": "card/back" + }, + "x": 235, + "y": 265, + "originX": 0.5010660980810234, + "originY": 0.500945179584121, + "visible": false + }, + { + "type": "Sprite", + "id": "ce8b4112-2ec8-4825-85c3-ac09dfc6629d", + "label": "glow", + "scope": "CLASS", + "components": [], + "texture": { + "key": "cardjitsu", + "frame": "card/glow0001" + }, + "x": 238, + "y": 259, + "originX": 0.5008695652173913, + "visible": false + }, + { + "type": "Image", + "id": "168cd85e-361d-4eae-8447-978bb7df8dc6", + "label": "color", + "scope": "CLASS", + "components": [], + "texture": { + "key": "cardjitsu", + "frame": "card/color" + }, + "x": 235, + "y": 265, + "originX": 0.5010660980810234, + "originY": 0.500945179584121 + }, + { + "type": "Image", + "id": "783f90f6-7493-44a9-bbf1-68add522e7c5", + "label": "attribute", + "scope": "CLASS", + "components": [], + "texture": { + "key": "cardjitsu", + "frame": "card/fire" + }, + "x": 68, + "y": 72, + "originY": 0.5051546391752577 + }, + { + "type": "Image", + "id": "045d53fd-0832-402d-bb4e-c2c88b7563e0", + "label": "disabled", + "scope": "CLASS", + "components": [], + "texture": { + "key": "cardjitsu", + "frame": "card/disabled" + }, + "x": 235, + "y": 265, + "originX": 0.5010660980810234, + "originY": 0.500945179584121, + "visible": false + } + ] + } + ], + "plainObjects": [], + "meta": { + "app": "Phaser Editor 2D - Scene Editor", + "url": "https://phasereditor2d.com", + "contentType": "phasereditor2d.core.scene.SceneContentType", + "version": 3 + } +} \ No newline at end of file From 1f98271c1f1ff183b1a663a7df940d69d6169fed Mon Sep 17 00:00:00 2001 From: wizguin <16276645+wizguin@users.noreply.github.com> Date: Sat, 25 Mar 2023 20:38:31 +0000 Subject: [PATCH 042/200] cardjitsu: Move panel --- src/scenes/games/card/CardJitsu.js | 8 ++++---- src/scenes/games/card/CardJitsu.scene | 22 +++++++++++----------- 2 files changed, 15 insertions(+), 15 deletions(-) diff --git a/src/scenes/games/card/CardJitsu.js b/src/scenes/games/card/CardJitsu.js index 1c3f3a12..49607725 100644 --- a/src/scenes/games/card/CardJitsu.js +++ b/src/scenes/games/card/CardJitsu.js @@ -47,14 +47,14 @@ export default class CardJitsu extends GameScene { const help = this.add.image(760, 26, "cardjitsu", "help"); help.setOrigin(0.5005370569280344, 0.5004436557231589); - // frame - const frame = this.add.image(760, 480, "cardjitsu", "frame"); - frame.setOrigin(0.5003261578604045, 0.5005192107995846); - // panel const panel = this.add.image(760, 854, "cardjitsu", "panel"); panel.setOrigin(0.500351370344343, 0.5); + // frame + const frame = this.add.image(760, 480, "cardjitsu", "frame"); + frame.setOrigin(0.5003261578604045, 0.5005192107995846); + // clock const clock = this.add.image(760, 676, "cardjitsu", "clock/clock0001"); clock.visible = false; diff --git a/src/scenes/games/card/CardJitsu.scene b/src/scenes/games/card/CardJitsu.scene index 89dbbfb0..f3159aac 100644 --- a/src/scenes/games/card/CardJitsu.scene +++ b/src/scenes/games/card/CardJitsu.scene @@ -57,30 +57,30 @@ }, { "type": "Image", - "id": "9e6b3a10-20e4-48fb-95b7-8e3259b670c4", - "label": "frame", + "id": "db30b7ad-1640-42d2-836d-9ac3e76bee29", + "label": "panel", "components": [], "texture": { "key": "cardjitsu", - "frame": "frame" + "frame": "panel" }, "x": 760, - "y": 480, - "originX": 0.5003261578604045, - "originY": 0.5005192107995846 + "y": 854, + "originX": 0.500351370344343 }, { "type": "Image", - "id": "db30b7ad-1640-42d2-836d-9ac3e76bee29", - "label": "panel", + "id": "9e6b3a10-20e4-48fb-95b7-8e3259b670c4", + "label": "frame", "components": [], "texture": { "key": "cardjitsu", - "frame": "panel" + "frame": "frame" }, "x": 760, - "y": 854, - "originX": 0.500351370344343 + "y": 480, + "originX": 0.5003261578604045, + "originY": 0.5005192107995846 }, { "type": "Image", From 1fea1b226bcdef37d9b32af11a83c164616ab5f8 Mon Sep 17 00:00:00 2001 From: wizguin <16276645+wizguin@users.noreply.github.com> Date: Sat, 25 Mar 2023 20:39:04 +0000 Subject: [PATCH 043/200] cardjitsu: Add players array --- src/scenes/games/card/CardJitsu.js | 4 ++++ src/scenes/games/card/CardJitsu.scene | 12 +++++++++++- 2 files changed, 15 insertions(+), 1 deletion(-) diff --git a/src/scenes/games/card/CardJitsu.js b/src/scenes/games/card/CardJitsu.js index 49607725..b393faa6 100644 --- a/src/scenes/games/card/CardJitsu.js +++ b/src/scenes/games/card/CardJitsu.js @@ -81,6 +81,9 @@ export default class CardJitsu extends GameScene { player1.scaleX = -1; player1.scaleY = 1; + // lists + const players = [player1, player2]; + // player2 (prefab fields) player2.username = username2; @@ -93,6 +96,7 @@ export default class CardJitsu extends GameScene { this.username1 = username1; this.player2 = player2; this.player1 = player1; + this.players = players; this.events.emit("scene-awake"); } diff --git a/src/scenes/games/card/CardJitsu.scene b/src/scenes/games/card/CardJitsu.scene index f3159aac..35643587 100644 --- a/src/scenes/games/card/CardJitsu.scene +++ b/src/scenes/games/card/CardJitsu.scene @@ -184,5 +184,15 @@ "url": "https://phasereditor2d.com", "contentType": "phasereditor2d.core.scene.SceneContentType", "version": 3 - } + }, + "lists": [ + { + "id": "6ce89abe-2ddb-4c0a-a242-5e92240d350e", + "label": "players", + "objectIds": [ + "6fd982c9-843f-4778-899e-de82fbcde04d", + "3f476cde-316b-42f5-ad18-da70ada1474d" + ] + } + ] } \ No newline at end of file From 44414c103767ff35d8b2b0c465cad5546699bc58 Mon Sep 17 00:00:00 2001 From: wizguin <16276645+wizguin@users.noreply.github.com> Date: Sat, 25 Mar 2023 20:41:07 +0000 Subject: [PATCH 044/200] cardjitsu: Add ServeState --- src/scenes/games/card/CardJitsu.js | 18 ++++++++---- src/scenes/games/card/states/ServeState.js | 33 ++++++++++++++++++++++ 2 files changed, 46 insertions(+), 5 deletions(-) create mode 100644 src/scenes/games/card/states/ServeState.js diff --git a/src/scenes/games/card/CardJitsu.js b/src/scenes/games/card/CardJitsu.js index b393faa6..900827a9 100644 --- a/src/scenes/games/card/CardJitsu.js +++ b/src/scenes/games/card/CardJitsu.js @@ -3,6 +3,10 @@ import GameScene from "../GameScene"; import CardJitsuPlayer from "./CardJitsuPlayer"; /* START-USER-IMPORTS */ + +import StateMachine from '@engine/utils/state_machine/StateMachine' +import ServeState from './states/ServeState' + /* END-USER-IMPORTS */ export default class CardJitsu extends GameScene { @@ -22,6 +26,8 @@ export default class CardJitsu extends GameScene { this.player2; /** @type {CardJitsuPlayer} */ this.player1; + /** @type {CardJitsuPlayer[]} */ + this.players; /* START-USER-CTR-CODE */ @@ -115,11 +121,13 @@ export default class CardJitsu extends GameScene { repeat: -1, ease: 'Cubic' }) - } - - setPlayer(user, turn) { - let player = this[`player${turn}`] - player.set(user, turn) + + // States + this.stateMachine = new StateMachine({ + 'serve': new ServeState(this) + }) + + this.stateMachine.setState('serve') } playBattle(battle) { diff --git a/src/scenes/games/card/states/ServeState.js b/src/scenes/games/card/states/ServeState.js new file mode 100644 index 00000000..32c5df6f --- /dev/null +++ b/src/scenes/games/card/states/ServeState.js @@ -0,0 +1,33 @@ +import State from '@engine/utils/state_machine/State' + + +export default class InitState extends State { + + constructor(scene) { + super() + + this.scene = scene + this.network = scene.network + } + + enter() { + this.scene.events.on('start_game', this.startGame, this) + this.scene.events.on('battle_complete', this.battleComplete, this) + } + + exit() { + this.scene.events.off('start_game', this.startGame, this) + this.scene.events.off('battle_complete', this.battleComplete, this) + } + + startGame() { + this.scene.spinner.visible = false + this.scene.playBattle('walk') + } + + battleComplete() { + this.scene.playBattle('ambient') + this.network.send('send_deal', { deal: 5 }) + } + +} From 709fffd82c1ea8bc6b9474908a50d077b426807d Mon Sep 17 00:00:00 2001 From: wizguin <16276645+wizguin@users.noreply.github.com> Date: Sat, 25 Mar 2023 20:43:15 +0000 Subject: [PATCH 045/200] cardjitsu: Add handleStartGame --- src/scenes/games/card/CardJitsu.js | 30 ++++++++++++++++++++++++ src/scenes/games/card/CardJitsuPlayer.js | 2 +- 2 files changed, 31 insertions(+), 1 deletion(-) diff --git a/src/scenes/games/card/CardJitsu.js b/src/scenes/games/card/CardJitsu.js index 900827a9..3d27c727 100644 --- a/src/scenes/games/card/CardJitsu.js +++ b/src/scenes/games/card/CardJitsu.js @@ -113,6 +113,8 @@ export default class CardJitsu extends GameScene { create() { super.create() + this.myPlayer + // Spinner this.tweens.add({ targets: this.spinner, @@ -128,6 +130,34 @@ export default class CardJitsu extends GameScene { }) this.stateMachine.setState('serve') + + this.addListeners() + this.network.send('start_game') + } + + addListeners() { + this.network.events.on('start_game', this.handleStartGame, this) + } + + removeListeners() { + this.network.events.off('start_game', this.handleStartGame, this) + } + + handleStartGame(args) { + for (let user of args.users) { + this.setPlayer(user, args.users.indexOf(user)) + } + + this.events.emit('start_game') + } + + setPlayer(user, index) { + let player = this.players[index] + player.set(user) + + if (this.world.isClientUsername(user.username)) { + this.myPlayer = player + } } playBattle(battle) { diff --git a/src/scenes/games/card/CardJitsuPlayer.js b/src/scenes/games/card/CardJitsuPlayer.js index cd2c4c7b..db45a6f5 100644 --- a/src/scenes/games/card/CardJitsuPlayer.js +++ b/src/scenes/games/card/CardJitsuPlayer.js @@ -32,7 +32,7 @@ export default class CardJitsuPlayer extends BaseContainer { return this.battle.animating } - set(user, turn) { + set(user) { this.username.text = user.username.toUpperCase() this.color = this.world.getColor(user.color) } From e7239a25805dbcd788fd9b59196a142242d77afe Mon Sep 17 00:00:00 2001 From: wizguin <16276645+wizguin@users.noreply.github.com> Date: Sat, 25 Mar 2023 21:24:08 +0000 Subject: [PATCH 046/200] cardjitsu: Add init methods to CardJitsuCard --- src/scenes/games/card/card/CardJitsuCard.js | 78 ++++++++++++++++++- .../games/card/card/CardJitsuCard.scene | 2 + 2 files changed, 79 insertions(+), 1 deletion(-) diff --git a/src/scenes/games/card/card/CardJitsuCard.js b/src/scenes/games/card/card/CardJitsuCard.js index 90fcadf9..24ad323b 100644 --- a/src/scenes/games/card/card/CardJitsuCard.js +++ b/src/scenes/games/card/card/CardJitsuCard.js @@ -7,7 +7,7 @@ import BaseContainer from "../../../base/BaseContainer"; export default class CardJitsuCard extends BaseContainer { constructor(scene, x, y) { - super(scene, x ?? 0, y ?? 0); + super(scene, x ?? 750, y ?? 1000); /** @type {Phaser.GameObjects.Image} */ this.shadow; @@ -65,6 +65,19 @@ export default class CardJitsuCard extends BaseContainer { /* START-USER-CTR-CODE */ + this.player + this.state + this.spacer + + this.posDealts = [{ x: 100, y: 770 }, { x: 1420, y: 770 }] + + this.dealtFrontSpacer = 150 + this.dealtBackSpacer = 70 + + this.scaleFront = 0.28 + this.scaleBack = 0.15 + this.scaleFlip = 0.40 + this.glow.anims.play('card/glow') /* END-USER-CTR-CODE */ @@ -72,6 +85,69 @@ export default class CardJitsuCard extends BaseContainer { /* START-USER-CODE */ + + init(player, state) { + if (!player.dealtCards.includes(null)) { + return + } + + this.player = player + this.state = state + + let empty = player.dealtCards.indexOf(null) + player.dealtCards[empty] = this + + this.updateState() + this.tweenToDealt(empty) + } + + updateState() { + if (this.state === 'back') { + this.setStateBack() + } else { + this.setStateFront() + } + } + + setStateFront() { + this.scale = this.scaleFront + this.spacer = this.dealtFrontSpacer + + this.showFrontSprites(true) + } + + setStateBack() { + this.scale = this.scaleBack + this.spacer = this.dealtBackSpacer + + this.showFrontSprites(false) + } + + showFrontSprites(show) { + this.back.visible = !show + this.attribute.visible = show + this.color.visible = show + + this.glow.visible = false + } + + tweenToDealt(empty) { + let index = this.scene.players.indexOf(this.player) + + let pos = this.posDealts[index] + + let x = (index === 0) + ? pos.x + (this.spacer * empty) + : pos.x - (this.spacer * empty) - this.spacer + + this.scene.tweens.add({ + targets: this, + x: x, + y: pos.y, + duration: 500 + }) + } + /* END-USER-CODE */ } diff --git a/src/scenes/games/card/card/CardJitsuCard.scene b/src/scenes/games/card/card/CardJitsuCard.scene index 667e3cf5..01938dd5 100644 --- a/src/scenes/games/card/card/CardJitsuCard.scene +++ b/src/scenes/games/card/card/CardJitsuCard.scene @@ -19,6 +19,8 @@ "id": "6c346f50-1d14-4573-89dc-cad5ae046a9c", "label": "container_1", "components": [], + "x": 750, + "y": 1000, "list": [ { "type": "Image", From 0e322054058318e10ce072a1dd093a03a360eaf4 Mon Sep 17 00:00:00 2001 From: wizguin <16276645+wizguin@users.noreply.github.com> Date: Sun, 26 Mar 2023 17:15:12 +0100 Subject: [PATCH 047/200] cardjitsu: Add card value --- src/scenes/games/card/card/CardJitsuCard.js | 9 +++++++++ src/scenes/games/card/card/CardJitsuCard.scene | 15 +++++++++++++++ 2 files changed, 24 insertions(+) diff --git a/src/scenes/games/card/card/CardJitsuCard.js b/src/scenes/games/card/card/CardJitsuCard.js index 24ad323b..d79fbdcf 100644 --- a/src/scenes/games/card/card/CardJitsuCard.js +++ b/src/scenes/games/card/card/CardJitsuCard.js @@ -21,6 +21,8 @@ export default class CardJitsuCard extends BaseContainer { this.attribute; /** @type {Phaser.GameObjects.Image} */ this.disabled; + /** @type {Phaser.GameObjects.Text} */ + this.value; // shadow @@ -56,12 +58,19 @@ export default class CardJitsuCard extends BaseContainer { disabled.visible = false; this.add(disabled); + // value + const value = scene.add.text(0, 121, "", {}); + value.text = "88"; + value.setStyle({ "align": "center", "color": "#000", "fixedWidth":132,"fontFamily": "Arial", "fontSize": "96px", "fontStyle": "bold" }); + this.add(value); + this.shadow = shadow; this.back = back; this.glow = glow; this.color = color; this.attribute = attribute; this.disabled = disabled; + this.value = value; /* START-USER-CTR-CODE */ diff --git a/src/scenes/games/card/card/CardJitsuCard.scene b/src/scenes/games/card/card/CardJitsuCard.scene index 01938dd5..66ac9682 100644 --- a/src/scenes/games/card/card/CardJitsuCard.scene +++ b/src/scenes/games/card/card/CardJitsuCard.scene @@ -112,6 +112,21 @@ "originX": 0.5010660980810234, "originY": 0.500945179584121, "visible": false + }, + { + "type": "Text", + "id": "10b504e1-dd20-411b-83e8-31df0743d59c", + "label": "value", + "scope": "CLASS", + "components": [], + "y": 121, + "text": "88", + "fixedWidth": 132, + "align": "center", + "fontFamily": "Arial", + "fontSize": "96px", + "fontStyle": "bold", + "color": "#000" } ] } From 06515520f96fe821b8aa4ea81ece8135734518aa Mon Sep 17 00:00:00 2001 From: wizguin <16276645+wizguin@users.noreply.github.com> Date: Mon, 27 Mar 2023 14:59:57 +0100 Subject: [PATCH 048/200] cardjitsu: Add CardLoader --- src/engine/loaders/CardLoader.js | 34 ++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 src/engine/loaders/CardLoader.js diff --git a/src/engine/loaders/CardLoader.js b/src/engine/loaders/CardLoader.js new file mode 100644 index 00000000..a4085f9e --- /dev/null +++ b/src/engine/loaders/CardLoader.js @@ -0,0 +1,34 @@ +import BaseLoader from './BaseLoader' + + +export default class CardLoader extends BaseLoader { + + constructor(scene) { + super(scene) + + this.baseURL = '/assets/media/games/card/icons/' + this.keyPrefix = 'card/icons/' + } + + loadCard(card) { + let key = this.getKey(card.card_id) + + if (this.checkComplete('image', key, () => { + this.onFileComplete(key, card) + })) { + return + } + + this.image(key, `${card.card_id}.png`) + this.start() + } + + onFileComplete(key, card) { + if (!this.textureExists(key)) { + return + } + + this.scene.onCardLoad(key, card) + } + +} From c0118fa26366187dd8fc9a8fb4b44e6ff67df2fc Mon Sep 17 00:00:00 2001 From: wizguin <16276645+wizguin@users.noreply.github.com> Date: Mon, 27 Mar 2023 15:04:46 +0100 Subject: [PATCH 049/200] cardjitsu: Add handle deal --- src/scenes/games/card/CardJitsu.js | 39 ++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) diff --git a/src/scenes/games/card/CardJitsu.js b/src/scenes/games/card/CardJitsu.js index 3d27c727..69298c08 100644 --- a/src/scenes/games/card/CardJitsu.js +++ b/src/scenes/games/card/CardJitsu.js @@ -4,6 +4,8 @@ import GameScene from "../GameScene"; import CardJitsuPlayer from "./CardJitsuPlayer"; /* START-USER-IMPORTS */ +import CardLoader from '@engine/loaders/CardLoader' +import CardJitsuCard from './card/CardJitsuCard' import StateMachine from '@engine/utils/state_machine/StateMachine' import ServeState from './states/ServeState' @@ -113,6 +115,8 @@ export default class CardJitsu extends GameScene { create() { super.create() + this.cardLoader = new CardLoader(this) + this.myPlayer // Spinner @@ -137,10 +141,14 @@ export default class CardJitsu extends GameScene { addListeners() { this.network.events.on('start_game', this.handleStartGame, this) + this.network.events.on('send_deal', this.handleSendDeal, this) + this.network.events.on('send_opponent_deal', this.handleSendOpponentDeal, this) } removeListeners() { this.network.events.off('start_game', this.handleStartGame, this) + this.network.events.on('send_deal', this.handleSendDeal, this) + this.network.events.on('send_opponent_deal', this.handleSendOpponentDeal, this) } handleStartGame(args) { @@ -151,6 +159,23 @@ export default class CardJitsu extends GameScene { this.events.emit('start_game') } + handleSendDeal(args) { + for (let card of args.cards) { + this.cardLoader.loadCard(card) + } + } + + handleSendOpponentDeal(args) { + for (let i = 0; i < args.deal; i++) { + let cardPrefab = this.createCard() + + let seat = this.players.indexOf(this.myPlayer) + let opponentSeat = (seat + 1) % 2 + + cardPrefab.init(this.players[opponentSeat], 'back') + } + } + setPlayer(user, index) { let player = this.players[index] player.set(user) @@ -171,6 +196,20 @@ export default class CardJitsu extends GameScene { } } + onCardLoad(key, card) { + let cardPrefab = this.createCard() + + cardPrefab.init(this.myPlayer, 'front', card) + cardPrefab.icon.setTexture(key) + } + + createCard() { + let card = new CardJitsuCard(this) + this.add.existing(card) + + return card + } + /* END-USER-CODE */ } From 7b9b781627bd4bec02a456c0ec09dbcea87f9601 Mon Sep 17 00:00:00 2001 From: wizguin <16276645+wizguin@users.noreply.github.com> Date: Mon, 27 Mar 2023 15:06:57 +0100 Subject: [PATCH 050/200] cardjitsu: Add card details --- src/scenes/games/card/card/CardJitsuCard.js | 66 ++++++++++++++++--- .../games/card/card/CardJitsuCard.scene | 16 ++++- 2 files changed, 70 insertions(+), 12 deletions(-) diff --git a/src/scenes/games/card/card/CardJitsuCard.js b/src/scenes/games/card/card/CardJitsuCard.js index d79fbdcf..268304b3 100644 --- a/src/scenes/games/card/card/CardJitsuCard.js +++ b/src/scenes/games/card/card/CardJitsuCard.js @@ -15,10 +15,12 @@ export default class CardJitsuCard extends BaseContainer { this.back; /** @type {Phaser.GameObjects.Sprite} */ this.glow; + /** @type {Phaser.GameObjects.Sprite} */ + this.icon; /** @type {Phaser.GameObjects.Image} */ this.color; /** @type {Phaser.GameObjects.Image} */ - this.attribute; + this.element; /** @type {Phaser.GameObjects.Image} */ this.disabled; /** @type {Phaser.GameObjects.Text} */ @@ -39,18 +41,22 @@ export default class CardJitsuCard extends BaseContainer { // glow const glow = scene.add.sprite(238, 259, "cardjitsu", "card/glow0001"); glow.setOrigin(0.5008695652173913, 0.5); - glow.visible = false; this.add(glow); + // icon + const icon = scene.add.sprite(235, 265, "_MISSING"); + icon.visible = false; + this.add(icon); + // color const color = scene.add.image(235, 265, "cardjitsu", "card/color"); color.setOrigin(0.5010660980810234, 0.500945179584121); this.add(color); - // attribute - const attribute = scene.add.image(68, 72, "cardjitsu", "card/fire"); - attribute.setOrigin(0.5, 0.5051546391752577); - this.add(attribute); + // element + const element = scene.add.image(68, 72, "cardjitsu", "card/f"); + element.setOrigin(0.5, 0.5051546391752577); + this.add(element); // disabled const disabled = scene.add.image(235, 265, "cardjitsu", "card/disabled"); @@ -67,8 +73,9 @@ export default class CardJitsuCard extends BaseContainer { this.shadow = shadow; this.back = back; this.glow = glow; + this.icon = icon; this.color = color; - this.attribute = attribute; + this.element = element; this.disabled = disabled; this.value = value; @@ -78,6 +85,9 @@ export default class CardJitsuCard extends BaseContainer { this.state this.spacer + this.color + this.glow + this.posDealts = [{ x: 100, y: 770 }, { x: 1420, y: 770 }] this.dealtFrontSpacer = 150 @@ -87,6 +97,27 @@ export default class CardJitsuCard extends BaseContainer { this.scaleBack = 0.15 this.scaleFlip = 0.40 + this.colors = { + r: { + color: 0xE23C26 + }, + g: { + color: 0x61B946 + }, + b: { + color: 0x1148A1 + }, + p: { + color: 0xA399CA + }, + o: { + color: 0xF7952B + }, + y: { + color: 0xFBEB2D + } + } + this.glow.anims.play('card/glow') /* END-USER-CTR-CODE */ @@ -95,7 +126,7 @@ export default class CardJitsuCard extends BaseContainer { /* START-USER-CODE */ - init(player, state) { + init(player, state, card = null) { if (!player.dealtCards.includes(null)) { return } @@ -107,9 +138,24 @@ export default class CardJitsuCard extends BaseContainer { player.dealtCards[empty] = this this.updateState() + + if (card) { + this.updateCard(card) + } + this.tweenToDealt(empty) } + updateCard(card) { + this.value.text = card.value + this.color.tint = this.colors[card.color].color + this.element.setFrame(`card/${card.element}`) + + if (card.power_id > 0) { + this.glow.visible = true + } + } + updateState() { if (this.state === 'back') { this.setStateBack() @@ -134,8 +180,10 @@ export default class CardJitsuCard extends BaseContainer { showFrontSprites(show) { this.back.visible = !show - this.attribute.visible = show + this.value.visible = show + this.element.visible = show this.color.visible = show + this.icon.visible = show this.glow.visible = false } diff --git a/src/scenes/games/card/card/CardJitsuCard.scene b/src/scenes/games/card/card/CardJitsuCard.scene index 66ac9682..633416b4 100644 --- a/src/scenes/games/card/card/CardJitsuCard.scene +++ b/src/scenes/games/card/card/CardJitsuCard.scene @@ -65,7 +65,17 @@ }, "x": 238, "y": 259, - "originX": 0.5008695652173913, + "originX": 0.5008695652173913 + }, + { + "type": "Sprite", + "id": "9aca60f5-218c-4d87-a2ad-c661e35b5f74", + "label": "icon", + "scope": "CLASS", + "components": [], + "texture": {}, + "x": 235, + "y": 265, "visible": false }, { @@ -86,12 +96,12 @@ { "type": "Image", "id": "783f90f6-7493-44a9-bbf1-68add522e7c5", - "label": "attribute", + "label": "element", "scope": "CLASS", "components": [], "texture": { "key": "cardjitsu", - "frame": "card/fire" + "frame": "card/f" }, "x": 68, "y": 72, From dde02c754e170d791078fbbd091d0987f3ed30e2 Mon Sep 17 00:00:00 2001 From: wizguin <16276645+wizguin@users.noreply.github.com> Date: Mon, 27 Mar 2023 15:59:01 +0100 Subject: [PATCH 051/200] cardjitsu: Add card input --- src/scenes/games/card/CardJitsu.js | 2 + src/scenes/games/card/card/CardJitsuCard.js | 40 ++++++++++++++++++- .../games/card/card/CardJitsuCard.scene | 17 +++++++- 3 files changed, 57 insertions(+), 2 deletions(-) diff --git a/src/scenes/games/card/CardJitsu.js b/src/scenes/games/card/CardJitsu.js index 69298c08..14372bbe 100644 --- a/src/scenes/games/card/CardJitsu.js +++ b/src/scenes/games/card/CardJitsu.js @@ -201,6 +201,8 @@ export default class CardJitsu extends GameScene { cardPrefab.init(this.myPlayer, 'front', card) cardPrefab.icon.setTexture(key) + + cardPrefab.enableInput() } createCard() { diff --git a/src/scenes/games/card/card/CardJitsuCard.js b/src/scenes/games/card/card/CardJitsuCard.js index 268304b3..b4676044 100644 --- a/src/scenes/games/card/card/CardJitsuCard.js +++ b/src/scenes/games/card/card/CardJitsuCard.js @@ -12,6 +12,8 @@ export default class CardJitsuCard extends BaseContainer { /** @type {Phaser.GameObjects.Image} */ this.shadow; /** @type {Phaser.GameObjects.Image} */ + this.hover; + /** @type {Phaser.GameObjects.Image} */ this.back; /** @type {Phaser.GameObjects.Sprite} */ this.glow; @@ -32,6 +34,11 @@ export default class CardJitsuCard extends BaseContainer { shadow.setOrigin(0.5010660980810234, 0.500945179584121); this.add(shadow); + // hover + const hover = scene.add.image(240, 269, "cardjitsu", "card/hover"); + hover.visible = false; + this.add(hover); + // back const back = scene.add.image(235, 265, "cardjitsu", "card/back"); back.setOrigin(0.5010660980810234, 0.500945179584121); @@ -41,6 +48,7 @@ export default class CardJitsuCard extends BaseContainer { // glow const glow = scene.add.sprite(238, 259, "cardjitsu", "card/glow0001"); glow.setOrigin(0.5008695652173913, 0.5); + glow.visible = false; this.add(glow); // icon @@ -71,6 +79,7 @@ export default class CardJitsuCard extends BaseContainer { this.add(value); this.shadow = shadow; + this.hover = hover; this.back = back; this.glow = glow; this.icon = icon; @@ -120,6 +129,10 @@ export default class CardJitsuCard extends BaseContainer { this.glow.anims.play('card/glow') + this.on('pointerup', this.onUp, this) + this.on('pointerover', this.onOver, this) + this.on('pointerout', this.onOut, this) + /* END-USER-CTR-CODE */ } @@ -152,7 +165,7 @@ export default class CardJitsuCard extends BaseContainer { this.element.setFrame(`card/${card.element}`) if (card.power_id > 0) { - this.glow.visible = true + //this.glow.visible = true } } @@ -205,6 +218,31 @@ export default class CardJitsuCard extends BaseContainer { }) } + enableInput() { + this.setSize(this.color.width, this.color.height) + this.setInteractive() + + // Offset + this.input.hitArea.x = this.color.x + this.input.hitArea.y = this.color.y + } + + disableInput() { + + } + + onUp() { + + } + + onOver() { + this.hover.visible = true + } + + onOut() { + this.hover.visible = false + } + /* END-USER-CODE */ } diff --git a/src/scenes/games/card/card/CardJitsuCard.scene b/src/scenes/games/card/card/CardJitsuCard.scene index 633416b4..07a05aac 100644 --- a/src/scenes/games/card/card/CardJitsuCard.scene +++ b/src/scenes/games/card/card/CardJitsuCard.scene @@ -37,6 +37,20 @@ "originX": 0.5010660980810234, "originY": 0.500945179584121 }, + { + "type": "Image", + "id": "26f85f1a-b09b-4f2a-af66-f661a3d84dd2", + "label": "hover", + "scope": "CLASS", + "components": [], + "texture": { + "key": "cardjitsu", + "frame": "card/hover" + }, + "x": 240, + "y": 269, + "visible": false + }, { "type": "Image", "id": "2ca4c8b6-b5b4-4c42-9d50-485b8caec74f", @@ -65,7 +79,8 @@ }, "x": 238, "y": 259, - "originX": 0.5008695652173913 + "originX": 0.5008695652173913, + "visible": false }, { "type": "Sprite", From 213ce68982d592a447a2cfb68a64d456ce87d642 Mon Sep 17 00:00:00 2001 From: wizguin <16276645+wizguin@users.noreply.github.com> Date: Tue, 28 Mar 2023 12:26:41 +0100 Subject: [PATCH 052/200] cardjitsu: Fix player depth --- src/scenes/games/card/CardJitsu.js | 32 +++++------ src/scenes/games/card/CardJitsu.scene | 76 +++++++++++++-------------- 2 files changed, 54 insertions(+), 54 deletions(-) diff --git a/src/scenes/games/card/CardJitsu.js b/src/scenes/games/card/CardJitsu.js index 14372bbe..c4dfc095 100644 --- a/src/scenes/games/card/CardJitsu.js +++ b/src/scenes/games/card/CardJitsu.js @@ -16,6 +16,10 @@ export default class CardJitsu extends GameScene { constructor() { super("CardJitsu"); + /** @type {CardJitsuPlayer} */ + this.player2; + /** @type {CardJitsuPlayer} */ + this.player1; /** @type {Phaser.GameObjects.Image} */ this.clock; /** @type {Phaser.GameObjects.Image} */ @@ -24,10 +28,6 @@ export default class CardJitsu extends GameScene { this.username2; /** @type {Phaser.GameObjects.Text} */ this.username1; - /** @type {CardJitsuPlayer} */ - this.player2; - /** @type {CardJitsuPlayer} */ - this.player1; /** @type {CardJitsuPlayer[]} */ this.players; @@ -48,6 +48,16 @@ export default class CardJitsu extends GameScene { // bg this.add.image(760, 480, "cardjitsu", "bg"); + // player2 + const player2 = new CardJitsuPlayer(this, 760, 315); + this.add.existing(player2); + + // player1 + const player1 = new CardJitsuPlayer(this, 760, 315); + this.add.existing(player1); + player1.scaleX = -1; + player1.scaleY = 1; + // close this.add.image(1466, 57, "cardjitsu", "close0001"); @@ -79,16 +89,6 @@ export default class CardJitsu extends GameScene { const username1 = this.add.text(100, 736, "", {}); username1.setStyle({ "color": "#000", "fixedWidth":410,"fontFamily": "CCComiccrazy", "fontSize": "28px", "fontStyle": "bold" }); - // player2 - const player2 = new CardJitsuPlayer(this, 760, 315); - this.add.existing(player2); - - // player1 - const player1 = new CardJitsuPlayer(this, 760, 315); - this.add.existing(player1); - player1.scaleX = -1; - player1.scaleY = 1; - // lists const players = [player1, player2]; @@ -98,12 +98,12 @@ export default class CardJitsu extends GameScene { // player1 (prefab fields) player1.username = username1; + this.player2 = player2; + this.player1 = player1; this.clock = clock; this.spinner = spinner; this.username2 = username2; this.username1 = username1; - this.player2 = player2; - this.player1 = player1; this.players = players; this.events.emit("scene-awake"); diff --git a/src/scenes/games/card/CardJitsu.scene b/src/scenes/games/card/CardJitsu.scene index 35643587..8a24b927 100644 --- a/src/scenes/games/card/CardJitsu.scene +++ b/src/scenes/games/card/CardJitsu.scene @@ -29,6 +29,44 @@ "x": 760, "y": 480 }, + { + "prefabId": "2c95b708-e07e-4a6b-ad34-afb595594583", + "id": "3f476cde-316b-42f5-ad18-da70ada1474d", + "unlock": [ + "x", + "y", + "username" + ], + "label": "player2", + "scope": "CLASS", + "username": "username2", + "components": [], + "x": 760, + "y": 315, + "nestedPrefabs": [], + "list": [] + }, + { + "prefabId": "2c95b708-e07e-4a6b-ad34-afb595594583", + "id": "6fd982c9-843f-4778-899e-de82fbcde04d", + "unlock": [ + "x", + "y", + "scaleX", + "scaleY", + "username" + ], + "label": "player1", + "scope": "CLASS", + "username": "username1", + "components": [], + "x": 760, + "y": 315, + "scaleX": -1, + "scaleY": 1, + "nestedPrefabs": [], + "list": [] + }, { "type": "Image", "id": "7a0d7dac-7b59-4a80-bc52-f98bbe8639bd", @@ -138,44 +176,6 @@ "fontSize": "28px", "fontStyle": "bold", "color": "#000" - }, - { - "prefabId": "2c95b708-e07e-4a6b-ad34-afb595594583", - "id": "3f476cde-316b-42f5-ad18-da70ada1474d", - "unlock": [ - "x", - "y", - "username" - ], - "label": "player2", - "scope": "CLASS", - "username": "username2", - "components": [], - "x": 760, - "y": 315, - "nestedPrefabs": [], - "list": [] - }, - { - "prefabId": "2c95b708-e07e-4a6b-ad34-afb595594583", - "id": "6fd982c9-843f-4778-899e-de82fbcde04d", - "unlock": [ - "x", - "y", - "scaleX", - "scaleY", - "username" - ], - "label": "player1", - "scope": "CLASS", - "username": "username1", - "components": [], - "x": 760, - "y": 315, - "scaleX": -1, - "scaleY": 1, - "nestedPrefabs": [], - "list": [] } ], "plainObjects": [], From 047cd4e3308ae99fdd38b4811400be9532ed5132 Mon Sep 17 00:00:00 2001 From: wizguin <16276645+wizguin@users.noreply.github.com> Date: Tue, 28 Mar 2023 12:28:18 +0100 Subject: [PATCH 053/200] cardjitsu: Better card sizing --- src/scenes/games/card/card/CardJitsuCard.js | 32 +++++++------ .../games/card/card/CardJitsuCard.scene | 45 ++++++++++--------- 2 files changed, 43 insertions(+), 34 deletions(-) diff --git a/src/scenes/games/card/card/CardJitsuCard.js b/src/scenes/games/card/card/CardJitsuCard.js index b4676044..c5a7f070 100644 --- a/src/scenes/games/card/card/CardJitsuCard.js +++ b/src/scenes/games/card/card/CardJitsuCard.js @@ -30,52 +30,56 @@ export default class CardJitsuCard extends BaseContainer { // shadow - const shadow = scene.add.image(245, 275, "cardjitsu", "card/shadow"); + const shadow = scene.add.image(99, 111, "cardjitsu", "card/shadow"); shadow.setOrigin(0.5010660980810234, 0.500945179584121); this.add(shadow); // hover - const hover = scene.add.image(240, 269, "cardjitsu", "card/hover"); + const hover = scene.add.image(97, 108, "cardjitsu", "card/hover"); hover.visible = false; this.add(hover); // back - const back = scene.add.image(235, 265, "cardjitsu", "card/back"); + const back = scene.add.image(95, 107, "cardjitsu", "card/back"); back.setOrigin(0.5010660980810234, 0.500945179584121); back.visible = false; this.add(back); // glow - const glow = scene.add.sprite(238, 259, "cardjitsu", "card/glow0001"); + const glow = scene.add.sprite(95, 104, "cardjitsu", "card/glow0001"); glow.setOrigin(0.5008695652173913, 0.5); - glow.visible = false; + glow.alpha = 0.5; + glow.alphaTopLeft = 0.5; + glow.alphaTopRight = 0.5; + glow.alphaBottomLeft = 0.5; + glow.alphaBottomRight = 0.5; this.add(glow); // icon - const icon = scene.add.sprite(235, 265, "_MISSING"); + const icon = scene.add.sprite(95, 107, "_MISSING"); icon.visible = false; this.add(icon); // color - const color = scene.add.image(235, 265, "cardjitsu", "card/color"); + const color = scene.add.image(95, 107, "cardjitsu", "card/color"); color.setOrigin(0.5010660980810234, 0.500945179584121); this.add(color); // element - const element = scene.add.image(68, 72, "cardjitsu", "card/f"); + const element = scene.add.image(28, 28, "cardjitsu", "card/f"); element.setOrigin(0.5, 0.5051546391752577); this.add(element); // disabled - const disabled = scene.add.image(235, 265, "cardjitsu", "card/disabled"); + const disabled = scene.add.image(95, 107, "cardjitsu", "card/disabled"); disabled.setOrigin(0.5010660980810234, 0.500945179584121); disabled.visible = false; this.add(disabled); // value - const value = scene.add.text(0, 121, "", {}); + const value = scene.add.text(1, 48, "", {}); value.text = "88"; - value.setStyle({ "align": "center", "color": "#000", "fixedWidth":132,"fontFamily": "Arial", "fontSize": "96px", "fontStyle": "bold" }); + value.setStyle({ "align": "center", "color": "#000", "fixedWidth":52,"fontFamily": "Arial", "fontSize": "38px", "fontStyle": "bold" }); this.add(value); this.shadow = shadow; @@ -102,9 +106,9 @@ export default class CardJitsuCard extends BaseContainer { this.dealtFrontSpacer = 150 this.dealtBackSpacer = 70 - this.scaleFront = 0.28 - this.scaleBack = 0.15 - this.scaleFlip = 0.40 + this.scaleFront = 0.7 + this.scaleBack = 0.375 + this.scalePick = 1 this.colors = { r: { diff --git a/src/scenes/games/card/card/CardJitsuCard.scene b/src/scenes/games/card/card/CardJitsuCard.scene index 07a05aac..456784f4 100644 --- a/src/scenes/games/card/card/CardJitsuCard.scene +++ b/src/scenes/games/card/card/CardJitsuCard.scene @@ -32,8 +32,8 @@ "key": "cardjitsu", "frame": "card/shadow" }, - "x": 245, - "y": 275, + "x": 99, + "y": 111, "originX": 0.5010660980810234, "originY": 0.500945179584121 }, @@ -47,8 +47,8 @@ "key": "cardjitsu", "frame": "card/hover" }, - "x": 240, - "y": 269, + "x": 97, + "y": 108, "visible": false }, { @@ -61,8 +61,8 @@ "key": "cardjitsu", "frame": "card/back" }, - "x": 235, - "y": 265, + "x": 95, + "y": 107, "originX": 0.5010660980810234, "originY": 0.500945179584121, "visible": false @@ -77,10 +77,14 @@ "key": "cardjitsu", "frame": "card/glow0001" }, - "x": 238, - "y": 259, + "x": 95, + "y": 104, "originX": 0.5008695652173913, - "visible": false + "alpha": 0.5, + "alphaTopLeft": 0.5, + "alphaTopRight": 0.5, + "alphaBottomLeft": 0.5, + "alphaBottomRight": 0.5 }, { "type": "Sprite", @@ -89,8 +93,8 @@ "scope": "CLASS", "components": [], "texture": {}, - "x": 235, - "y": 265, + "x": 95, + "y": 107, "visible": false }, { @@ -103,8 +107,8 @@ "key": "cardjitsu", "frame": "card/color" }, - "x": 235, - "y": 265, + "x": 95, + "y": 107, "originX": 0.5010660980810234, "originY": 0.500945179584121 }, @@ -118,8 +122,8 @@ "key": "cardjitsu", "frame": "card/f" }, - "x": 68, - "y": 72, + "x": 28, + "y": 28, "originY": 0.5051546391752577 }, { @@ -132,8 +136,8 @@ "key": "cardjitsu", "frame": "card/disabled" }, - "x": 235, - "y": 265, + "x": 95, + "y": 107, "originX": 0.5010660980810234, "originY": 0.500945179584121, "visible": false @@ -144,12 +148,13 @@ "label": "value", "scope": "CLASS", "components": [], - "y": 121, + "x": 1, + "y": 48, "text": "88", - "fixedWidth": 132, + "fixedWidth": 52, "align": "center", "fontFamily": "Arial", - "fontSize": "96px", + "fontSize": "38px", "fontStyle": "bold", "color": "#000" } From fbf9b395f28c26a2b7307a869dba0425166cc13f Mon Sep 17 00:00:00 2001 From: wizguin <16276645+wizguin@users.noreply.github.com> Date: Thu, 30 Mar 2023 16:46:00 +0100 Subject: [PATCH 054/200] cardjitsu: Dealing --- src/scenes/games/card/states/ServeState.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/scenes/games/card/states/ServeState.js b/src/scenes/games/card/states/ServeState.js index 32c5df6f..0ff905e9 100644 --- a/src/scenes/games/card/states/ServeState.js +++ b/src/scenes/games/card/states/ServeState.js @@ -27,7 +27,7 @@ export default class InitState extends State { battleComplete() { this.scene.playBattle('ambient') - this.network.send('send_deal', { deal: 5 }) + this.network.send('send_deal') } } From 6579ee412a5ab63c58c481eb980a9ed7807011f9 Mon Sep 17 00:00:00 2001 From: wizguin <16276645+wizguin@users.noreply.github.com> Date: Thu, 30 Mar 2023 18:46:27 +0100 Subject: [PATCH 055/200] cardjitsu: Picking card & reveal --- src/scenes/games/card/CardJitsu.js | 54 +++++++++-- src/scenes/games/card/CardJitsuPlayer.js | 18 ++-- src/scenes/games/card/card/CardJitsuCard.js | 102 +++++++++++++++++--- 3 files changed, 146 insertions(+), 28 deletions(-) diff --git a/src/scenes/games/card/CardJitsu.js b/src/scenes/games/card/CardJitsu.js index c4dfc095..47850bed 100644 --- a/src/scenes/games/card/CardJitsu.js +++ b/src/scenes/games/card/CardJitsu.js @@ -115,9 +115,14 @@ export default class CardJitsu extends GameScene { create() { super.create() + this.myPlayer + this.opponent + + // Loader this.cardLoader = new CardLoader(this) - this.myPlayer + this.onDealCardLoad = this.onDealCardLoad.bind(this) + this.onRevealCardLoad = this.onRevealCardLoad.bind(this) // Spinner this.tweens.add({ @@ -143,12 +148,18 @@ export default class CardJitsu extends GameScene { this.network.events.on('start_game', this.handleStartGame, this) this.network.events.on('send_deal', this.handleSendDeal, this) this.network.events.on('send_opponent_deal', this.handleSendOpponentDeal, this) + this.network.events.on('pick_card', this.handlePickCard, this) + this.network.events.on('pick_opponent_card', this.handlePickOpponentCard, this) + this.network.events.on('reveal_card', this.handleRevealCard, this) } removeListeners() { this.network.events.off('start_game', this.handleStartGame, this) - this.network.events.on('send_deal', this.handleSendDeal, this) - this.network.events.on('send_opponent_deal', this.handleSendOpponentDeal, this) + this.network.events.off('send_deal', this.handleSendDeal, this) + this.network.events.off('send_opponent_deal', this.handleSendOpponentDeal, this) + this.network.events.off('pick_card', this.handlePickCard, this) + this.network.events.off('pick_opponent_card', this.handlePickOpponentCard, this) + this.network.events.off('reveal_card', this.handleRevealCard, this) } handleStartGame(args) { @@ -161,7 +172,7 @@ export default class CardJitsu extends GameScene { handleSendDeal(args) { for (let card of args.cards) { - this.cardLoader.loadCard(card) + this.cardLoader.loadCard(card, this.onDealCardLoad) } } @@ -169,19 +180,32 @@ export default class CardJitsu extends GameScene { for (let i = 0; i < args.deal; i++) { let cardPrefab = this.createCard() - let seat = this.players.indexOf(this.myPlayer) - let opponentSeat = (seat + 1) % 2 - - cardPrefab.init(this.players[opponentSeat], 'back') + cardPrefab.init(this.opponent, 'back') } } + handlePickCard(args) { + let card = this.myPlayer.dealtCards.find(dealt => dealt.id === args.card) + this.myPlayer.pickCard(card) + } + + handlePickOpponentCard(args) { + let card = this.opponent.dealtCards[args.card] + this.opponent.pickCard(card) + } + + handleRevealCard(args) { + this.cardLoader.loadCard(args.card, this.onRevealCardLoad) + } + setPlayer(user, index) { let player = this.players[index] player.set(user) if (this.world.isClientUsername(user.username)) { this.myPlayer = player + } else { + this.opponent = player } } @@ -196,7 +220,7 @@ export default class CardJitsu extends GameScene { } } - onCardLoad(key, card) { + onDealCardLoad(key, card) { let cardPrefab = this.createCard() cardPrefab.init(this.myPlayer, 'front', card) @@ -205,6 +229,14 @@ export default class CardJitsu extends GameScene { cardPrefab.enableInput() } + onRevealCardLoad(key, card) { + let cardPrefab = this.opponent.pick + + cardPrefab.updateCard(card) + cardPrefab.icon.setTexture(key) + cardPrefab.updateState('reveal') + } + createCard() { let card = new CardJitsuCard(this) this.add.existing(card) @@ -212,6 +244,10 @@ export default class CardJitsu extends GameScene { return card } + pickCard(card) { + this.network.send('pick_card', { card: card.id }) + } + /* END-USER-CODE */ } diff --git a/src/scenes/games/card/CardJitsuPlayer.js b/src/scenes/games/card/CardJitsuPlayer.js index db45a6f5..0344f7ee 100644 --- a/src/scenes/games/card/CardJitsuPlayer.js +++ b/src/scenes/games/card/CardJitsuPlayer.js @@ -19,9 +19,11 @@ export default class CardJitsuPlayer extends BaseContainer { /* START-USER-CTR-CODE */ this.battle = new CardJitsuBattle(this) - this.color + this.dealtCards = new Array(5).fill(null) + this.pick + /* END-USER-CTR-CODE */ } @@ -45,12 +47,16 @@ export default class CardJitsuPlayer extends BaseContainer { this.setColor(this.color) } - setColor(color) { - this.battle.setColor(color) - } + pickCard(card) { + for (let dealt of this.dealtCards) { + dealt.disableInput() + } + + let index = this.dealtCards.indexOf(card) + this.dealtCards[index] = null - setBeltColor(color) { - this.battle.setBeltColor(color) + card.tweenToPick() + this.pick = card } /* END-USER-CODE */ diff --git a/src/scenes/games/card/card/CardJitsuCard.js b/src/scenes/games/card/card/CardJitsuCard.js index c5a7f070..0ca88b27 100644 --- a/src/scenes/games/card/card/CardJitsuCard.js +++ b/src/scenes/games/card/card/CardJitsuCard.js @@ -95,13 +95,17 @@ export default class CardJitsuCard extends BaseContainer { /* START-USER-CTR-CODE */ this.player + this.id this.state this.spacer this.color this.glow + this.tween + this.posDealts = [{ x: 100, y: 770 }, { x: 1420, y: 770 }] + this.posPicks = [{ x: 450, y: 300 }, { x: 850, y: 300 }] this.dealtFrontSpacer = 150 this.dealtBackSpacer = 70 @@ -149,12 +153,11 @@ export default class CardJitsuCard extends BaseContainer { } this.player = player - this.state = state let empty = player.dealtCards.indexOf(null) player.dealtCards[empty] = this - this.updateState() + this.updateState(state) if (card) { this.updateCard(card) @@ -164,20 +167,31 @@ export default class CardJitsuCard extends BaseContainer { } updateCard(card) { + this.id = parseInt(card.card_id) + this.value.text = card.value this.color.tint = this.colors[card.color].color this.element.setFrame(`card/${card.element}`) if (card.power_id > 0) { - //this.glow.visible = true + this.glow.visible = true + this.glow.tint = this.colors[card.color].color } } - updateState() { - if (this.state === 'back') { - this.setStateBack() - } else { - this.setStateFront() + updateState(state) { + this.state = state + + switch (state) { + case 'back': + this.setStateBack() + break + case 'reveal': + this.setStateReveal() + break + default: + this.setStateFront() + break } } @@ -195,6 +209,17 @@ export default class CardJitsuCard extends BaseContainer { this.showFrontSprites(false) } + setStateReveal() { + this.scale = this.scalePick + + if (!this.tween) { + this.revealCard() + return + } + + this.tween.once('complete', this.revealCard, this) + } + showFrontSprites(show) { this.back.visible = !show this.value.visible = show @@ -214,14 +239,64 @@ export default class CardJitsuCard extends BaseContainer { ? pos.x + (this.spacer * empty) : pos.x - (this.spacer * empty) - this.spacer - this.scene.tweens.add({ + this.tweenTo(x, pos.y) + } + + tweenToPick() { + this.scale = this.scalePick + + let index = this.scene.players.indexOf(this.player) + let pos = this.posPicks[index] + + this.tweenTo(pos.x, pos.y) + } + + tweenTo(x, y) { + this.tween = this.scene.tweens.add({ targets: this, + duration: 500, + x: x, - y: pos.y, - duration: 500 + y: y, + + onComplete: () => this.removeTween() }) } + removeTween() { + if (!this.tween) { + return + } + + this.tween.remove() + this.tween = null + } + + revealCard() { + this.scene.time.delayedCall(1000, () => this.flip()) + } + + flip() { + let timeline = this.scene.tweens.createTimeline() + + timeline.add({ + targets: this, + duration: 250, + x: this.x + this.back.width / 2, + scaleX: 0, + onComplete: () => this.showFrontSprites(true) + }) + + timeline.add({ + targets: this, + duration: 250, + x: this.x, + scaleX: 1, + }) + + timeline.play() + } + enableInput() { this.setSize(this.color.width, this.color.height) this.setInteractive() @@ -232,11 +307,12 @@ export default class CardJitsuCard extends BaseContainer { } disableInput() { - + this.disableInteractive() + this.onOut() } onUp() { - + this.scene.pickCard(this) } onOver() { From ec8e064f29ebf0016346adadd1811bb136454b3a Mon Sep 17 00:00:00 2001 From: wizguin <16276645+wizguin@users.noreply.github.com> Date: Thu, 30 Mar 2023 18:52:22 +0100 Subject: [PATCH 056/200] cardjitsu: Update pick --- src/scenes/games/card/CardJitsu.js | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/src/scenes/games/card/CardJitsu.js b/src/scenes/games/card/CardJitsu.js index 47850bed..213b7782 100644 --- a/src/scenes/games/card/CardJitsu.js +++ b/src/scenes/games/card/CardJitsu.js @@ -149,7 +149,6 @@ export default class CardJitsu extends GameScene { this.network.events.on('send_deal', this.handleSendDeal, this) this.network.events.on('send_opponent_deal', this.handleSendOpponentDeal, this) this.network.events.on('pick_card', this.handlePickCard, this) - this.network.events.on('pick_opponent_card', this.handlePickOpponentCard, this) this.network.events.on('reveal_card', this.handleRevealCard, this) } @@ -158,7 +157,6 @@ export default class CardJitsu extends GameScene { this.network.events.off('send_deal', this.handleSendDeal, this) this.network.events.off('send_opponent_deal', this.handleSendOpponentDeal, this) this.network.events.off('pick_card', this.handlePickCard, this) - this.network.events.off('pick_opponent_card', this.handlePickOpponentCard, this) this.network.events.off('reveal_card', this.handleRevealCard, this) } @@ -185,11 +183,6 @@ export default class CardJitsu extends GameScene { } handlePickCard(args) { - let card = this.myPlayer.dealtCards.find(dealt => dealt.id === args.card) - this.myPlayer.pickCard(card) - } - - handlePickOpponentCard(args) { let card = this.opponent.dealtCards[args.card] this.opponent.pickCard(card) } @@ -245,6 +238,7 @@ export default class CardJitsu extends GameScene { } pickCard(card) { + this.myPlayer.pickCard(card) this.network.send('pick_card', { card: card.id }) } From 7fec0b71f34156f54ddf69b0fc36d8f3d465b741 Mon Sep 17 00:00:00 2001 From: wizguin <16276645+wizguin@users.noreply.github.com> Date: Thu, 30 Mar 2023 18:57:49 +0100 Subject: [PATCH 057/200] cardjitsu: Better ui alignment --- src/scenes/games/card/CardJitsu.js | 6 +++--- src/scenes/games/card/CardJitsu.scene | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/scenes/games/card/CardJitsu.js b/src/scenes/games/card/CardJitsu.js index 213b7782..0fd4725f 100644 --- a/src/scenes/games/card/CardJitsu.js +++ b/src/scenes/games/card/CardJitsu.js @@ -59,10 +59,10 @@ export default class CardJitsu extends GameScene { player1.scaleY = 1; // close - this.add.image(1466, 57, "cardjitsu", "close0001"); + this.add.image(1464, 57, "cardjitsu", "close0001"); // help - const help = this.add.image(760, 26, "cardjitsu", "help"); + const help = this.add.image(754, 26, "cardjitsu", "help"); help.setOrigin(0.5005370569280344, 0.5004436557231589); // panel @@ -70,7 +70,7 @@ export default class CardJitsu extends GameScene { panel.setOrigin(0.500351370344343, 0.5); // frame - const frame = this.add.image(760, 480, "cardjitsu", "frame"); + const frame = this.add.image(758, 480, "cardjitsu", "frame"); frame.setOrigin(0.5003261578604045, 0.5005192107995846); // clock diff --git a/src/scenes/games/card/CardJitsu.scene b/src/scenes/games/card/CardJitsu.scene index 8a24b927..2dac20bd 100644 --- a/src/scenes/games/card/CardJitsu.scene +++ b/src/scenes/games/card/CardJitsu.scene @@ -76,7 +76,7 @@ "key": "cardjitsu", "frame": "close0001" }, - "x": 1466, + "x": 1464, "y": 57 }, { @@ -88,7 +88,7 @@ "key": "cardjitsu", "frame": "help" }, - "x": 760, + "x": 754, "y": 26, "originX": 0.5005370569280344, "originY": 0.5004436557231589 @@ -115,7 +115,7 @@ "key": "cardjitsu", "frame": "frame" }, - "x": 760, + "x": 758, "y": 480, "originX": 0.5003261578604045, "originY": 0.5005192107995846 From 90bf7506e1141e07f2866e08579a9aead4f34500 Mon Sep 17 00:00:00 2001 From: wizguin <16276645+wizguin@users.noreply.github.com> Date: Thu, 30 Mar 2023 21:48:54 +0100 Subject: [PATCH 058/200] cardjitsu: Allow custom callback on card loader --- src/engine/loaders/CardLoader.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/engine/loaders/CardLoader.js b/src/engine/loaders/CardLoader.js index a4085f9e..ea894b8b 100644 --- a/src/engine/loaders/CardLoader.js +++ b/src/engine/loaders/CardLoader.js @@ -10,11 +10,11 @@ export default class CardLoader extends BaseLoader { this.keyPrefix = 'card/icons/' } - loadCard(card) { + loadCard(card, callback) { let key = this.getKey(card.card_id) if (this.checkComplete('image', key, () => { - this.onFileComplete(key, card) + this.onFileComplete(key, card, callback) })) { return } @@ -23,12 +23,12 @@ export default class CardLoader extends BaseLoader { this.start() } - onFileComplete(key, card) { + onFileComplete(key, card, callback) { if (!this.textureExists(key)) { return } - this.scene.onCardLoad(key, card) + callback(key, card) } } From 5cd4b908582fa6d187776cf4307e0e1e1dc7a023 Mon Sep 17 00:00:00 2001 From: wizguin <16276645+wizguin@users.noreply.github.com> Date: Thu, 30 Mar 2023 22:30:02 +0100 Subject: [PATCH 059/200] cardjitsu: setColor --- src/scenes/games/card/CardJitsuPlayer.js | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/scenes/games/card/CardJitsuPlayer.js b/src/scenes/games/card/CardJitsuPlayer.js index 0344f7ee..52fe9e92 100644 --- a/src/scenes/games/card/CardJitsuPlayer.js +++ b/src/scenes/games/card/CardJitsuPlayer.js @@ -39,6 +39,14 @@ export default class CardJitsuPlayer extends BaseContainer { this.color = this.world.getColor(user.color) } + setColor(color) { + this.battle.setColor(color) + } + + setBeltColor(color) { + this.battle.setBeltColor(color) + } + playBattle(battle) { this.battle.play(battle) From 0104665314cf0383092f3c360ab57521a018e9cf Mon Sep 17 00:00:00 2001 From: wizguin <16276645+wizguin@users.noreply.github.com> Date: Thu, 30 Mar 2023 23:03:37 +0100 Subject: [PATCH 060/200] cardjitsu: Move layout config to separate file --- src/scenes/games/card/card/CardJitsuCard.js | 58 ++++++--------------- src/scenes/games/card/layout.js | 55 +++++++++++++++++++ 2 files changed, 72 insertions(+), 41 deletions(-) create mode 100644 src/scenes/games/card/layout.js diff --git a/src/scenes/games/card/card/CardJitsuCard.js b/src/scenes/games/card/card/CardJitsuCard.js index 0ca88b27..d7eb155f 100644 --- a/src/scenes/games/card/card/CardJitsuCard.js +++ b/src/scenes/games/card/card/CardJitsuCard.js @@ -2,6 +2,9 @@ import BaseContainer from "../../../base/BaseContainer"; /* START-USER-IMPORTS */ + +import layout from '../layout' + /* END-USER-IMPORTS */ export default class CardJitsuCard extends BaseContainer { @@ -104,37 +107,6 @@ export default class CardJitsuCard extends BaseContainer { this.tween - this.posDealts = [{ x: 100, y: 770 }, { x: 1420, y: 770 }] - this.posPicks = [{ x: 450, y: 300 }, { x: 850, y: 300 }] - - this.dealtFrontSpacer = 150 - this.dealtBackSpacer = 70 - - this.scaleFront = 0.7 - this.scaleBack = 0.375 - this.scalePick = 1 - - this.colors = { - r: { - color: 0xE23C26 - }, - g: { - color: 0x61B946 - }, - b: { - color: 0x1148A1 - }, - p: { - color: 0xA399CA - }, - o: { - color: 0xF7952B - }, - y: { - color: 0xFBEB2D - } - } - this.glow.anims.play('card/glow') this.on('pointerup', this.onUp, this) @@ -170,12 +142,13 @@ export default class CardJitsuCard extends BaseContainer { this.id = parseInt(card.card_id) this.value.text = card.value - this.color.tint = this.colors[card.color].color + this.color.tint = layout.colors[card.color].color + this.element.setFrame(`card/${card.element}`) if (card.power_id > 0) { this.glow.visible = true - this.glow.tint = this.colors[card.color].color + this.glow.tint = layout.colors[card.color].color } } @@ -196,21 +169,21 @@ export default class CardJitsuCard extends BaseContainer { } setStateFront() { - this.scale = this.scaleFront - this.spacer = this.dealtFrontSpacer + this.scale = layout.scale.front + this.spacer = layout.spacer.dealtFront this.showFrontSprites(true) } setStateBack() { - this.scale = this.scaleBack - this.spacer = this.dealtBackSpacer + this.scale = layout.scale.back + this.spacer = layout.spacer.dealtBack this.showFrontSprites(false) } setStateReveal() { - this.scale = this.scalePick + this.scale = layout.scale.pick if (!this.tween) { this.revealCard() @@ -233,7 +206,7 @@ export default class CardJitsuCard extends BaseContainer { tweenToDealt(empty) { let index = this.scene.players.indexOf(this.player) - let pos = this.posDealts[index] + let pos = layout.pos.dealts[index] let x = (index === 0) ? pos.x + (this.spacer * empty) @@ -243,10 +216,10 @@ export default class CardJitsuCard extends BaseContainer { } tweenToPick() { - this.scale = this.scalePick + this.scale = layout.scale.pick let index = this.scene.players.indexOf(this.player) - let pos = this.posPicks[index] + let pos = layout.pos.picks[index] this.tweenTo(pos.x, pos.y) } @@ -282,14 +255,17 @@ export default class CardJitsuCard extends BaseContainer { timeline.add({ targets: this, duration: 250, + x: this.x + this.back.width / 2, scaleX: 0, + onComplete: () => this.showFrontSprites(true) }) timeline.add({ targets: this, duration: 250, + x: this.x, scaleX: 1, }) diff --git a/src/scenes/games/card/layout.js b/src/scenes/games/card/layout.js new file mode 100644 index 00000000..cf46104b --- /dev/null +++ b/src/scenes/games/card/layout.js @@ -0,0 +1,55 @@ +const layout = { + pos: { + dealts: [ + { + x: 100, + y: 770 + }, + { + x: 1420, + y: 770 + } + ], + picks: [ + { + x: 450, + y: 300 + }, + { + x: 850, + y: 300 + } + ] + }, + spacer: { + dealtFront: 150, + dealtBack: 70 + }, + scale: { + front: 0.7, + back: 0.375, + pick: 1 + }, + colors: { + r: { + color: 0xE23C26 + }, + g: { + color: 0x61B946 + }, + b: { + color: 0x1148A1 + }, + p: { + color: 0xA399CA + }, + o: { + color: 0xF7952B + }, + y: { + color: 0xFBEB2D + } + } +} + +export default layout From 6055d1d311498218c30cce8821d1ee4d3daea9ad Mon Sep 17 00:00:00 2001 From: wizguin <16276645+wizguin@users.noreply.github.com> Date: Fri, 31 Mar 2023 15:37:56 +0100 Subject: [PATCH 061/200] cardjitsu: Focus tween bug --- src/scenes/games/card/CardJitsuPlayer.js | 2 +- src/scenes/games/card/card/CardJitsuCard.js | 15 ++++++++++++--- 2 files changed, 13 insertions(+), 4 deletions(-) diff --git a/src/scenes/games/card/CardJitsuPlayer.js b/src/scenes/games/card/CardJitsuPlayer.js index 52fe9e92..512f53ce 100644 --- a/src/scenes/games/card/CardJitsuPlayer.js +++ b/src/scenes/games/card/CardJitsuPlayer.js @@ -63,7 +63,7 @@ export default class CardJitsuPlayer extends BaseContainer { let index = this.dealtCards.indexOf(card) this.dealtCards[index] = null - card.tweenToPick() + card.pick() this.pick = card } diff --git a/src/scenes/games/card/card/CardJitsuCard.js b/src/scenes/games/card/card/CardJitsuCard.js index d7eb155f..96798566 100644 --- a/src/scenes/games/card/card/CardJitsuCard.js +++ b/src/scenes/games/card/card/CardJitsuCard.js @@ -215,6 +215,15 @@ export default class CardJitsuCard extends BaseContainer { this.tweenTo(x, pos.y) } + pick() { + if (!this.tween) { + this.tweenToPick() + return + } + + this.tween.once('complete', this.tweenToPick, this) + } + tweenToPick() { this.scale = layout.scale.pick @@ -230,10 +239,10 @@ export default class CardJitsuCard extends BaseContainer { duration: 500, x: x, - y: y, - - onComplete: () => this.removeTween() + y: y }) + + this.tween.once('complete', () => this.removeTween()) } removeTween() { From 489f5f0b57e1f664bda74185c68afa2896297046 Mon Sep 17 00:00:00 2001 From: wizguin <16276645+wizguin@users.noreply.github.com> Date: Sat, 1 Apr 2023 13:54:18 +0100 Subject: [PATCH 062/200] cardjitsu: judge basics --- src/engine/loaders/BattleLoader.js | 49 +++++++++++ src/scenes/games/card/CardJitsu.js | 95 +++++++++++++++++++-- src/scenes/games/card/CardJitsuPlayer.js | 22 +++++ src/scenes/games/card/card/CardJitsuCard.js | 13 ++- 4 files changed, 170 insertions(+), 9 deletions(-) create mode 100644 src/engine/loaders/BattleLoader.js diff --git a/src/engine/loaders/BattleLoader.js b/src/engine/loaders/BattleLoader.js new file mode 100644 index 00000000..688b9197 --- /dev/null +++ b/src/engine/loaders/BattleLoader.js @@ -0,0 +1,49 @@ +import BaseLoader from './BaseLoader' + + +export default class BattleLoader extends BaseLoader { + + constructor(scene) { + super(scene) + + this.baseURL = '/assets/media/games/card/battles/' + this.keyPrefix = '' + } + + loadBattle(card, callback) { + if (card.powerId == 0) { + this.loadBattleSegment(`${card.elementId}_attack`) + this.loadBattleSegment(`${card.elementId}_react`) + } + + if (card.powerId != 0) { + this.loadBattleSegment(`pow_${card.id}_attack`) + this.loadBattleSegment(`pow_${card.id}_react`) + } + + this.once('complete', () => callback()) + + this.start() + } + + loadBattleSegment(battle) { + let key = this.getKey(battle) + + if (this.checkComplete('json', key, () => { + this.onFileComplete(key) + })) { + return + } + + this.multiatlas(key, `${battle}.json`) + } + + onFileComplete(key) { + if (!this.textureExists(key)) { + return + } + + console.log(key, 'completed') + } + +} diff --git a/src/scenes/games/card/CardJitsu.js b/src/scenes/games/card/CardJitsu.js index 0fd4725f..a11e5737 100644 --- a/src/scenes/games/card/CardJitsu.js +++ b/src/scenes/games/card/CardJitsu.js @@ -4,6 +4,7 @@ import GameScene from "../GameScene"; import CardJitsuPlayer from "./CardJitsuPlayer"; /* START-USER-IMPORTS */ +import BattleLoader from '@engine/loaders/BattleLoader' import CardLoader from '@engine/loaders/CardLoader' import CardJitsuCard from './card/CardJitsuCard' import StateMachine from '@engine/utils/state_machine/StateMachine' @@ -119,6 +120,7 @@ export default class CardJitsu extends GameScene { this.opponent // Loader + this.battleLoader = new BattleLoader(this) this.cardLoader = new CardLoader(this) this.onDealCardLoad = this.onDealCardLoad.bind(this) @@ -150,6 +152,7 @@ export default class CardJitsu extends GameScene { this.network.events.on('send_opponent_deal', this.handleSendOpponentDeal, this) this.network.events.on('pick_card', this.handlePickCard, this) this.network.events.on('reveal_card', this.handleRevealCard, this) + this.network.events.on('judge', this.handleJudge, this) } removeListeners() { @@ -158,6 +161,7 @@ export default class CardJitsu extends GameScene { this.network.events.off('send_opponent_deal', this.handleSendOpponentDeal, this) this.network.events.off('pick_card', this.handlePickCard, this) this.network.events.off('reveal_card', this.handleRevealCard, this) + this.network.events.off('judge', this.handleJudge, this) } handleStartGame(args) { @@ -191,6 +195,14 @@ export default class CardJitsu extends GameScene { this.cardLoader.loadCard(args.card, this.onRevealCardLoad) } + handleJudge(args) { + let cardPrefab = this.opponent.pick + + cardPrefab.updateState('reveal') + + this.events.once('flipped', () => this.onFlipped(args.winner)) + } + setPlayer(user, index) { let player = this.players[index] player.set(user) @@ -202,17 +214,20 @@ export default class CardJitsu extends GameScene { } } - playBattle(battle) { - this.player1.playBattle(battle) - this.player2.playBattle(battle) - } - onBattleComplete() { if (!this.player1.animating && !this.player2.animating) { this.events.emit('battle_complete') } } + onFlipped(winner) { + let winCard = this.players[winner].pick + + this.battleLoader.loadBattle(winCard, () => { + this.judge(winner, winCard) + }) + } + onDealCardLoad(key, card) { let cardPrefab = this.createCard() @@ -227,7 +242,25 @@ export default class CardJitsu extends GameScene { cardPrefab.updateCard(card) cardPrefab.icon.setTexture(key) - cardPrefab.updateState('reveal') + } + + playBattle(battle, winSeat = null) { + if (!winSeat) { + this.player1.playBattle(battle) + this.player2.playBattle(battle) + + return + } + + let mySeat = this.players.indexOf(this.myPlayer) + + if (winSeat == mySeat) { + this.myPlayer.playBattle(`${battle}_attack`) + this.opponent.playBattle(`${battle}_react`) + } else { + this.myPlayer.playBattle(`${battle}_react`) + this.opponent.playBattle(`${battle}_attack`) + } } createCard() { @@ -242,6 +275,56 @@ export default class CardJitsu extends GameScene { this.network.send('pick_card', { card: card.id }) } + judge(winner, winCard) { + let mySeat = this.players.indexOf(this.myPlayer) + + if (winner == -1) { + this.judgeTie() + return + } + + winCard.visible = false + + if (winner == mySeat) { + this.judgeWin(winner, winCard) + } else { + this.judgeLoss(winner, winCard) + } + } + + judgeTie() { + this.myPlayer.cardLose() + this.opponent.cardLose() + + this.playBattle('tie') + } + + judgeWin(winSeat, winCard) { + this.myPlayer.cardWin() + this.opponent.cardLose() + + this.judgePlayBattle(winSeat, winCard) + } + + judgeLoss(winSeat, winCard) { + this.myPlayer.cardLose() + this.opponent.cardWin() + + this.judgePlayBattle(winSeat, winCard) + } + + judgePlayBattle(winSeat, winCard) { + if (winCard.powerId == 0) { + this.playBattle(winCard.elementId, winSeat) + return + } + + if (winCard.powerId != 0) { + this.playBattle(`pow_${winCard.id}`, winSeat) + return + } + } + /* END-USER-CODE */ } diff --git a/src/scenes/games/card/CardJitsuPlayer.js b/src/scenes/games/card/CardJitsuPlayer.js index 512f53ce..3150a85c 100644 --- a/src/scenes/games/card/CardJitsuPlayer.js +++ b/src/scenes/games/card/CardJitsuPlayer.js @@ -24,6 +24,9 @@ export default class CardJitsuPlayer extends BaseContainer { this.dealtCards = new Array(5).fill(null) this.pick + this.wins = [] + this.losses = [] + /* END-USER-CTR-CODE */ } @@ -67,6 +70,25 @@ export default class CardJitsuPlayer extends BaseContainer { this.pick = card } + cardWin() { + if (!this.pick) { + return + } + + this.wins.push(this.pick) + this.pick = null + } + + cardLose() { + if (!this.pick) { + return + } + + this.losses.push(this.pick) + this.pick.destroy() + this.pick = null + } + /* END-USER-CODE */ } diff --git a/src/scenes/games/card/card/CardJitsuCard.js b/src/scenes/games/card/card/CardJitsuCard.js index 96798566..d924d398 100644 --- a/src/scenes/games/card/card/CardJitsuCard.js +++ b/src/scenes/games/card/card/CardJitsuCard.js @@ -98,10 +98,13 @@ export default class CardJitsuCard extends BaseContainer { /* START-USER-CTR-CODE */ this.player - this.id this.state - this.spacer + this.id + this.powerId + this.elementId + + this.spacer this.color this.glow @@ -140,6 +143,8 @@ export default class CardJitsuCard extends BaseContainer { updateCard(card) { this.id = parseInt(card.card_id) + this.powerId = parseInt(card.power_id) + this.elementId = card.element this.value.text = card.value this.color.tint = layout.colors[card.color].color @@ -259,7 +264,9 @@ export default class CardJitsuCard extends BaseContainer { } flip() { - let timeline = this.scene.tweens.createTimeline() + let timeline = this.scene.tweens.createTimeline({ + onComplete: () => this.scene.events.emit('flipped') + }) timeline.add({ targets: this, From fa42445a324ae15ae77d5c3ee3ba47fc5a003450 Mon Sep 17 00:00:00 2001 From: wizguin <16276645+wizguin@users.noreply.github.com> Date: Sat, 1 Apr 2023 14:41:26 +0100 Subject: [PATCH 063/200] cardjitsu: Display glow --- src/scenes/games/card/card/CardJitsuCard.js | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/src/scenes/games/card/card/CardJitsuCard.js b/src/scenes/games/card/card/CardJitsuCard.js index d924d398..b4c73e8c 100644 --- a/src/scenes/games/card/card/CardJitsuCard.js +++ b/src/scenes/games/card/card/CardJitsuCard.js @@ -132,12 +132,12 @@ export default class CardJitsuCard extends BaseContainer { let empty = player.dealtCards.indexOf(null) player.dealtCards[empty] = this - this.updateState(state) - if (card) { this.updateCard(card) } + this.updateState(state) + this.tweenToDealt(empty) } @@ -152,7 +152,6 @@ export default class CardJitsuCard extends BaseContainer { this.element.setFrame(`card/${card.element}`) if (card.power_id > 0) { - this.glow.visible = true this.glow.tint = layout.colors[card.color].color } } @@ -204,8 +203,7 @@ export default class CardJitsuCard extends BaseContainer { this.element.visible = show this.color.visible = show this.icon.visible = show - - this.glow.visible = false + this.glow.visible = show && this.powerId > 0 } tweenToDealt(empty) { From 4e60e7a366eef291a2a04f9469367b444d80210d Mon Sep 17 00:00:00 2001 From: wizguin <16276645+wizguin@users.noreply.github.com> Date: Thu, 6 Apr 2023 11:53:31 +0100 Subject: [PATCH 064/200] cardjitsu: Track won cards --- src/engine/loaders/BattleLoader.js | 2 + src/scenes/games/card/CardJitsu.js | 22 +++--- src/scenes/games/card/CardJitsuPlayer.js | 7 ++ src/scenes/games/card/card/CardJitsuCard.js | 60 +++++++++++++-- .../games/card/card/CardJitsuCard.scene | 24 +++++- src/scenes/games/card/card/CardJitsuThumb.js | 47 +++++++++++ .../games/card/card/CardJitsuThumb.scene | 77 +++++++++++++++++++ src/scenes/games/card/layout.js | 45 +++++++++-- 8 files changed, 262 insertions(+), 22 deletions(-) create mode 100644 src/scenes/games/card/card/CardJitsuThumb.js create mode 100644 src/scenes/games/card/card/CardJitsuThumb.scene diff --git a/src/engine/loaders/BattleLoader.js b/src/engine/loaders/BattleLoader.js index 688b9197..c3463818 100644 --- a/src/engine/loaders/BattleLoader.js +++ b/src/engine/loaders/BattleLoader.js @@ -8,6 +8,8 @@ export default class BattleLoader extends BaseLoader { this.baseURL = '/assets/media/games/card/battles/' this.keyPrefix = '' + + this.maxParallelDownloads = 1 } loadBattle(card, callback) { diff --git a/src/scenes/games/card/CardJitsu.js b/src/scenes/games/card/CardJitsu.js index a11e5737..e4aff927 100644 --- a/src/scenes/games/card/CardJitsu.js +++ b/src/scenes/games/card/CardJitsu.js @@ -176,6 +176,12 @@ export default class CardJitsu extends GameScene { for (let card of args.cards) { this.cardLoader.loadCard(card, this.onDealCardLoad) } + + for (let card of this.myPlayer.dealtCards) { + if (card) { + card.enableInput() + } + } } handleSendOpponentDeal(args) { @@ -198,7 +204,7 @@ export default class CardJitsu extends GameScene { handleJudge(args) { let cardPrefab = this.opponent.pick - cardPrefab.updateState('reveal') + cardPrefab.setState('reveal') this.events.once('flipped', () => this.onFlipped(args.winner)) } @@ -221,6 +227,11 @@ export default class CardJitsu extends GameScene { } onFlipped(winner) { + if (winner == -1) { + this.judgeTie() + return + } + let winCard = this.players[winner].pick this.battleLoader.loadBattle(winCard, () => { @@ -245,7 +256,7 @@ export default class CardJitsu extends GameScene { } playBattle(battle, winSeat = null) { - if (!winSeat) { + if (winSeat == null) { this.player1.playBattle(battle) this.player2.playBattle(battle) @@ -278,13 +289,6 @@ export default class CardJitsu extends GameScene { judge(winner, winCard) { let mySeat = this.players.indexOf(this.myPlayer) - if (winner == -1) { - this.judgeTie() - return - } - - winCard.visible = false - if (winner == mySeat) { this.judgeWin(winner, winCard) } else { diff --git a/src/scenes/games/card/CardJitsuPlayer.js b/src/scenes/games/card/CardJitsuPlayer.js index 3150a85c..489650c3 100644 --- a/src/scenes/games/card/CardJitsuPlayer.js +++ b/src/scenes/games/card/CardJitsuPlayer.js @@ -37,6 +37,10 @@ export default class CardJitsuPlayer extends BaseContainer { return this.battle.animating } + getElementWins(element) { + return this.wins.filter(win => win.elementId == element) + } + set(user) { this.username.text = user.username.toUpperCase() this.color = this.world.getColor(user.color) @@ -76,6 +80,8 @@ export default class CardJitsuPlayer extends BaseContainer { } this.wins.push(this.pick) + + this.pick.setState('thumbnail') this.pick = null } @@ -85,6 +91,7 @@ export default class CardJitsuPlayer extends BaseContainer { } this.losses.push(this.pick) + this.pick.destroy() this.pick = null } diff --git a/src/scenes/games/card/card/CardJitsuCard.js b/src/scenes/games/card/card/CardJitsuCard.js index b4c73e8c..1f2b8d9c 100644 --- a/src/scenes/games/card/card/CardJitsuCard.js +++ b/src/scenes/games/card/card/CardJitsuCard.js @@ -1,6 +1,7 @@ /* START OF COMPILED CODE */ import BaseContainer from "../../../base/BaseContainer"; +import CardJitsuThumb from "./CardJitsuThumb"; /* START-USER-IMPORTS */ import layout from '../layout' @@ -30,6 +31,8 @@ export default class CardJitsuCard extends BaseContainer { this.disabled; /** @type {Phaser.GameObjects.Text} */ this.value; + /** @type {CardJitsuThumb} */ + this.thumbnail; // shadow @@ -51,6 +54,7 @@ export default class CardJitsuCard extends BaseContainer { // glow const glow = scene.add.sprite(95, 104, "cardjitsu", "card/glow0001"); glow.setOrigin(0.5008695652173913, 0.5); + glow.visible = false; glow.alpha = 0.5; glow.alphaTopLeft = 0.5; glow.alphaTopRight = 0.5; @@ -66,6 +70,10 @@ export default class CardJitsuCard extends BaseContainer { // color const color = scene.add.image(95, 107, "cardjitsu", "card/color"); color.setOrigin(0.5010660980810234, 0.500945179584121); + color.tintTopLeft = 1132705; + color.tintTopRight = 1132705; + color.tintBottomLeft = 1132705; + color.tintBottomRight = 1132705; this.add(color); // element @@ -85,6 +93,11 @@ export default class CardJitsuCard extends BaseContainer { value.setStyle({ "align": "center", "color": "#000", "fixedWidth":52,"fontFamily": "Arial", "fontSize": "38px", "fontStyle": "bold" }); this.add(value); + // thumbnail + const thumbnail = new CardJitsuThumb(scene, 47, 45); + thumbnail.visible = false; + this.add(thumbnail); + this.shadow = shadow; this.hover = hover; this.back = back; @@ -94,6 +107,7 @@ export default class CardJitsuCard extends BaseContainer { this.element = element; this.disabled = disabled; this.value = value; + this.thumbnail = thumbnail; /* START-USER-CTR-CODE */ @@ -136,27 +150,33 @@ export default class CardJitsuCard extends BaseContainer { this.updateCard(card) } - this.updateState(state) + this.updateDepth() + this.setState(state) this.tweenToDealt(empty) } updateCard(card) { + let tint = layout.colors[card.color].color + this.id = parseInt(card.card_id) this.powerId = parseInt(card.power_id) this.elementId = card.element this.value.text = card.value - this.color.tint = layout.colors[card.color].color + this.color.tint = tint this.element.setFrame(`card/${card.element}`) if (card.power_id > 0) { - this.glow.tint = layout.colors[card.color].color + this.glow.tint = tint } + + this.thumbnail.color.tint = tint + this.thumbnail.element.setFrame(`card/thumbnail/${card.element}`) } - updateState(state) { + setState(state) { this.state = state switch (state) { @@ -166,6 +186,9 @@ export default class CardJitsuCard extends BaseContainer { case 'reveal': this.setStateReveal() break + case 'thumbnail': + this.setStateThumbnail() + break default: this.setStateFront() break @@ -197,7 +220,17 @@ export default class CardJitsuCard extends BaseContainer { this.tween.once('complete', this.revealCard, this) } + setStateThumbnail() { + this.spacer = layout.spacer.win + + this.list.map(sprite => sprite.visible = false) + this.thumbnail.visible = true + + this.tweenToWin() + } + showFrontSprites(show) { + this.thumbnail.visible = false this.back.visible = !show this.value.visible = show this.element.visible = show @@ -236,6 +269,19 @@ export default class CardJitsuCard extends BaseContainer { this.tweenTo(pos.x, pos.y) } + tweenToWin() { + let index = this.scene.players.indexOf(this.player) + let pos = layout.pos.wins[index][this.elementId] + + let wins = this.player.getElementWins(this.elementId).length + + let y = pos.y + (this.spacer * wins) + + this.tweenTo(pos.x, y) + + this.tween.once('complete', this.updateDepth, this) + } + tweenTo(x, y) { this.tween = this.scene.tweens.add({ targets: this, @@ -245,7 +291,7 @@ export default class CardJitsuCard extends BaseContainer { y: y }) - this.tween.once('complete', () => this.removeTween()) + this.tween.once('complete', this.removeTween, this) } removeTween() { @@ -313,6 +359,10 @@ export default class CardJitsuCard extends BaseContainer { this.hover.visible = false } + updateDepth() { + this.depth = this.y + } + /* END-USER-CODE */ } diff --git a/src/scenes/games/card/card/CardJitsuCard.scene b/src/scenes/games/card/card/CardJitsuCard.scene index 456784f4..ded6ddc4 100644 --- a/src/scenes/games/card/card/CardJitsuCard.scene +++ b/src/scenes/games/card/card/CardJitsuCard.scene @@ -80,6 +80,7 @@ "x": 95, "y": 104, "originX": 0.5008695652173913, + "visible": false, "alpha": 0.5, "alphaTopLeft": 0.5, "alphaTopRight": 0.5, @@ -110,7 +111,11 @@ "x": 95, "y": 107, "originX": 0.5010660980810234, - "originY": 0.500945179584121 + "originY": 0.500945179584121, + "tintTopLeft": "#1148a1", + "tintTopRight": "#1148a1", + "tintBottomLeft": "#1148a1", + "tintBottomRight": "#1148a1" }, { "type": "Image", @@ -157,6 +162,23 @@ "fontSize": "38px", "fontStyle": "bold", "color": "#000" + }, + { + "prefabId": "f44f8f17-7031-4845-aaba-fc842a544771", + "id": "23b26ff4-5fed-4419-b975-ead0216911c4", + "unlock": [ + "x", + "y", + "visible" + ], + "label": "thumbnail", + "scope": "CLASS", + "components": [], + "x": 47, + "y": 45, + "visible": false, + "nestedPrefabs": [], + "list": [] } ] } diff --git a/src/scenes/games/card/card/CardJitsuThumb.js b/src/scenes/games/card/card/CardJitsuThumb.js new file mode 100644 index 00000000..9d8b36b0 --- /dev/null +++ b/src/scenes/games/card/card/CardJitsuThumb.js @@ -0,0 +1,47 @@ +/* START OF COMPILED CODE */ + +import BaseContainer from "../../../base/BaseContainer"; +/* START-USER-IMPORTS */ +/* END-USER-IMPORTS */ + +export default class CardJitsuThumb extends BaseContainer { + + constructor(scene, x, y) { + super(scene, x ?? 760, y ?? 480); + + /** @type {Phaser.GameObjects.Image} */ + this.color; + /** @type {Phaser.GameObjects.Image} */ + this.element; + + + // back + const back = scene.add.image(0, 0, "cardjitsu", "card/thumbnail/back"); + this.add(back); + + // color + const color = scene.add.image(-2, -2, "cardjitsu", "card/thumbnail/color"); + color.tintTopLeft = 1132705; + color.tintTopRight = 1132705; + color.tintBottomLeft = 1132705; + color.tintBottomRight = 1132705; + this.add(color); + + // element + const element = scene.add.image(0, 0, "cardjitsu", "card/thumbnail/f"); + element.setOrigin(0.5, 0.5102040816326531); + this.add(element); + + this.color = color; + this.element = element; + + /* START-USER-CTR-CODE */ + /* END-USER-CTR-CODE */ + } + + + /* START-USER-CODE */ + /* END-USER-CODE */ +} + +/* END OF COMPILED CODE */ diff --git a/src/scenes/games/card/card/CardJitsuThumb.scene b/src/scenes/games/card/card/CardJitsuThumb.scene new file mode 100644 index 00000000..d077b472 --- /dev/null +++ b/src/scenes/games/card/card/CardJitsuThumb.scene @@ -0,0 +1,77 @@ +{ + "id": "f44f8f17-7031-4845-aaba-fc842a544771", + "sceneType": "PREFAB", + "settings": { + "compilerInsertSpaces": true, + "snapEnabled": true, + "snapWidth": 1533, + "snapHeight": 963, + "javaScriptInitFieldsInConstructor": true, + "exportClass": true, + "autoImport": true, + "superClassName": "BaseContainer", + "preloadMethodName": "", + "preloadPackFiles": [], + "createMethodName": "", + "borderWidth": 1520, + "borderHeight": 960 + }, + "displayList": [ + { + "type": "Container", + "id": "3d6d8f71-4942-41ab-882c-cbb250278716", + "label": "container_1", + "components": [], + "x": 760, + "y": 480, + "list": [ + { + "type": "Image", + "id": "508731ad-5b4c-455b-a37b-7aedbe538f01", + "label": "back", + "components": [], + "texture": { + "key": "cardjitsu", + "frame": "card/thumbnail/back" + } + }, + { + "type": "Image", + "id": "ce66837f-6376-4b3c-aea9-71bb41e10eec", + "label": "color", + "scope": "CLASS", + "components": [], + "texture": { + "key": "cardjitsu", + "frame": "card/thumbnail/color" + }, + "x": -2, + "y": -2, + "tintTopLeft": "#1148a1", + "tintTopRight": "#1148a1", + "tintBottomLeft": "#1148a1", + "tintBottomRight": "#1148a1" + }, + { + "type": "Image", + "id": "3ad6fe2a-409a-49fa-94a7-5a40b43330a1", + "label": "element", + "scope": "CLASS", + "components": [], + "texture": { + "key": "cardjitsu", + "frame": "card/thumbnail/f" + }, + "originY": 0.5102040816326531 + } + ] + } + ], + "plainObjects": [], + "meta": { + "app": "Phaser Editor 2D - Scene Editor", + "url": "https://phasereditor2d.com", + "contentType": "phasereditor2d.core.scene.SceneContentType", + "version": 3 + } +} \ No newline at end of file diff --git a/src/scenes/games/card/layout.js b/src/scenes/games/card/layout.js index cf46104b..6923a197 100644 --- a/src/scenes/games/card/layout.js +++ b/src/scenes/games/card/layout.js @@ -19,11 +19,42 @@ const layout = { x: 850, y: 300 } + ], + wins: [ + { + f: { + x: 100, + y: 50 + }, + w: { + x: 200, + y: 50 + }, + s: { + x: 300, + y: 50 + } + }, + { + f: { + x: 1100, + y: 50 + }, + w: { + x: 1200, + y: 50 + }, + s: { + x: 1300, + y: 50 + } + } ] }, spacer: { dealtFront: 150, - dealtBack: 70 + dealtBack: 70, + win: 30 }, scale: { front: 0.7, @@ -32,22 +63,22 @@ const layout = { }, colors: { r: { - color: 0xE23C26 + color: 0xe23c26 }, g: { - color: 0x61B946 + color: 0x61b946 }, b: { - color: 0x1148A1 + color: 0x1148a1 }, p: { - color: 0xA399CA + color: 0xa399ca }, o: { - color: 0xF7952B + color: 0xf7952b }, y: { - color: 0xFBEB2D + color: 0xfbeb2d } } } From 0d29ca45c7e3d5c33b53c925857de28edfad1b36 Mon Sep 17 00:00:00 2001 From: wizguin <16276645+wizguin@users.noreply.github.com> Date: Thu, 6 Apr 2023 12:02:49 +0100 Subject: [PATCH 065/200] cardjitsu: Use setState for pick --- src/scenes/games/card/CardJitsuPlayer.js | 2 +- src/scenes/games/card/card/CardJitsuCard.js | 23 +++++++++++++-------- 2 files changed, 15 insertions(+), 10 deletions(-) diff --git a/src/scenes/games/card/CardJitsuPlayer.js b/src/scenes/games/card/CardJitsuPlayer.js index 489650c3..9b62a56c 100644 --- a/src/scenes/games/card/CardJitsuPlayer.js +++ b/src/scenes/games/card/CardJitsuPlayer.js @@ -70,7 +70,7 @@ export default class CardJitsuPlayer extends BaseContainer { let index = this.dealtCards.indexOf(card) this.dealtCards[index] = null - card.pick() + card.setState('pick') this.pick = card } diff --git a/src/scenes/games/card/card/CardJitsuCard.js b/src/scenes/games/card/card/CardJitsuCard.js index 1f2b8d9c..bc22658b 100644 --- a/src/scenes/games/card/card/CardJitsuCard.js +++ b/src/scenes/games/card/card/CardJitsuCard.js @@ -183,6 +183,9 @@ export default class CardJitsuCard extends BaseContainer { case 'back': this.setStateBack() break + case 'pick': + this.setStatePick() + break case 'reveal': this.setStateReveal() break @@ -209,6 +212,17 @@ export default class CardJitsuCard extends BaseContainer { this.showFrontSprites(false) } + setStatePick() { + this.scale = layout.scale.pick + + if (!this.tween) { + this.tweenToPick() + return + } + + this.tween.once('complete', this.tweenToPick, this) + } + setStateReveal() { this.scale = layout.scale.pick @@ -251,15 +265,6 @@ export default class CardJitsuCard extends BaseContainer { this.tweenTo(x, pos.y) } - pick() { - if (!this.tween) { - this.tweenToPick() - return - } - - this.tween.once('complete', this.tweenToPick, this) - } - tweenToPick() { this.scale = layout.scale.pick From bc46ab0766a22df99dcf1764a2cdcb52c9bd853b Mon Sep 17 00:00:00 2001 From: wizguin <16276645+wizguin@users.noreply.github.com> Date: Thu, 6 Apr 2023 12:08:15 +0100 Subject: [PATCH 066/200] cardjitsu: Remove state machine --- src/engine/utils/state_machine/State.js | 19 ----------- .../utils/state_machine/StateMachine.js | 30 ----------------- src/scenes/games/card/CardJitsu.js | 15 +++------ src/scenes/games/card/states/ServeState.js | 33 ------------------- 4 files changed, 4 insertions(+), 93 deletions(-) delete mode 100644 src/engine/utils/state_machine/State.js delete mode 100644 src/engine/utils/state_machine/StateMachine.js delete mode 100644 src/scenes/games/card/states/ServeState.js diff --git a/src/engine/utils/state_machine/State.js b/src/engine/utils/state_machine/State.js deleted file mode 100644 index 6b099095..00000000 --- a/src/engine/utils/state_machine/State.js +++ /dev/null @@ -1,19 +0,0 @@ -export default class State { - - constructor() { - this.stateMachine - } - - enter() { - - } - - update() { - - } - - exit() { - - } - -} diff --git a/src/engine/utils/state_machine/StateMachine.js b/src/engine/utils/state_machine/StateMachine.js deleted file mode 100644 index 5307b6b0..00000000 --- a/src/engine/utils/state_machine/StateMachine.js +++ /dev/null @@ -1,30 +0,0 @@ -export default class StateMachine { - - constructor(states) { - this.states = states - - this.state - - for (let state of Object.values(states)) { - state.stateMachine = this - } - } - - setState(state) { - if (this.isRunningState(state)) { - return - } - - if (this.state) { - this.state.exit() - } - - this.state = this.states[state] - this.state.enter() - } - - isRunningState(state) { - return this.state === this.states[state] - } - -} diff --git a/src/scenes/games/card/CardJitsu.js b/src/scenes/games/card/CardJitsu.js index e4aff927..2374e318 100644 --- a/src/scenes/games/card/CardJitsu.js +++ b/src/scenes/games/card/CardJitsu.js @@ -7,8 +7,6 @@ import CardJitsuPlayer from "./CardJitsuPlayer"; import BattleLoader from '@engine/loaders/BattleLoader' import CardLoader from '@engine/loaders/CardLoader' import CardJitsuCard from './card/CardJitsuCard' -import StateMachine from '@engine/utils/state_machine/StateMachine' -import ServeState from './states/ServeState' /* END-USER-IMPORTS */ @@ -135,13 +133,6 @@ export default class CardJitsu extends GameScene { ease: 'Cubic' }) - // States - this.stateMachine = new StateMachine({ - 'serve': new ServeState(this) - }) - - this.stateMachine.setState('serve') - this.addListeners() this.network.send('start_game') } @@ -169,7 +160,8 @@ export default class CardJitsu extends GameScene { this.setPlayer(user, args.users.indexOf(user)) } - this.events.emit('start_game') + this.spinner.visible = false + this.playBattle('walk') } handleSendDeal(args) { @@ -222,7 +214,8 @@ export default class CardJitsu extends GameScene { onBattleComplete() { if (!this.player1.animating && !this.player2.animating) { - this.events.emit('battle_complete') + this.playBattle('ambient') + this.network.send('send_deal') } } diff --git a/src/scenes/games/card/states/ServeState.js b/src/scenes/games/card/states/ServeState.js deleted file mode 100644 index 0ff905e9..00000000 --- a/src/scenes/games/card/states/ServeState.js +++ /dev/null @@ -1,33 +0,0 @@ -import State from '@engine/utils/state_machine/State' - - -export default class InitState extends State { - - constructor(scene) { - super() - - this.scene = scene - this.network = scene.network - } - - enter() { - this.scene.events.on('start_game', this.startGame, this) - this.scene.events.on('battle_complete', this.battleComplete, this) - } - - exit() { - this.scene.events.off('start_game', this.startGame, this) - this.scene.events.off('battle_complete', this.battleComplete, this) - } - - startGame() { - this.scene.spinner.visible = false - this.scene.playBattle('walk') - } - - battleComplete() { - this.scene.playBattle('ambient') - this.network.send('send_deal') - } - -} From dcdfebf763741348a18fc56d2f4e099bf9c76cf7 Mon Sep 17 00:00:00 2001 From: wizguin <16276645+wizguin@users.noreply.github.com> Date: Thu, 6 Apr 2023 12:34:59 +0100 Subject: [PATCH 067/200] cardjitsu: Wait for deal before adding input --- src/scenes/games/card/CardJitsu.js | 8 -------- src/scenes/games/card/CardJitsuPlayer.js | 20 +++++++++++++++++--- src/scenes/games/card/card/CardJitsuCard.js | 16 ++++++++++++++++ 3 files changed, 33 insertions(+), 11 deletions(-) diff --git a/src/scenes/games/card/CardJitsu.js b/src/scenes/games/card/CardJitsu.js index 2374e318..e887f5b2 100644 --- a/src/scenes/games/card/CardJitsu.js +++ b/src/scenes/games/card/CardJitsu.js @@ -168,12 +168,6 @@ export default class CardJitsu extends GameScene { for (let card of args.cards) { this.cardLoader.loadCard(card, this.onDealCardLoad) } - - for (let card of this.myPlayer.dealtCards) { - if (card) { - card.enableInput() - } - } } handleSendOpponentDeal(args) { @@ -237,8 +231,6 @@ export default class CardJitsu extends GameScene { cardPrefab.init(this.myPlayer, 'front', card) cardPrefab.icon.setTexture(key) - - cardPrefab.enableInput() } onRevealCardLoad(key, card) { diff --git a/src/scenes/games/card/CardJitsuPlayer.js b/src/scenes/games/card/CardJitsuPlayer.js index 9b62a56c..43a1254f 100644 --- a/src/scenes/games/card/CardJitsuPlayer.js +++ b/src/scenes/games/card/CardJitsuPlayer.js @@ -63,9 +63,7 @@ export default class CardJitsuPlayer extends BaseContainer { } pickCard(card) { - for (let dealt of this.dealtCards) { - dealt.disableInput() - } + this.disableCards() let index = this.dealtCards.indexOf(card) this.dealtCards[index] = null @@ -96,6 +94,22 @@ export default class CardJitsuPlayer extends BaseContainer { this.pick = null } + enableCards() { + for (let dealt of this.dealtCards) { + if (dealt) { + dealt.enableInput() + } + } + } + + disableCards() { + for (let dealt of this.dealtCards) { + if (dealt) { + dealt.disableInput() + } + } + } + /* END-USER-CODE */ } diff --git a/src/scenes/games/card/card/CardJitsuCard.js b/src/scenes/games/card/card/CardJitsuCard.js index bc22658b..e75f9173 100644 --- a/src/scenes/games/card/card/CardJitsuCard.js +++ b/src/scenes/games/card/card/CardJitsuCard.js @@ -263,6 +263,22 @@ export default class CardJitsuCard extends BaseContainer { : pos.x - (this.spacer * empty) - this.spacer this.tweenTo(x, pos.y) + + this.tween.once('complete', this.onTweenToDealtComplete, this) + } + + onTweenToDealtComplete() { + if (this.player != this.scene.myPlayer) { + return + } + + for (let card of this.player.dealtCards) { + if (card.tween) { + return + } + } + + this.player.enableCards() } tweenToPick() { From 14b78d2595ecdf3fccfe347b33cc56ff1da9c17e Mon Sep 17 00:00:00 2001 From: wizguin <16276645+wizguin@users.noreply.github.com> Date: Thu, 6 Apr 2023 19:45:56 +0100 Subject: [PATCH 068/200] cardjitsu: Win logic --- src/scenes/games/card/CardJitsu.js | 30 ++++++++++++++++++++- src/scenes/games/card/CardJitsuBattle.js | 2 +- src/scenes/games/card/CardJitsuPlayer.js | 4 +++ src/scenes/games/card/card/CardJitsuCard.js | 16 +++++++++++ src/scenes/games/card/layout.js | 13 ++++++++- 5 files changed, 62 insertions(+), 3 deletions(-) diff --git a/src/scenes/games/card/CardJitsu.js b/src/scenes/games/card/CardJitsu.js index e887f5b2..97d2df03 100644 --- a/src/scenes/games/card/CardJitsu.js +++ b/src/scenes/games/card/CardJitsu.js @@ -133,6 +133,10 @@ export default class CardJitsu extends GameScene { ease: 'Cubic' }) + this.gameOver = false + + this.events.on('battle_complete', this.onBattleComplete, this) + this.addListeners() this.network.send('start_game') } @@ -144,6 +148,7 @@ export default class CardJitsu extends GameScene { this.network.events.on('pick_card', this.handlePickCard, this) this.network.events.on('reveal_card', this.handleRevealCard, this) this.network.events.on('judge', this.handleJudge, this) + this.network.events.on('winner', this.handleWinner, this) } removeListeners() { @@ -153,6 +158,7 @@ export default class CardJitsu extends GameScene { this.network.events.off('pick_card', this.handlePickCard, this) this.network.events.off('reveal_card', this.handleRevealCard, this) this.network.events.off('judge', this.handleJudge, this) + this.network.events.off('winner', this.handleWinner, this) } handleStartGame(args) { @@ -195,6 +201,12 @@ export default class CardJitsu extends GameScene { this.events.once('flipped', () => this.onFlipped(args.winner)) } + handleWinner(args) { + this.gameOver = true + + this.events.once('battle_complete', () => this.endGame(args.winner, args.cards)) + } + setPlayer(user, index) { let player = this.players[index] player.set(user) @@ -209,7 +221,10 @@ export default class CardJitsu extends GameScene { onBattleComplete() { if (!this.player1.animating && !this.player2.animating) { this.playBattle('ambient') - this.network.send('send_deal') + + if (!this.gameOver) { + this.network.send('send_deal') + } } } @@ -314,6 +329,19 @@ export default class CardJitsu extends GameScene { } } + endGame(winSeat, winCards) { + let winner = this.players[winSeat] + + // temp until made int on server + winCards = winCards.map(i => parseInt(i)) + + let cards = winner.findWins(winCards) + + for (let i = 0; i < cards.length; i++) { + cards[i].tweenToOver(i) + } + } + /* END-USER-CODE */ } diff --git a/src/scenes/games/card/CardJitsuBattle.js b/src/scenes/games/card/CardJitsuBattle.js index 0aeffc11..2f5c78cd 100644 --- a/src/scenes/games/card/CardJitsuBattle.js +++ b/src/scenes/games/card/CardJitsuBattle.js @@ -130,7 +130,7 @@ export default class CardJitsuBattle { onAnimationComplete() { this.animating = false - this.scene.onBattleComplete() + this.scene.events.emit('battle_complete') } setColor(color) { diff --git a/src/scenes/games/card/CardJitsuPlayer.js b/src/scenes/games/card/CardJitsuPlayer.js index 43a1254f..dc67f8b6 100644 --- a/src/scenes/games/card/CardJitsuPlayer.js +++ b/src/scenes/games/card/CardJitsuPlayer.js @@ -110,6 +110,10 @@ export default class CardJitsuPlayer extends BaseContainer { } } + findWins(find) { + return find.map(id => this.wins.find(win => win.id == id)).filter(Boolean) + } + /* END-USER-CODE */ } diff --git a/src/scenes/games/card/card/CardJitsuCard.js b/src/scenes/games/card/card/CardJitsuCard.js index e75f9173..5c5b40ce 100644 --- a/src/scenes/games/card/card/CardJitsuCard.js +++ b/src/scenes/games/card/card/CardJitsuCard.js @@ -303,6 +303,22 @@ export default class CardJitsuCard extends BaseContainer { this.tween.once('complete', this.updateDepth, this) } + tweenToOver(cardIndex) { + if (this.tween) { + this.tween.once('complete', () => this.tweenToOver(cardIndex)) + return + } + + let spacer = layout.spacer.out + + let index = this.scene.players.indexOf(this.player) + let pos = layout.pos.over[index] + + let x = pos.x + (spacer * cardIndex) + + this.tweenTo(x, pos.y) + } + tweenTo(x, y) { this.tween = this.scene.tweens.add({ targets: this, diff --git a/src/scenes/games/card/layout.js b/src/scenes/games/card/layout.js index 6923a197..cb510927 100644 --- a/src/scenes/games/card/layout.js +++ b/src/scenes/games/card/layout.js @@ -49,12 +49,23 @@ const layout = { y: 50 } } + ], + over: [ + { + x: 90, + y: 340 + }, + { + x: 1140, + y: 340 + } ] }, spacer: { dealtFront: 150, dealtBack: 70, - win: 30 + win: 30, + out: 100 }, scale: { front: 0.7, From ec0eefc800a665855c7a8f19526144cbbf42f527 Mon Sep 17 00:00:00 2001 From: wizguin <16276645+wizguin@users.noreply.github.com> Date: Thu, 6 Apr 2023 21:54:19 +0100 Subject: [PATCH 069/200] cardjitsu: Add onLastBattle --- src/scenes/games/card/CardJitsu.js | 53 ++++++++++++++---------- src/scenes/games/card/CardJitsuBattle.js | 2 +- 2 files changed, 31 insertions(+), 24 deletions(-) diff --git a/src/scenes/games/card/CardJitsu.js b/src/scenes/games/card/CardJitsu.js index 97d2df03..04fa565c 100644 --- a/src/scenes/games/card/CardJitsu.js +++ b/src/scenes/games/card/CardJitsu.js @@ -133,8 +133,6 @@ export default class CardJitsu extends GameScene { ease: 'Cubic' }) - this.gameOver = false - this.events.on('battle_complete', this.onBattleComplete, this) this.addListeners() @@ -202,9 +200,10 @@ export default class CardJitsu extends GameScene { } handleWinner(args) { - this.gameOver = true + // Remove original handler + this.events.off('battle_complete', this.onBattleComplete, this) - this.events.once('battle_complete', () => this.endGame(args.winner, args.cards)) + this.events.once('battle_complete', () => this.onLastBattle(args.winner, args.cards)) } setPlayer(user, index) { @@ -218,16 +217,18 @@ export default class CardJitsu extends GameScene { } } - onBattleComplete() { + checkBattleComplete() { if (!this.player1.animating && !this.player2.animating) { - this.playBattle('ambient') - - if (!this.gameOver) { - this.network.send('send_deal') - } + this.events.emit('battle_complete') } } + onBattleComplete() { + this.playBattle('ambient') + + this.network.send('send_deal') + } + onFlipped(winner) { if (winner == -1) { this.judgeTie() @@ -255,6 +256,25 @@ export default class CardJitsu extends GameScene { cardPrefab.icon.setTexture(key) } + onLastBattle(winSeat, winCards) { + this.playBattle('ambient') + + let winner = this.players[winSeat] + + // temp until made int on server + winCards = winCards.map(i => parseInt(i)) + + let cards = winner.findWins(winCards) + + for (let i = 0; i < cards.length; i++) { + cards[i].tweenToOver(i) + } + + this.time.delayedCall(1000, () => this.playBattle('tie')) + + // this.events.once('battle_complete', ) + } + playBattle(battle, winSeat = null) { if (winSeat == null) { this.player1.playBattle(battle) @@ -329,19 +349,6 @@ export default class CardJitsu extends GameScene { } } - endGame(winSeat, winCards) { - let winner = this.players[winSeat] - - // temp until made int on server - winCards = winCards.map(i => parseInt(i)) - - let cards = winner.findWins(winCards) - - for (let i = 0; i < cards.length; i++) { - cards[i].tweenToOver(i) - } - } - /* END-USER-CODE */ } diff --git a/src/scenes/games/card/CardJitsuBattle.js b/src/scenes/games/card/CardJitsuBattle.js index 2f5c78cd..dbdc4bd9 100644 --- a/src/scenes/games/card/CardJitsuBattle.js +++ b/src/scenes/games/card/CardJitsuBattle.js @@ -130,7 +130,7 @@ export default class CardJitsuBattle { onAnimationComplete() { this.animating = false - this.scene.events.emit('battle_complete') + this.scene.checkBattleComplete() } setColor(color) { From 46b823b38d561d81284035086e5b6f61e7eff50e Mon Sep 17 00:00:00 2001 From: wizguin <16276645+wizguin@users.noreply.github.com> Date: Thu, 6 Apr 2023 22:48:59 +0100 Subject: [PATCH 070/200] cardjitsu: Fixed focus bug --- src/scenes/games/card/CardJitsu.js | 5 +++++ src/scenes/games/card/CardJitsuPlayer.js | 10 +++++++++- 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/src/scenes/games/card/CardJitsu.js b/src/scenes/games/card/CardJitsu.js index 04fa565c..115f0050 100644 --- a/src/scenes/games/card/CardJitsu.js +++ b/src/scenes/games/card/CardJitsu.js @@ -183,6 +183,11 @@ export default class CardJitsu extends GameScene { } handlePickCard(args) { + if (this.opponent.pick) { + this.events.once('remove_pick', () => this.handlePickCard(args)) + return + } + let card = this.opponent.dealtCards[args.card] this.opponent.pickCard(card) } diff --git a/src/scenes/games/card/CardJitsuPlayer.js b/src/scenes/games/card/CardJitsuPlayer.js index dc67f8b6..d94378ed 100644 --- a/src/scenes/games/card/CardJitsuPlayer.js +++ b/src/scenes/games/card/CardJitsuPlayer.js @@ -80,7 +80,7 @@ export default class CardJitsuPlayer extends BaseContainer { this.wins.push(this.pick) this.pick.setState('thumbnail') - this.pick = null + this.removePick() } cardLose() { @@ -91,7 +91,15 @@ export default class CardJitsuPlayer extends BaseContainer { this.losses.push(this.pick) this.pick.destroy() + this.removePick() + } + + removePick() { this.pick = null + + if (this === this.scene.opponent) { + this.scene.events.emit('remove_pick') + } } enableCards() { From 880d3a9ed1ca83f1b74fa9f27d451c4e7543f331 Mon Sep 17 00:00:00 2001 From: wizguin <16276645+wizguin@users.noreply.github.com> Date: Fri, 7 Apr 2023 13:18:37 +0100 Subject: [PATCH 071/200] cardjitsu: Add clock --- src/scenes/games/card/CardJitsu.js | 7 +- src/scenes/games/card/CardJitsu.scene | 13 ++-- src/scenes/games/card/clock/CardJitsuClock.js | 41 ++++++++++++ .../games/card/clock/CardJitsuClock.scene | 66 +++++++++++++++++++ 4 files changed, 117 insertions(+), 10 deletions(-) create mode 100644 src/scenes/games/card/clock/CardJitsuClock.js create mode 100644 src/scenes/games/card/clock/CardJitsuClock.scene diff --git a/src/scenes/games/card/CardJitsu.js b/src/scenes/games/card/CardJitsu.js index 115f0050..694c198b 100644 --- a/src/scenes/games/card/CardJitsu.js +++ b/src/scenes/games/card/CardJitsu.js @@ -2,6 +2,7 @@ import GameScene from "../GameScene"; import CardJitsuPlayer from "./CardJitsuPlayer"; +import CardJitsuClock from "./clock/CardJitsuClock"; /* START-USER-IMPORTS */ import BattleLoader from '@engine/loaders/BattleLoader' @@ -19,7 +20,7 @@ export default class CardJitsu extends GameScene { this.player2; /** @type {CardJitsuPlayer} */ this.player1; - /** @type {Phaser.GameObjects.Image} */ + /** @type {CardJitsuClock} */ this.clock; /** @type {Phaser.GameObjects.Image} */ this.spinner; @@ -73,8 +74,8 @@ export default class CardJitsu extends GameScene { frame.setOrigin(0.5003261578604045, 0.5005192107995846); // clock - const clock = this.add.image(760, 676, "cardjitsu", "clock/clock0001"); - clock.visible = false; + const clock = new CardJitsuClock(this, 760, 676); + this.add.existing(clock); // spinner const spinner = this.add.image(760, 482, "cardjitsu", "spinner"); diff --git a/src/scenes/games/card/CardJitsu.scene b/src/scenes/games/card/CardJitsu.scene index 2dac20bd..c0da3f73 100644 --- a/src/scenes/games/card/CardJitsu.scene +++ b/src/scenes/games/card/CardJitsu.scene @@ -121,18 +121,17 @@ "originY": 0.5005192107995846 }, { - "type": "Image", + "prefabId": "ebed3022-bcec-4b40-b9a2-de88069e87b6", "id": "5ae193e4-747e-4c9e-a9b1-33e45c465696", + "unlock": [ + "x", + "y" + ], "label": "clock", "scope": "CLASS", "components": [], - "texture": { - "key": "cardjitsu", - "frame": "clock/clock0001" - }, "x": 760, - "y": 676, - "visible": false + "y": 676 }, { "type": "Image", diff --git a/src/scenes/games/card/clock/CardJitsuClock.js b/src/scenes/games/card/clock/CardJitsuClock.js new file mode 100644 index 00000000..d426c794 --- /dev/null +++ b/src/scenes/games/card/clock/CardJitsuClock.js @@ -0,0 +1,41 @@ +/* START OF COMPILED CODE */ + +import BaseContainer from "../../../base/BaseContainer"; +/* START-USER-IMPORTS */ +/* END-USER-IMPORTS */ + +export default class CardJitsuClock extends BaseContainer { + + constructor(scene, x, y) { + super(scene, x ?? 760, y ?? 480); + + /** @type {Phaser.GameObjects.Image} */ + this.clock; + /** @type {Phaser.GameObjects.Text} */ + this.time; + + + // clock + const clock = scene.add.image(0, 0, "cardjitsu", "clock/clock0001"); + this.add(clock); + + // time + const time = scene.add.text(0, 0, "", {}); + time.setOrigin(0.5, 0.5); + time.text = "20"; + time.setStyle({ "align": "center", "color": "#000", "fixedWidth":200,"fontFamily": "CCComiccrazy", "fontSize": "44px", "strokeThickness":5,"shadow.color": "#fff", "shadow.blur":5,"shadow.stroke":true,"shadow.fill":true}); + this.add(time); + + this.clock = clock; + this.time = time; + + /* START-USER-CTR-CODE */ + /* END-USER-CTR-CODE */ + } + + + /* START-USER-CODE */ + /* END-USER-CODE */ +} + +/* END OF COMPILED CODE */ diff --git a/src/scenes/games/card/clock/CardJitsuClock.scene b/src/scenes/games/card/clock/CardJitsuClock.scene new file mode 100644 index 00000000..2a080983 --- /dev/null +++ b/src/scenes/games/card/clock/CardJitsuClock.scene @@ -0,0 +1,66 @@ +{ + "id": "ebed3022-bcec-4b40-b9a2-de88069e87b6", + "sceneType": "PREFAB", + "settings": { + "compilerInsertSpaces": true, + "javaScriptInitFieldsInConstructor": true, + "exportClass": true, + "autoImport": true, + "superClassName": "BaseContainer", + "preloadMethodName": "", + "preloadPackFiles": [], + "createMethodName": "", + "borderWidth": 1520, + "borderHeight": 960 + }, + "displayList": [ + { + "type": "Container", + "id": "98f77107-b6ed-43ab-afe7-b671b634fc43", + "label": "container_1", + "components": [], + "x": 760, + "y": 480, + "list": [ + { + "type": "Image", + "id": "38218f7f-cf95-4b0f-b999-1093dd226621", + "label": "clock", + "scope": "CLASS", + "components": [], + "texture": { + "key": "cardjitsu", + "frame": "clock/clock0001" + } + }, + { + "type": "Text", + "id": "6cb3e767-0b54-409d-8cd2-d211c434661a", + "label": "time", + "scope": "CLASS", + "components": [], + "originX": 0.5, + "originY": 0.5, + "text": "20", + "fixedWidth": 200, + "align": "center", + "fontFamily": "CCComiccrazy", + "fontSize": "44px", + "color": "#000", + "strokeThickness": 5, + "shadow.stroke": true, + "shadow.fill": true, + "shadow.color": "#fff", + "shadow.blur": 5 + } + ] + } + ], + "plainObjects": [], + "meta": { + "app": "Phaser Editor 2D - Scene Editor", + "url": "https://phasereditor2d.com", + "contentType": "phasereditor2d.core.scene.SceneContentType", + "version": 3 + } +} \ No newline at end of file From 33a1928ccd7f668dfa84eb6b507c3ef46880d60a Mon Sep 17 00:00:00 2001 From: wizguin <16276645+wizguin@users.noreply.github.com> Date: Fri, 7 Apr 2023 13:49:22 +0100 Subject: [PATCH 072/200] cardjitsu: Clock timer functions --- src/scenes/games/card/CardJitsu.js | 1 + src/scenes/games/card/CardJitsu.scene | 8 ++- src/scenes/games/card/clock/CardJitsuClock.js | 49 ++++++++++++++++++- .../games/card/clock/CardJitsuClock.scene | 2 +- 4 files changed, 56 insertions(+), 4 deletions(-) diff --git a/src/scenes/games/card/CardJitsu.js b/src/scenes/games/card/CardJitsu.js index 694c198b..821dfb5c 100644 --- a/src/scenes/games/card/CardJitsu.js +++ b/src/scenes/games/card/CardJitsu.js @@ -76,6 +76,7 @@ export default class CardJitsu extends GameScene { // clock const clock = new CardJitsuClock(this, 760, 676); this.add.existing(clock); + clock.visible = false; // spinner const spinner = this.add.image(760, 482, "cardjitsu", "spinner"); diff --git a/src/scenes/games/card/CardJitsu.scene b/src/scenes/games/card/CardJitsu.scene index c0da3f73..281e6155 100644 --- a/src/scenes/games/card/CardJitsu.scene +++ b/src/scenes/games/card/CardJitsu.scene @@ -125,13 +125,17 @@ "id": "5ae193e4-747e-4c9e-a9b1-33e45c465696", "unlock": [ "x", - "y" + "y", + "visible" ], "label": "clock", "scope": "CLASS", "components": [], "x": 760, - "y": 676 + "y": 676, + "visible": false, + "nestedPrefabs": [], + "list": [] }, { "type": "Image", diff --git a/src/scenes/games/card/clock/CardJitsuClock.js b/src/scenes/games/card/clock/CardJitsuClock.js index d426c794..4ef32821 100644 --- a/src/scenes/games/card/clock/CardJitsuClock.js +++ b/src/scenes/games/card/clock/CardJitsuClock.js @@ -16,7 +16,7 @@ export default class CardJitsuClock extends BaseContainer { // clock - const clock = scene.add.image(0, 0, "cardjitsu", "clock/clock0001"); + const clock = scene.add.image(0, 0, "cardjitsu", "clock/20"); this.add(clock); // time @@ -30,11 +30,58 @@ export default class CardJitsuClock extends BaseContainer { this.time = time; /* START-USER-CTR-CODE */ + + this.timerConfig = { + delay: 1000, + callback: this.onTimeEvent, + callbackScope: this, + repeat: 20, + startAt: 1000, + paused: true + } + + this.timer = scene.time.addEvent(this.timerConfig) + + // temp + window.s = () => this.start() + window.st = () => this.stop() + /* END-USER-CTR-CODE */ } /* START-USER-CODE */ + + start() { + this.show() + + this.timer.paused = false + } + + stop() { + this.close() + + this.timer.reset(this.timerConfig) + this.updateClock() + } + + onTimeEvent() { + console.log(this.timer.repeatCount) + + if (this.timer.repeatCount == 0) { + this.stop() + return + } + + this.updateClock() + } + + updateClock() { + this.time.text = this.timer.repeatCount + + this.clock.setFrame(`clock/${this.timer.repeatCount}`) + } + /* END-USER-CODE */ } diff --git a/src/scenes/games/card/clock/CardJitsuClock.scene b/src/scenes/games/card/clock/CardJitsuClock.scene index 2a080983..d8a2d2fb 100644 --- a/src/scenes/games/card/clock/CardJitsuClock.scene +++ b/src/scenes/games/card/clock/CardJitsuClock.scene @@ -30,7 +30,7 @@ "components": [], "texture": { "key": "cardjitsu", - "frame": "clock/clock0001" + "frame": "clock/20" } }, { From 7ea40accba1588a826bdc4f2413b87f9717adfca Mon Sep 17 00:00:00 2001 From: wizguin <16276645+wizguin@users.noreply.github.com> Date: Fri, 7 Apr 2023 16:56:05 +0100 Subject: [PATCH 073/200] cardjitsu: Clock functionality --- src/scenes/games/card/CardJitsu.js | 14 ++++++++++++++ src/scenes/games/card/card/CardJitsuCard.js | 2 +- src/scenes/games/card/clock/CardJitsuClock.js | 9 ++++++--- 3 files changed, 21 insertions(+), 4 deletions(-) diff --git a/src/scenes/games/card/CardJitsu.js b/src/scenes/games/card/CardJitsu.js index 821dfb5c..07fa0bea 100644 --- a/src/scenes/games/card/CardJitsu.js +++ b/src/scenes/games/card/CardJitsu.js @@ -308,9 +308,23 @@ export default class CardJitsu extends GameScene { return card } + allCardsDealt() { + this.myPlayer.enableCards() + + this.clock.start() + } + + timeUp() { + let random = Phaser.Math.RND.pick(this.myPlayer.dealtCards) + + this.pickCard(random) + } + pickCard(card) { this.myPlayer.pickCard(card) this.network.send('pick_card', { card: card.id }) + + this.clock.stop() } judge(winner, winCard) { diff --git a/src/scenes/games/card/card/CardJitsuCard.js b/src/scenes/games/card/card/CardJitsuCard.js index 5c5b40ce..5ae8d83c 100644 --- a/src/scenes/games/card/card/CardJitsuCard.js +++ b/src/scenes/games/card/card/CardJitsuCard.js @@ -278,7 +278,7 @@ export default class CardJitsuCard extends BaseContainer { } } - this.player.enableCards() + this.scene.allCardsDealt() } tweenToPick() { diff --git a/src/scenes/games/card/clock/CardJitsuClock.js b/src/scenes/games/card/clock/CardJitsuClock.js index 4ef32821..4c1e1124 100644 --- a/src/scenes/games/card/clock/CardJitsuClock.js +++ b/src/scenes/games/card/clock/CardJitsuClock.js @@ -66,16 +66,19 @@ export default class CardJitsuClock extends BaseContainer { } onTimeEvent() { - console.log(this.timer.repeatCount) - if (this.timer.repeatCount == 0) { - this.stop() + this.timeUp() return } this.updateClock() } + timeUp() { + this.stop() + this.scene.timeUp() + } + updateClock() { this.time.text = this.timer.repeatCount From 299e8aefed393696afe998110e6b4683951a7560 Mon Sep 17 00:00:00 2001 From: wizguin <16276645+wizguin@users.noreply.github.com> Date: Fri, 7 Apr 2023 21:00:54 +0100 Subject: [PATCH 074/200] cardjitsu: Close button --- src/scenes/games/card/CardJitsu.js | 7 ++++++- src/scenes/games/card/CardJitsu.scene | 7 +++++-- 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/src/scenes/games/card/CardJitsu.js b/src/scenes/games/card/CardJitsu.js index 07fa0bea..2edc0bbc 100644 --- a/src/scenes/games/card/CardJitsu.js +++ b/src/scenes/games/card/CardJitsu.js @@ -2,6 +2,7 @@ import GameScene from "../GameScene"; import CardJitsuPlayer from "./CardJitsuPlayer"; +import Button from "../../components/Button"; import CardJitsuClock from "./clock/CardJitsuClock"; /* START-USER-IMPORTS */ @@ -59,7 +60,7 @@ export default class CardJitsu extends GameScene { player1.scaleY = 1; // close - this.add.image(1464, 57, "cardjitsu", "close0001"); + const close = this.add.image(1464, 57, "cardjitsu", "close"); // help const help = this.add.image(754, 26, "cardjitsu", "help"); @@ -99,6 +100,10 @@ export default class CardJitsu extends GameScene { // player1 (prefab fields) player1.username = username1; + // close (components) + const closeButton = new Button(close); + closeButton.spriteName = "close"; + this.player2 = player2; this.player1 = player1; this.clock = clock; diff --git a/src/scenes/games/card/CardJitsu.scene b/src/scenes/games/card/CardJitsu.scene index 281e6155..0e478a12 100644 --- a/src/scenes/games/card/CardJitsu.scene +++ b/src/scenes/games/card/CardJitsu.scene @@ -71,10 +71,13 @@ "type": "Image", "id": "7a0d7dac-7b59-4a80-bc52-f98bbe8639bd", "label": "close", - "components": [], + "components": [ + "Button" + ], + "Button.spriteName": "close", "texture": { "key": "cardjitsu", - "frame": "close0001" + "frame": "close" }, "x": 1464, "y": 57 From 44aee3cfd55190fc14d4c18db339c0574595b505 Mon Sep 17 00:00:00 2001 From: wizguin <16276645+wizguin@users.noreply.github.com> Date: Sat, 8 Apr 2023 12:52:37 +0100 Subject: [PATCH 075/200] cardjitsu: Add player seat property --- src/scenes/games/card/CardJitsu.js | 18 ++++++------------ src/scenes/games/card/CardJitsu.scene | 17 +++++++++++++---- src/scenes/games/card/CardJitsuPlayer.js | 18 ++++++++++++------ src/scenes/games/card/CardJitsuPlayer.scene | 15 +-------------- src/scenes/games/card/card/CardJitsuCard.js | 15 ++++++--------- 5 files changed, 38 insertions(+), 45 deletions(-) diff --git a/src/scenes/games/card/CardJitsu.js b/src/scenes/games/card/CardJitsu.js index 2edc0bbc..25bfa7bf 100644 --- a/src/scenes/games/card/CardJitsu.js +++ b/src/scenes/games/card/CardJitsu.js @@ -31,6 +31,8 @@ export default class CardJitsu extends GameScene { this.username1; /** @type {CardJitsuPlayer[]} */ this.players; + /** @type {Phaser.GameObjects.Text[]} */ + this.usernames; /* START-USER-CTR-CODE */ @@ -93,12 +95,7 @@ export default class CardJitsu extends GameScene { // lists const players = [player1, player2]; - - // player2 (prefab fields) - player2.username = username2; - - // player1 (prefab fields) - player1.username = username1; + const usernames = [username1, username2]; // close (components) const closeButton = new Button(close); @@ -111,6 +108,7 @@ export default class CardJitsu extends GameScene { this.username2 = username2; this.username1 = username1; this.players = players; + this.usernames = usernames; this.events.emit("scene-awake"); } @@ -295,9 +293,7 @@ export default class CardJitsu extends GameScene { return } - let mySeat = this.players.indexOf(this.myPlayer) - - if (winSeat == mySeat) { + if (winSeat == this.myPlayer.seat) { this.myPlayer.playBattle(`${battle}_attack`) this.opponent.playBattle(`${battle}_react`) } else { @@ -333,9 +329,7 @@ export default class CardJitsu extends GameScene { } judge(winner, winCard) { - let mySeat = this.players.indexOf(this.myPlayer) - - if (winner == mySeat) { + if (winner == this.myPlayer.seat) { this.judgeWin(winner, winCard) } else { this.judgeLoss(winner, winCard) diff --git a/src/scenes/games/card/CardJitsu.scene b/src/scenes/games/card/CardJitsu.scene index 0e478a12..cce26071 100644 --- a/src/scenes/games/card/CardJitsu.scene +++ b/src/scenes/games/card/CardJitsu.scene @@ -35,11 +35,11 @@ "unlock": [ "x", "y", - "username" + "username", + "usernameText" ], "label": "player2", "scope": "CLASS", - "username": "username2", "components": [], "x": 760, "y": 315, @@ -54,11 +54,11 @@ "y", "scaleX", "scaleY", - "username" + "username", + "usernameText" ], "label": "player1", "scope": "CLASS", - "username": "username1", "components": [], "x": 760, "y": 315, @@ -75,6 +75,7 @@ "Button" ], "Button.spriteName": "close", + "Button.callback": "() => this.onCloseClick()", "texture": { "key": "cardjitsu", "frame": "close" @@ -199,6 +200,14 @@ "6fd982c9-843f-4778-899e-de82fbcde04d", "3f476cde-316b-42f5-ad18-da70ada1474d" ] + }, + { + "id": "612a85bc-48d2-4a9f-a377-75a400da8bca", + "label": "usernames", + "objectIds": [ + "c54766f1-4ebc-4dc0-b3a4-b119c06d9faf", + "a3698971-d213-46ce-b701-03bf7dd7a7ed" + ] } ] } \ No newline at end of file diff --git a/src/scenes/games/card/CardJitsuPlayer.js b/src/scenes/games/card/CardJitsuPlayer.js index d94378ed..a423748c 100644 --- a/src/scenes/games/card/CardJitsuPlayer.js +++ b/src/scenes/games/card/CardJitsuPlayer.js @@ -12,12 +12,11 @@ export default class CardJitsuPlayer extends BaseContainer { constructor(scene, x, y) { super(scene, x ?? 760, y ?? 480); - /** @type {Phaser.GameObjects.Text} */ - this.username; - - /* START-USER-CTR-CODE */ + this.seat + this.username + this.battle = new CardJitsuBattle(this) this.color @@ -30,19 +29,26 @@ export default class CardJitsuPlayer extends BaseContainer { /* END-USER-CTR-CODE */ } - /* START-USER-CODE */ get animating() { return this.battle.animating } + get usernameText() { + return this.scene.usernames[this.seat] + } + getElementWins(element) { return this.wins.filter(win => win.elementId == element) } set(user) { - this.username.text = user.username.toUpperCase() + this.seat = this.scene.players.indexOf(this) + + this.username = user.username + this.usernameText.text = user.username.toUpperCase() + this.color = this.world.getColor(user.color) } diff --git a/src/scenes/games/card/CardJitsuPlayer.scene b/src/scenes/games/card/CardJitsuPlayer.scene index b4641083..0f3c8429 100644 --- a/src/scenes/games/card/CardJitsuPlayer.scene +++ b/src/scenes/games/card/CardJitsuPlayer.scene @@ -30,18 +30,5 @@ "url": "https://phasereditor2d.com", "contentType": "phasereditor2d.core.scene.SceneContentType", "version": 3 - }, - "prefabProperties": [ - { - "name": "username", - "label": "username", - "tooltip": "username", - "defValue": "", - "customDefinition": false, - "type": { - "id": "object-var", - "expressionType": "Phaser.GameObjects.Text" - } - } - ] + } } \ No newline at end of file diff --git a/src/scenes/games/card/card/CardJitsuCard.js b/src/scenes/games/card/card/CardJitsuCard.js index 5ae8d83c..d20e2af1 100644 --- a/src/scenes/games/card/card/CardJitsuCard.js +++ b/src/scenes/games/card/card/CardJitsuCard.js @@ -254,11 +254,11 @@ export default class CardJitsuCard extends BaseContainer { } tweenToDealt(empty) { - let index = this.scene.players.indexOf(this.player) + let seat = this.player.seat - let pos = layout.pos.dealts[index] + let pos = layout.pos.dealts[seat] - let x = (index === 0) + let x = (seat === 0) ? pos.x + (this.spacer * empty) : pos.x - (this.spacer * empty) - this.spacer @@ -284,15 +284,13 @@ export default class CardJitsuCard extends BaseContainer { tweenToPick() { this.scale = layout.scale.pick - let index = this.scene.players.indexOf(this.player) - let pos = layout.pos.picks[index] + let pos = layout.pos.picks[this.player.seat] this.tweenTo(pos.x, pos.y) } tweenToWin() { - let index = this.scene.players.indexOf(this.player) - let pos = layout.pos.wins[index][this.elementId] + let pos = layout.pos.wins[this.player.seat][this.elementId] let wins = this.player.getElementWins(this.elementId).length @@ -311,8 +309,7 @@ export default class CardJitsuCard extends BaseContainer { let spacer = layout.spacer.out - let index = this.scene.players.indexOf(this.player) - let pos = layout.pos.over[index] + let pos = layout.pos.over[this.player.seat] let x = pos.x + (spacer * cardIndex) From de691d65be8b4a041d6289ca78b45ca56243fa2e Mon Sep 17 00:00:00 2001 From: wizguin <16276645+wizguin@users.noreply.github.com> Date: Sat, 8 Apr 2023 13:21:59 +0100 Subject: [PATCH 076/200] cardjitsu: Game over/close prompts --- src/scenes/games/card/CardJitsu.js | 53 ++++++++++++++++++++++++++++-- 1 file changed, 51 insertions(+), 2 deletions(-) diff --git a/src/scenes/games/card/CardJitsu.js b/src/scenes/games/card/CardJitsu.js index 25bfa7bf..6023ed55 100644 --- a/src/scenes/games/card/CardJitsu.js +++ b/src/scenes/games/card/CardJitsu.js @@ -100,6 +100,7 @@ export default class CardJitsu extends GameScene { // close (components) const closeButton = new Button(close); closeButton.spriteName = "close"; + closeButton.callback = () => this.onCloseClick(); this.player2 = player2; this.player1 = player1; @@ -140,6 +141,8 @@ export default class CardJitsu extends GameScene { this.events.on('battle_complete', this.onBattleComplete, this) + this.started = false + this.addListeners() this.network.send('start_game') } @@ -171,6 +174,8 @@ export default class CardJitsu extends GameScene { this.spinner.visible = false this.playBattle('walk') + + this.started = true } handleSendDeal(args) { @@ -280,9 +285,16 @@ export default class CardJitsu extends GameScene { cards[i].tweenToOver(i) } - this.time.delayedCall(1000, () => this.playBattle('tie')) + this.time.delayedCall(1000, () => this.playGameOver(winSeat)) + } - // this.events.once('battle_complete', ) + onCloseClick() { + if (!this.started) { + this.sendLeaveGame() + return + } + + this.showCloseGamePrompt() } playBattle(battle, winSeat = null) { @@ -369,6 +381,43 @@ export default class CardJitsu extends GameScene { } } + playGameOver(winSeat) { + this.playBattle('tie') + + let callback = () => this.time.delayedCall(500, () => this.showGameOverPrompt(winSeat)) + + this.events.once('battle_complete', callback) + } + + sendLeaveGame() { + this.network.send('leave_game') + this.leaveGame() + } + + leaveGame() { + this.removeListeners() + + this.world.client.sendJoinLastRoom() + } + + showCloseGamePrompt() { + this.interface.prompt.showWindow(this.getString('quit_game_prompt'), 'dual', () => { + this.sendLeaveGame() + + this.interface.prompt.window.visible = false + }) + } + + showGameOverPrompt(winSeat) { + let username = this.players[winSeat].username + + this.interface.prompt.showWindow(this.getFormatString('wins', username), 'single', () => { + this.sendLeaveGame() + + this.interface.prompt.window.visible = false + }) + } + /* END-USER-CODE */ } From d0d1f8a9b6b50087f6a1b1570167c1ba01a9cb02 Mon Sep 17 00:00:00 2001 From: wizguin <16276645+wizguin@users.noreply.github.com> Date: Sat, 8 Apr 2023 16:35:35 +0100 Subject: [PATCH 077/200] cardjitsu: Handle leave game --- src/scenes/games/card/CardJitsu.js | 34 ++++++++++++++++++++---------- 1 file changed, 23 insertions(+), 11 deletions(-) diff --git a/src/scenes/games/card/CardJitsu.js b/src/scenes/games/card/CardJitsu.js index 6023ed55..5d47dca5 100644 --- a/src/scenes/games/card/CardJitsu.js +++ b/src/scenes/games/card/CardJitsu.js @@ -155,6 +155,7 @@ export default class CardJitsu extends GameScene { this.network.events.on('reveal_card', this.handleRevealCard, this) this.network.events.on('judge', this.handleJudge, this) this.network.events.on('winner', this.handleWinner, this) + this.network.events.on('close_game', this.handleCloseGame, this) } removeListeners() { @@ -165,6 +166,7 @@ export default class CardJitsu extends GameScene { this.network.events.off('reveal_card', this.handleRevealCard, this) this.network.events.off('judge', this.handleJudge, this) this.network.events.off('winner', this.handleWinner, this) + this.network.events.off('close_game', this.handleCloseGame, this) } handleStartGame(args) { @@ -221,6 +223,14 @@ export default class CardJitsu extends GameScene { this.events.once('battle_complete', () => this.onLastBattle(args.winner, args.cards)) } + handleCloseGame(args) { + this.interface.prompt.showWindow(this.getFormatString('player_quit_prompt', args.username)) + + // remove this delay when BUG with 2 players joining the same room at exactly the same time is fixed + // currently add_player breaks because the previous room hasn't shut down yet + this.time.delayedCall(500, () => this.sendLeaveGame()) + } + setPlayer(user, index) { let player = this.players[index] player.set(user) @@ -389,17 +399,6 @@ export default class CardJitsu extends GameScene { this.events.once('battle_complete', callback) } - sendLeaveGame() { - this.network.send('leave_game') - this.leaveGame() - } - - leaveGame() { - this.removeListeners() - - this.world.client.sendJoinLastRoom() - } - showCloseGamePrompt() { this.interface.prompt.showWindow(this.getString('quit_game_prompt'), 'dual', () => { this.sendLeaveGame() @@ -418,6 +417,19 @@ export default class CardJitsu extends GameScene { }) } + sendLeaveGame() { + this.network.send('leave_game') + this.leaveGame() + } + + leaveGame() { + this.removeListeners() + + this.events.off('battle_complete', this.onBattleComplete, this) + + this.world.client.sendJoinLastRoom() + } + /* END-USER-CODE */ } From 9f8d7266794792bba05f063f19fb7453e74a91db Mon Sep 17 00:00:00 2001 From: wizguin <16276645+wizguin@users.noreply.github.com> Date: Sat, 8 Apr 2023 22:49:47 +0100 Subject: [PATCH 078/200] cardjitsu: Bug fix remove events --- src/scenes/games/card/CardJitsu.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/scenes/games/card/CardJitsu.js b/src/scenes/games/card/CardJitsu.js index 5d47dca5..0a23d606 100644 --- a/src/scenes/games/card/CardJitsu.js +++ b/src/scenes/games/card/CardJitsu.js @@ -425,7 +425,10 @@ export default class CardJitsu extends GameScene { leaveGame() { this.removeListeners() - this.events.off('battle_complete', this.onBattleComplete, this) + // destroying room scene would remove need to remove these events + this.events.off('battle_complete') + this.events.off('flipped') + this.events.off('remove_pick') this.world.client.sendJoinLastRoom() } From 2d80335df7cf45560a0a1b1634721574ace3ca48 Mon Sep 17 00:00:00 2001 From: wizguin <16276645+wizguin@users.noreply.github.com> Date: Sun, 9 Apr 2023 00:39:49 +0100 Subject: [PATCH 079/200] cardjitsu: Set belt color from rank --- src/scenes/games/card/CardJitsuBattle.js | 17 ++++++++++++++++- src/scenes/games/card/CardJitsuPlayer.js | 8 ++++++-- 2 files changed, 22 insertions(+), 3 deletions(-) diff --git a/src/scenes/games/card/CardJitsuBattle.js b/src/scenes/games/card/CardJitsuBattle.js index dbdc4bd9..a600e378 100644 --- a/src/scenes/games/card/CardJitsuBattle.js +++ b/src/scenes/games/card/CardJitsuBattle.js @@ -9,6 +9,9 @@ export default class CardJitsuBattle { this.list = {} this.animating = false + + // can be moved somewhere else + this.beltColors = [null, 16777215, 16776960, 16737792, 3394560, 13260, 13369344, 6684927, 6697728, 4473924, 4473924] } get body() { @@ -147,12 +150,24 @@ export default class CardJitsuBattle { } } - setBeltColor(color) { + setBelt(rank) { + if (rank < 1) { + this.hideBelt() + return + } + + let color = this.beltColors[rank] + if (this.belt) { this.belt.tint = color } } + hideBelt() { + this.belt.visible = false + this.beltLine.visible = false + } + clear() { for (let child in this.list) { this.list[child].destroy() diff --git a/src/scenes/games/card/CardJitsuPlayer.js b/src/scenes/games/card/CardJitsuPlayer.js index a423748c..7171df11 100644 --- a/src/scenes/games/card/CardJitsuPlayer.js +++ b/src/scenes/games/card/CardJitsuPlayer.js @@ -16,6 +16,7 @@ export default class CardJitsuPlayer extends BaseContainer { this.seat this.username + this.rank this.battle = new CardJitsuBattle(this) this.color @@ -49,6 +50,8 @@ export default class CardJitsuPlayer extends BaseContainer { this.username = user.username this.usernameText.text = user.username.toUpperCase() + this.rank = user.ninjaRank + this.color = this.world.getColor(user.color) } @@ -56,8 +59,8 @@ export default class CardJitsuPlayer extends BaseContainer { this.battle.setColor(color) } - setBeltColor(color) { - this.battle.setBeltColor(color) + setBelt(rank) { + this.battle.setBelt(rank) } playBattle(battle) { @@ -66,6 +69,7 @@ export default class CardJitsuPlayer extends BaseContainer { this.battle.sensei.visible = false this.setColor(this.color) + this.setBelt(this.rank) } pickCard(card) { From 979f26975a5ea57fb1e71583e3ae324a8d4234f6 Mon Sep 17 00:00:00 2001 From: wizguin <16276645+wizguin@users.noreply.github.com> Date: Mon, 10 Apr 2023 14:32:52 +0100 Subject: [PATCH 080/200] cardjitsu: Start sensei widget --- src/data/widgets.js | 3 +- src/scenes/games/sensei/Sensei.js | 42 +++++++++++++ src/scenes/games/sensei/Sensei.scene | 62 +++++++++++++++++++ src/scenes/games/sensei/SenseiSprite.js | 35 +++++++++++ src/scenes/games/sensei/SenseiSprite.scene | 70 ++++++++++++++++++++++ 5 files changed, 211 insertions(+), 1 deletion(-) create mode 100644 src/scenes/games/sensei/Sensei.js create mode 100644 src/scenes/games/sensei/Sensei.scene create mode 100644 src/scenes/games/sensei/SenseiSprite.js create mode 100644 src/scenes/games/sensei/SenseiSprite.scene diff --git a/src/data/widgets.js b/src/data/widgets.js index a920523f..05122a29 100644 --- a/src/data/widgets.js +++ b/src/data/widgets.js @@ -5,7 +5,8 @@ const widgets = { 'FindFour': require('@scenes/games/four/FindFour'), 'Mancala': require('@scenes/games/mancala/Mancala'), - 'Map': require('@scenes/interface/game/map/Map') + 'Map': require('@scenes/interface/game/map/Map'), + 'Sensei': require('@scenes/games/sensei/Sensei') } export default widgets diff --git a/src/scenes/games/sensei/Sensei.js b/src/scenes/games/sensei/Sensei.js new file mode 100644 index 00000000..ffad9a1f --- /dev/null +++ b/src/scenes/games/sensei/Sensei.js @@ -0,0 +1,42 @@ +export const preload = { + key: 'sensei-pack', + url: 'assets/media/games/sensei/sensei-pack.json', + loadString: ['loading', 'sensei'] +} + +/* START OF COMPILED CODE */ + +import BaseContainer from "../../base/BaseContainer"; +import SenseiSprite from "./SenseiSprite"; +/* START-USER-IMPORTS */ +/* END-USER-IMPORTS */ + +export default class Sensei extends BaseContainer { + + constructor(scene, x, y) { + super(scene, x ?? 409, y ?? 350); + + /** @type {SenseiSprite} */ + this.sensei; + + + // bg + const bg = scene.add.image(189, 212, "sensei", "bg"); + this.add(bg); + + // sensei + const sensei = new SenseiSprite(scene, -189, 11); + this.add(sensei); + + this.sensei = sensei; + + /* START-USER-CTR-CODE */ + /* END-USER-CTR-CODE */ + } + + + /* START-USER-CODE */ + /* END-USER-CODE */ +} + +/* END OF COMPILED CODE */ diff --git a/src/scenes/games/sensei/Sensei.scene b/src/scenes/games/sensei/Sensei.scene new file mode 100644 index 00000000..282c1526 --- /dev/null +++ b/src/scenes/games/sensei/Sensei.scene @@ -0,0 +1,62 @@ +{ + "id": "fbf6af33-9518-47c9-b5a9-fd3beb3a5292", + "sceneType": "PREFAB", + "settings": { + "compilerInsertSpaces": true, + "javaScriptInitFieldsInConstructor": true, + "exportClass": true, + "autoImport": true, + "superClassName": "BaseContainer", + "preloadMethodName": "", + "preloadPackFiles": [], + "createMethodName": "", + "borderWidth": 1520, + "borderHeight": 960 + }, + "displayList": [ + { + "type": "Container", + "id": "6c8b4abc-527b-4fb7-86e5-ce92b00f7ca6", + "label": "container_1", + "components": [], + "x": 409, + "y": 350, + "list": [ + { + "type": "Image", + "id": "06e66bb6-5a49-4833-8a26-681a8126ce3b", + "label": "bg", + "components": [], + "texture": { + "key": "sensei", + "frame": "bg" + }, + "x": 189, + "y": 212 + }, + { + "prefabId": "05d04137-c915-4f19-ba6c-2d937cd558d7", + "id": "e7df3b1d-4174-48f4-a459-8ee32d5c0805", + "unlock": [ + "x", + "y" + ], + "label": "sensei", + "scope": "CLASS", + "components": [], + "x": -189, + "y": 11, + "nestedPrefabs": [], + "list": [] + } + ] + } + ], + "plainObjects": [], + "meta": { + "app": "Phaser Editor 2D - Scene Editor", + "url": "https://phasereditor2d.com", + "contentType": "phasereditor2d.core.scene.SceneContentType", + "version": 3 + } +} \ No newline at end of file diff --git a/src/scenes/games/sensei/SenseiSprite.js b/src/scenes/games/sensei/SenseiSprite.js new file mode 100644 index 00000000..1bd66035 --- /dev/null +++ b/src/scenes/games/sensei/SenseiSprite.js @@ -0,0 +1,35 @@ +/* START OF COMPILED CODE */ + +import BaseContainer from "../../base/BaseContainer"; +/* START-USER-IMPORTS */ +/* END-USER-IMPORTS */ + +export default class SenseiSprite extends BaseContainer { + + constructor(scene, x, y) { + super(scene, x ?? 0, y ?? 0); + + // base + const base = scene.add.image(0, 0, "sensei", "sensei/talk/base/base"); + base.setOrigin(0.5, 0.5009140767824497); + this.add(base); + + // beak + const beak = scene.add.image(39, -142, "sensei", "sensei/talk/beak/beak0001"); + beak.setOrigin(0.5, 0.5037593984962406); + this.add(beak); + + // eyebrows + const eyebrows = scene.add.image(-6, -179, "sensei", "sensei/talk/eyebrows/eyebrows0001"); + eyebrows.setOrigin(0.5, 0.5027624309392266); + this.add(eyebrows); + + /* START-USER-CTR-CODE */ + /* END-USER-CTR-CODE */ + } + + /* START-USER-CODE */ + /* END-USER-CODE */ +} + +/* END OF COMPILED CODE */ diff --git a/src/scenes/games/sensei/SenseiSprite.scene b/src/scenes/games/sensei/SenseiSprite.scene new file mode 100644 index 00000000..b183b0b3 --- /dev/null +++ b/src/scenes/games/sensei/SenseiSprite.scene @@ -0,0 +1,70 @@ +{ + "id": "05d04137-c915-4f19-ba6c-2d937cd558d7", + "sceneType": "PREFAB", + "settings": { + "compilerInsertSpaces": true, + "javaScriptInitFieldsInConstructor": true, + "exportClass": true, + "autoImport": true, + "superClassName": "BaseContainer", + "preloadMethodName": "", + "preloadPackFiles": [], + "createMethodName": "", + "borderWidth": 1520, + "borderHeight": 960 + }, + "displayList": [ + { + "type": "Container", + "id": "cd072e2a-a2e4-46a5-8808-9f05596ea6bf", + "label": "container_2", + "components": [], + "list": [ + { + "type": "Image", + "id": "44f8a28d-0709-4e0a-86f5-14c40b4cc924", + "label": "base", + "components": [], + "texture": { + "key": "sensei", + "frame": "sensei/talk/base/base" + }, + "originY": 0.5009140767824497 + }, + { + "type": "Image", + "id": "97d1b382-3f13-4efc-a14a-462d81eff120", + "label": "beak", + "components": [], + "texture": { + "key": "sensei", + "frame": "sensei/talk/beak/beak0001" + }, + "x": 39, + "y": -142, + "originY": 0.5037593984962406 + }, + { + "type": "Image", + "id": "79d113f9-9a27-407b-ab6c-5444be9c730a", + "label": "eyebrows", + "components": [], + "texture": { + "key": "sensei", + "frame": "sensei/talk/eyebrows/eyebrows0001" + }, + "x": -6, + "y": -179, + "originY": 0.5027624309392266 + } + ] + } + ], + "plainObjects": [], + "meta": { + "app": "Phaser Editor 2D - Scene Editor", + "url": "https://phasereditor2d.com", + "contentType": "phasereditor2d.core.scene.SceneContentType", + "version": 3 + } +} \ No newline at end of file From cc9d65196437d487dfa49565207249c277afacf2 Mon Sep 17 00:00:00 2001 From: wizguin <16276645+wizguin@users.noreply.github.com> Date: Tue, 11 Apr 2023 11:19:15 +0100 Subject: [PATCH 081/200] cardjitsu: Add handle award --- src/scenes/games/card/CardJitsu.js | 34 +++++++++++++++++++++++++++++- 1 file changed, 33 insertions(+), 1 deletion(-) diff --git a/src/scenes/games/card/CardJitsu.js b/src/scenes/games/card/CardJitsu.js index 0a23d606..0071c3e0 100644 --- a/src/scenes/games/card/CardJitsu.js +++ b/src/scenes/games/card/CardJitsu.js @@ -143,10 +143,14 @@ export default class CardJitsu extends GameScene { this.started = false + this.awards = [4025, 4026, 4027, 4028, 4029, 4030, 4031, 4032, 4033, 104] + this.rankUp + this.addListeners() this.network.send('start_game') } + // probably a better way than needing 2 functions for this addListeners() { this.network.events.on('start_game', this.handleStartGame, this) this.network.events.on('send_deal', this.handleSendDeal, this) @@ -156,6 +160,7 @@ export default class CardJitsu extends GameScene { this.network.events.on('judge', this.handleJudge, this) this.network.events.on('winner', this.handleWinner, this) this.network.events.on('close_game', this.handleCloseGame, this) + this.network.events.on('award', this.handleAward, this) } removeListeners() { @@ -167,6 +172,8 @@ export default class CardJitsu extends GameScene { this.network.events.off('judge', this.handleJudge, this) this.network.events.off('winner', this.handleWinner, this) this.network.events.off('close_game', this.handleCloseGame, this) + this.network.events.off('close_game', this.handleCloseGame, this) + this.network.events.off('award', this.handleAward, this) } handleStartGame(args) { @@ -231,6 +238,22 @@ export default class CardJitsu extends GameScene { this.time.delayedCall(500, () => this.sendLeaveGame()) } + handleAward(args) { + this.rankUp = args.rank + + this.addAward(this.awards[args.rank - 1]) + } + + addAward(award) { + // this should be abstracted, user inventory could be its own class + if (this.world.client.inventory['body'].includes(award)) { + return + } + + this.world.client.inventory['body'].push(award) + this.world.client.inventory['body'].sort((a, b) => a - b) + } + setPlayer(user, index) { let player = this.players[index] player.set(user) @@ -411,12 +434,21 @@ export default class CardJitsu extends GameScene { let username = this.players[winSeat].username this.interface.prompt.showWindow(this.getFormatString('wins', username), 'single', () => { - this.sendLeaveGame() + this.winsPromptCallback() this.interface.prompt.window.visible = false }) } + winsPromptCallback() { + if (!this.rankUp) { + this.sendLeaveGame() + return + } + + this.interface.loadWidget('Sensei') + } + sendLeaveGame() { this.network.send('leave_game') this.leaveGame() From dea1635361c957d4e6b727f2fbe98cbb7a6660a3 Mon Sep 17 00:00:00 2001 From: wizguin <16276645+wizguin@users.noreply.github.com> Date: Tue, 11 Apr 2023 11:56:37 +0100 Subject: [PATCH 082/200] cardjitsu: Add SenseiBelt --- src/scenes/games/sensei/SenseiBelt.js | 64 +++++++++++++++++++++ src/scenes/games/sensei/SenseiBelt.scene | 73 ++++++++++++++++++++++++ 2 files changed, 137 insertions(+) create mode 100644 src/scenes/games/sensei/SenseiBelt.js create mode 100644 src/scenes/games/sensei/SenseiBelt.scene diff --git a/src/scenes/games/sensei/SenseiBelt.js b/src/scenes/games/sensei/SenseiBelt.js new file mode 100644 index 00000000..2674e8da --- /dev/null +++ b/src/scenes/games/sensei/SenseiBelt.js @@ -0,0 +1,64 @@ +/* START OF COMPILED CODE */ + +import BaseContainer from "../../base/BaseContainer"; +/* START-USER-IMPORTS */ +/* END-USER-IMPORTS */ + +export default class SenseiBelt extends BaseContainer { + + constructor(scene, x, y) { + super(scene, x ?? 760, y ?? 480); + + /** @type {Phaser.GameObjects.Image} */ + this.color; + + + // belt + const belt = scene.add.image(0, 0, "sensei", "belt/belt"); + belt.setOrigin(0.5009784735812133, 0.5); + this.add(belt); + + // color + const color = scene.add.image(4, -1, "sensei", "belt/color"); + color.setOrigin(0.503448275862069, 0.5); + this.add(color); + + // shadow + const shadow = scene.add.image(1, 6, "sensei", "belt/shadow"); + shadow.setOrigin(0.5, 0.5014492753623189); + this.add(shadow); + + this.color = color; + + /* START-USER-CTR-CODE */ + /* END-USER-CTR-CODE */ + } + + + /* START-USER-CODE */ + + show() { + super.show() + + // Fade + scene.tweens.add({ + targets: this, + alpha: { from: 0, to: 1 }, + duration: 1450 + }) + + // Float + scene.tweens.add({ + targets: this, + y: this.y + 10, + duration: 333, + repeat: -1, + yoyo: true, + ease: Phaser.Math.Easing.Quadratic.InOut + }) + } + + /* END-USER-CODE */ +} + +/* END OF COMPILED CODE */ diff --git a/src/scenes/games/sensei/SenseiBelt.scene b/src/scenes/games/sensei/SenseiBelt.scene new file mode 100644 index 00000000..a12b8b02 --- /dev/null +++ b/src/scenes/games/sensei/SenseiBelt.scene @@ -0,0 +1,73 @@ +{ + "id": "897d8990-9358-4074-882a-e64ab2e43e6d", + "sceneType": "PREFAB", + "settings": { + "compilerInsertSpaces": true, + "javaScriptInitFieldsInConstructor": true, + "exportClass": true, + "autoImport": true, + "superClassName": "BaseContainer", + "preloadMethodName": "", + "preloadPackFiles": [], + "createMethodName": "", + "borderWidth": 1520, + "borderHeight": 960 + }, + "displayList": [ + { + "type": "Container", + "id": "4293c1e1-13e0-421c-b2c6-9861f7b3a64d", + "label": "container_2", + "components": [], + "x": 760, + "y": 480, + "list": [ + { + "type": "Image", + "id": "5c3eb48a-06c1-43a3-b1de-e46dd3528d27", + "label": "belt", + "components": [], + "texture": { + "key": "sensei", + "frame": "belt/belt" + }, + "originX": 0.5009784735812133 + }, + { + "type": "Image", + "id": "6e2bd2fb-89af-4878-80f3-f79d68a62080", + "label": "color", + "scope": "CLASS", + "components": [], + "texture": { + "key": "sensei", + "frame": "belt/color" + }, + "x": 4, + "y": -1, + "originX": 0.503448275862069 + }, + { + "type": "Image", + "id": "562d5386-43e0-4b1c-aa6e-cfa33c8928f6", + "label": "shadow", + "components": [], + "texture": { + "key": "sensei", + "frame": "belt/shadow" + }, + "x": 1, + "y": 6, + "originY": 0.5014492753623189 + } + ] + } + ], + "plainObjects": [], + "meta": { + "app": "Phaser Editor 2D - Scene Editor", + "url": "https://phasereditor2d.com", + "contentType": "phasereditor2d.core.scene.SceneContentType", + "version": 3 + } +} \ No newline at end of file From c728daf90ac2bb92180288c1a4e32817635369db Mon Sep 17 00:00:00 2001 From: wizguin <16276645+wizguin@users.noreply.github.com> Date: Tue, 11 Apr 2023 11:57:53 +0100 Subject: [PATCH 083/200] cardjitsu: Update SenseiSprite --- src/scenes/games/sensei/SenseiSprite.js | 34 ++++++++++++++-- src/scenes/games/sensei/SenseiSprite.scene | 46 ++++++++++++++++++---- 2 files changed, 69 insertions(+), 11 deletions(-) diff --git a/src/scenes/games/sensei/SenseiSprite.js b/src/scenes/games/sensei/SenseiSprite.js index 1bd66035..2566619a 100644 --- a/src/scenes/games/sensei/SenseiSprite.js +++ b/src/scenes/games/sensei/SenseiSprite.js @@ -9,25 +9,53 @@ export default class SenseiSprite extends BaseContainer { constructor(scene, x, y) { super(scene, x ?? 0, y ?? 0); + /** @type {Phaser.GameObjects.Image} */ + this.base; + /** @type {Phaser.GameObjects.Image} */ + this.beard; + /** @type {Phaser.GameObjects.Image} */ + this.beak; + /** @type {Phaser.GameObjects.Image} */ + this.eyebrows; + /** @type {Phaser.GameObjects.Image} */ + this.front; + + // base const base = scene.add.image(0, 0, "sensei", "sensei/talk/base/base"); - base.setOrigin(0.5, 0.5009140767824497); + base.setOrigin(0.501039501039501, 0.5); this.add(base); + // beard + const beard = scene.add.image(64, 120, "sensei", "sensei/talk/beard/beard0001"); + this.add(beard); + // beak - const beak = scene.add.image(39, -142, "sensei", "sensei/talk/beak/beak0001"); + const beak = scene.add.image(84, -111, "sensei", "sensei/talk/beak/beak0001"); beak.setOrigin(0.5, 0.5037593984962406); this.add(beak); // eyebrows - const eyebrows = scene.add.image(-6, -179, "sensei", "sensei/talk/eyebrows/eyebrows0001"); + const eyebrows = scene.add.image(45, -148, "sensei", "sensei/talk/eyebrows/eyebrows0001"); eyebrows.setOrigin(0.5, 0.5027624309392266); this.add(eyebrows); + // front + const front = scene.add.image(71, 182, "sensei", "sensei/talk/front/front"); + front.setOrigin(0.5009487666034156, 0.5); + this.add(front); + + this.base = base; + this.beard = beard; + this.beak = beak; + this.eyebrows = eyebrows; + this.front = front; + /* START-USER-CTR-CODE */ /* END-USER-CTR-CODE */ } + /* START-USER-CODE */ /* END-USER-CODE */ } diff --git a/src/scenes/games/sensei/SenseiSprite.scene b/src/scenes/games/sensei/SenseiSprite.scene index b183b0b3..09ee0866 100644 --- a/src/scenes/games/sensei/SenseiSprite.scene +++ b/src/scenes/games/sensei/SenseiSprite.scene @@ -22,40 +22,70 @@ "list": [ { "type": "Image", - "id": "44f8a28d-0709-4e0a-86f5-14c40b4cc924", + "id": "239209aa-cd82-49d7-bc0d-7e1526fcf9a0", "label": "base", + "scope": "CLASS", "components": [], "texture": { "key": "sensei", "frame": "sensei/talk/base/base" }, - "originY": 0.5009140767824497 + "originX": 0.501039501039501 }, { "type": "Image", - "id": "97d1b382-3f13-4efc-a14a-462d81eff120", + "id": "10bcd89a-7f3b-422c-95a3-591f6bdfd528", + "label": "beard", + "scope": "CLASS", + "components": [], + "texture": { + "key": "sensei", + "frame": "sensei/talk/beard/beard0001" + }, + "x": 64, + "y": 120 + }, + { + "type": "Image", + "id": "1f15b8e8-4bc2-4d8d-be15-5da03a121018", "label": "beak", + "scope": "CLASS", "components": [], "texture": { "key": "sensei", "frame": "sensei/talk/beak/beak0001" }, - "x": 39, - "y": -142, + "x": 84, + "y": -111, "originY": 0.5037593984962406 }, { "type": "Image", - "id": "79d113f9-9a27-407b-ab6c-5444be9c730a", + "id": "8368fd3d-03ce-4524-b9cd-84f9b22c76b8", "label": "eyebrows", + "scope": "CLASS", "components": [], "texture": { "key": "sensei", "frame": "sensei/talk/eyebrows/eyebrows0001" }, - "x": -6, - "y": -179, + "x": 45, + "y": -148, "originY": 0.5027624309392266 + }, + { + "type": "Image", + "id": "f8ddd89e-07bd-4d19-a71e-2f7c0ccb247c", + "label": "front", + "scope": "CLASS", + "components": [], + "texture": { + "key": "sensei", + "frame": "sensei/talk/front/front" + }, + "x": 71, + "y": 182, + "originX": 0.5009487666034156 } ] } From beda3ed3335cb99a6b536a298c1e306041d7e21d Mon Sep 17 00:00:00 2001 From: wizguin <16276645+wizguin@users.noreply.github.com> Date: Tue, 11 Apr 2023 11:58:26 +0100 Subject: [PATCH 084/200] cardjitsu: update Sensei --- src/scenes/games/sensei/Sensei.js | 28 +++++++++++++++- src/scenes/games/sensei/Sensei.scene | 50 ++++++++++++++++++++++++++-- 2 files changed, 75 insertions(+), 3 deletions(-) diff --git a/src/scenes/games/sensei/Sensei.js b/src/scenes/games/sensei/Sensei.js index ffad9a1f..14b0b5c3 100644 --- a/src/scenes/games/sensei/Sensei.js +++ b/src/scenes/games/sensei/Sensei.js @@ -8,6 +8,7 @@ export const preload = { import BaseContainer from "../../base/BaseContainer"; import SenseiSprite from "./SenseiSprite"; +import SenseiBelt from "./SenseiBelt"; /* START-USER-IMPORTS */ /* END-USER-IMPORTS */ @@ -18,6 +19,12 @@ export default class Sensei extends BaseContainer { /** @type {SenseiSprite} */ this.sensei; + /** @type {SenseiBelt} */ + this.belt; + /** @type {Phaser.GameObjects.Image} */ + this.bubble; + /** @type {Phaser.GameObjects.Text} */ + this.dialog; // bg @@ -25,10 +32,29 @@ export default class Sensei extends BaseContainer { this.add(bg); // sensei - const sensei = new SenseiSprite(scene, -189, 11); + const sensei = new SenseiSprite(scene, -237, -21); this.add(sensei); + // belt + const belt = new SenseiBelt(scene, 697, 218); + this.add(belt); + + // bubble + const bubble = scene.add.image(522, -149, "sensei", "bubble"); + bubble.setOrigin(0.5004574565416285, 0.5); + this.add(bubble); + + // dialog + const dialog = scene.add.text(548, -221, "", {}); + dialog.setOrigin(0.5, 0.5); + dialog.text = "This example text\nI have put it on three lines\nNot a good haiku"; + dialog.setStyle({ "align": "center", "color": "#000", "fixedWidth":1030,"fontFamily": "CCComiccrazy", "fontSize": "40px" }); + this.add(dialog); + this.sensei = sensei; + this.belt = belt; + this.bubble = bubble; + this.dialog = dialog; /* START-USER-CTR-CODE */ /* END-USER-CTR-CODE */ diff --git a/src/scenes/games/sensei/Sensei.scene b/src/scenes/games/sensei/Sensei.scene index 282c1526..3c6aacfa 100644 --- a/src/scenes/games/sensei/Sensei.scene +++ b/src/scenes/games/sensei/Sensei.scene @@ -44,10 +44,56 @@ "label": "sensei", "scope": "CLASS", "components": [], - "x": -189, - "y": 11, + "x": -237, + "y": -21, "nestedPrefabs": [], "list": [] + }, + { + "prefabId": "897d8990-9358-4074-882a-e64ab2e43e6d", + "id": "d7b7ee82-0eb5-4a93-9f9f-ebb2c2c4eb8d", + "unlock": [ + "x", + "y" + ], + "label": "belt", + "scope": "CLASS", + "components": [], + "x": 697, + "y": 218, + "nestedPrefabs": [], + "list": [] + }, + { + "type": "Image", + "id": "39370fe4-3a26-44fa-b7ac-a9ed6d763109", + "label": "bubble", + "scope": "CLASS", + "components": [], + "texture": { + "key": "sensei", + "frame": "bubble" + }, + "x": 522, + "y": -149, + "originX": 0.5004574565416285 + }, + { + "type": "Text", + "id": "9914f859-c661-4847-9b24-1a350014193a", + "label": "dialog", + "scope": "CLASS", + "components": [], + "x": 548, + "y": -221, + "originX": 0.5, + "originY": 0.5, + "text": "This example text\nI have put it on three lines\nNot a good haiku", + "fixedWidth": 1030, + "align": "center", + "fontFamily": "CCComiccrazy", + "fontSize": "40px", + "color": "#000" } ] } From 2526eb58f4ac3c9a70a8a0ed9038168da3cf7377 Mon Sep 17 00:00:00 2001 From: wizguin <16276645+wizguin@users.noreply.github.com> Date: Tue, 11 Apr 2023 13:08:33 +0100 Subject: [PATCH 085/200] cardjitsu: Add sensei speech prefab --- src/scenes/games/sensei/SenseiSpeech.js | 39 ++++++++++++++ src/scenes/games/sensei/SenseiSpeech.scene | 63 ++++++++++++++++++++++ 2 files changed, 102 insertions(+) create mode 100644 src/scenes/games/sensei/SenseiSpeech.js create mode 100644 src/scenes/games/sensei/SenseiSpeech.scene diff --git a/src/scenes/games/sensei/SenseiSpeech.js b/src/scenes/games/sensei/SenseiSpeech.js new file mode 100644 index 00000000..1fc963f4 --- /dev/null +++ b/src/scenes/games/sensei/SenseiSpeech.js @@ -0,0 +1,39 @@ +/* START OF COMPILED CODE */ + +import BaseContainer from "../../base/BaseContainer"; +/* START-USER-IMPORTS */ +/* END-USER-IMPORTS */ + +export default class SenseiSpeech extends BaseContainer { + + constructor(scene, x, y) { + super(scene, x ?? 760, y ?? 480); + + /** @type {Phaser.GameObjects.Text} */ + this.dialog; + + + // bubble + const bubble = scene.add.image(0, 0, "sensei", "bubble"); + bubble.setOrigin(0.5004574565416285, 0.5); + this.add(bubble); + + // dialog + const dialog = scene.add.text(26, -72, "", {}); + dialog.setOrigin(0.5, 0.5); + dialog.text = "This example text\nI have put it on three lines\nNot a good haiku"; + dialog.setStyle({ "align": "center", "color": "#000", "fixedWidth":1030,"fontFamily": "CCComiccrazy", "fontSize": "40px" }); + this.add(dialog); + + this.dialog = dialog; + + /* START-USER-CTR-CODE */ + /* END-USER-CTR-CODE */ + } + + + /* START-USER-CODE */ + /* END-USER-CODE */ +} + +/* END OF COMPILED CODE */ diff --git a/src/scenes/games/sensei/SenseiSpeech.scene b/src/scenes/games/sensei/SenseiSpeech.scene new file mode 100644 index 00000000..f59fbedd --- /dev/null +++ b/src/scenes/games/sensei/SenseiSpeech.scene @@ -0,0 +1,63 @@ +{ + "id": "21b5b7fb-31dc-48aa-beea-a780ae0fe510", + "sceneType": "PREFAB", + "settings": { + "compilerInsertSpaces": true, + "javaScriptInitFieldsInConstructor": true, + "exportClass": true, + "autoImport": true, + "superClassName": "BaseContainer", + "preloadMethodName": "", + "preloadPackFiles": [], + "createMethodName": "", + "borderWidth": 1520, + "borderHeight": 960 + }, + "displayList": [ + { + "type": "Container", + "id": "e5d528fa-be3b-4a85-ad3b-5d125d347631", + "label": "container_2", + "components": [], + "x": 760, + "y": 480, + "list": [ + { + "type": "Image", + "id": "39370fe4-3a26-44fa-b7ac-a9ed6d763109", + "label": "bubble", + "components": [], + "texture": { + "key": "sensei", + "frame": "bubble" + }, + "originX": 0.5004574565416285 + }, + { + "type": "Text", + "id": "9914f859-c661-4847-9b24-1a350014193a", + "label": "dialog", + "scope": "CLASS", + "components": [], + "x": 26, + "y": -72, + "originX": 0.5, + "originY": 0.5, + "text": "This example text\nI have put it on three lines\nNot a good haiku", + "fixedWidth": 1030, + "align": "center", + "fontFamily": "CCComiccrazy", + "fontSize": "40px", + "color": "#000" + } + ] + } + ], + "plainObjects": [], + "meta": { + "app": "Phaser Editor 2D - Scene Editor", + "url": "https://phasereditor2d.com", + "contentType": "phasereditor2d.core.scene.SceneContentType", + "version": 3 + } +} \ No newline at end of file From 86537ff4ec490a1983776e6d5307945545575733 Mon Sep 17 00:00:00 2001 From: wizguin <16276645+wizguin@users.noreply.github.com> Date: Tue, 11 Apr 2023 13:10:46 +0100 Subject: [PATCH 086/200] cardjitsu: Sensei widget menu system --- src/scenes/games/sensei/Sensei.js | 107 +++++++++++++++++++++++---- src/scenes/games/sensei/Sensei.scene | 44 +++++------ 2 files changed, 108 insertions(+), 43 deletions(-) diff --git a/src/scenes/games/sensei/Sensei.js b/src/scenes/games/sensei/Sensei.js index 14b0b5c3..e24be142 100644 --- a/src/scenes/games/sensei/Sensei.js +++ b/src/scenes/games/sensei/Sensei.js @@ -7,8 +7,10 @@ export const preload = { /* START OF COMPILED CODE */ import BaseContainer from "../../base/BaseContainer"; +import Interactive from "../../components/Interactive"; import SenseiSprite from "./SenseiSprite"; import SenseiBelt from "./SenseiBelt"; +import SenseiSpeech from "./SenseiSpeech"; /* START-USER-IMPORTS */ /* END-USER-IMPORTS */ @@ -21,10 +23,8 @@ export default class Sensei extends BaseContainer { this.sensei; /** @type {SenseiBelt} */ this.belt; - /** @type {Phaser.GameObjects.Image} */ - this.bubble; - /** @type {Phaser.GameObjects.Text} */ - this.dialog; + /** @type {SenseiSpeech} */ + this.speech; // bg @@ -37,31 +37,106 @@ export default class Sensei extends BaseContainer { // belt const belt = new SenseiBelt(scene, 697, 218); + belt.visible = false; this.add(belt); - // bubble - const bubble = scene.add.image(522, -149, "sensei", "bubble"); - bubble.setOrigin(0.5004574565416285, 0.5); - this.add(bubble); + // speech + const speech = new SenseiSpeech(scene, 522, -149); + speech.visible = false; + this.add(speech); - // dialog - const dialog = scene.add.text(548, -221, "", {}); - dialog.setOrigin(0.5, 0.5); - dialog.text = "This example text\nI have put it on three lines\nNot a good haiku"; - dialog.setStyle({ "align": "center", "color": "#000", "fixedWidth":1030,"fontFamily": "CCComiccrazy", "fontSize": "40px" }); - this.add(dialog); + // bg (components) + new Interactive(bg); this.sensei = sensei; this.belt = belt; - this.bubble = bubble; - this.dialog = dialog; + this.speech = speech; /* START-USER-CTR-CODE */ + + bg.on('pointerup', this.onBackgroundClick, this) + + this.menu + this.currentIndex = 0 + + // Menu sequences + this.menus = { + beltAward: [ + this.menuBeltAward, + this.menuBeltEarned, + this.close, + ] + } + + this.bindMenus() + /* END-USER-CTR-CODE */ } /* START-USER-CODE */ + + show() { + super.show() + + this.scene.events.emit('sensei_ready') + } + + close() { + super.close() + } + + onBackgroundClick() { + this.updateMenu() + } + + loadMenu(menu) { + if (!(menu in this.menus)) { + return + } + + this.menu = this.menus[menu] + this.currentIndex = 0 + + this.updateMenu() + } + + updateMenu() { + if (!this.menu) { + return + } + + if (this.currentIndex >= this.menu.length) { + return + } + + this.menu[this.currentIndex]() + + this.currentIndex++ + } + + menuBeltAward() { + console.log('1') + } + + menuBeltEarned() { + console.log('2') + } + + bindMenus() { + for (let menu of Object.values(this.menus)) { + this.bindMenu(menu) + } + } + + bindMenu(menu) { + for (let i = 0; i < menu.length; i++) { + let item = menu[i] + + menu[i] = item.bind(this) + } + } + /* END-USER-CODE */ } diff --git a/src/scenes/games/sensei/Sensei.scene b/src/scenes/games/sensei/Sensei.scene index 3c6aacfa..22e2e6f0 100644 --- a/src/scenes/games/sensei/Sensei.scene +++ b/src/scenes/games/sensei/Sensei.scene @@ -26,7 +26,9 @@ "type": "Image", "id": "06e66bb6-5a49-4833-8a26-681a8126ce3b", "label": "bg", - "components": [], + "components": [ + "Interactive" + ], "texture": { "key": "sensei", "frame": "bg" @@ -54,46 +56,34 @@ "id": "d7b7ee82-0eb5-4a93-9f9f-ebb2c2c4eb8d", "unlock": [ "x", - "y" + "y", + "visible" ], "label": "belt", "scope": "CLASS", "components": [], "x": 697, "y": 218, + "visible": false, "nestedPrefabs": [], "list": [] }, { - "type": "Image", - "id": "39370fe4-3a26-44fa-b7ac-a9ed6d763109", - "label": "bubble", + "prefabId": "21b5b7fb-31dc-48aa-beea-a780ae0fe510", + "id": "536fa4b4-a12b-4d0c-8c76-00af7f45305c", + "unlock": [ + "x", + "y", + "visible" + ], + "label": "speech", "scope": "CLASS", "components": [], - "texture": { - "key": "sensei", - "frame": "bubble" - }, "x": 522, "y": -149, - "originX": 0.5004574565416285 - }, - { - "type": "Text", - "id": "9914f859-c661-4847-9b24-1a350014193a", - "label": "dialog", - "scope": "CLASS", - "components": [], - "x": 548, - "y": -221, - "originX": 0.5, - "originY": 0.5, - "text": "This example text\nI have put it on three lines\nNot a good haiku", - "fixedWidth": 1030, - "align": "center", - "fontFamily": "CCComiccrazy", - "fontSize": "40px", - "color": "#000" + "visible": false, + "nestedPrefabs": [], + "list": [] } ] } From fe6bae8cbf973766a0a20b61c60eec070f32f087 Mon Sep 17 00:00:00 2001 From: wizguin <16276645+wizguin@users.noreply.github.com> Date: Tue, 11 Apr 2023 21:09:11 +0100 Subject: [PATCH 087/200] cardjitsu: Sensei belt rank up --- src/scenes/games/card/CardJitsu.js | 9 ++++++- src/scenes/games/card/CardJitsuBattle.js | 4 +-- src/scenes/games/sensei/Sensei.js | 34 +++++++++++++++++++++--- src/scenes/games/sensei/SenseiBelt.js | 11 +++++--- src/scenes/games/sensei/SenseiSpeech.js | 7 +++++ 5 files changed, 56 insertions(+), 9 deletions(-) diff --git a/src/scenes/games/card/CardJitsu.js b/src/scenes/games/card/CardJitsu.js index 0071c3e0..88445e3d 100644 --- a/src/scenes/games/card/CardJitsu.js +++ b/src/scenes/games/card/CardJitsu.js @@ -144,7 +144,7 @@ export default class CardJitsu extends GameScene { this.started = false this.awards = [4025, 4026, 4027, 4028, 4029, 4030, 4031, 4032, 4033, 104] - this.rankUp + this.rankUp = null this.addListeners() this.network.send('start_game') @@ -446,6 +446,13 @@ export default class CardJitsu extends GameScene { return } + this.interface.events.once('sensei_ready', () => { + let sensei = this.interface.loadedWidgets.Sensei + + sensei.rankId = this.rankUp + sensei.loadMenu('beltAward') + }) + this.interface.loadWidget('Sensei') } diff --git a/src/scenes/games/card/CardJitsuBattle.js b/src/scenes/games/card/CardJitsuBattle.js index a600e378..00e4718f 100644 --- a/src/scenes/games/card/CardJitsuBattle.js +++ b/src/scenes/games/card/CardJitsuBattle.js @@ -11,7 +11,7 @@ export default class CardJitsuBattle { this.animating = false // can be moved somewhere else - this.beltColors = [null, 16777215, 16776960, 16737792, 3394560, 13260, 13369344, 6684927, 6697728, 4473924, 4473924] + this.beltColors = [16777215, 16776960, 16737792, 3394560, 13260, 13369344, 6684927, 6697728, 4473924, 4473924] } get body() { @@ -156,7 +156,7 @@ export default class CardJitsuBattle { return } - let color = this.beltColors[rank] + let color = this.beltColors[rank - 1] if (this.belt) { this.belt.tint = color diff --git a/src/scenes/games/sensei/Sensei.js b/src/scenes/games/sensei/Sensei.js index e24be142..7efb2017 100644 --- a/src/scenes/games/sensei/Sensei.js +++ b/src/scenes/games/sensei/Sensei.js @@ -64,10 +64,14 @@ export default class Sensei extends BaseContainer { beltAward: [ this.menuBeltAward, this.menuBeltEarned, - this.close, + this.leaveGame, ] } + this.rankId = 1 + + this.beltNames = ['White', 'Yellow', 'Orange', 'Green', 'Blue', 'Red', 'Purple', 'Brown', 'Black'] + this.bindMenus() /* END-USER-CTR-CODE */ @@ -83,6 +87,11 @@ export default class Sensei extends BaseContainer { } close() { + this.menu = null + this.currentIndex = 0 + + this.hideAll() + super.close() } @@ -116,11 +125,30 @@ export default class Sensei extends BaseContainer { } menuBeltAward() { - console.log('1') + this.showSpeech('Congratulations!\nMuch like the fearsome earthquake,\nYou have rocked the house.') } menuBeltEarned() { - console.log('2') + let beltName = this.beltNames[this.rankId - 1] + + this.showSpeech(`Well done. You have earned\na ${beltName} Belt for your efforts.\nI am proud of you.`) + + this.belt.show(this.rankId) + } + + showSpeech(text) { + // todo: strings file + this.speech.show(text) + } + + hideAll() { + this.speech.close() + this.belt.close() + } + + leaveGame() { + this.close() + this.world.room.sendLeaveGame() } bindMenus() { diff --git a/src/scenes/games/sensei/SenseiBelt.js b/src/scenes/games/sensei/SenseiBelt.js index 2674e8da..fa458da2 100644 --- a/src/scenes/games/sensei/SenseiBelt.js +++ b/src/scenes/games/sensei/SenseiBelt.js @@ -31,24 +31,29 @@ export default class SenseiBelt extends BaseContainer { this.color = color; /* START-USER-CTR-CODE */ + + this.colors = [16777215, 16776960, 16737792, 3394560, 13260, 13369344, 6684927, 6697728, 4473924, 4473924] + /* END-USER-CTR-CODE */ } /* START-USER-CODE */ - show() { + show(rank) { + this.color.tint = this.colors[rank - 1] + super.show() // Fade - scene.tweens.add({ + this.scene.tweens.add({ targets: this, alpha: { from: 0, to: 1 }, duration: 1450 }) // Float - scene.tweens.add({ + this.scene.tweens.add({ targets: this, y: this.y + 10, duration: 333, diff --git a/src/scenes/games/sensei/SenseiSpeech.js b/src/scenes/games/sensei/SenseiSpeech.js index 1fc963f4..429c361e 100644 --- a/src/scenes/games/sensei/SenseiSpeech.js +++ b/src/scenes/games/sensei/SenseiSpeech.js @@ -33,6 +33,13 @@ export default class SenseiSpeech extends BaseContainer { /* START-USER-CODE */ + + show(text) { + this.dialog.text = text + + super.show() + } + /* END-USER-CODE */ } From 179013ba63f74503bde55a1e019d8d3381782cdb Mon Sep 17 00:00:00 2001 From: wizguin <16276645+wizguin@users.noreply.github.com> Date: Tue, 11 Apr 2023 21:57:47 +0100 Subject: [PATCH 088/200] cardjitsu: Rename SenseiWidget, add Sensei scene --- src/data/rooms.js | 4 + src/data/widgets.js | 2 +- src/scenes/games/sensei/Sensei.js | 162 +++-------------- src/scenes/games/sensei/Sensei.scene | 95 ++-------- .../games/sensei/{ => widget}/SenseiBelt.js | 2 +- .../sensei/{ => widget}/SenseiBelt.scene | 0 .../games/sensei/{ => widget}/SenseiSpeech.js | 2 +- .../sensei/{ => widget}/SenseiSpeech.scene | 0 .../games/sensei/{ => widget}/SenseiSprite.js | 2 +- .../sensei/{ => widget}/SenseiSprite.scene | 0 .../games/sensei/widget/SenseiWidget.js | 171 ++++++++++++++++++ .../games/sensei/widget/SenseiWidget.scene | 98 ++++++++++ 12 files changed, 318 insertions(+), 220 deletions(-) rename src/scenes/games/sensei/{ => widget}/SenseiBelt.js (96%) rename src/scenes/games/sensei/{ => widget}/SenseiBelt.scene (100%) rename src/scenes/games/sensei/{ => widget}/SenseiSpeech.js (94%) rename src/scenes/games/sensei/{ => widget}/SenseiSpeech.scene (100%) rename src/scenes/games/sensei/{ => widget}/SenseiSprite.js (96%) rename src/scenes/games/sensei/{ => widget}/SenseiSprite.scene (100%) create mode 100644 src/scenes/games/sensei/widget/SenseiWidget.js create mode 100644 src/scenes/games/sensei/widget/SenseiWidget.scene diff --git a/src/data/rooms.js b/src/data/rooms.js index ed5f9e59..541a58f4 100644 --- a/src/data/rooms.js +++ b/src/data/rooms.js @@ -137,6 +137,10 @@ const rooms = { x: 840, y: 480 }, + 951: { + key: 'Sensei', + scene: require('@rooms/../games/sensei/Sensei').default + }, 998: { key: 'CardJitsu', scene: require('@rooms/../games/card/CardJitsu').default diff --git a/src/data/widgets.js b/src/data/widgets.js index 05122a29..fc238fd3 100644 --- a/src/data/widgets.js +++ b/src/data/widgets.js @@ -6,7 +6,7 @@ const widgets = { 'FindFour': require('@scenes/games/four/FindFour'), 'Mancala': require('@scenes/games/mancala/Mancala'), 'Map': require('@scenes/interface/game/map/Map'), - 'Sensei': require('@scenes/games/sensei/Sensei') + 'Sensei': require('@scenes/games/sensei/widget/SenseiWidget') } export default widgets diff --git a/src/scenes/games/sensei/Sensei.js b/src/scenes/games/sensei/Sensei.js index 7efb2017..e943bb38 100644 --- a/src/scenes/games/sensei/Sensei.js +++ b/src/scenes/games/sensei/Sensei.js @@ -1,168 +1,50 @@ -export const preload = { - key: 'sensei-pack', - url: 'assets/media/games/sensei/sensei-pack.json', - loadString: ['loading', 'sensei'] -} + +// You can write more code here /* START OF COMPILED CODE */ -import BaseContainer from "../../base/BaseContainer"; -import Interactive from "../../components/Interactive"; -import SenseiSprite from "./SenseiSprite"; -import SenseiBelt from "./SenseiBelt"; -import SenseiSpeech from "./SenseiSpeech"; +import GameScene from "../GameScene"; +import SenseiWidget from "./widget/SenseiWidget"; /* START-USER-IMPORTS */ /* END-USER-IMPORTS */ -export default class Sensei extends BaseContainer { +export default class Sensei extends GameScene { - constructor(scene, x, y) { - super(scene, x ?? 409, y ?? 350); + constructor() { + super("Sensei"); - /** @type {SenseiSprite} */ + /** @type {SenseiWidget} */ this.sensei; - /** @type {SenseiBelt} */ - this.belt; - /** @type {SenseiSpeech} */ - this.speech; - - - // bg - const bg = scene.add.image(189, 212, "sensei", "bg"); - this.add(bg); - - // sensei - const sensei = new SenseiSprite(scene, -237, -21); - this.add(sensei); - // belt - const belt = new SenseiBelt(scene, 697, 218); - belt.visible = false; - this.add(belt); - - // speech - const speech = new SenseiSpeech(scene, 522, -149); - speech.visible = false; - this.add(speech); - - // bg (components) - new Interactive(bg); - - this.sensei = sensei; - this.belt = belt; - this.speech = speech; /* START-USER-CTR-CODE */ - - bg.on('pointerup', this.onBackgroundClick, this) - - this.menu - this.currentIndex = 0 - - // Menu sequences - this.menus = { - beltAward: [ - this.menuBeltAward, - this.menuBeltEarned, - this.leaveGame, - ] - } - - this.rankId = 1 - - this.beltNames = ['White', 'Yellow', 'Orange', 'Green', 'Blue', 'Red', 'Purple', 'Brown', 'Black'] - - this.bindMenus() - /* END-USER-CTR-CODE */ } + /** @returns {void} */ + _preload() { - /* START-USER-CODE */ - - show() { - super.show() - - this.scene.events.emit('sensei_ready') - } - - close() { - this.menu = null - this.currentIndex = 0 - - this.hideAll() - - super.close() - } - - onBackgroundClick() { - this.updateMenu() - } - - loadMenu(menu) { - if (!(menu in this.menus)) { - return - } - - this.menu = this.menus[menu] - this.currentIndex = 0 - - this.updateMenu() + this.load.pack("sensei-pack", "assets/media/games/sensei/sensei-pack.json"); } - updateMenu() { - if (!this.menu) { - return - } - - if (this.currentIndex >= this.menu.length) { - return - } - - this.menu[this.currentIndex]() + /** @returns {void} */ + _create() { - this.currentIndex++ - } - - menuBeltAward() { - this.showSpeech('Congratulations!\nMuch like the fearsome earthquake,\nYou have rocked the house.') - } - - menuBeltEarned() { - let beltName = this.beltNames[this.rankId - 1] - - this.showSpeech(`Well done. You have earned\na ${beltName} Belt for your efforts.\nI am proud of you.`) - - this.belt.show(this.rankId) - } - - showSpeech(text) { - // todo: strings file - this.speech.show(text) - } + // sensei + const sensei = new SenseiWidget(this); + this.add.existing(sensei); + sensei.visible = true; - hideAll() { - this.speech.close() - this.belt.close() - } + this.sensei = sensei; - leaveGame() { - this.close() - this.world.room.sendLeaveGame() + this.events.emit("scene-awake"); } - bindMenus() { - for (let menu of Object.values(this.menus)) { - this.bindMenu(menu) - } - } - bindMenu(menu) { - for (let i = 0; i < menu.length; i++) { - let item = menu[i] + /* START-USER-CODE */ - menu[i] = item.bind(this) - } + create() { + super.create() } /* END-USER-CODE */ diff --git a/src/scenes/games/sensei/Sensei.scene b/src/scenes/games/sensei/Sensei.scene index 22e2e6f0..5f7837eb 100644 --- a/src/scenes/games/sensei/Sensei.scene +++ b/src/scenes/games/sensei/Sensei.scene @@ -1,91 +1,34 @@ { - "id": "fbf6af33-9518-47c9-b5a9-fd3beb3a5292", - "sceneType": "PREFAB", + "id": "0ac4158a-df71-4a5d-8d9f-1540ef2542cf", + "sceneType": "SCENE", "settings": { "compilerInsertSpaces": true, "javaScriptInitFieldsInConstructor": true, "exportClass": true, "autoImport": true, - "superClassName": "BaseContainer", - "preloadMethodName": "", - "preloadPackFiles": [], - "createMethodName": "", + "superClassName": "GameScene", + "preloadMethodName": "_preload", + "preloadPackFiles": [ + "yukon/assets/media/games/sensei/sensei-pack.json" + ], + "createMethodName": "_create", + "sceneKey": "Sensei", "borderWidth": 1520, "borderHeight": 960 }, "displayList": [ { - "type": "Container", - "id": "6c8b4abc-527b-4fb7-86e5-ce92b00f7ca6", - "label": "container_1", + "prefabId": "fbf6af33-9518-47c9-b5a9-fd3beb3a5292", + "id": "ab620860-d6bf-4dea-bfcc-879f38ee00ab", + "unlock": [ + "visible" + ], + "label": "sensei", + "scope": "CLASS", "components": [], - "x": 409, - "y": 350, - "list": [ - { - "type": "Image", - "id": "06e66bb6-5a49-4833-8a26-681a8126ce3b", - "label": "bg", - "components": [ - "Interactive" - ], - "texture": { - "key": "sensei", - "frame": "bg" - }, - "x": 189, - "y": 212 - }, - { - "prefabId": "05d04137-c915-4f19-ba6c-2d937cd558d7", - "id": "e7df3b1d-4174-48f4-a459-8ee32d5c0805", - "unlock": [ - "x", - "y" - ], - "label": "sensei", - "scope": "CLASS", - "components": [], - "x": -237, - "y": -21, - "nestedPrefabs": [], - "list": [] - }, - { - "prefabId": "897d8990-9358-4074-882a-e64ab2e43e6d", - "id": "d7b7ee82-0eb5-4a93-9f9f-ebb2c2c4eb8d", - "unlock": [ - "x", - "y", - "visible" - ], - "label": "belt", - "scope": "CLASS", - "components": [], - "x": 697, - "y": 218, - "visible": false, - "nestedPrefabs": [], - "list": [] - }, - { - "prefabId": "21b5b7fb-31dc-48aa-beea-a780ae0fe510", - "id": "536fa4b4-a12b-4d0c-8c76-00af7f45305c", - "unlock": [ - "x", - "y", - "visible" - ], - "label": "speech", - "scope": "CLASS", - "components": [], - "x": 522, - "y": -149, - "visible": false, - "nestedPrefabs": [], - "list": [] - } - ] + "visible": true, + "nestedPrefabs": [], + "list": [] } ], "plainObjects": [], diff --git a/src/scenes/games/sensei/SenseiBelt.js b/src/scenes/games/sensei/widget/SenseiBelt.js similarity index 96% rename from src/scenes/games/sensei/SenseiBelt.js rename to src/scenes/games/sensei/widget/SenseiBelt.js index fa458da2..2bca79e7 100644 --- a/src/scenes/games/sensei/SenseiBelt.js +++ b/src/scenes/games/sensei/widget/SenseiBelt.js @@ -1,6 +1,6 @@ /* START OF COMPILED CODE */ -import BaseContainer from "../../base/BaseContainer"; +import BaseContainer from "../../../base/BaseContainer"; /* START-USER-IMPORTS */ /* END-USER-IMPORTS */ diff --git a/src/scenes/games/sensei/SenseiBelt.scene b/src/scenes/games/sensei/widget/SenseiBelt.scene similarity index 100% rename from src/scenes/games/sensei/SenseiBelt.scene rename to src/scenes/games/sensei/widget/SenseiBelt.scene diff --git a/src/scenes/games/sensei/SenseiSpeech.js b/src/scenes/games/sensei/widget/SenseiSpeech.js similarity index 94% rename from src/scenes/games/sensei/SenseiSpeech.js rename to src/scenes/games/sensei/widget/SenseiSpeech.js index 429c361e..896ab900 100644 --- a/src/scenes/games/sensei/SenseiSpeech.js +++ b/src/scenes/games/sensei/widget/SenseiSpeech.js @@ -1,6 +1,6 @@ /* START OF COMPILED CODE */ -import BaseContainer from "../../base/BaseContainer"; +import BaseContainer from "../../../base/BaseContainer"; /* START-USER-IMPORTS */ /* END-USER-IMPORTS */ diff --git a/src/scenes/games/sensei/SenseiSpeech.scene b/src/scenes/games/sensei/widget/SenseiSpeech.scene similarity index 100% rename from src/scenes/games/sensei/SenseiSpeech.scene rename to src/scenes/games/sensei/widget/SenseiSpeech.scene diff --git a/src/scenes/games/sensei/SenseiSprite.js b/src/scenes/games/sensei/widget/SenseiSprite.js similarity index 96% rename from src/scenes/games/sensei/SenseiSprite.js rename to src/scenes/games/sensei/widget/SenseiSprite.js index 2566619a..2e35be92 100644 --- a/src/scenes/games/sensei/SenseiSprite.js +++ b/src/scenes/games/sensei/widget/SenseiSprite.js @@ -1,6 +1,6 @@ /* START OF COMPILED CODE */ -import BaseContainer from "../../base/BaseContainer"; +import BaseContainer from "../../../base/BaseContainer"; /* START-USER-IMPORTS */ /* END-USER-IMPORTS */ diff --git a/src/scenes/games/sensei/SenseiSprite.scene b/src/scenes/games/sensei/widget/SenseiSprite.scene similarity index 100% rename from src/scenes/games/sensei/SenseiSprite.scene rename to src/scenes/games/sensei/widget/SenseiSprite.scene diff --git a/src/scenes/games/sensei/widget/SenseiWidget.js b/src/scenes/games/sensei/widget/SenseiWidget.js new file mode 100644 index 00000000..7b4ed3a2 --- /dev/null +++ b/src/scenes/games/sensei/widget/SenseiWidget.js @@ -0,0 +1,171 @@ +export const preload = { + key: 'sensei-pack', + url: 'assets/media/games/sensei/sensei-pack.json', + loadString: ['loading', 'sensei'] +} + +/* START OF COMPILED CODE */ + +import BaseContainer from "../../../base/BaseContainer"; +import Interactive from "../../../components/Interactive"; +import SenseiSprite from "./SenseiSprite"; +import SenseiBelt from "./SenseiBelt"; +import SenseiSpeech from "./SenseiSpeech"; +/* START-USER-IMPORTS */ +/* END-USER-IMPORTS */ + +export default class SenseiWidget extends BaseContainer { + + constructor(scene, x, y) { + super(scene, x ?? 409, y ?? 350); + + /** @type {SenseiSprite} */ + this.sensei; + /** @type {SenseiBelt} */ + this.belt; + /** @type {SenseiSpeech} */ + this.speech; + + + // bg + const bg = scene.add.image(189, 212, "sensei", "bg"); + this.add(bg); + + // sensei + const sensei = new SenseiSprite(scene, -237, -21); + this.add(sensei); + + // belt + const belt = new SenseiBelt(scene, 697, 218); + belt.visible = false; + this.add(belt); + + // speech + const speech = new SenseiSpeech(scene, 522, -149); + speech.visible = false; + this.add(speech); + + // bg (components) + new Interactive(bg); + + this.sensei = sensei; + this.belt = belt; + this.speech = speech; + + /* START-USER-CTR-CODE */ + + bg.on('pointerup', this.onBackgroundClick, this) + + this.menu + this.currentIndex = 0 + + // Menu sequences + this.menus = { + beltAward: [ + this.menuBeltAward, + this.menuBeltEarned, + this.leaveGame, + ] + } + + this.rankId = 1 + + this.beltNames = ['White', 'Yellow', 'Orange', 'Green', 'Blue', 'Red', 'Purple', 'Brown', 'Black'] + + this.bindMenus() + + /* END-USER-CTR-CODE */ + } + + + /* START-USER-CODE */ + + show() { + super.show() + + this.scene.events.emit('sensei_ready') + } + + close() { + this.menu = null + this.currentIndex = 0 + + this.hideAll() + + super.close() + } + + onBackgroundClick() { + this.updateMenu() + } + + loadMenu(menu) { + if (!(menu in this.menus)) { + return + } + + this.menu = this.menus[menu] + this.currentIndex = 0 + + this.updateMenu() + } + + updateMenu() { + if (!this.menu) { + return + } + + if (this.currentIndex >= this.menu.length) { + return + } + + this.menu[this.currentIndex]() + + this.currentIndex++ + } + + menuBeltAward() { + this.showSpeech('Congratulations!\nMuch like the fearsome earthquake,\nYou have rocked the house.') + } + + menuBeltEarned() { + let beltName = this.beltNames[this.rankId - 1] + + this.showSpeech(`Well done. You have earned\na ${beltName} Belt for your efforts.\nI am proud of you.`) + + this.belt.show(this.rankId) + } + + showSpeech(text) { + // todo: strings file + this.speech.show(text) + } + + hideAll() { + this.speech.close() + this.belt.close() + } + + leaveGame() { + this.close() + this.world.room.sendLeaveGame() + } + + bindMenus() { + for (let menu of Object.values(this.menus)) { + this.bindMenu(menu) + } + } + + bindMenu(menu) { + for (let i = 0; i < menu.length; i++) { + let item = menu[i] + + menu[i] = item.bind(this) + } + } + + /* END-USER-CODE */ +} + +/* END OF COMPILED CODE */ diff --git a/src/scenes/games/sensei/widget/SenseiWidget.scene b/src/scenes/games/sensei/widget/SenseiWidget.scene new file mode 100644 index 00000000..22e2e6f0 --- /dev/null +++ b/src/scenes/games/sensei/widget/SenseiWidget.scene @@ -0,0 +1,98 @@ +{ + "id": "fbf6af33-9518-47c9-b5a9-fd3beb3a5292", + "sceneType": "PREFAB", + "settings": { + "compilerInsertSpaces": true, + "javaScriptInitFieldsInConstructor": true, + "exportClass": true, + "autoImport": true, + "superClassName": "BaseContainer", + "preloadMethodName": "", + "preloadPackFiles": [], + "createMethodName": "", + "borderWidth": 1520, + "borderHeight": 960 + }, + "displayList": [ + { + "type": "Container", + "id": "6c8b4abc-527b-4fb7-86e5-ce92b00f7ca6", + "label": "container_1", + "components": [], + "x": 409, + "y": 350, + "list": [ + { + "type": "Image", + "id": "06e66bb6-5a49-4833-8a26-681a8126ce3b", + "label": "bg", + "components": [ + "Interactive" + ], + "texture": { + "key": "sensei", + "frame": "bg" + }, + "x": 189, + "y": 212 + }, + { + "prefabId": "05d04137-c915-4f19-ba6c-2d937cd558d7", + "id": "e7df3b1d-4174-48f4-a459-8ee32d5c0805", + "unlock": [ + "x", + "y" + ], + "label": "sensei", + "scope": "CLASS", + "components": [], + "x": -237, + "y": -21, + "nestedPrefabs": [], + "list": [] + }, + { + "prefabId": "897d8990-9358-4074-882a-e64ab2e43e6d", + "id": "d7b7ee82-0eb5-4a93-9f9f-ebb2c2c4eb8d", + "unlock": [ + "x", + "y", + "visible" + ], + "label": "belt", + "scope": "CLASS", + "components": [], + "x": 697, + "y": 218, + "visible": false, + "nestedPrefabs": [], + "list": [] + }, + { + "prefabId": "21b5b7fb-31dc-48aa-beea-a780ae0fe510", + "id": "536fa4b4-a12b-4d0c-8c76-00af7f45305c", + "unlock": [ + "x", + "y", + "visible" + ], + "label": "speech", + "scope": "CLASS", + "components": [], + "x": 522, + "y": -149, + "visible": false, + "nestedPrefabs": [], + "list": [] + } + ] + } + ], + "plainObjects": [], + "meta": { + "app": "Phaser Editor 2D - Scene Editor", + "url": "https://phasereditor2d.com", + "contentType": "phasereditor2d.core.scene.SceneContentType", + "version": 3 + } +} \ No newline at end of file From 8dbba1aac21d7bb81e6bbde39a7914316f814514 Mon Sep 17 00:00:00 2001 From: wizguin <16276645+wizguin@users.noreply.github.com> Date: Tue, 11 Apr 2023 22:22:50 +0100 Subject: [PATCH 089/200] cardjitsu: Add SenseiMenu --- src/scenes/games/sensei/Sensei.js | 13 ++++-- src/scenes/games/sensei/Sensei.scene | 15 +++++++ src/scenes/games/sensei/menu/SenseiMenu.js | 32 +++++++++++++ src/scenes/games/sensei/menu/SenseiMenu.scene | 45 +++++++++++++++++++ 4 files changed, 102 insertions(+), 3 deletions(-) create mode 100644 src/scenes/games/sensei/menu/SenseiMenu.js create mode 100644 src/scenes/games/sensei/menu/SenseiMenu.scene diff --git a/src/scenes/games/sensei/Sensei.js b/src/scenes/games/sensei/Sensei.js index e943bb38..bc994711 100644 --- a/src/scenes/games/sensei/Sensei.js +++ b/src/scenes/games/sensei/Sensei.js @@ -1,10 +1,8 @@ - -// You can write more code here - /* START OF COMPILED CODE */ import GameScene from "../GameScene"; import SenseiWidget from "./widget/SenseiWidget"; +import SenseiMenu from "./menu/SenseiMenu"; /* START-USER-IMPORTS */ /* END-USER-IMPORTS */ @@ -15,6 +13,8 @@ export default class Sensei extends GameScene { /** @type {SenseiWidget} */ this.sensei; + /** @type {SenseiMenu} */ + this.menu; /* START-USER-CTR-CODE */ @@ -35,7 +35,12 @@ export default class Sensei extends GameScene { this.add.existing(sensei); sensei.visible = true; + // menu + const menu = new SenseiMenu(this, 1055, 774); + this.add.existing(menu); + this.sensei = sensei; + this.menu = menu; this.events.emit("scene-awake"); } @@ -45,6 +50,8 @@ export default class Sensei extends GameScene { create() { super.create() + + this.sensei.showSpeech('Hello world') } /* END-USER-CODE */ diff --git a/src/scenes/games/sensei/Sensei.scene b/src/scenes/games/sensei/Sensei.scene index 5f7837eb..90647355 100644 --- a/src/scenes/games/sensei/Sensei.scene +++ b/src/scenes/games/sensei/Sensei.scene @@ -29,6 +29,21 @@ "visible": true, "nestedPrefabs": [], "list": [] + }, + { + "prefabId": "717f221e-2a49-41a0-a3d4-1aabab9d9a0f", + "id": "7d7ebac3-5625-4b21-9b9c-18c356cc56f3", + "unlock": [ + "x", + "y" + ], + "label": "menu", + "scope": "CLASS", + "components": [], + "x": 1055, + "y": 774, + "nestedPrefabs": [], + "list": [] } ], "plainObjects": [], diff --git a/src/scenes/games/sensei/menu/SenseiMenu.js b/src/scenes/games/sensei/menu/SenseiMenu.js new file mode 100644 index 00000000..43b9fe73 --- /dev/null +++ b/src/scenes/games/sensei/menu/SenseiMenu.js @@ -0,0 +1,32 @@ +/* START OF COMPILED CODE */ + +import BaseContainer from "../../../base/BaseContainer"; +/* START-USER-IMPORTS */ +/* END-USER-IMPORTS */ + +export default class SenseiMenu extends BaseContainer { + + constructor(scene, x, y) { + super(scene, x ?? 0, y ?? 0); + + /** @type {Phaser.GameObjects.Image} */ + this.bg; + + + // bg + const bg = scene.add.image(0, 0, "sensei", "menu/bg"); + bg.setOrigin(0.5, 0.5015197568389058); + this.add(bg); + + this.bg = bg; + + /* START-USER-CTR-CODE */ + /* END-USER-CTR-CODE */ + } + + + /* START-USER-CODE */ + /* END-USER-CODE */ +} + +/* END OF COMPILED CODE */ diff --git a/src/scenes/games/sensei/menu/SenseiMenu.scene b/src/scenes/games/sensei/menu/SenseiMenu.scene new file mode 100644 index 00000000..2e491db0 --- /dev/null +++ b/src/scenes/games/sensei/menu/SenseiMenu.scene @@ -0,0 +1,45 @@ +{ + "id": "717f221e-2a49-41a0-a3d4-1aabab9d9a0f", + "sceneType": "PREFAB", + "settings": { + "compilerInsertSpaces": true, + "javaScriptInitFieldsInConstructor": true, + "exportClass": true, + "autoImport": true, + "superClassName": "BaseContainer", + "preloadMethodName": "", + "preloadPackFiles": [], + "createMethodName": "", + "borderWidth": 1520, + "borderHeight": 960 + }, + "displayList": [ + { + "type": "Container", + "id": "cc188231-2b7e-4bcd-a7bc-6da884837ac6", + "label": "container_1", + "components": [], + "list": [ + { + "type": "Image", + "id": "45bc16aa-d4e2-4c36-8505-48fb586adbfc", + "label": "bg", + "scope": "CLASS", + "components": [], + "texture": { + "key": "sensei", + "frame": "menu/bg" + }, + "originY": 0.5015197568389058 + } + ] + } + ], + "plainObjects": [], + "meta": { + "app": "Phaser Editor 2D - Scene Editor", + "url": "https://phasereditor2d.com", + "contentType": "phasereditor2d.core.scene.SceneContentType", + "version": 3 + } +} \ No newline at end of file From d1f2c6e85efa8d109455fe7b16f6e982a118782e Mon Sep 17 00:00:00 2001 From: wizguin <16276645+wizguin@users.noreply.github.com> Date: Wed, 12 Apr 2023 08:42:07 +0100 Subject: [PATCH 090/200] sensei: Close button --- src/scenes/games/sensei/Sensei.js | 12 ++++++++ src/scenes/games/sensei/Sensei.scene | 28 +++++++++++++++++++ .../games/sensei/widget/SenseiWidget.js | 2 +- .../games/sensei/widget/SenseiWidget.scene | 4 +-- 4 files changed, 43 insertions(+), 3 deletions(-) diff --git a/src/scenes/games/sensei/Sensei.js b/src/scenes/games/sensei/Sensei.js index bc994711..4ead4f81 100644 --- a/src/scenes/games/sensei/Sensei.js +++ b/src/scenes/games/sensei/Sensei.js @@ -3,6 +3,7 @@ import GameScene from "../GameScene"; import SenseiWidget from "./widget/SenseiWidget"; import SenseiMenu from "./menu/SenseiMenu"; +import Button from "../../components/Button"; /* START-USER-IMPORTS */ /* END-USER-IMPORTS */ @@ -39,6 +40,17 @@ export default class Sensei extends GameScene { const menu = new SenseiMenu(this, 1055, 774); this.add.existing(menu); + // xButton + const xButton = this.add.image(1474, 43, "main", "grey-button"); + + // x + this.add.image(1474, 41, "main", "grey-x"); + + // xButton (components) + const xButtonButton = new Button(xButton); + xButtonButton.spriteName = "grey-button"; + xButtonButton.callback = () => this.world.client.sendJoinLastRoom(); + this.sensei = sensei; this.menu = menu; diff --git a/src/scenes/games/sensei/Sensei.scene b/src/scenes/games/sensei/Sensei.scene index 90647355..e1ca0db5 100644 --- a/src/scenes/games/sensei/Sensei.scene +++ b/src/scenes/games/sensei/Sensei.scene @@ -44,6 +44,34 @@ "y": 774, "nestedPrefabs": [], "list": [] + }, + { + "type": "Image", + "id": "931acc13-5748-49c2-b341-63c5e9242a42", + "label": "xButton", + "components": [ + "Button" + ], + "Button.spriteName": "grey-button", + "Button.callback": "() => this.world.client.sendJoinLastRoom()", + "texture": { + "key": "main", + "frame": "grey-button" + }, + "x": 1474, + "y": 43 + }, + { + "type": "Image", + "id": "42c44031-0283-493f-84b0-702119a7182b", + "label": "x", + "components": [], + "texture": { + "key": "main", + "frame": "grey-x" + }, + "x": 1474, + "y": 41 } ], "plainObjects": [], diff --git a/src/scenes/games/sensei/widget/SenseiWidget.js b/src/scenes/games/sensei/widget/SenseiWidget.js index 7b4ed3a2..c0643311 100644 --- a/src/scenes/games/sensei/widget/SenseiWidget.js +++ b/src/scenes/games/sensei/widget/SenseiWidget.js @@ -17,7 +17,7 @@ import SenseiSpeech from "./SenseiSpeech"; export default class SenseiWidget extends BaseContainer { constructor(scene, x, y) { - super(scene, x ?? 409, y ?? 350); + super(scene, x ?? 415, y ?? 353); /** @type {SenseiSprite} */ this.sensei; diff --git a/src/scenes/games/sensei/widget/SenseiWidget.scene b/src/scenes/games/sensei/widget/SenseiWidget.scene index 22e2e6f0..26e158a3 100644 --- a/src/scenes/games/sensei/widget/SenseiWidget.scene +++ b/src/scenes/games/sensei/widget/SenseiWidget.scene @@ -19,8 +19,8 @@ "id": "6c8b4abc-527b-4fb7-86e5-ce92b00f7ca6", "label": "container_1", "components": [], - "x": 409, - "y": 350, + "x": 415, + "y": 353, "list": [ { "type": "Image", From a8d3aa328b24d1cbc2b2cf52963ab7156052ffa6 Mon Sep 17 00:00:00 2001 From: wizguin <16276645+wizguin@users.noreply.github.com> Date: Wed, 12 Apr 2023 08:42:40 +0100 Subject: [PATCH 091/200] sensei: Add menu item prefab --- src/scenes/games/sensei/menu/SenseiMenu.js | 5 ++ src/scenes/games/sensei/menu/SenseiMenu.scene | 14 ++++++ .../games/sensei/menu/SenseiMenuItem.js | 31 ++++++++++++ .../games/sensei/menu/SenseiMenuItem.scene | 48 +++++++++++++++++++ 4 files changed, 98 insertions(+) create mode 100644 src/scenes/games/sensei/menu/SenseiMenuItem.js create mode 100644 src/scenes/games/sensei/menu/SenseiMenuItem.scene diff --git a/src/scenes/games/sensei/menu/SenseiMenu.js b/src/scenes/games/sensei/menu/SenseiMenu.js index 43b9fe73..92933428 100644 --- a/src/scenes/games/sensei/menu/SenseiMenu.js +++ b/src/scenes/games/sensei/menu/SenseiMenu.js @@ -1,6 +1,7 @@ /* START OF COMPILED CODE */ import BaseContainer from "../../../base/BaseContainer"; +import SenseiMenuItem from "./SenseiMenuItem"; /* START-USER-IMPORTS */ /* END-USER-IMPORTS */ @@ -18,6 +19,10 @@ export default class SenseiMenu extends BaseContainer { bg.setOrigin(0.5, 0.5015197568389058); this.add(bg); + // senseiMenuItem + const senseiMenuItem = new SenseiMenuItem(scene, 0, -94); + this.add(senseiMenuItem); + this.bg = bg; /* START-USER-CTR-CODE */ diff --git a/src/scenes/games/sensei/menu/SenseiMenu.scene b/src/scenes/games/sensei/menu/SenseiMenu.scene index 2e491db0..03c6de2c 100644 --- a/src/scenes/games/sensei/menu/SenseiMenu.scene +++ b/src/scenes/games/sensei/menu/SenseiMenu.scene @@ -31,6 +31,20 @@ "frame": "menu/bg" }, "originY": 0.5015197568389058 + }, + { + "prefabId": "09107910-1b0d-415a-80fe-5bf424b8d97a", + "id": "fa3ec168-e4e1-4a50-8685-29a2d6e96874", + "unlock": [ + "x", + "y" + ], + "label": "senseiMenuItem", + "components": [], + "x": 0, + "y": -94, + "nestedPrefabs": [], + "list": [] } ] } diff --git a/src/scenes/games/sensei/menu/SenseiMenuItem.js b/src/scenes/games/sensei/menu/SenseiMenuItem.js new file mode 100644 index 00000000..645c2bcc --- /dev/null +++ b/src/scenes/games/sensei/menu/SenseiMenuItem.js @@ -0,0 +1,31 @@ +/* START OF COMPILED CODE */ + +import BaseContainer from "../../../base/BaseContainer"; +import Button from "../../../components/Button"; +/* START-USER-IMPORTS */ +/* END-USER-IMPORTS */ + +export default class SenseiMenuItem extends BaseContainer { + + constructor(scene, x, y) { + super(scene, x ?? 0, y ?? 0); + + // item + const item = scene.add.image(0, 0, "sensei", "menu/item-hover"); + this.add(item); + + // item (components) + const itemButton = new Button(item); + itemButton.spriteName = "menu/item"; + itemButton.callback = () => this.onClick(); + itemButton.activeFrame = false; + + /* START-USER-CTR-CODE */ + /* END-USER-CTR-CODE */ + } + + /* START-USER-CODE */ + /* END-USER-CODE */ +} + +/* END OF COMPILED CODE */ diff --git a/src/scenes/games/sensei/menu/SenseiMenuItem.scene b/src/scenes/games/sensei/menu/SenseiMenuItem.scene new file mode 100644 index 00000000..d1b13422 --- /dev/null +++ b/src/scenes/games/sensei/menu/SenseiMenuItem.scene @@ -0,0 +1,48 @@ +{ + "id": "09107910-1b0d-415a-80fe-5bf424b8d97a", + "sceneType": "PREFAB", + "settings": { + "compilerInsertSpaces": true, + "javaScriptInitFieldsInConstructor": true, + "exportClass": true, + "autoImport": true, + "superClassName": "BaseContainer", + "preloadMethodName": "", + "preloadPackFiles": [], + "createMethodName": "", + "borderWidth": 1520, + "borderHeight": 960 + }, + "displayList": [ + { + "type": "Container", + "id": "8aaa5e07-e214-4a10-9b85-d7015b5bbea1", + "label": "container_1", + "components": [], + "list": [ + { + "type": "Image", + "id": "e7941825-34f8-48c0-a2b3-90bb401eb0a7", + "label": "item", + "components": [ + "Button" + ], + "Button.spriteName": "menu/item", + "Button.callback": "() => this.onClick()", + "Button.activeFrame": false, + "texture": { + "key": "sensei", + "frame": "menu/item-hover" + } + } + ] + } + ], + "plainObjects": [], + "meta": { + "app": "Phaser Editor 2D - Scene Editor", + "url": "https://phasereditor2d.com", + "contentType": "phasereditor2d.core.scene.SceneContentType", + "version": 3 + } +} \ No newline at end of file From 07d4f475f22e67e59837d8d665bff04e15776705 Mon Sep 17 00:00:00 2001 From: wizguin <16276645+wizguin@users.noreply.github.com> Date: Wed, 12 Apr 2023 08:49:47 +0100 Subject: [PATCH 092/200] sensei: Set menu bg to nine slice --- src/scenes/games/sensei/menu/SenseiMenu.js | 9 ++++++--- src/scenes/games/sensei/menu/SenseiMenu.scene | 11 ++++++++--- 2 files changed, 14 insertions(+), 6 deletions(-) diff --git a/src/scenes/games/sensei/menu/SenseiMenu.js b/src/scenes/games/sensei/menu/SenseiMenu.js index 92933428..b6b7e64c 100644 --- a/src/scenes/games/sensei/menu/SenseiMenu.js +++ b/src/scenes/games/sensei/menu/SenseiMenu.js @@ -10,13 +10,16 @@ export default class SenseiMenu extends BaseContainer { constructor(scene, x, y) { super(scene, x ?? 0, y ?? 0); - /** @type {Phaser.GameObjects.Image} */ + /** @type {NinePatchContainer} */ this.bg; // bg - const bg = scene.add.image(0, 0, "sensei", "menu/bg"); - bg.setOrigin(0.5, 0.5015197568389058); + const bg = scene.add.ninePatchContainer(0, 0, 842, 323, "sensei", "menu/bg"); + bg.marginLeft = 60; + bg.marginTop = 40; + bg.marginRight = 60; + bg.marginBottom = 45; this.add(bg); // senseiMenuItem diff --git a/src/scenes/games/sensei/menu/SenseiMenu.scene b/src/scenes/games/sensei/menu/SenseiMenu.scene index 03c6de2c..bc50084a 100644 --- a/src/scenes/games/sensei/menu/SenseiMenu.scene +++ b/src/scenes/games/sensei/menu/SenseiMenu.scene @@ -21,8 +21,8 @@ "components": [], "list": [ { - "type": "Image", - "id": "45bc16aa-d4e2-4c36-8505-48fb586adbfc", + "type": "NinePatchContainer", + "id": "907491ca-6c4a-4227-a8f0-fd5774fb38af", "label": "bg", "scope": "CLASS", "components": [], @@ -30,7 +30,12 @@ "key": "sensei", "frame": "menu/bg" }, - "originY": 0.5015197568389058 + "width": 842, + "height": 323, + "marginLeft": 60, + "marginRight": 60, + "marginTop": 40, + "marginBottom": 45 }, { "prefabId": "09107910-1b0d-415a-80fe-5bf424b8d97a", From e453deaeb344f99859864b54cab34e51afb7eddd Mon Sep 17 00:00:00 2001 From: wizguin <16276645+wizguin@users.noreply.github.com> Date: Wed, 12 Apr 2023 11:20:36 +0100 Subject: [PATCH 093/200] sensei: Menu basic functionality --- src/scenes/games/sensei/Sensei.js | 2 +- src/scenes/games/sensei/Sensei.scene | 2 +- src/scenes/games/sensei/menu/SenseiMenu.js | 78 ++++++++++++++++++- src/scenes/games/sensei/menu/SenseiMenu.scene | 70 ++++++++++++++++- .../games/sensei/menu/SenseiMenuItem.js | 60 ++++++++++++++ .../games/sensei/menu/SenseiMenuItem.scene | 29 +++++++ 6 files changed, 231 insertions(+), 10 deletions(-) diff --git a/src/scenes/games/sensei/Sensei.js b/src/scenes/games/sensei/Sensei.js index 4ead4f81..48594e60 100644 --- a/src/scenes/games/sensei/Sensei.js +++ b/src/scenes/games/sensei/Sensei.js @@ -37,7 +37,7 @@ export default class Sensei extends GameScene { sensei.visible = true; // menu - const menu = new SenseiMenu(this, 1055, 774); + const menu = new SenseiMenu(this, 1060, 774); this.add.existing(menu); // xButton diff --git a/src/scenes/games/sensei/Sensei.scene b/src/scenes/games/sensei/Sensei.scene index e1ca0db5..92a478c9 100644 --- a/src/scenes/games/sensei/Sensei.scene +++ b/src/scenes/games/sensei/Sensei.scene @@ -40,7 +40,7 @@ "label": "menu", "scope": "CLASS", "components": [], - "x": 1055, + "x": 1060, "y": 774, "nestedPrefabs": [], "list": [] diff --git a/src/scenes/games/sensei/menu/SenseiMenu.js b/src/scenes/games/sensei/menu/SenseiMenu.js index b6b7e64c..8252ca04 100644 --- a/src/scenes/games/sensei/menu/SenseiMenu.js +++ b/src/scenes/games/sensei/menu/SenseiMenu.js @@ -12,28 +12,98 @@ export default class SenseiMenu extends BaseContainer { /** @type {NinePatchContainer} */ this.bg; + /** @type {SenseiMenuItem[]} */ + this.items; // bg - const bg = scene.add.ninePatchContainer(0, 0, 842, 323, "sensei", "menu/bg"); + const bg = scene.add.ninePatchContainer(0, 0, 848, 323, "sensei", "menu/bg"); bg.marginLeft = 60; bg.marginTop = 40; bg.marginRight = 60; bg.marginBottom = 45; this.add(bg); - // senseiMenuItem - const senseiMenuItem = new SenseiMenuItem(scene, 0, -94); - this.add(senseiMenuItem); + // senseiMenuItem4 + const senseiMenuItem4 = new SenseiMenuItem(scene, 0, 92); + senseiMenuItem4.visible = false; + this.add(senseiMenuItem4); + + // senseiMenuItem3 + const senseiMenuItem3 = new SenseiMenuItem(scene, 0, 30); + senseiMenuItem3.visible = false; + this.add(senseiMenuItem3); + + // senseiMenuItem2 + const senseiMenuItem2 = new SenseiMenuItem(scene, 0, -32); + senseiMenuItem2.visible = false; + this.add(senseiMenuItem2); + + // senseiMenuItem1 + const senseiMenuItem1 = new SenseiMenuItem(scene, 0, -94); + senseiMenuItem1.visible = false; + this.add(senseiMenuItem1); + + // lists + const items = [senseiMenuItem1, senseiMenuItem2, senseiMenuItem3, senseiMenuItem4]; this.bg = bg; + this.items = items; /* START-USER-CTR-CODE */ + + this.menus = { + start: [ + { + text: 'Competition Mode', + callback: () => console.log('matchmaking'), + icon: 'menu/icon/belt' + }, + { + text: 'Sensei Mode', + callback: () => console.log('sensei'), + icon: 'menu/icon/sensei' + }, + { + text: 'Instructions', + callback: () => console.log('instructions'), + icon: 'menu/icon/instructions' + }, + ] + } + + this.loadMenu('start') + /* END-USER-CTR-CODE */ } /* START-USER-CODE */ + + loadMenu(menu) { + if (!(menu in this.menus)) { + return + } + + this.menu = this.menus[menu] + + this.updateMenu() + } + + updateMenu() { + if (!this.menu) { + return + } + + for (let i = 0; i < this.menu.length; i++) { + let config = this.menu[i] + + let item = this.items[i] + + item.show(config) + } + } + /* END-USER-CODE */ } diff --git a/src/scenes/games/sensei/menu/SenseiMenu.scene b/src/scenes/games/sensei/menu/SenseiMenu.scene index bc50084a..b929498c 100644 --- a/src/scenes/games/sensei/menu/SenseiMenu.scene +++ b/src/scenes/games/sensei/menu/SenseiMenu.scene @@ -30,24 +30,74 @@ "key": "sensei", "frame": "menu/bg" }, - "width": 842, + "width": 848, "height": 323, "marginLeft": 60, "marginRight": 60, "marginTop": 40, "marginBottom": 45 }, + { + "prefabId": "09107910-1b0d-415a-80fe-5bf424b8d97a", + "id": "d7db7652-6890-4681-a0c5-b03d3dcb9aef", + "unlock": [ + "x", + "y", + "visible" + ], + "label": "senseiMenuItem4", + "components": [], + "x": 0, + "y": 92, + "visible": false, + "nestedPrefabs": [], + "list": [] + }, + { + "prefabId": "09107910-1b0d-415a-80fe-5bf424b8d97a", + "id": "6030acca-d185-4087-8b80-de8730932721", + "unlock": [ + "x", + "y", + "visible" + ], + "label": "senseiMenuItem3", + "components": [], + "x": 0, + "y": 30, + "visible": false, + "nestedPrefabs": [], + "list": [] + }, + { + "prefabId": "09107910-1b0d-415a-80fe-5bf424b8d97a", + "id": "5790a6f6-fa4c-4dcc-b87f-f561cf423691", + "unlock": [ + "x", + "y", + "visible" + ], + "label": "senseiMenuItem2", + "components": [], + "x": 0, + "y": -32, + "visible": false, + "nestedPrefabs": [], + "list": [] + }, { "prefabId": "09107910-1b0d-415a-80fe-5bf424b8d97a", "id": "fa3ec168-e4e1-4a50-8685-29a2d6e96874", "unlock": [ "x", - "y" + "y", + "visible" ], - "label": "senseiMenuItem", + "label": "senseiMenuItem1", "components": [], "x": 0, "y": -94, + "visible": false, "nestedPrefabs": [], "list": [] } @@ -60,5 +110,17 @@ "url": "https://phasereditor2d.com", "contentType": "phasereditor2d.core.scene.SceneContentType", "version": 3 - } + }, + "lists": [ + { + "id": "916431eb-b2a5-475a-9067-6b83e8e6ed16", + "label": "items", + "objectIds": [ + "fa3ec168-e4e1-4a50-8685-29a2d6e96874", + "5790a6f6-fa4c-4dcc-b87f-f561cf423691", + "6030acca-d185-4087-8b80-de8730932721", + "d7db7652-6890-4681-a0c5-b03d3dcb9aef" + ] + } + ] } \ No newline at end of file diff --git a/src/scenes/games/sensei/menu/SenseiMenuItem.js b/src/scenes/games/sensei/menu/SenseiMenuItem.js index 645c2bcc..ca97ca8f 100644 --- a/src/scenes/games/sensei/menu/SenseiMenuItem.js +++ b/src/scenes/games/sensei/menu/SenseiMenuItem.js @@ -10,21 +10,81 @@ export default class SenseiMenuItem extends BaseContainer { constructor(scene, x, y) { super(scene, x ?? 0, y ?? 0); + /** @type {Phaser.GameObjects.Text} */ + this.text; + /** @type {Phaser.GameObjects.Image} */ + this.icon; + + // item const item = scene.add.image(0, 0, "sensei", "menu/item-hover"); this.add(item); + // text + const text = scene.add.text(0, 0, "", {}); + text.setOrigin(0.5, 0.5); + text.text = "This is a menu item!"; + text.setStyle({ "color": "#000", "fixedWidth":720,"fontFamily": "CCComiccrazy", "fontSize": "26px" }); + this.add(text); + + // icon + const icon = scene.add.image(-342, 0, "sensei", "menu/icon/belt"); + icon.setOrigin(0.5106382978723404, 0.5106382978723404); + icon.visible = false; + this.add(icon); + // item (components) const itemButton = new Button(item); itemButton.spriteName = "menu/item"; itemButton.callback = () => this.onClick(); itemButton.activeFrame = false; + this.text = text; + this.icon = icon; + /* START-USER-CTR-CODE */ + + this.callback + /* END-USER-CTR-CODE */ } + /* START-USER-CODE */ + + show(config) { + this.text.text = config.text + + this.callback = config.callback + + if (config.icon) { + this.showIcon(config.icon) + } else { + this.hideIcon() + } + + super.show() + } + + showIcon(icon) { + this.icon.visible = true + this.icon.setFrame(icon) + + this.text.x = 50 + } + + hideIcon() { + this.icon.visible = false + + this.text.x = 0 + } + + onClick() { + if (this.callback) { + this.callback() + } + } + /* END-USER-CODE */ } diff --git a/src/scenes/games/sensei/menu/SenseiMenuItem.scene b/src/scenes/games/sensei/menu/SenseiMenuItem.scene index d1b13422..d569a6ed 100644 --- a/src/scenes/games/sensei/menu/SenseiMenuItem.scene +++ b/src/scenes/games/sensei/menu/SenseiMenuItem.scene @@ -34,6 +34,35 @@ "key": "sensei", "frame": "menu/item-hover" } + }, + { + "type": "Text", + "id": "6cf0380e-497d-4d1a-b1cf-89d06a966ee5", + "label": "text", + "scope": "CLASS", + "components": [], + "originX": 0.5, + "originY": 0.5, + "text": "This is a menu item!", + "fixedWidth": 720, + "fontFamily": "CCComiccrazy", + "fontSize": "26px", + "color": "#000" + }, + { + "type": "Image", + "id": "45287d6d-9695-479a-92e0-873e03a1f6af", + "label": "icon", + "scope": "CLASS", + "components": [], + "texture": { + "key": "sensei", + "frame": "menu/icon/belt" + }, + "x": -342, + "originX": 0.5106382978723404, + "originY": 0.5106382978723404, + "visible": false } ] } From b7481790c04bd9ba65ab68c1018ae45b5e1f849c Mon Sep 17 00:00:00 2001 From: wizguin <16276645+wizguin@users.noreply.github.com> Date: Wed, 12 Apr 2023 11:39:11 +0100 Subject: [PATCH 094/200] sensei: Auto resize menu bg --- src/scenes/games/sensei/Sensei.js | 2 -- src/scenes/games/sensei/menu/SenseiMenu.js | 19 +++++++++++++------ src/scenes/games/sensei/menu/SenseiMenu.scene | 4 +++- 3 files changed, 16 insertions(+), 9 deletions(-) diff --git a/src/scenes/games/sensei/Sensei.js b/src/scenes/games/sensei/Sensei.js index 48594e60..a0130771 100644 --- a/src/scenes/games/sensei/Sensei.js +++ b/src/scenes/games/sensei/Sensei.js @@ -62,8 +62,6 @@ export default class Sensei extends GameScene { create() { super.create() - - this.sensei.showSpeech('Hello world') } /* END-USER-CODE */ diff --git a/src/scenes/games/sensei/menu/SenseiMenu.js b/src/scenes/games/sensei/menu/SenseiMenu.js index 8252ca04..6ddd5c05 100644 --- a/src/scenes/games/sensei/menu/SenseiMenu.js +++ b/src/scenes/games/sensei/menu/SenseiMenu.js @@ -17,11 +17,12 @@ export default class SenseiMenu extends BaseContainer { // bg - const bg = scene.add.ninePatchContainer(0, 0, 848, 323, "sensei", "menu/bg"); + const bg = scene.add.ninePatchContainer(0, -162, 848, 323, "sensei", "menu/bg"); bg.marginLeft = 60; bg.marginTop = 40; bg.marginRight = 60; bg.marginBottom = 45; + bg.ninePatchContainerOriginY = 0; this.add(bg); // senseiMenuItem4 @@ -64,11 +65,11 @@ export default class SenseiMenu extends BaseContainer { callback: () => console.log('sensei'), icon: 'menu/icon/sensei' }, - { - text: 'Instructions', - callback: () => console.log('instructions'), - icon: 'menu/icon/instructions' - }, + // { + // text: 'Instructions', + // callback: () => console.log('instructions'), + // icon: 'menu/icon/instructions' + // } ] } @@ -102,6 +103,12 @@ export default class SenseiMenu extends BaseContainer { item.show(config) } + + this.resizeMenu() + } + + resizeMenu() { + this.bg.height = (this.menu.length * 61) + 78 } /* END-USER-CODE */ diff --git a/src/scenes/games/sensei/menu/SenseiMenu.scene b/src/scenes/games/sensei/menu/SenseiMenu.scene index b929498c..35317c36 100644 --- a/src/scenes/games/sensei/menu/SenseiMenu.scene +++ b/src/scenes/games/sensei/menu/SenseiMenu.scene @@ -30,12 +30,14 @@ "key": "sensei", "frame": "menu/bg" }, + "y": -162, "width": 848, "height": 323, "marginLeft": 60, "marginRight": 60, "marginTop": 40, - "marginBottom": 45 + "marginBottom": 45, + "ninePatchContainerOriginY": 0 }, { "prefabId": "09107910-1b0d-415a-80fe-5bf424b8d97a", From b5eaa360d434b43d924e92181c84e826f78aeb37 Mon Sep 17 00:00:00 2001 From: wizguin <16276645+wizguin@users.noreply.github.com> Date: Wed, 12 Apr 2023 12:59:52 +0100 Subject: [PATCH 095/200] sensei: Menu functionality --- src/scenes/games/sensei/Sensei.js | 8 +++ src/scenes/games/sensei/menu/SenseiMenu.js | 69 ++++++++++++++++--- .../games/sensei/menu/SenseiMenuItem.js | 26 ++++--- .../games/sensei/menu/SenseiMenuItem.scene | 6 +- .../games/sensei/widget/SenseiWidget.js | 6 +- 5 files changed, 92 insertions(+), 23 deletions(-) diff --git a/src/scenes/games/sensei/Sensei.js b/src/scenes/games/sensei/Sensei.js index a0130771..d1858e70 100644 --- a/src/scenes/games/sensei/Sensei.js +++ b/src/scenes/games/sensei/Sensei.js @@ -64,6 +64,14 @@ export default class Sensei extends GameScene { super.create() } + showSpeech(text) { + this.sensei.showSpeech(text) + } + + hideSpeech() { + this.sensei.hideSpeech() + } + /* END-USER-CODE */ } diff --git a/src/scenes/games/sensei/menu/SenseiMenu.js b/src/scenes/games/sensei/menu/SenseiMenu.js index 6ddd5c05..8d8194c4 100644 --- a/src/scenes/games/sensei/menu/SenseiMenu.js +++ b/src/scenes/games/sensei/menu/SenseiMenu.js @@ -57,22 +57,25 @@ export default class SenseiMenu extends BaseContainer { start: [ { text: 'Competition Mode', - callback: () => console.log('matchmaking'), - icon: 'menu/icon/belt' + icon: 'menu/icon/belt', + + over: this.competitionOver, + out: this.hideSpeech, + up: this.competitionUp }, { text: 'Sensei Mode', - callback: () => console.log('sensei'), - icon: 'menu/icon/sensei' - }, - // { - // text: 'Instructions', - // callback: () => console.log('instructions'), - // icon: 'menu/icon/instructions' - // } + icon: 'menu/icon/sensei', + + over: this.senseiOver, + out: this.hideSpeech, + up: this.senseiUp + } ] } + this.bindMenus() + this.loadMenu('start') /* END-USER-CTR-CODE */ @@ -81,6 +84,10 @@ export default class SenseiMenu extends BaseContainer { /* START-USER-CODE */ + hideSpeech() { + this.scene.hideSpeech() + } + loadMenu(menu) { if (!(menu in this.menus)) { return @@ -111,6 +118,48 @@ export default class SenseiMenu extends BaseContainer { this.bg.height = (this.menu.length * 61) + 78 } + bindMenus() { + for (let menu of Object.values(this.menus)) { + this.bindMenu(menu) + } + } + + bindMenu(menu) { + for (let item of menu) { + this.bindItem(item) + } + } + + bindItem(item) { + if (item.over) { + item.over = item.over.bind(this) + } + + if (item.out) { + item.out = item.out.bind(this) + } + + if (item.up) { + item.up = item.up.bind(this) + } + } + + competitionOver() { + this.scene.showSpeech('Do you wish to play\nAnd compete with another\nStudent, grasshopper?') + } + + competitionUp() { + + } + + senseiOver() { + this.scene.showSpeech('To become ninja,\nYou must challenge me and win.\nBut bring your black belt.') + } + + senseiUp() { + + } + /* END-USER-CODE */ } diff --git a/src/scenes/games/sensei/menu/SenseiMenuItem.js b/src/scenes/games/sensei/menu/SenseiMenuItem.js index ca97ca8f..a444c9c6 100644 --- a/src/scenes/games/sensei/menu/SenseiMenuItem.js +++ b/src/scenes/games/sensei/menu/SenseiMenuItem.js @@ -17,7 +17,7 @@ export default class SenseiMenuItem extends BaseContainer { // item - const item = scene.add.image(0, 0, "sensei", "menu/item-hover"); + const item = scene.add.image(0, 0, "sensei", "menu/item"); this.add(item); // text @@ -36,7 +36,9 @@ export default class SenseiMenuItem extends BaseContainer { // item (components) const itemButton = new Button(item); itemButton.spriteName = "menu/item"; - itemButton.callback = () => this.onClick(); + itemButton.hoverCallback = () => this.onOver(); + itemButton.hoverOutCallback = () => this.onOut(); + itemButton.callback = () => this.onUp(); itemButton.activeFrame = false; this.text = text; @@ -44,7 +46,9 @@ export default class SenseiMenuItem extends BaseContainer { /* START-USER-CTR-CODE */ - this.callback + this.onOver = () => {} + this.onOut = () => {} + this.onUp = () => {} /* END-USER-CTR-CODE */ } @@ -55,7 +59,7 @@ export default class SenseiMenuItem extends BaseContainer { show(config) { this.text.text = config.text - this.callback = config.callback + this.setCallbacks(config) if (config.icon) { this.showIcon(config.icon) @@ -66,6 +70,14 @@ export default class SenseiMenuItem extends BaseContainer { super.show() } + setCallbacks(config) { + let empty = () => {} + + this.onOver = config.over || empty + this.onOut = config.out || empty + this.onUp = config.up || empty + } + showIcon(icon) { this.icon.visible = true this.icon.setFrame(icon) @@ -79,12 +91,6 @@ export default class SenseiMenuItem extends BaseContainer { this.text.x = 0 } - onClick() { - if (this.callback) { - this.callback() - } - } - /* END-USER-CODE */ } diff --git a/src/scenes/games/sensei/menu/SenseiMenuItem.scene b/src/scenes/games/sensei/menu/SenseiMenuItem.scene index d569a6ed..e7c32933 100644 --- a/src/scenes/games/sensei/menu/SenseiMenuItem.scene +++ b/src/scenes/games/sensei/menu/SenseiMenuItem.scene @@ -28,11 +28,13 @@ "Button" ], "Button.spriteName": "menu/item", - "Button.callback": "() => this.onClick()", + "Button.hoverCallback": "() => this.onOver()", + "Button.hoverOutCallback": "() => this.onOut()", + "Button.callback": "() => this.onUp()", "Button.activeFrame": false, "texture": { "key": "sensei", - "frame": "menu/item-hover" + "frame": "menu/item" } }, { diff --git a/src/scenes/games/sensei/widget/SenseiWidget.js b/src/scenes/games/sensei/widget/SenseiWidget.js index c0643311..df3f1a22 100644 --- a/src/scenes/games/sensei/widget/SenseiWidget.js +++ b/src/scenes/games/sensei/widget/SenseiWidget.js @@ -141,8 +141,12 @@ export default class SenseiWidget extends BaseContainer { this.speech.show(text) } - hideAll() { + hideSpeech() { this.speech.close() + } + + hideAll() { + this.hideSpeech() this.belt.close() } From 0eaa61723a970d4f702e987ee72023d4011f6645 Mon Sep 17 00:00:00 2001 From: wizguin <16276645+wizguin@users.noreply.github.com> Date: Wed, 12 Apr 2023 18:48:55 +0100 Subject: [PATCH 096/200] sensei: Add SenseiMatch --- src/scenes/games/sensei/Sensei.js | 19 +++ src/scenes/games/sensei/Sensei.scene | 17 +++ src/scenes/games/sensei/match/SenseiMatch.js | 92 ++++++++++++ .../games/sensei/match/SenseiMatch.scene | 133 ++++++++++++++++++ .../games/sensei/match/SenseiMatchItem.js | 44 ++++++ .../games/sensei/match/SenseiMatchItem.scene | 70 +++++++++ src/scenes/games/sensei/menu/SenseiMenu.js | 27 ++-- 7 files changed, 394 insertions(+), 8 deletions(-) create mode 100644 src/scenes/games/sensei/match/SenseiMatch.js create mode 100644 src/scenes/games/sensei/match/SenseiMatch.scene create mode 100644 src/scenes/games/sensei/match/SenseiMatchItem.js create mode 100644 src/scenes/games/sensei/match/SenseiMatchItem.scene diff --git a/src/scenes/games/sensei/Sensei.js b/src/scenes/games/sensei/Sensei.js index d1858e70..bbab380c 100644 --- a/src/scenes/games/sensei/Sensei.js +++ b/src/scenes/games/sensei/Sensei.js @@ -4,6 +4,7 @@ import GameScene from "../GameScene"; import SenseiWidget from "./widget/SenseiWidget"; import SenseiMenu from "./menu/SenseiMenu"; import Button from "../../components/Button"; +import SenseiMatch from "./match/SenseiMatch"; /* START-USER-IMPORTS */ /* END-USER-IMPORTS */ @@ -16,6 +17,8 @@ export default class Sensei extends GameScene { this.sensei; /** @type {SenseiMenu} */ this.menu; + /** @type {SenseiMatch} */ + this.match; /* START-USER-CTR-CODE */ @@ -46,6 +49,11 @@ export default class Sensei extends GameScene { // x this.add.image(1474, 41, "main", "grey-x"); + // match + const match = new SenseiMatch(this, 1024, 424); + this.add.existing(match); + match.visible = false; + // xButton (components) const xButtonButton = new Button(xButton); xButtonButton.spriteName = "grey-button"; @@ -53,6 +61,7 @@ export default class Sensei extends GameScene { this.sensei = sensei; this.menu = menu; + this.match = match; this.events.emit("scene-awake"); } @@ -62,6 +71,16 @@ export default class Sensei extends GameScene { create() { super.create() + + this.showMenu('start') + } + + showMenu(menu) { + this.menu.show(menu) + } + + showMatch() { + this.match.show() } showSpeech(text) { diff --git a/src/scenes/games/sensei/Sensei.scene b/src/scenes/games/sensei/Sensei.scene index 92a478c9..3064770a 100644 --- a/src/scenes/games/sensei/Sensei.scene +++ b/src/scenes/games/sensei/Sensei.scene @@ -72,6 +72,23 @@ }, "x": 1474, "y": 41 + }, + { + "prefabId": "d658d0fb-b2e2-4eee-ba26-d33156d4eee1", + "id": "a3de0ee2-1b7a-4a18-a3a3-afa1e39efcb7", + "unlock": [ + "x", + "y", + "visible" + ], + "label": "match", + "scope": "CLASS", + "components": [], + "x": 1024, + "y": 424, + "visible": false, + "nestedPrefabs": [], + "list": [] } ], "plainObjects": [], diff --git a/src/scenes/games/sensei/match/SenseiMatch.js b/src/scenes/games/sensei/match/SenseiMatch.js new file mode 100644 index 00000000..f2132af1 --- /dev/null +++ b/src/scenes/games/sensei/match/SenseiMatch.js @@ -0,0 +1,92 @@ +/* START OF COMPILED CODE */ + +import BaseContainer from "../../../base/BaseContainer"; +import DraggableContainer from "../../../components/DraggableContainer"; +import SenseiMatchItem from "./SenseiMatchItem"; +import Button from "../../../components/Button"; +/* START-USER-IMPORTS */ +/* END-USER-IMPORTS */ + +export default class SenseiMatch extends BaseContainer { + + constructor(scene, x, y) { + super(scene, x ?? 760, y ?? 480); + + // bg + const bg = scene.add.image(0, 0, "sensei", "match/window"); + this.add(bg); + + // item2 + const item2 = new SenseiMatchItem(scene, 0, 46); + this.add(item2); + + // item1 + const item1 = new SenseiMatchItem(scene, 2, 98); + this.add(item1); + + // text_1 + const text_1 = scene.add.text(0, -20, "", {}); + text_1.setOrigin(0.5, 0.5); + text_1.text = "Waiting for more players"; + text_1.setStyle({ "align": "center", "fixedWidth":460,"fontFamily": "Arial Narrow", "fontSize": "32px" }); + this.add(text_1); + + // spinner + const spinner = scene.add.image(0, -100, "sensei", "match/spinner"); + spinner.setOrigin(0.5, 0.5063291139240507); + spinner.visible = false; + this.add(spinner); + + // xButton + const xButton = scene.add.image(234, -124, "main", "blue-button"); + this.add(xButton); + + // xIcon + const xIcon = scene.add.image(234, -126, "main", "blue-x"); + this.add(xIcon); + + // this (components) + const thisDraggableContainer = new DraggableContainer(this); + thisDraggableContainer.handle = bg; + + // xButton (components) + const xButtonButton = new Button(xButton); + xButtonButton.spriteName = "blue-button"; + xButtonButton.callback = () => this.close(); + + /* START-USER-CTR-CODE */ + + // Spinner + scene.tweens.add({ + targets: spinner, + angle: { from: 0, to: 180 }, + duration: 900, + repeat: -1, + ease: 'Cubic' + }) + + this.originalX = this.x + this.originalY = this.y + + /* END-USER-CTR-CODE */ + } + + /* START-USER-CODE */ + + show() { + this.x = this.originalX + this.y = this.originalY + + super.show() + } + + close() { + super.close() + + this.scene.showMenu('start') + } + + /* END-USER-CODE */ +} + +/* END OF COMPILED CODE */ diff --git a/src/scenes/games/sensei/match/SenseiMatch.scene b/src/scenes/games/sensei/match/SenseiMatch.scene new file mode 100644 index 00000000..38bcebed --- /dev/null +++ b/src/scenes/games/sensei/match/SenseiMatch.scene @@ -0,0 +1,133 @@ +{ + "id": "d658d0fb-b2e2-4eee-ba26-d33156d4eee1", + "sceneType": "PREFAB", + "settings": { + "compilerInsertSpaces": true, + "snapWidth": 80, + "snapHeight": 79, + "javaScriptInitFieldsInConstructor": true, + "exportClass": true, + "autoImport": true, + "superClassName": "BaseContainer", + "preloadMethodName": "", + "preloadPackFiles": [], + "createMethodName": "", + "borderWidth": 1520, + "borderHeight": 960 + }, + "displayList": [ + { + "type": "Container", + "id": "e37bfe4e-e273-4274-9d00-41841d00298a", + "label": "container_1", + "components": [ + "DraggableContainer" + ], + "DraggableContainer.handle": "bg", + "x": 760, + "y": 480, + "list": [ + { + "type": "Image", + "id": "5688e8cb-f7d7-45bc-b786-59a8031f6dc7", + "label": "bg", + "components": [], + "texture": { + "key": "sensei", + "frame": "match/window" + } + }, + { + "prefabId": "07fe953a-6cae-4a48-aa0d-6ab406415f4e", + "id": "12bc02a8-5618-461e-83de-1a00a7412997", + "unlock": [ + "x", + "y" + ], + "label": "item2", + "components": [], + "x": 0, + "y": 46, + "nestedPrefabs": [], + "list": [] + }, + { + "prefabId": "07fe953a-6cae-4a48-aa0d-6ab406415f4e", + "id": "c80802ff-9240-44e6-9512-d6cb00e47373", + "unlock": [ + "x", + "y" + ], + "label": "item1", + "components": [], + "x": 2, + "y": 98, + "nestedPrefabs": [], + "list": [] + }, + { + "type": "Text", + "id": "7b204eaf-dbd4-42cb-8322-ce985fdd95fd", + "label": "text_1", + "components": [], + "y": -20, + "originX": 0.5, + "originY": 0.5, + "text": "Waiting for more players", + "fixedWidth": 460, + "align": "center", + "fontFamily": "Arial Narrow", + "fontSize": "32px" + }, + { + "type": "Image", + "id": "fd40b908-3817-45e9-9d72-e9fa95d657f1", + "label": "spinner", + "components": [], + "texture": { + "key": "sensei", + "frame": "match/spinner" + }, + "y": -100, + "originY": 0.5063291139240507, + "visible": false + }, + { + "type": "Image", + "id": "1e74f682-47c7-48d3-b696-f422a26ef831", + "label": "xButton", + "components": [ + "Button" + ], + "Button.spriteName": "blue-button", + "Button.callback": "() => this.close()", + "texture": { + "key": "main", + "frame": "blue-button" + }, + "x": 234, + "y": -124 + }, + { + "type": "Image", + "id": "931e5701-f927-410a-9586-ec26268a6b61", + "label": "xIcon", + "components": [], + "texture": { + "key": "main", + "frame": "blue-x" + }, + "x": 234, + "y": -126 + } + ] + } + ], + "plainObjects": [], + "meta": { + "app": "Phaser Editor 2D - Scene Editor", + "url": "https://phasereditor2d.com", + "contentType": "phasereditor2d.core.scene.SceneContentType", + "version": 3 + } +} \ No newline at end of file diff --git a/src/scenes/games/sensei/match/SenseiMatchItem.js b/src/scenes/games/sensei/match/SenseiMatchItem.js new file mode 100644 index 00000000..8495226c --- /dev/null +++ b/src/scenes/games/sensei/match/SenseiMatchItem.js @@ -0,0 +1,44 @@ +/* START OF COMPILED CODE */ + +import BaseContainer from "../../../base/BaseContainer"; +/* START-USER-IMPORTS */ +/* END-USER-IMPORTS */ + +export default class SenseiMatchItem extends BaseContainer { + + constructor(scene, x, y) { + super(scene, x ?? 760, y ?? 480); + + /** @type {Phaser.GameObjects.Image} */ + this.icon; + /** @type {Phaser.GameObjects.Text} */ + this.username; + + + // item + const item = scene.add.image(0, 0, "main", "buddy/item"); + this.add(item); + + // icon + const icon = scene.add.image(-137, 0, "main", "buddy/icon-offline"); + this.add(icon); + + // username + const username = scene.add.text(25, 0, "", {}); + username.setOrigin(0.5, 0.5); + username.setStyle({ "fixedWidth":270,"fontFamily": "Arial", "fontSize": "24px" }); + this.add(username); + + this.icon = icon; + this.username = username; + + /* START-USER-CTR-CODE */ + /* END-USER-CTR-CODE */ + } + + + /* START-USER-CODE */ + /* END-USER-CODE */ +} + +/* END OF COMPILED CODE */ diff --git a/src/scenes/games/sensei/match/SenseiMatchItem.scene b/src/scenes/games/sensei/match/SenseiMatchItem.scene new file mode 100644 index 00000000..a988c1a6 --- /dev/null +++ b/src/scenes/games/sensei/match/SenseiMatchItem.scene @@ -0,0 +1,70 @@ +{ + "id": "07fe953a-6cae-4a48-aa0d-6ab406415f4e", + "sceneType": "PREFAB", + "settings": { + "compilerInsertSpaces": true, + "javaScriptInitFieldsInConstructor": true, + "exportClass": true, + "autoImport": true, + "superClassName": "BaseContainer", + "preloadMethodName": "", + "preloadPackFiles": [], + "createMethodName": "", + "borderWidth": 1520, + "borderHeight": 960 + }, + "displayList": [ + { + "type": "Container", + "id": "dd60dc30-073d-45d0-a9ee-dd562211f7f5", + "label": "container_1", + "components": [], + "x": 760, + "y": 480, + "list": [ + { + "type": "Image", + "id": "a26cef61-4e6e-48e6-bf95-9462fb1949c6", + "label": "item", + "components": [], + "texture": { + "key": "main", + "frame": "buddy/item" + } + }, + { + "type": "Image", + "id": "940a9878-56ab-4312-903e-18df2c2c58a0", + "label": "icon", + "scope": "CLASS", + "components": [], + "texture": { + "key": "main", + "frame": "buddy/icon-offline" + }, + "x": -137 + }, + { + "type": "Text", + "id": "f366378c-85d3-48fe-b1e9-a20d9b0e482f", + "label": "username", + "scope": "CLASS", + "components": [], + "x": 25, + "originX": 0.5, + "originY": 0.5, + "fixedWidth": 270, + "fontFamily": "Arial", + "fontSize": "24px" + } + ] + } + ], + "plainObjects": [], + "meta": { + "app": "Phaser Editor 2D - Scene Editor", + "url": "https://phasereditor2d.com", + "contentType": "phasereditor2d.core.scene.SceneContentType", + "version": 3 + } +} \ No newline at end of file diff --git a/src/scenes/games/sensei/menu/SenseiMenu.js b/src/scenes/games/sensei/menu/SenseiMenu.js index 8d8194c4..4ae8be4f 100644 --- a/src/scenes/games/sensei/menu/SenseiMenu.js +++ b/src/scenes/games/sensei/menu/SenseiMenu.js @@ -56,7 +56,7 @@ export default class SenseiMenu extends BaseContainer { this.menus = { start: [ { - text: 'Competition Mode', + text: 'Earn your belts', icon: 'menu/icon/belt', over: this.competitionOver, @@ -64,7 +64,7 @@ export default class SenseiMenu extends BaseContainer { up: this.competitionUp }, { - text: 'Sensei Mode', + text: 'Challenge Sensei', icon: 'menu/icon/sensei', over: this.senseiOver, @@ -76,19 +76,15 @@ export default class SenseiMenu extends BaseContainer { this.bindMenus() - this.loadMenu('start') - /* END-USER-CTR-CODE */ } /* START-USER-CODE */ - hideSpeech() { - this.scene.hideSpeech() - } + show(menu) { + this.reset() - loadMenu(menu) { if (!(menu in this.menus)) { return } @@ -96,6 +92,8 @@ export default class SenseiMenu extends BaseContainer { this.menu = this.menus[menu] this.updateMenu() + + super.show() } updateMenu() { @@ -149,7 +147,10 @@ export default class SenseiMenu extends BaseContainer { } competitionUp() { + this.close() + this.hideSpeech() + this.scene.showMatch() } senseiOver() { @@ -160,6 +161,16 @@ export default class SenseiMenu extends BaseContainer { } + hideSpeech() { + this.scene.hideSpeech() + } + + reset() { + for (let item of this.items) { + item.close() + } + } + /* END-USER-CODE */ } From 60491d95d1c49cb3d066f67a27beb3264f47d545 Mon Sep 17 00:00:00 2001 From: wizguin <16276645+wizguin@users.noreply.github.com> Date: Thu, 13 Apr 2023 10:06:21 +0100 Subject: [PATCH 097/200] sensei: Join and leave matchmaking --- src/scenes/games/sensei/Sensei.js | 6 ++ src/scenes/games/sensei/match/SenseiMatch.js | 55 +++++++++++++++---- .../games/sensei/match/SenseiMatch.scene | 19 ++++--- .../games/sensei/match/SenseiMatchItem.js | 40 +++++++++++++- .../games/sensei/match/SenseiMatchItem.scene | 15 ++++- 5 files changed, 113 insertions(+), 22 deletions(-) diff --git a/src/scenes/games/sensei/Sensei.js b/src/scenes/games/sensei/Sensei.js index bbab380c..ba6dd2b6 100644 --- a/src/scenes/games/sensei/Sensei.js +++ b/src/scenes/games/sensei/Sensei.js @@ -91,6 +91,12 @@ export default class Sensei extends GameScene { this.sensei.hideSpeech() } + stop() { + this.match.close() + + super.stop() + } + /* END-USER-CODE */ } diff --git a/src/scenes/games/sensei/match/SenseiMatch.js b/src/scenes/games/sensei/match/SenseiMatch.js index f2132af1..ab35d5c4 100644 --- a/src/scenes/games/sensei/match/SenseiMatch.js +++ b/src/scenes/games/sensei/match/SenseiMatch.js @@ -12,24 +12,32 @@ export default class SenseiMatch extends BaseContainer { constructor(scene, x, y) { super(scene, x ?? 760, y ?? 480); + /** @type {SenseiMatchItem} */ + this.opponent; + /** @type {SenseiMatchItem} */ + this.myPlayer; + /** @type {Phaser.GameObjects.Text} */ + this.text; + + // bg const bg = scene.add.image(0, 0, "sensei", "match/window"); this.add(bg); - // item2 - const item2 = new SenseiMatchItem(scene, 0, 46); - this.add(item2); + // opponent + const opponent = new SenseiMatchItem(scene, 0, 98); + this.add(opponent); - // item1 - const item1 = new SenseiMatchItem(scene, 2, 98); - this.add(item1); + // myPlayer + const myPlayer = new SenseiMatchItem(scene, 0, 46); + this.add(myPlayer); - // text_1 - const text_1 = scene.add.text(0, -20, "", {}); - text_1.setOrigin(0.5, 0.5); - text_1.text = "Waiting for more players"; - text_1.setStyle({ "align": "center", "fixedWidth":460,"fontFamily": "Arial Narrow", "fontSize": "32px" }); - this.add(text_1); + // text + const text = scene.add.text(0, -20, "", {}); + text.setOrigin(0.5, 0.5); + text.text = "Waiting for more players"; + text.setStyle({ "align": "center", "fixedWidth":460,"fontFamily": "Arial Narrow", "fontSize": "32px" }); + this.add(text); // spinner const spinner = scene.add.image(0, -100, "sensei", "match/spinner"); @@ -54,6 +62,10 @@ export default class SenseiMatch extends BaseContainer { xButtonButton.spriteName = "blue-button"; xButtonButton.callback = () => this.close(); + this.opponent = opponent; + this.myPlayer = myPlayer; + this.text = text; + /* START-USER-CTR-CODE */ // Spinner @@ -71,21 +83,40 @@ export default class SenseiMatch extends BaseContainer { /* END-USER-CTR-CODE */ } + /* START-USER-CODE */ + addListeners() { + this.network.events.on('join_matchmaking', this.handleJoinMatchmaking, this) + } + + removeListeners() { + this.network.events.off('join_matchmaking', this.handleJoinMatchmaking, this) + } + show() { this.x = this.originalX this.y = this.originalY + this.addListeners() + this.scene.network.send('join_matchmaking') + super.show() } close() { + this.scene.network.send('leave_matchmaking') + this.removeListeners() + super.close() this.scene.showMenu('start') } + handleJoinMatchmaking() { + this.myPlayer.setItem(this.world.client.penguin.username) + } + /* END-USER-CODE */ } diff --git a/src/scenes/games/sensei/match/SenseiMatch.scene b/src/scenes/games/sensei/match/SenseiMatch.scene index 38bcebed..3ef742b7 100644 --- a/src/scenes/games/sensei/match/SenseiMatch.scene +++ b/src/scenes/games/sensei/match/SenseiMatch.scene @@ -39,36 +39,39 @@ }, { "prefabId": "07fe953a-6cae-4a48-aa0d-6ab406415f4e", - "id": "12bc02a8-5618-461e-83de-1a00a7412997", + "id": "c80802ff-9240-44e6-9512-d6cb00e47373", "unlock": [ "x", "y" ], - "label": "item2", + "label": "opponent", + "scope": "CLASS", "components": [], "x": 0, - "y": 46, + "y": 98, "nestedPrefabs": [], "list": [] }, { "prefabId": "07fe953a-6cae-4a48-aa0d-6ab406415f4e", - "id": "c80802ff-9240-44e6-9512-d6cb00e47373", + "id": "12bc02a8-5618-461e-83de-1a00a7412997", "unlock": [ "x", "y" ], - "label": "item1", + "label": "myPlayer", + "scope": "CLASS", "components": [], - "x": 2, - "y": 98, + "x": 0, + "y": 46, "nestedPrefabs": [], "list": [] }, { "type": "Text", "id": "7b204eaf-dbd4-42cb-8322-ce985fdd95fd", - "label": "text_1", + "label": "text", + "scope": "CLASS", "components": [], "y": -20, "originX": 0.5, diff --git a/src/scenes/games/sensei/match/SenseiMatchItem.js b/src/scenes/games/sensei/match/SenseiMatchItem.js index 8495226c..84989e9c 100644 --- a/src/scenes/games/sensei/match/SenseiMatchItem.js +++ b/src/scenes/games/sensei/match/SenseiMatchItem.js @@ -11,6 +11,8 @@ export default class SenseiMatchItem extends BaseContainer { /** @type {Phaser.GameObjects.Image} */ this.icon; + /** @type {Phaser.GameObjects.Image} */ + this.spinner; /** @type {Phaser.GameObjects.Text} */ this.username; @@ -20,9 +22,14 @@ export default class SenseiMatchItem extends BaseContainer { this.add(item); // icon - const icon = scene.add.image(-137, 0, "main", "buddy/icon-offline"); + const icon = scene.add.image(-137, 0, "main", "buddy/icon-player"); + icon.visible = false; this.add(icon); + // spinner + const spinner = scene.add.image(-137, 0, "main", "buddy/icon-load"); + this.add(spinner); + // username const username = scene.add.text(25, 0, "", {}); username.setOrigin(0.5, 0.5); @@ -30,14 +37,45 @@ export default class SenseiMatchItem extends BaseContainer { this.add(username); this.icon = icon; + this.spinner = spinner; this.username = username; /* START-USER-CTR-CODE */ + + // Spinner + scene.tweens.add({ + targets: this.spinner, + angle: { from: 0, to: 180 }, + duration: 900, + repeat: -1, + ease: 'Cubic' + }) + /* END-USER-CTR-CODE */ } /* START-USER-CODE */ + + setItem(player) { + if (!player) { + clearItem() + return + } + + this.username.text = player + + this.spinner.visible = false + this.icon.visible = true + } + + clearItem() { + this.username.text = '' + + this.icon.visible = false + this.spinner.visible = true + } + /* END-USER-CODE */ } diff --git a/src/scenes/games/sensei/match/SenseiMatchItem.scene b/src/scenes/games/sensei/match/SenseiMatchItem.scene index a988c1a6..d801a8a5 100644 --- a/src/scenes/games/sensei/match/SenseiMatchItem.scene +++ b/src/scenes/games/sensei/match/SenseiMatchItem.scene @@ -40,7 +40,20 @@ "components": [], "texture": { "key": "main", - "frame": "buddy/icon-offline" + "frame": "buddy/icon-player" + }, + "x": -137, + "visible": false + }, + { + "type": "Image", + "id": "b4fdaa43-9dc9-4152-a95e-28f3de2b805e", + "label": "spinner", + "scope": "CLASS", + "components": [], + "texture": { + "key": "main", + "frame": "buddy/icon-load" }, "x": -137 }, From b362ea3d36bdff1c30a6e71ec0a7233d8528ea0b Mon Sep 17 00:00:00 2001 From: wizguin <16276645+wizguin@users.noreply.github.com> Date: Thu, 13 Apr 2023 13:07:16 +0100 Subject: [PATCH 098/200] sensei: Match making matching and tick --- src/scenes/games/sensei/match/SenseiMatch.js | 46 +++++++++++++++---- .../games/sensei/match/SenseiMatch.scene | 22 +++++++-- 2 files changed, 56 insertions(+), 12 deletions(-) diff --git a/src/scenes/games/sensei/match/SenseiMatch.js b/src/scenes/games/sensei/match/SenseiMatch.js index ab35d5c4..b9470a69 100644 --- a/src/scenes/games/sensei/match/SenseiMatch.js +++ b/src/scenes/games/sensei/match/SenseiMatch.js @@ -17,7 +17,11 @@ export default class SenseiMatch extends BaseContainer { /** @type {SenseiMatchItem} */ this.myPlayer; /** @type {Phaser.GameObjects.Text} */ - this.text; + this.message; + /** @type {Phaser.GameObjects.Text} */ + this.time; + /** @type {Phaser.GameObjects.Image} */ + this.spinner; // bg @@ -32,17 +36,23 @@ export default class SenseiMatch extends BaseContainer { const myPlayer = new SenseiMatchItem(scene, 0, 46); this.add(myPlayer); - // text - const text = scene.add.text(0, -20, "", {}); - text.setOrigin(0.5, 0.5); - text.text = "Waiting for more players"; - text.setStyle({ "align": "center", "fixedWidth":460,"fontFamily": "Arial Narrow", "fontSize": "32px" }); - this.add(text); + // message + const message = scene.add.text(0, -20, "", {}); + message.setOrigin(0.5, 0.5); + message.text = "Waiting for more players"; + message.setStyle({ "align": "center", "fixedWidth":460,"fontFamily": "Arial Narrow", "fontSize": "32px" }); + this.add(message); + + // time + const time = scene.add.text(0, -100, "", {}); + time.setOrigin(0.5, 0.5); + time.text = "10"; + time.setStyle({ "align": "center", "fixedWidth":60,"fontFamily": "Arial", "fontSize": "32px", "fontStyle": "bold" }); + this.add(time); // spinner const spinner = scene.add.image(0, -100, "sensei", "match/spinner"); spinner.setOrigin(0.5, 0.5063291139240507); - spinner.visible = false; this.add(spinner); // xButton @@ -64,7 +74,9 @@ export default class SenseiMatch extends BaseContainer { this.opponent = opponent; this.myPlayer = myPlayer; - this.text = text; + this.message = message; + this.time = time; + this.spinner = spinner; /* START-USER-CTR-CODE */ @@ -88,13 +100,17 @@ export default class SenseiMatch extends BaseContainer { addListeners() { this.network.events.on('join_matchmaking', this.handleJoinMatchmaking, this) + this.network.events.on('tick_matchmaking', this.handleTickMatchmaking, this) } removeListeners() { this.network.events.off('join_matchmaking', this.handleJoinMatchmaking, this) + this.network.events.off('tick_matchmaking', this.handleTickMatchmaking, this) } show() { + this.showWaitingElements(true) + this.x = this.originalX this.y = this.originalY @@ -117,6 +133,18 @@ export default class SenseiMatch extends BaseContainer { this.myPlayer.setItem(this.world.client.penguin.username) } + handleTickMatchmaking(args) { + this.showWaitingElements(false) + + this.time.text = args.tick + } + + showWaitingElements(show) { + this.spinner.visible = !show + this.time.visible = !show + this.message.visible = show + } + /* END-USER-CODE */ } diff --git a/src/scenes/games/sensei/match/SenseiMatch.scene b/src/scenes/games/sensei/match/SenseiMatch.scene index 3ef742b7..32220b6c 100644 --- a/src/scenes/games/sensei/match/SenseiMatch.scene +++ b/src/scenes/games/sensei/match/SenseiMatch.scene @@ -70,7 +70,7 @@ { "type": "Text", "id": "7b204eaf-dbd4-42cb-8322-ce985fdd95fd", - "label": "text", + "label": "message", "scope": "CLASS", "components": [], "y": -20, @@ -82,18 +82,34 @@ "fontFamily": "Arial Narrow", "fontSize": "32px" }, + { + "type": "Text", + "id": "150d74b5-74fe-4764-9d54-4a697e9eda43", + "label": "time", + "scope": "CLASS", + "components": [], + "y": -100, + "originX": 0.5, + "originY": 0.5, + "text": "10", + "fixedWidth": 60, + "align": "center", + "fontFamily": "Arial", + "fontSize": "32px", + "fontStyle": "bold" + }, { "type": "Image", "id": "fd40b908-3817-45e9-9d72-e9fa95d657f1", "label": "spinner", + "scope": "CLASS", "components": [], "texture": { "key": "sensei", "frame": "match/spinner" }, "y": -100, - "originY": 0.5063291139240507, - "visible": false + "originY": 0.5063291139240507 }, { "type": "Image", From 792e88cc45eda7d1e72e23462a18862ae64a1444 Mon Sep 17 00:00:00 2001 From: wizguin <16276645+wizguin@users.noreply.github.com> Date: Thu, 13 Apr 2023 16:52:00 +0100 Subject: [PATCH 099/200] sensei: Add join_sensei --- src/scenes/games/sensei/menu/SenseiMenu.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/scenes/games/sensei/menu/SenseiMenu.js b/src/scenes/games/sensei/menu/SenseiMenu.js index 4ae8be4f..40a83a02 100644 --- a/src/scenes/games/sensei/menu/SenseiMenu.js +++ b/src/scenes/games/sensei/menu/SenseiMenu.js @@ -158,7 +158,7 @@ export default class SenseiMenu extends BaseContainer { } senseiUp() { - + this.network.send('join_sensei') } hideSpeech() { From 06c1d302c4f14487ee36769797821b6396fea0fb Mon Sep 17 00:00:00 2001 From: wizguin <16276645+wizguin@users.noreply.github.com> Date: Thu, 13 Apr 2023 17:08:40 +0100 Subject: [PATCH 100/200] sensei: Sensei battle sprites visibility --- src/scenes/games/card/CardJitsuPlayer.js | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/scenes/games/card/CardJitsuPlayer.js b/src/scenes/games/card/CardJitsuPlayer.js index 7171df11..4318819b 100644 --- a/src/scenes/games/card/CardJitsuPlayer.js +++ b/src/scenes/games/card/CardJitsuPlayer.js @@ -17,6 +17,7 @@ export default class CardJitsuPlayer extends BaseContainer { this.seat this.username this.rank + this.sensei this.battle = new CardJitsuBattle(this) this.color @@ -53,6 +54,8 @@ export default class CardJitsuPlayer extends BaseContainer { this.rank = user.ninjaRank this.color = this.world.getColor(user.color) + + this.sensei = user.sensei || false } setColor(color) { @@ -60,13 +63,13 @@ export default class CardJitsuPlayer extends BaseContainer { } setBelt(rank) { - this.battle.setBelt(rank) + this.battle.setBelt(this.sensei ? 0 : rank) } playBattle(battle) { this.battle.play(battle) - this.battle.sensei.visible = false + this.battle.sensei.visible = this.sensei this.setColor(this.color) this.setBelt(this.rank) From 0a40376f7f0060e3d6f5a09a2539da925e4132c1 Mon Sep 17 00:00:00 2001 From: wizguin <16276645+wizguin@users.noreply.github.com> Date: Mon, 17 Apr 2023 15:45:45 +0100 Subject: [PATCH 101/200] cardjitsu: Use ints in cards config --- src/scenes/games/card/CardJitsu.js | 4 ---- src/scenes/games/card/card/CardJitsuCard.js | 4 ++-- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/src/scenes/games/card/CardJitsu.js b/src/scenes/games/card/CardJitsu.js index 88445e3d..70e856e3 100644 --- a/src/scenes/games/card/CardJitsu.js +++ b/src/scenes/games/card/CardJitsu.js @@ -308,10 +308,6 @@ export default class CardJitsu extends GameScene { this.playBattle('ambient') let winner = this.players[winSeat] - - // temp until made int on server - winCards = winCards.map(i => parseInt(i)) - let cards = winner.findWins(winCards) for (let i = 0; i < cards.length; i++) { diff --git a/src/scenes/games/card/card/CardJitsuCard.js b/src/scenes/games/card/card/CardJitsuCard.js index d20e2af1..7879e120 100644 --- a/src/scenes/games/card/card/CardJitsuCard.js +++ b/src/scenes/games/card/card/CardJitsuCard.js @@ -159,8 +159,8 @@ export default class CardJitsuCard extends BaseContainer { updateCard(card) { let tint = layout.colors[card.color].color - this.id = parseInt(card.card_id) - this.powerId = parseInt(card.power_id) + this.id = card.card_id + this.powerId = card.power_id this.elementId = card.element this.value.text = card.value From ebeb5e80e6bdf32a4f0f26535e96dd921b7fb366 Mon Sep 17 00:00:00 2001 From: wizguin <16276645+wizguin@users.noreply.github.com> Date: Mon, 17 Apr 2023 16:08:11 +0100 Subject: [PATCH 102/200] cardjitsu: Earning ninja mask --- src/scenes/games/card/CardJitsu.js | 5 +- src/scenes/games/sensei/widget/SenseiBelt.js | 37 +++++++++++- .../games/sensei/widget/SenseiBelt.scene | 15 +++++ .../games/sensei/widget/SenseiWidget.js | 56 ++++++++++++++++++- .../games/sensei/widget/SenseiWidget.scene | 15 +++++ 5 files changed, 121 insertions(+), 7 deletions(-) diff --git a/src/scenes/games/card/CardJitsu.js b/src/scenes/games/card/CardJitsu.js index 70e856e3..269a0962 100644 --- a/src/scenes/games/card/CardJitsu.js +++ b/src/scenes/games/card/CardJitsu.js @@ -443,10 +443,7 @@ export default class CardJitsu extends GameScene { } this.interface.events.once('sensei_ready', () => { - let sensei = this.interface.loadedWidgets.Sensei - - sensei.rankId = this.rankUp - sensei.loadMenu('beltAward') + this.interface.loadedWidgets.Sensei.rankUp(this.rankUp) }) this.interface.loadWidget('Sensei') diff --git a/src/scenes/games/sensei/widget/SenseiBelt.js b/src/scenes/games/sensei/widget/SenseiBelt.js index 2bca79e7..2521c74b 100644 --- a/src/scenes/games/sensei/widget/SenseiBelt.js +++ b/src/scenes/games/sensei/widget/SenseiBelt.js @@ -9,8 +9,14 @@ export default class SenseiBelt extends BaseContainer { constructor(scene, x, y) { super(scene, x ?? 760, y ?? 480); + /** @type {Phaser.GameObjects.Image} */ + this.belt; /** @type {Phaser.GameObjects.Image} */ this.color; + /** @type {Phaser.GameObjects.Image} */ + this.shadow; + /** @type {Phaser.GameObjects.Image} */ + this.ninja; // belt @@ -28,7 +34,16 @@ export default class SenseiBelt extends BaseContainer { shadow.setOrigin(0.5, 0.5014492753623189); this.add(shadow); + // ninja + const ninja = scene.add.image(0, 0, "sensei", "mask/mask"); + ninja.setOrigin(0.500823723228995, 0.5); + ninja.visible = false; + this.add(ninja); + + this.belt = belt; this.color = color; + this.shadow = shadow; + this.ninja = ninja; /* START-USER-CTR-CODE */ @@ -40,11 +55,31 @@ export default class SenseiBelt extends BaseContainer { /* START-USER-CODE */ - show(rank) { + showBelt(rank) { + this.showBeltSprites(true) this.color.tint = this.colors[rank - 1] + this.show() + } + + showMask() { + this.showBeltSprites(false) + this.show() + } + + show() { super.show() + this.addTweens() + } + + showBeltSprites(show) { + this.ninja.visible = !show + this.shadow.visible = show + this.color.visible = show + this.belt.visible = show + } + addTweens() { // Fade this.scene.tweens.add({ targets: this, diff --git a/src/scenes/games/sensei/widget/SenseiBelt.scene b/src/scenes/games/sensei/widget/SenseiBelt.scene index a12b8b02..58d2a828 100644 --- a/src/scenes/games/sensei/widget/SenseiBelt.scene +++ b/src/scenes/games/sensei/widget/SenseiBelt.scene @@ -26,6 +26,7 @@ "type": "Image", "id": "5c3eb48a-06c1-43a3-b1de-e46dd3528d27", "label": "belt", + "scope": "CLASS", "components": [], "texture": { "key": "sensei", @@ -51,6 +52,7 @@ "type": "Image", "id": "562d5386-43e0-4b1c-aa6e-cfa33c8928f6", "label": "shadow", + "scope": "CLASS", "components": [], "texture": { "key": "sensei", @@ -59,6 +61,19 @@ "x": 1, "y": 6, "originY": 0.5014492753623189 + }, + { + "type": "Image", + "id": "ef2c6293-d6b9-4fc4-9d07-cbcbd5d7faa7", + "label": "ninja", + "scope": "CLASS", + "components": [], + "texture": { + "key": "sensei", + "frame": "mask/mask" + }, + "originX": 0.500823723228995, + "visible": false } ] } diff --git a/src/scenes/games/sensei/widget/SenseiWidget.js b/src/scenes/games/sensei/widget/SenseiWidget.js index df3f1a22..62b88981 100644 --- a/src/scenes/games/sensei/widget/SenseiWidget.js +++ b/src/scenes/games/sensei/widget/SenseiWidget.js @@ -25,6 +25,8 @@ export default class SenseiWidget extends BaseContainer { this.belt; /** @type {SenseiSpeech} */ this.speech; + /** @type {Phaser.GameObjects.Sprite} */ + this.hideout; // bg @@ -45,12 +47,19 @@ export default class SenseiWidget extends BaseContainer { speech.visible = false; this.add(speech); + // hideout + const hideout = scene.add.sprite(573, 133, "sensei", "hideout/hideout0001"); + hideout.setOrigin(0.5005599104143337, 0.5); + hideout.visible = false; + this.add(hideout); + // bg (components) new Interactive(bg); this.sensei = sensei; this.belt = belt; this.speech = speech; + this.hideout = hideout; /* START-USER-CTR-CODE */ @@ -64,7 +73,14 @@ export default class SenseiWidget extends BaseContainer { beltAward: [ this.menuBeltAward, this.menuBeltEarned, - this.leaveGame, + this.leaveGame + ], + maskAward: [ + this.menuMaskStart, + this.menuMaskAward, + this.menuMaskEarned, + this.menuMaskHideout, + this.leaveGame ] } @@ -81,6 +97,8 @@ export default class SenseiWidget extends BaseContainer { /* START-USER-CODE */ show() { + this.hideAll() + super.show() this.scene.events.emit('sensei_ready') @@ -124,6 +142,16 @@ export default class SenseiWidget extends BaseContainer { this.currentIndex++ } + rankUp(rank) { + this.rankId = rank + + if (rank > this.beltNames.length) { + this.loadMenu('maskAward') + } else { + this.loadMenu('beltAward') + } + } + menuBeltAward() { this.showSpeech('Congratulations!\nMuch like the fearsome earthquake,\nYou have rocked the house.') } @@ -133,7 +161,30 @@ export default class SenseiWidget extends BaseContainer { this.showSpeech(`Well done. You have earned\na ${beltName} Belt for your efforts.\nI am proud of you.`) - this.belt.show(this.rankId) + this.belt.showBelt(this.rankId) + } + + menuMaskStart() { + this.showSpeech('The gentle lotus,\nCowers before the storm cloud.\nBut you... you did not.') + } + + menuMaskAward() { + this.showSpeech('Well done, grasshopper.\nYou have faced my skills, and won.\nAnd proven yourself.') + } + + menuMaskEarned() { + this.showSpeech('Now receive the mark\nOf a Card-Jitsu master,\nWith this ninja mask.') + + this.belt.showMask() + } + + menuMaskHideout() { + this.belt.close() + + this.hideout.visible = true + this.hideout.play('hideout') + + this.showSpeech('You may now join us,\nIn the secret ninja hideout.\nCongratulations!') } showSpeech(text) { @@ -148,6 +199,7 @@ export default class SenseiWidget extends BaseContainer { hideAll() { this.hideSpeech() this.belt.close() + this.hideout.visible = false } leaveGame() { diff --git a/src/scenes/games/sensei/widget/SenseiWidget.scene b/src/scenes/games/sensei/widget/SenseiWidget.scene index 26e158a3..cf5f86e8 100644 --- a/src/scenes/games/sensei/widget/SenseiWidget.scene +++ b/src/scenes/games/sensei/widget/SenseiWidget.scene @@ -84,6 +84,21 @@ "visible": false, "nestedPrefabs": [], "list": [] + }, + { + "type": "Sprite", + "id": "285d21e7-04d7-4494-a425-7cff536c0c7a", + "label": "hideout", + "scope": "CLASS", + "components": [], + "texture": { + "key": "sensei", + "frame": "hideout/hideout0001" + }, + "x": 573, + "y": 133, + "originX": 0.5005599104143337, + "visible": false } ] } From 24f83f1923a5c1c710b9aa736c9691b50f691d74 Mon Sep 17 00:00:00 2001 From: wizguin <16276645+wizguin@users.noreply.github.com> Date: Tue, 18 Apr 2023 14:05:35 +0100 Subject: [PATCH 103/200] cardjitsu: Fix addAward for ninja mask --- src/scenes/games/card/CardJitsu.js | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/scenes/games/card/CardJitsu.js b/src/scenes/games/card/CardJitsu.js index 269a0962..d16c93ed 100644 --- a/src/scenes/games/card/CardJitsu.js +++ b/src/scenes/games/card/CardJitsu.js @@ -245,13 +245,15 @@ export default class CardJitsu extends GameScene { } addAward(award) { + let type = award == 104 ? 'face' : 'body' + // this should be abstracted, user inventory could be its own class - if (this.world.client.inventory['body'].includes(award)) { + if (this.world.client.inventory[type].includes(award)) { return } - this.world.client.inventory['body'].push(award) - this.world.client.inventory['body'].sort((a, b) => a - b) + this.world.client.inventory[type].push(award) + this.world.client.inventory[type].sort((a, b) => a - b) } setPlayer(user, index) { From 33d1ee013701fbf1830d388c942b790a37f88c6b Mon Sep 17 00:00:00 2001 From: wizguin <16276645+wizguin@users.noreply.github.com> Date: Wed, 19 Apr 2023 13:49:33 +0100 Subject: [PATCH 104/200] ninjaprogress: Add --- src/data/widgets.js | 1 + .../games/ninjaprogress/NinjaProgress.js | 102 ++++++++++ .../games/ninjaprogress/NinjaProgress.scene | 191 ++++++++++++++++++ 3 files changed, 294 insertions(+) create mode 100644 src/scenes/games/ninjaprogress/NinjaProgress.js create mode 100644 src/scenes/games/ninjaprogress/NinjaProgress.scene diff --git a/src/data/widgets.js b/src/data/widgets.js index fc238fd3..72627566 100644 --- a/src/data/widgets.js +++ b/src/data/widgets.js @@ -6,6 +6,7 @@ const widgets = { 'FindFour': require('@scenes/games/four/FindFour'), 'Mancala': require('@scenes/games/mancala/Mancala'), 'Map': require('@scenes/interface/game/map/Map'), + 'NinjaProgress': require('@scenes/games/ninjaprogress/NinjaProgress'), 'Sensei': require('@scenes/games/sensei/widget/SenseiWidget') } diff --git a/src/scenes/games/ninjaprogress/NinjaProgress.js b/src/scenes/games/ninjaprogress/NinjaProgress.js new file mode 100644 index 00000000..f6a22576 --- /dev/null +++ b/src/scenes/games/ninjaprogress/NinjaProgress.js @@ -0,0 +1,102 @@ +export const preload = { + key: 'ninjaprogress-pack', + url: 'assets/media/games/ninjaprogress/ninjaprogress-pack.json', + loadString: ['loading', 'ninjaprogress'] +} + +/* START OF COMPILED CODE */ + +import BaseContainer from "../../base/BaseContainer"; +/* START-USER-IMPORTS */ +/* END-USER-IMPORTS */ + +export default class NinjaProgress extends BaseContainer { + + constructor(scene, x, y) { + super(scene, x ?? 760, y ?? 480); + + /** @type {Phaser.GameObjects.Image} */ + this.nextBelt; + /** @type {Phaser.GameObjects.Image} */ + this.currentBelt; + /** @type {Phaser.GameObjects.Image} */ + this.progress; + /** @type {Phaser.GameObjects.Container} */ + this.separator; + + + // bg + const bg = scene.add.image(0, 51, "ninjaprogress", "bg"); + this.add(bg); + + // button + const button = scene.add.image(0, 23, "ninjaprogress", "button"); + button.setOrigin(0.5, 0.5060240963855421); + this.add(button); + + // cards + const cards = scene.add.image(0, 23, "ninjaprogress", "cards"); + this.add(cards); + + // nextBelt + const nextBelt = scene.add.image(0, 23, "ninjaprogress", "next/1"); + nextBelt.setOrigin(0.5042735042735043, 0.5052631578947369); + nextBelt.visible = false; + this.add(nextBelt); + + // currentBelt + const currentBelt = scene.add.image(0, 23, "ninjaprogress", "belt/1"); + currentBelt.setOrigin(0.502262443438914, 0.5); + currentBelt.visible = false; + this.add(currentBelt); + + // progressBg + const progressBg = scene.add.image(0, 0, "ninjaprogress", "progress"); + this.add(progressBg); + + // progress + const progress = scene.add.image(0, 7, "ninjaprogress", "progress/1"); + progress.setOrigin(0.5008347245409015, 0.5); + this.add(progress); + + // frame2 + const frame2 = scene.add.image(0, -2, "ninjaprogress", "frame/2"); + frame2.setOrigin(0.500374531835206, 0.5); + this.add(frame2); + + // separator + const separator = scene.add.container(-20, -217); + this.add(separator); + + // sep + const sep = scene.add.image(18, 0, "ninjaprogress", "separator/separator"); + separator.add(sep); + + // arrow + const arrow = scene.add.image(0, 9, "ninjaprogress", "separator/arrow"); + arrow.setOrigin(0.5, 0.5454545454545454); + separator.add(arrow); + + // frame1 + const frame1 = scene.add.image(2, 23, "ninjaprogress", "frame/1"); + this.add(frame1); + + // xButton + const xButton = scene.add.image(541, -305, "ninjaprogress", "close"); + this.add(xButton); + + this.nextBelt = nextBelt; + this.currentBelt = currentBelt; + this.progress = progress; + this.separator = separator; + + /* START-USER-CTR-CODE */ + /* END-USER-CTR-CODE */ + } + + + /* START-USER-CODE */ + /* END-USER-CODE */ +} + +/* END OF COMPILED CODE */ diff --git a/src/scenes/games/ninjaprogress/NinjaProgress.scene b/src/scenes/games/ninjaprogress/NinjaProgress.scene new file mode 100644 index 00000000..14cd0d2d --- /dev/null +++ b/src/scenes/games/ninjaprogress/NinjaProgress.scene @@ -0,0 +1,191 @@ +{ + "id": "9c33734a-197d-4f67-a819-ddfed17122cb", + "sceneType": "PREFAB", + "settings": { + "compilerInsertSpaces": true, + "javaScriptInitFieldsInConstructor": true, + "exportClass": true, + "autoImport": true, + "superClassName": "BaseContainer", + "preloadMethodName": "", + "preloadPackFiles": [], + "createMethodName": "", + "borderWidth": 1520, + "borderHeight": 960 + }, + "displayList": [ + { + "type": "Container", + "id": "24a2f1b7-2511-43fa-a48d-fdd3ce8acf40", + "label": "container_1", + "components": [], + "x": 760, + "y": 480, + "list": [ + { + "type": "Image", + "id": "ad799b05-40ff-4e8c-a56e-dc291a18cd30", + "label": "bg", + "components": [], + "texture": { + "key": "ninjaprogress", + "frame": "bg" + }, + "y": 51 + }, + { + "type": "Image", + "id": "ff473508-416a-4edf-a27c-41a0edb01120", + "label": "button", + "components": [], + "texture": { + "key": "ninjaprogress", + "frame": "button" + }, + "y": 23, + "originY": 0.5060240963855421 + }, + { + "type": "Image", + "id": "fa7467a5-603b-46e2-9f03-44a9d036b218", + "label": "cards", + "components": [], + "texture": { + "key": "ninjaprogress", + "frame": "cards" + }, + "y": 23 + }, + { + "type": "Image", + "id": "374a2838-1cb8-4407-a5f5-b1de8aafaf29", + "label": "nextBelt", + "scope": "CLASS", + "components": [], + "texture": { + "key": "ninjaprogress", + "frame": "next/1" + }, + "y": 23, + "originX": 0.5042735042735043, + "originY": 0.5052631578947369, + "visible": false + }, + { + "type": "Image", + "id": "bc23f8fa-624d-4a53-842c-15526779d7df", + "label": "currentBelt", + "scope": "CLASS", + "components": [], + "texture": { + "key": "ninjaprogress", + "frame": "belt/1" + }, + "y": 23, + "originX": 0.502262443438914, + "visible": false + }, + { + "type": "Image", + "id": "27fb7239-fc87-44d5-8fb8-b48adcdff5f4", + "label": "progressBg", + "components": [], + "texture": { + "key": "ninjaprogress", + "frame": "progress" + } + }, + { + "type": "Image", + "id": "bff05c3e-1f12-4d7f-a38d-d2ba933299c8", + "label": "progress", + "scope": "CLASS", + "components": [], + "texture": { + "key": "ninjaprogress", + "frame": "progress/1" + }, + "y": 7, + "originX": 0.5008347245409015 + }, + { + "type": "Image", + "id": "e5afcad6-4320-4997-ae48-b1aa760a21a5", + "label": "frame2", + "components": [], + "texture": { + "key": "ninjaprogress", + "frame": "frame/2" + }, + "y": -2, + "originX": 0.500374531835206 + }, + { + "type": "Container", + "id": "bfebc54f-e303-4129-8cb1-e5f6acb59318", + "label": "separator", + "scope": "CLASS", + "components": [], + "x": -20, + "y": -217, + "list": [ + { + "type": "Image", + "id": "20fedf31-3359-43b8-89e6-c202f3665ce8", + "label": "sep", + "components": [], + "texture": { + "key": "ninjaprogress", + "frame": "separator/separator" + }, + "x": 18 + }, + { + "type": "Image", + "id": "fbeb26e2-ad32-4223-962b-61ff561b3563", + "label": "arrow", + "components": [], + "texture": { + "key": "ninjaprogress", + "frame": "separator/arrow" + }, + "y": 9, + "originY": 0.5454545454545454 + } + ] + }, + { + "type": "Image", + "id": "b59f681c-846b-436f-a297-0239e4c83f62", + "label": "frame1", + "components": [], + "texture": { + "key": "ninjaprogress", + "frame": "frame/1" + }, + "x": 2, + "y": 23 + }, + { + "type": "Image", + "id": "0972ddd2-bf0a-4b96-9f03-b2243200659b", + "label": "xButton", + "components": [], + "texture": { + "key": "ninjaprogress", + "frame": "close" + }, + "x": 541, + "y": -305 + } + ] + } + ], + "plainObjects": [], + "meta": { + "app": "Phaser Editor 2D - Scene Editor", + "url": "https://phasereditor2d.com", + "contentType": "phasereditor2d.core.scene.SceneContentType", + "version": 3 + } +} \ No newline at end of file From bd755708c2b7e55d5b000f8dd38278ecb69bf92c Mon Sep 17 00:00:00 2001 From: wizguin <16276645+wizguin@users.noreply.github.com> Date: Wed, 19 Apr 2023 15:10:24 +0100 Subject: [PATCH 105/200] ninjaprogress: Add block --- src/scenes/games/ninjaprogress/NinjaProgress.js | 12 ++++++++++++ src/scenes/games/ninjaprogress/NinjaProgress.scene | 13 +++++++++++++ 2 files changed, 25 insertions(+) diff --git a/src/scenes/games/ninjaprogress/NinjaProgress.js b/src/scenes/games/ninjaprogress/NinjaProgress.js index f6a22576..626edb00 100644 --- a/src/scenes/games/ninjaprogress/NinjaProgress.js +++ b/src/scenes/games/ninjaprogress/NinjaProgress.js @@ -7,6 +7,8 @@ export const preload = { /* START OF COMPILED CODE */ import BaseContainer from "../../base/BaseContainer"; +import Interactive from "../../components/Interactive"; +import Button from "../../components/Button"; /* START-USER-IMPORTS */ /* END-USER-IMPORTS */ @@ -25,6 +27,13 @@ export default class NinjaProgress extends BaseContainer { this.separator; + // block + const block = scene.add.rectangle(0, 0, 1520, 960); + block.isFilled = true; + block.fillColor = 0; + block.fillAlpha = 0.2; + this.add(block); + // bg const bg = scene.add.image(0, 51, "ninjaprogress", "bg"); this.add(bg); @@ -85,6 +94,9 @@ export default class NinjaProgress extends BaseContainer { const xButton = scene.add.image(541, -305, "ninjaprogress", "close"); this.add(xButton); + // block (components) + new Interactive(block); + this.nextBelt = nextBelt; this.currentBelt = currentBelt; this.progress = progress; diff --git a/src/scenes/games/ninjaprogress/NinjaProgress.scene b/src/scenes/games/ninjaprogress/NinjaProgress.scene index 14cd0d2d..8fed7567 100644 --- a/src/scenes/games/ninjaprogress/NinjaProgress.scene +++ b/src/scenes/games/ninjaprogress/NinjaProgress.scene @@ -22,6 +22,19 @@ "x": 760, "y": 480, "list": [ + { + "type": "Rectangle", + "id": "fa964fba-f465-4781-ac56-f5ed6a276e3a", + "label": "block", + "components": [ + "Interactive" + ], + "isFilled": true, + "fillColor": "#000000", + "fillAlpha": 0.2, + "width": 1520, + "height": 960 + }, { "type": "Image", "id": "ad799b05-40ff-4e8c-a56e-dc291a18cd30", From 09cadb2248340ff4228fa4c06aa55c1512527c0f Mon Sep 17 00:00:00 2001 From: wizguin <16276645+wizguin@users.noreply.github.com> Date: Wed, 19 Apr 2023 15:10:58 +0100 Subject: [PATCH 106/200] ninjaprogress: Close button --- src/scenes/games/ninjaprogress/NinjaProgress.js | 5 +++++ src/scenes/games/ninjaprogress/NinjaProgress.scene | 6 +++++- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/src/scenes/games/ninjaprogress/NinjaProgress.js b/src/scenes/games/ninjaprogress/NinjaProgress.js index 626edb00..4027913b 100644 --- a/src/scenes/games/ninjaprogress/NinjaProgress.js +++ b/src/scenes/games/ninjaprogress/NinjaProgress.js @@ -97,6 +97,11 @@ export default class NinjaProgress extends BaseContainer { // block (components) new Interactive(block); + // xButton (components) + const xButtonButton = new Button(xButton); + xButtonButton.spriteName = "close"; + xButtonButton.callback = () => this.close(); + this.nextBelt = nextBelt; this.currentBelt = currentBelt; this.progress = progress; diff --git a/src/scenes/games/ninjaprogress/NinjaProgress.scene b/src/scenes/games/ninjaprogress/NinjaProgress.scene index 8fed7567..02fdc471 100644 --- a/src/scenes/games/ninjaprogress/NinjaProgress.scene +++ b/src/scenes/games/ninjaprogress/NinjaProgress.scene @@ -183,7 +183,11 @@ "type": "Image", "id": "0972ddd2-bf0a-4b96-9f03-b2243200659b", "label": "xButton", - "components": [], + "components": [ + "Button" + ], + "Button.spriteName": "close", + "Button.callback": "() => this.close()", "texture": { "key": "ninjaprogress", "frame": "close" From f1c768b96e122a4c699a104ef8c2d0b03d1b3397 Mon Sep 17 00:00:00 2001 From: wizguin <16276645+wizguin@users.noreply.github.com> Date: Wed, 19 Apr 2023 16:05:39 +0100 Subject: [PATCH 107/200] ninjaprogress: Add setRank --- .../games/ninjaprogress/NinjaProgress.js | 77 ++++++++++++++---- .../games/ninjaprogress/NinjaProgress.scene | 81 +++++++++++++++---- 2 files changed, 130 insertions(+), 28 deletions(-) diff --git a/src/scenes/games/ninjaprogress/NinjaProgress.js b/src/scenes/games/ninjaprogress/NinjaProgress.js index 4027913b..f74761ae 100644 --- a/src/scenes/games/ninjaprogress/NinjaProgress.js +++ b/src/scenes/games/ninjaprogress/NinjaProgress.js @@ -22,7 +22,9 @@ export default class NinjaProgress extends BaseContainer { /** @type {Phaser.GameObjects.Image} */ this.currentBelt; /** @type {Phaser.GameObjects.Image} */ - this.progress; + this.bar; + /** @type {Phaser.GameObjects.Text} */ + this.progressText; /** @type {Phaser.GameObjects.Container} */ this.separator; @@ -47,26 +49,46 @@ export default class NinjaProgress extends BaseContainer { const cards = scene.add.image(0, 23, "ninjaprogress", "cards"); this.add(cards); + // progressBg + const progressBg = scene.add.image(0, 0, "ninjaprogress", "progress"); + this.add(progressBg); + // nextBelt - const nextBelt = scene.add.image(0, 23, "ninjaprogress", "next/1"); + const nextBelt = scene.add.image(436, 27, "ninjaprogress", "next/1"); nextBelt.setOrigin(0.5042735042735043, 0.5052631578947369); - nextBelt.visible = false; this.add(nextBelt); // currentBelt - const currentBelt = scene.add.image(0, 23, "ninjaprogress", "belt/1"); + const currentBelt = scene.add.image(-399, 66, "ninjaprogress", "belt/1"); currentBelt.setOrigin(0.502262443438914, 0.5); - currentBelt.visible = false; this.add(currentBelt); - // progressBg - const progressBg = scene.add.image(0, 0, "ninjaprogress", "progress"); - this.add(progressBg); - - // progress - const progress = scene.add.image(0, 7, "ninjaprogress", "progress/1"); - progress.setOrigin(0.5008347245409015, 0.5); - this.add(progress); + // nextText + const nextText = scene.add.text(244, -42, "", {}); + nextText.setOrigin(0.5, 1); + nextText.text = "Next Belt"; + nextText.setStyle({ "align": "right", "color": "#333", "fixedWidth":500,"fontFamily": "Burbank Small", "fontSize": "26px", "fontStyle": "bold" }); + this.add(nextText); + + // currentText + const currentText = scene.add.text(-256, -42, "", {}); + currentText.setOrigin(0.5, 1); + currentText.text = "Current Belt"; + currentText.setStyle({ "color": "#333", "fixedWidth":500,"fontFamily": "Burbank Small", "fontSize": "32px", "fontStyle": "bold" }); + this.add(currentText); + + // bar + const bar = scene.add.image(46, 7, "ninjaprogress", "progress/1"); + bar.setOrigin(0.5008347245409015, 0.5); + this.add(bar); + + // progressText + const progressText = scene.add.text(-192, 8, "", {}); + progressText.setOrigin(1, 0.5); + progressText.visible = false; + progressText.text = "0%"; + progressText.setStyle({ "align": "right", "color": "#333", "fixedWidth":80,"fontFamily": "Burbank Small", "fontSize": "28px", "fontStyle": "bold" }); + this.add(progressText); // frame2 const frame2 = scene.add.image(0, -2, "ninjaprogress", "frame/2"); @@ -104,15 +126,42 @@ export default class NinjaProgress extends BaseContainer { this.nextBelt = nextBelt; this.currentBelt = currentBelt; - this.progress = progress; + this.bar = bar; + this.progressText = progressText; this.separator = separator; /* START-USER-CTR-CODE */ + + this.progressStartX = this.progressText.x + + this.setRank(5) + this.setProgress(50) + /* END-USER-CTR-CODE */ } /* START-USER-CODE */ + + setRank(rank) { + this.setCurrentBelt(rank) + this.setNextBelt(rank) + } + + setCurrentBelt(rank) { + this.currentBelt.setFrame(`belt/${rank}`) + } + + setNextBelt(rank) { + this.nextBelt.setFrame(`next/${rank + 1}`) + } + + setProgress(progress) { + progress = Phaser.Math.Clamp(progress, 1, 100) + + this.bar.setFrame(`progress/${progress}`) + } + /* END-USER-CODE */ } diff --git a/src/scenes/games/ninjaprogress/NinjaProgress.scene b/src/scenes/games/ninjaprogress/NinjaProgress.scene index 02fdc471..fb6b94f1 100644 --- a/src/scenes/games/ninjaprogress/NinjaProgress.scene +++ b/src/scenes/games/ninjaprogress/NinjaProgress.scene @@ -69,6 +69,16 @@ }, "y": 23 }, + { + "type": "Image", + "id": "27fb7239-fc87-44d5-8fb8-b48adcdff5f4", + "label": "progressBg", + "components": [], + "texture": { + "key": "ninjaprogress", + "frame": "progress" + } + }, { "type": "Image", "id": "374a2838-1cb8-4407-a5f5-b1de8aafaf29", @@ -79,10 +89,10 @@ "key": "ninjaprogress", "frame": "next/1" }, - "y": 23, + "x": 436, + "y": 27, "originX": 0.5042735042735043, - "originY": 0.5052631578947369, - "visible": false + "originY": 0.5052631578947369 }, { "type": "Image", @@ -94,33 +104,76 @@ "key": "ninjaprogress", "frame": "belt/1" }, - "y": 23, - "originX": 0.502262443438914, - "visible": false + "x": -399, + "y": 66, + "originX": 0.502262443438914 }, { - "type": "Image", - "id": "27fb7239-fc87-44d5-8fb8-b48adcdff5f4", - "label": "progressBg", + "type": "Text", + "id": "8ba4a30c-2d8d-451b-85e0-2bcffb8a6c85", + "label": "nextText", "components": [], - "texture": { - "key": "ninjaprogress", - "frame": "progress" - } + "x": 244, + "y": -42, + "originX": 0.5, + "originY": 1, + "text": "Next Belt", + "fixedWidth": 500, + "align": "right", + "fontFamily": "Burbank Small", + "fontSize": "26px", + "fontStyle": "bold", + "color": "#333" + }, + { + "type": "Text", + "id": "456d9a0f-c780-43b6-b567-a2c88bf0cfb3", + "label": "currentText", + "components": [], + "x": -256, + "y": -42, + "originX": 0.5, + "originY": 1, + "text": "Current Belt", + "fixedWidth": 500, + "fontFamily": "Burbank Small", + "fontSize": "32px", + "fontStyle": "bold", + "color": "#333" }, { "type": "Image", "id": "bff05c3e-1f12-4d7f-a38d-d2ba933299c8", - "label": "progress", + "label": "bar", "scope": "CLASS", "components": [], "texture": { "key": "ninjaprogress", "frame": "progress/1" }, + "x": 46, "y": 7, "originX": 0.5008347245409015 }, + { + "type": "Text", + "id": "366be64f-d6da-4849-8142-09442eeb6d94", + "label": "progressText", + "scope": "CLASS", + "components": [], + "x": -192, + "y": 8, + "originX": 1, + "originY": 0.5, + "visible": false, + "text": "0%", + "fixedWidth": 80, + "align": "right", + "fontFamily": "Burbank Small", + "fontSize": "28px", + "fontStyle": "bold", + "color": "#333" + }, { "type": "Image", "id": "e5afcad6-4320-4997-ae48-b1aa760a21a5", From 2cb826ecf98b38a5525b8969695ab1db645d91c7 Mon Sep 17 00:00:00 2001 From: wizguin <16276645+wizguin@users.noreply.github.com> Date: Wed, 19 Apr 2023 16:33:27 +0100 Subject: [PATCH 108/200] ninjaprogress: Handle no belt --- src/scenes/games/ninjaprogress/NinjaProgress.js | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/scenes/games/ninjaprogress/NinjaProgress.js b/src/scenes/games/ninjaprogress/NinjaProgress.js index f74761ae..64abd718 100644 --- a/src/scenes/games/ninjaprogress/NinjaProgress.js +++ b/src/scenes/games/ninjaprogress/NinjaProgress.js @@ -134,8 +134,8 @@ export default class NinjaProgress extends BaseContainer { this.progressStartX = this.progressText.x - this.setRank(5) - this.setProgress(50) + this.setRank(0) + this.setProgress(0) /* END-USER-CTR-CODE */ } @@ -149,6 +149,10 @@ export default class NinjaProgress extends BaseContainer { } setCurrentBelt(rank) { + this.currentBelt.alpha = rank > 0 ? 1 : 0.25 + + rank = Phaser.Math.Clamp(rank, 1, 9) + this.currentBelt.setFrame(`belt/${rank}`) } From 864d97135e3b1a5f8f6b08ed40f93070d7f2a033 Mon Sep 17 00:00:00 2001 From: wizguin <16276645+wizguin@users.noreply.github.com> Date: Wed, 19 Apr 2023 18:58:41 +0100 Subject: [PATCH 109/200] ninjaprogress: No next belt on black belt --- src/scenes/games/ninjaprogress/NinjaProgress.js | 15 ++++++++++++++- .../games/ninjaprogress/NinjaProgress.scene | 2 ++ 2 files changed, 16 insertions(+), 1 deletion(-) diff --git a/src/scenes/games/ninjaprogress/NinjaProgress.js b/src/scenes/games/ninjaprogress/NinjaProgress.js index 64abd718..308106ad 100644 --- a/src/scenes/games/ninjaprogress/NinjaProgress.js +++ b/src/scenes/games/ninjaprogress/NinjaProgress.js @@ -21,6 +21,10 @@ export default class NinjaProgress extends BaseContainer { this.nextBelt; /** @type {Phaser.GameObjects.Image} */ this.currentBelt; + /** @type {Phaser.GameObjects.Text} */ + this.nextText; + /** @type {Phaser.GameObjects.Text} */ + this.currentText; /** @type {Phaser.GameObjects.Image} */ this.bar; /** @type {Phaser.GameObjects.Text} */ @@ -126,6 +130,8 @@ export default class NinjaProgress extends BaseContainer { this.nextBelt = nextBelt; this.currentBelt = currentBelt; + this.nextText = nextText; + this.currentText = currentText; this.bar = bar; this.progressText = progressText; this.separator = separator; @@ -157,7 +163,14 @@ export default class NinjaProgress extends BaseContainer { } setNextBelt(rank) { - this.nextBelt.setFrame(`next/${rank + 1}`) + let visible = rank < 9 + + this.nextText.visible = visible + this.nextBelt.visible = visible + + rank = Phaser.Math.Clamp(rank + 1, 1, 9) + + this.nextBelt.setFrame(`next/${rank}`) } setProgress(progress) { diff --git a/src/scenes/games/ninjaprogress/NinjaProgress.scene b/src/scenes/games/ninjaprogress/NinjaProgress.scene index fb6b94f1..cd497851 100644 --- a/src/scenes/games/ninjaprogress/NinjaProgress.scene +++ b/src/scenes/games/ninjaprogress/NinjaProgress.scene @@ -112,6 +112,7 @@ "type": "Text", "id": "8ba4a30c-2d8d-451b-85e0-2bcffb8a6c85", "label": "nextText", + "scope": "CLASS", "components": [], "x": 244, "y": -42, @@ -129,6 +130,7 @@ "type": "Text", "id": "456d9a0f-c780-43b6-b567-a2c88bf0cfb3", "label": "currentText", + "scope": "CLASS", "components": [], "x": -256, "y": -42, From 2a7e9ac7562ed41b4d13a2528e8bfd49f297166b Mon Sep 17 00:00:00 2001 From: wizguin <16276645+wizguin@users.noreply.github.com> Date: Wed, 19 Apr 2023 19:55:46 +0100 Subject: [PATCH 110/200] ninjaprogress: Update elements --- .../games/ninjaprogress/NinjaProgress.js | 60 +++++++++++++++---- .../games/ninjaprogress/NinjaProgress.scene | 49 +++++++++++++-- 2 files changed, 91 insertions(+), 18 deletions(-) diff --git a/src/scenes/games/ninjaprogress/NinjaProgress.js b/src/scenes/games/ninjaprogress/NinjaProgress.js index 308106ad..d1dd4099 100644 --- a/src/scenes/games/ninjaprogress/NinjaProgress.js +++ b/src/scenes/games/ninjaprogress/NinjaProgress.js @@ -17,6 +17,8 @@ export default class NinjaProgress extends BaseContainer { constructor(scene, x, y) { super(scene, x ?? 760, y ?? 480); + /** @type {Phaser.GameObjects.Text} */ + this.cardsText; /** @type {Phaser.GameObjects.Image} */ this.nextBelt; /** @type {Phaser.GameObjects.Image} */ @@ -29,6 +31,8 @@ export default class NinjaProgress extends BaseContainer { this.bar; /** @type {Phaser.GameObjects.Text} */ this.progressText; + /** @type {Phaser.GameObjects.Image} */ + this.sensei; /** @type {Phaser.GameObjects.Container} */ this.separator; @@ -44,13 +48,20 @@ export default class NinjaProgress extends BaseContainer { const bg = scene.add.image(0, 51, "ninjaprogress", "bg"); this.add(bg); - // button - const button = scene.add.image(0, 23, "ninjaprogress", "button"); - button.setOrigin(0.5, 0.5060240963855421); - this.add(button); + // cardsButton + const cardsButton = scene.add.image(0, 254, "ninjaprogress", "button"); + cardsButton.setOrigin(0.5, 0.5060240963855421); + this.add(cardsButton); + + // cardsText + const cardsText = scene.add.text(-81, 254, "", {}); + cardsText.setOrigin(0.5, 0.5); + cardsText.text = "VIEW YOUR\nCARDS"; + cardsText.setStyle({ "align": "center", "color": "#736357", "fixedWidth":140,"fontFamily": "CCFaceFront", "fontSize": "20px", "fontStyle": "bold italic" }); + this.add(cardsText); // cards - const cards = scene.add.image(0, 23, "ninjaprogress", "cards"); + const cards = scene.add.image(68, 245, "ninjaprogress", "cards"); this.add(cards); // progressBg @@ -94,6 +105,12 @@ export default class NinjaProgress extends BaseContainer { progressText.setStyle({ "align": "right", "color": "#333", "fixedWidth":80,"fontFamily": "Burbank Small", "fontSize": "28px", "fontStyle": "bold" }); this.add(progressText); + // sensei + const sensei = scene.add.image(128, -14, "ninjaprogress", "sensei"); + sensei.setOrigin(0.5, 0.5023255813953489); + sensei.visible = false; + this.add(sensei); + // frame2 const frame2 = scene.add.image(0, -2, "ninjaprogress", "frame/2"); frame2.setOrigin(0.500374531835206, 0.5); @@ -123,25 +140,33 @@ export default class NinjaProgress extends BaseContainer { // block (components) new Interactive(block); + // cardsButton (components) + const cardsButtonButton = new Button(cardsButton); + cardsButtonButton.spriteName = "button"; + // xButton (components) const xButtonButton = new Button(xButton); xButtonButton.spriteName = "close"; xButtonButton.callback = () => this.close(); + this.cardsText = cardsText; this.nextBelt = nextBelt; this.currentBelt = currentBelt; this.nextText = nextText; this.currentText = currentText; this.bar = bar; this.progressText = progressText; + this.sensei = sensei; this.separator = separator; /* START-USER-CTR-CODE */ this.progressStartX = this.progressText.x - this.setRank(0) - this.setProgress(0) + window.test = (rank, progress) => { + this.setRank(rank) + this.setProgress(progress) + } /* END-USER-CTR-CODE */ } @@ -150,6 +175,7 @@ export default class NinjaProgress extends BaseContainer { /* START-USER-CODE */ setRank(rank) { + this.setVisibleElements(rank) this.setCurrentBelt(rank) this.setNextBelt(rank) } @@ -163,11 +189,6 @@ export default class NinjaProgress extends BaseContainer { } setNextBelt(rank) { - let visible = rank < 9 - - this.nextText.visible = visible - this.nextBelt.visible = visible - rank = Phaser.Math.Clamp(rank + 1, 1, 9) this.nextBelt.setFrame(`next/${rank}`) @@ -179,6 +200,21 @@ export default class NinjaProgress extends BaseContainer { this.bar.setFrame(`progress/${progress}`) } + setVisibleElements(rank) { + let nextVisible = rank < 9 + let senseiVisible = rank == 9 + let ninjaVisible = rank == 10 + + this.bar.visible = nextVisible + this.nextText.visible = nextVisible + this.nextBelt.visible = nextVisible + + this.sensei.visible = senseiVisible + + this.currentText.visible = !ninjaVisible + this.currentBelt.visible = !ninjaVisible + } + /* END-USER-CODE */ } diff --git a/src/scenes/games/ninjaprogress/NinjaProgress.scene b/src/scenes/games/ninjaprogress/NinjaProgress.scene index cd497851..6bf1d21f 100644 --- a/src/scenes/games/ninjaprogress/NinjaProgress.scene +++ b/src/scenes/games/ninjaprogress/NinjaProgress.scene @@ -48,26 +48,48 @@ }, { "type": "Image", - "id": "ff473508-416a-4edf-a27c-41a0edb01120", - "label": "button", - "components": [], + "id": "b3dc35d6-8e63-4fba-911e-0e32fa354e8a", + "label": "cardsButton", + "components": [ + "Button" + ], + "Button.spriteName": "button", "texture": { "key": "ninjaprogress", "frame": "button" }, - "y": 23, + "y": 254, "originY": 0.5060240963855421 }, + { + "type": "Text", + "id": "2504cb8f-1c7b-45f8-a24d-03813652b9a4", + "label": "cardsText", + "scope": "CLASS", + "components": [], + "x": -81, + "y": 254, + "originX": 0.5, + "originY": 0.5, + "text": "VIEW YOUR\nCARDS", + "fixedWidth": 140, + "align": "center", + "fontFamily": "CCFaceFront", + "fontSize": "20px", + "fontStyle": "bold italic", + "color": "#736357" + }, { "type": "Image", - "id": "fa7467a5-603b-46e2-9f03-44a9d036b218", + "id": "1a214fa4-e565-46b0-ac3b-cc496c3ee226", "label": "cards", "components": [], "texture": { "key": "ninjaprogress", "frame": "cards" }, - "y": 23 + "x": 68, + "y": 245 }, { "type": "Image", @@ -176,6 +198,21 @@ "fontStyle": "bold", "color": "#333" }, + { + "type": "Image", + "id": "b10ef6fe-7275-4f5d-bc05-56dbfc72db12", + "label": "sensei", + "scope": "CLASS", + "components": [], + "texture": { + "key": "ninjaprogress", + "frame": "sensei" + }, + "x": 128, + "y": -14, + "originY": 0.5023255813953489, + "visible": false + }, { "type": "Image", "id": "e5afcad6-4320-4997-ae48-b1aa760a21a5", From c61942d33c175b082242e419e185b43a9d5fb359 Mon Sep 17 00:00:00 2001 From: wizguin <16276645+wizguin@users.noreply.github.com> Date: Wed, 19 Apr 2023 20:14:36 +0100 Subject: [PATCH 111/200] ninjaprogress: Move progress to ProgressView --- .../games/ninjaprogress/NinjaProgress.js | 144 +------------ .../games/ninjaprogress/NinjaProgress.scene | 172 +-------------- .../games/ninjaprogress/ProgressView.js | 162 ++++++++++++++ .../games/ninjaprogress/ProgressView.scene | 201 ++++++++++++++++++ 4 files changed, 381 insertions(+), 298 deletions(-) create mode 100644 src/scenes/games/ninjaprogress/ProgressView.js create mode 100644 src/scenes/games/ninjaprogress/ProgressView.scene diff --git a/src/scenes/games/ninjaprogress/NinjaProgress.js b/src/scenes/games/ninjaprogress/NinjaProgress.js index d1dd4099..0b63874b 100644 --- a/src/scenes/games/ninjaprogress/NinjaProgress.js +++ b/src/scenes/games/ninjaprogress/NinjaProgress.js @@ -8,6 +8,7 @@ export const preload = { import BaseContainer from "../../base/BaseContainer"; import Interactive from "../../components/Interactive"; +import ProgressView from "./ProgressView"; import Button from "../../components/Button"; /* START-USER-IMPORTS */ /* END-USER-IMPORTS */ @@ -17,22 +18,8 @@ export default class NinjaProgress extends BaseContainer { constructor(scene, x, y) { super(scene, x ?? 760, y ?? 480); - /** @type {Phaser.GameObjects.Text} */ - this.cardsText; - /** @type {Phaser.GameObjects.Image} */ - this.nextBelt; - /** @type {Phaser.GameObjects.Image} */ - this.currentBelt; - /** @type {Phaser.GameObjects.Text} */ - this.nextText; - /** @type {Phaser.GameObjects.Text} */ - this.currentText; - /** @type {Phaser.GameObjects.Image} */ - this.bar; - /** @type {Phaser.GameObjects.Text} */ - this.progressText; - /** @type {Phaser.GameObjects.Image} */ - this.sensei; + /** @type {ProgressView} */ + this.progress; /** @type {Phaser.GameObjects.Container} */ this.separator; @@ -48,68 +35,9 @@ export default class NinjaProgress extends BaseContainer { const bg = scene.add.image(0, 51, "ninjaprogress", "bg"); this.add(bg); - // cardsButton - const cardsButton = scene.add.image(0, 254, "ninjaprogress", "button"); - cardsButton.setOrigin(0.5, 0.5060240963855421); - this.add(cardsButton); - - // cardsText - const cardsText = scene.add.text(-81, 254, "", {}); - cardsText.setOrigin(0.5, 0.5); - cardsText.text = "VIEW YOUR\nCARDS"; - cardsText.setStyle({ "align": "center", "color": "#736357", "fixedWidth":140,"fontFamily": "CCFaceFront", "fontSize": "20px", "fontStyle": "bold italic" }); - this.add(cardsText); - - // cards - const cards = scene.add.image(68, 245, "ninjaprogress", "cards"); - this.add(cards); - - // progressBg - const progressBg = scene.add.image(0, 0, "ninjaprogress", "progress"); - this.add(progressBg); - - // nextBelt - const nextBelt = scene.add.image(436, 27, "ninjaprogress", "next/1"); - nextBelt.setOrigin(0.5042735042735043, 0.5052631578947369); - this.add(nextBelt); - - // currentBelt - const currentBelt = scene.add.image(-399, 66, "ninjaprogress", "belt/1"); - currentBelt.setOrigin(0.502262443438914, 0.5); - this.add(currentBelt); - - // nextText - const nextText = scene.add.text(244, -42, "", {}); - nextText.setOrigin(0.5, 1); - nextText.text = "Next Belt"; - nextText.setStyle({ "align": "right", "color": "#333", "fixedWidth":500,"fontFamily": "Burbank Small", "fontSize": "26px", "fontStyle": "bold" }); - this.add(nextText); - - // currentText - const currentText = scene.add.text(-256, -42, "", {}); - currentText.setOrigin(0.5, 1); - currentText.text = "Current Belt"; - currentText.setStyle({ "color": "#333", "fixedWidth":500,"fontFamily": "Burbank Small", "fontSize": "32px", "fontStyle": "bold" }); - this.add(currentText); - - // bar - const bar = scene.add.image(46, 7, "ninjaprogress", "progress/1"); - bar.setOrigin(0.5008347245409015, 0.5); - this.add(bar); - - // progressText - const progressText = scene.add.text(-192, 8, "", {}); - progressText.setOrigin(1, 0.5); - progressText.visible = false; - progressText.text = "0%"; - progressText.setStyle({ "align": "right", "color": "#333", "fixedWidth":80,"fontFamily": "Burbank Small", "fontSize": "28px", "fontStyle": "bold" }); - this.add(progressText); - - // sensei - const sensei = scene.add.image(128, -14, "ninjaprogress", "sensei"); - sensei.setOrigin(0.5, 0.5023255813953489); - sensei.visible = false; - this.add(sensei); + // progress + const progress = new ProgressView(scene, 0, 0); + this.add(progress); // frame2 const frame2 = scene.add.image(0, -2, "ninjaprogress", "frame/2"); @@ -140,32 +68,18 @@ export default class NinjaProgress extends BaseContainer { // block (components) new Interactive(block); - // cardsButton (components) - const cardsButtonButton = new Button(cardsButton); - cardsButtonButton.spriteName = "button"; - // xButton (components) const xButtonButton = new Button(xButton); xButtonButton.spriteName = "close"; xButtonButton.callback = () => this.close(); - this.cardsText = cardsText; - this.nextBelt = nextBelt; - this.currentBelt = currentBelt; - this.nextText = nextText; - this.currentText = currentText; - this.bar = bar; - this.progressText = progressText; - this.sensei = sensei; + this.progress = progress; this.separator = separator; /* START-USER-CTR-CODE */ - this.progressStartX = this.progressText.x - window.test = (rank, progress) => { - this.setRank(rank) - this.setProgress(progress) + this.progress.show(rank, progress) } /* END-USER-CTR-CODE */ @@ -173,48 +87,6 @@ export default class NinjaProgress extends BaseContainer { /* START-USER-CODE */ - - setRank(rank) { - this.setVisibleElements(rank) - this.setCurrentBelt(rank) - this.setNextBelt(rank) - } - - setCurrentBelt(rank) { - this.currentBelt.alpha = rank > 0 ? 1 : 0.25 - - rank = Phaser.Math.Clamp(rank, 1, 9) - - this.currentBelt.setFrame(`belt/${rank}`) - } - - setNextBelt(rank) { - rank = Phaser.Math.Clamp(rank + 1, 1, 9) - - this.nextBelt.setFrame(`next/${rank}`) - } - - setProgress(progress) { - progress = Phaser.Math.Clamp(progress, 1, 100) - - this.bar.setFrame(`progress/${progress}`) - } - - setVisibleElements(rank) { - let nextVisible = rank < 9 - let senseiVisible = rank == 9 - let ninjaVisible = rank == 10 - - this.bar.visible = nextVisible - this.nextText.visible = nextVisible - this.nextBelt.visible = nextVisible - - this.sensei.visible = senseiVisible - - this.currentText.visible = !ninjaVisible - this.currentBelt.visible = !ninjaVisible - } - /* END-USER-CODE */ } diff --git a/src/scenes/games/ninjaprogress/NinjaProgress.scene b/src/scenes/games/ninjaprogress/NinjaProgress.scene index 6bf1d21f..0eee75dd 100644 --- a/src/scenes/games/ninjaprogress/NinjaProgress.scene +++ b/src/scenes/games/ninjaprogress/NinjaProgress.scene @@ -47,171 +47,19 @@ "y": 51 }, { - "type": "Image", - "id": "b3dc35d6-8e63-4fba-911e-0e32fa354e8a", - "label": "cardsButton", - "components": [ - "Button" + "prefabId": "69fb792c-79d1-47f9-a9aa-152d9e190c9d", + "id": "eb43e92d-7d06-471a-a937-c8b14e00548f", + "unlock": [ + "x", + "y" ], - "Button.spriteName": "button", - "texture": { - "key": "ninjaprogress", - "frame": "button" - }, - "y": 254, - "originY": 0.5060240963855421 - }, - { - "type": "Text", - "id": "2504cb8f-1c7b-45f8-a24d-03813652b9a4", - "label": "cardsText", + "label": "progress", "scope": "CLASS", "components": [], - "x": -81, - "y": 254, - "originX": 0.5, - "originY": 0.5, - "text": "VIEW YOUR\nCARDS", - "fixedWidth": 140, - "align": "center", - "fontFamily": "CCFaceFront", - "fontSize": "20px", - "fontStyle": "bold italic", - "color": "#736357" - }, - { - "type": "Image", - "id": "1a214fa4-e565-46b0-ac3b-cc496c3ee226", - "label": "cards", - "components": [], - "texture": { - "key": "ninjaprogress", - "frame": "cards" - }, - "x": 68, - "y": 245 - }, - { - "type": "Image", - "id": "27fb7239-fc87-44d5-8fb8-b48adcdff5f4", - "label": "progressBg", - "components": [], - "texture": { - "key": "ninjaprogress", - "frame": "progress" - } - }, - { - "type": "Image", - "id": "374a2838-1cb8-4407-a5f5-b1de8aafaf29", - "label": "nextBelt", - "scope": "CLASS", - "components": [], - "texture": { - "key": "ninjaprogress", - "frame": "next/1" - }, - "x": 436, - "y": 27, - "originX": 0.5042735042735043, - "originY": 0.5052631578947369 - }, - { - "type": "Image", - "id": "bc23f8fa-624d-4a53-842c-15526779d7df", - "label": "currentBelt", - "scope": "CLASS", - "components": [], - "texture": { - "key": "ninjaprogress", - "frame": "belt/1" - }, - "x": -399, - "y": 66, - "originX": 0.502262443438914 - }, - { - "type": "Text", - "id": "8ba4a30c-2d8d-451b-85e0-2bcffb8a6c85", - "label": "nextText", - "scope": "CLASS", - "components": [], - "x": 244, - "y": -42, - "originX": 0.5, - "originY": 1, - "text": "Next Belt", - "fixedWidth": 500, - "align": "right", - "fontFamily": "Burbank Small", - "fontSize": "26px", - "fontStyle": "bold", - "color": "#333" - }, - { - "type": "Text", - "id": "456d9a0f-c780-43b6-b567-a2c88bf0cfb3", - "label": "currentText", - "scope": "CLASS", - "components": [], - "x": -256, - "y": -42, - "originX": 0.5, - "originY": 1, - "text": "Current Belt", - "fixedWidth": 500, - "fontFamily": "Burbank Small", - "fontSize": "32px", - "fontStyle": "bold", - "color": "#333" - }, - { - "type": "Image", - "id": "bff05c3e-1f12-4d7f-a38d-d2ba933299c8", - "label": "bar", - "scope": "CLASS", - "components": [], - "texture": { - "key": "ninjaprogress", - "frame": "progress/1" - }, - "x": 46, - "y": 7, - "originX": 0.5008347245409015 - }, - { - "type": "Text", - "id": "366be64f-d6da-4849-8142-09442eeb6d94", - "label": "progressText", - "scope": "CLASS", - "components": [], - "x": -192, - "y": 8, - "originX": 1, - "originY": 0.5, - "visible": false, - "text": "0%", - "fixedWidth": 80, - "align": "right", - "fontFamily": "Burbank Small", - "fontSize": "28px", - "fontStyle": "bold", - "color": "#333" - }, - { - "type": "Image", - "id": "b10ef6fe-7275-4f5d-bc05-56dbfc72db12", - "label": "sensei", - "scope": "CLASS", - "components": [], - "texture": { - "key": "ninjaprogress", - "frame": "sensei" - }, - "x": 128, - "y": -14, - "originY": 0.5023255813953489, - "visible": false + "x": 0, + "y": 0, + "nestedPrefabs": [], + "list": [] }, { "type": "Image", diff --git a/src/scenes/games/ninjaprogress/ProgressView.js b/src/scenes/games/ninjaprogress/ProgressView.js new file mode 100644 index 00000000..da14ed7f --- /dev/null +++ b/src/scenes/games/ninjaprogress/ProgressView.js @@ -0,0 +1,162 @@ +/* START OF COMPILED CODE */ + +import BaseContainer from "../../base/BaseContainer"; +import Button from "../../components/Button"; +/* START-USER-IMPORTS */ +/* END-USER-IMPORTS */ + +export default class ProgressView extends BaseContainer { + + constructor(scene, x, y) { + super(scene, x ?? 760, y ?? 480); + + /** @type {Phaser.GameObjects.Image} */ + this.nextBelt; + /** @type {Phaser.GameObjects.Image} */ + this.currentBelt; + /** @type {Phaser.GameObjects.Text} */ + this.nextText; + /** @type {Phaser.GameObjects.Text} */ + this.currentText; + /** @type {Phaser.GameObjects.Image} */ + this.bar; + /** @type {Phaser.GameObjects.Text} */ + this.progressText; + /** @type {Phaser.GameObjects.Image} */ + this.sensei; + + + // cardsButton + const cardsButton = scene.add.image(0, 254, "ninjaprogress", "button"); + cardsButton.setOrigin(0.5, 0.5060240963855421); + this.add(cardsButton); + + // cards + const cards = scene.add.image(68, 245, "ninjaprogress", "cards"); + this.add(cards); + + // cardsText + const cardsText = scene.add.text(-81, 254, "", {}); + cardsText.setOrigin(0.5, 0.5); + cardsText.text = "VIEW YOUR\nCARDS"; + cardsText.setStyle({ "align": "center", "color": "#736357", "fixedWidth":140,"fontFamily": "CCFaceFront", "fontSize": "20px", "fontStyle": "bold italic" }); + this.add(cardsText); + + // progressBg + const progressBg = scene.add.image(0, 0, "ninjaprogress", "progress"); + this.add(progressBg); + + // nextBelt + const nextBelt = scene.add.image(436, 27, "ninjaprogress", "next/1"); + nextBelt.setOrigin(0.5042735042735043, 0.5052631578947369); + this.add(nextBelt); + + // currentBelt + const currentBelt = scene.add.image(-399, 66, "ninjaprogress", "belt/1"); + currentBelt.setOrigin(0.502262443438914, 0.5); + this.add(currentBelt); + + // nextText + const nextText = scene.add.text(244, -42, "", {}); + nextText.setOrigin(0.5, 1); + nextText.text = "Next Belt"; + nextText.setStyle({ "align": "right", "color": "#333", "fixedWidth":500,"fontFamily": "Burbank Small", "fontSize": "26px", "fontStyle": "bold" }); + this.add(nextText); + + // currentText + const currentText = scene.add.text(-256, -42, "", {}); + currentText.setOrigin(0.5, 1); + currentText.text = "Current Belt"; + currentText.setStyle({ "color": "#333", "fixedWidth":500,"fontFamily": "Burbank Small", "fontSize": "32px", "fontStyle": "bold" }); + this.add(currentText); + + // bar + const bar = scene.add.image(46, 7, "ninjaprogress", "progress/1"); + bar.setOrigin(0.5008347245409015, 0.5); + this.add(bar); + + // progressText + const progressText = scene.add.text(-192, 8, "", {}); + progressText.setOrigin(1, 0.5); + progressText.visible = false; + progressText.text = "0%"; + progressText.setStyle({ "align": "right", "color": "#333", "fixedWidth":80,"fontFamily": "Burbank Small", "fontSize": "28px", "fontStyle": "bold" }); + this.add(progressText); + + // sensei + const sensei = scene.add.image(128, -14, "ninjaprogress", "sensei"); + sensei.setOrigin(0.5, 0.5023255813953489); + sensei.visible = false; + this.add(sensei); + + // cardsButton (components) + const cardsButtonButton = new Button(cardsButton); + cardsButtonButton.spriteName = "button"; + + this.nextBelt = nextBelt; + this.currentBelt = currentBelt; + this.nextText = nextText; + this.currentText = currentText; + this.bar = bar; + this.progressText = progressText; + this.sensei = sensei; + + /* START-USER-CTR-CODE */ + /* END-USER-CTR-CODE */ + } + + + /* START-USER-CODE */ + + show(rank, progress) { + this.setRank(rank) + this.setProgress(progress) + + super.show() + } + + setRank(rank) { + this.setVisibleElements(rank) + this.setCurrentBelt(rank) + this.setNextBelt(rank) + } + + setCurrentBelt(rank) { + this.currentBelt.alpha = rank > 0 ? 1 : 0.25 + + rank = Phaser.Math.Clamp(rank, 1, 9) + + this.currentBelt.setFrame(`belt/${rank}`) + } + + setNextBelt(rank) { + rank = Phaser.Math.Clamp(rank + 1, 1, 9) + + this.nextBelt.setFrame(`next/${rank}`) + } + + setProgress(progress) { + progress = Phaser.Math.Clamp(progress, 1, 100) + + this.bar.setFrame(`progress/${progress}`) + } + + setVisibleElements(rank) { + let nextVisible = rank < 9 + let senseiVisible = rank == 9 + let ninjaVisible = rank == 10 + + this.bar.visible = nextVisible + this.nextText.visible = nextVisible + this.nextBelt.visible = nextVisible + + this.sensei.visible = senseiVisible + + this.currentText.visible = !ninjaVisible + this.currentBelt.visible = !ninjaVisible + } + + /* END-USER-CODE */ +} + +/* END OF COMPILED CODE */ diff --git a/src/scenes/games/ninjaprogress/ProgressView.scene b/src/scenes/games/ninjaprogress/ProgressView.scene new file mode 100644 index 00000000..d7d2dab0 --- /dev/null +++ b/src/scenes/games/ninjaprogress/ProgressView.scene @@ -0,0 +1,201 @@ +{ + "id": "69fb792c-79d1-47f9-a9aa-152d9e190c9d", + "sceneType": "PREFAB", + "settings": { + "compilerInsertSpaces": true, + "javaScriptInitFieldsInConstructor": true, + "exportClass": true, + "autoImport": true, + "superClassName": "BaseContainer", + "preloadMethodName": "", + "preloadPackFiles": [], + "createMethodName": "", + "borderWidth": 1520, + "borderHeight": 960 + }, + "displayList": [ + { + "type": "Container", + "id": "e79a212e-9595-46b8-930e-6c5f2e0e62c0", + "label": "container_1", + "components": [], + "x": 760, + "y": 480, + "list": [ + { + "type": "Image", + "id": "ceff7150-8ae8-4b1a-ba67-c7018433f491", + "label": "cardsButton", + "components": [ + "Button" + ], + "Button.spriteName": "button", + "texture": { + "key": "ninjaprogress", + "frame": "button" + }, + "y": 254, + "originY": 0.5060240963855421 + }, + { + "type": "Image", + "id": "7b9b4fe8-ae89-45a4-abb5-b027bf877c8b", + "label": "cards", + "components": [], + "texture": { + "key": "ninjaprogress", + "frame": "cards" + }, + "x": 68, + "y": 245 + }, + { + "type": "Text", + "id": "928a8a3c-c2c0-4c2b-8b73-0b1bcd0cfe0e", + "label": "cardsText", + "components": [], + "x": -81, + "y": 254, + "originX": 0.5, + "originY": 0.5, + "text": "VIEW YOUR\nCARDS", + "fixedWidth": 140, + "align": "center", + "fontFamily": "CCFaceFront", + "fontSize": "20px", + "fontStyle": "bold italic", + "color": "#736357" + }, + { + "type": "Image", + "id": "076ce9cb-e64c-4dcc-be8a-e351954f6d6a", + "label": "progressBg", + "components": [], + "texture": { + "key": "ninjaprogress", + "frame": "progress" + } + }, + { + "type": "Image", + "id": "d269ba3b-46d9-4af2-8920-62965ed19bf6", + "label": "nextBelt", + "scope": "CLASS", + "components": [], + "texture": { + "key": "ninjaprogress", + "frame": "next/1" + }, + "x": 436, + "y": 27, + "originX": 0.5042735042735043, + "originY": 0.5052631578947369 + }, + { + "type": "Image", + "id": "a85434a7-54ef-4c09-99d2-857f010bf8fc", + "label": "currentBelt", + "scope": "CLASS", + "components": [], + "texture": { + "key": "ninjaprogress", + "frame": "belt/1" + }, + "x": -399, + "y": 66, + "originX": 0.502262443438914 + }, + { + "type": "Text", + "id": "21d65873-cc17-4483-be74-d80f8a55abad", + "label": "nextText", + "scope": "CLASS", + "components": [], + "x": 244, + "y": -42, + "originX": 0.5, + "originY": 1, + "text": "Next Belt", + "fixedWidth": 500, + "align": "right", + "fontFamily": "Burbank Small", + "fontSize": "26px", + "fontStyle": "bold", + "color": "#333" + }, + { + "type": "Text", + "id": "d70717d1-7680-46ce-9783-b2a5963bcbdd", + "label": "currentText", + "scope": "CLASS", + "components": [], + "x": -256, + "y": -42, + "originX": 0.5, + "originY": 1, + "text": "Current Belt", + "fixedWidth": 500, + "fontFamily": "Burbank Small", + "fontSize": "32px", + "fontStyle": "bold", + "color": "#333" + }, + { + "type": "Image", + "id": "429725a8-bb97-4868-9739-0025aa45eead", + "label": "bar", + "scope": "CLASS", + "components": [], + "texture": { + "key": "ninjaprogress", + "frame": "progress/1" + }, + "x": 46, + "y": 7, + "originX": 0.5008347245409015 + }, + { + "type": "Text", + "id": "c60c1252-f381-4260-b587-06924e6e85b7", + "label": "progressText", + "scope": "CLASS", + "components": [], + "x": -192, + "y": 8, + "originX": 1, + "originY": 0.5, + "visible": false, + "text": "0%", + "fixedWidth": 80, + "align": "right", + "fontFamily": "Burbank Small", + "fontSize": "28px", + "fontStyle": "bold", + "color": "#333" + }, + { + "type": "Image", + "id": "a8b59277-06bc-450f-a0c6-408956531166", + "label": "sensei", + "scope": "CLASS", + "components": [], + "texture": { + "key": "ninjaprogress", + "frame": "sensei" + }, + "x": 128, + "y": -14, + "originY": 0.5023255813953489, + "visible": false + } + ] + } + ], + "plainObjects": [], + "meta": { + "app": "Phaser Editor 2D - Scene Editor", + "url": "https://phasereditor2d.com", + "contentType": "phasereditor2d.core.scene.SceneContentType", + "version": 3 + } +} \ No newline at end of file From 66d1ae130285bf0fe3992ee1d32933d09bad566b Mon Sep 17 00:00:00 2001 From: wizguin <16276645+wizguin@users.noreply.github.com> Date: Wed, 19 Apr 2023 21:46:17 +0100 Subject: [PATCH 112/200] ninjaprogress: Add Separator and basic toggling --- .../games/ninjaprogress/NinjaProgress.js | 29 +++---- .../games/ninjaprogress/NinjaProgress.scene | 41 +++------ src/scenes/games/ninjaprogress/Separator.js | 87 +++++++++++++++++++ .../games/ninjaprogress/Separator.scene | 72 +++++++++++++++ 4 files changed, 184 insertions(+), 45 deletions(-) create mode 100644 src/scenes/games/ninjaprogress/Separator.js create mode 100644 src/scenes/games/ninjaprogress/Separator.scene diff --git a/src/scenes/games/ninjaprogress/NinjaProgress.js b/src/scenes/games/ninjaprogress/NinjaProgress.js index 0b63874b..1bc1fe78 100644 --- a/src/scenes/games/ninjaprogress/NinjaProgress.js +++ b/src/scenes/games/ninjaprogress/NinjaProgress.js @@ -9,6 +9,7 @@ export const preload = { import BaseContainer from "../../base/BaseContainer"; import Interactive from "../../components/Interactive"; import ProgressView from "./ProgressView"; +import Separator from "./Separator"; import Button from "../../components/Button"; /* START-USER-IMPORTS */ /* END-USER-IMPORTS */ @@ -20,7 +21,7 @@ export default class NinjaProgress extends BaseContainer { /** @type {ProgressView} */ this.progress; - /** @type {Phaser.GameObjects.Container} */ + /** @type {Separator} */ this.separator; @@ -45,18 +46,10 @@ export default class NinjaProgress extends BaseContainer { this.add(frame2); // separator - const separator = scene.add.container(-20, -217); + const separator = new Separator(scene, -18, -214); + separator.visible = true; this.add(separator); - // sep - const sep = scene.add.image(18, 0, "ninjaprogress", "separator/separator"); - separator.add(sep); - - // arrow - const arrow = scene.add.image(0, 9, "ninjaprogress", "separator/arrow"); - arrow.setOrigin(0.5, 0.5454545454545454); - separator.add(arrow); - // frame1 const frame1 = scene.add.image(2, 23, "ninjaprogress", "frame/1"); this.add(frame1); @@ -77,16 +70,20 @@ export default class NinjaProgress extends BaseContainer { this.separator = separator; /* START-USER-CTR-CODE */ - - window.test = (rank, progress) => { - this.progress.show(rank, progress) - } - /* END-USER-CTR-CODE */ } /* START-USER-CODE */ + + showProgress() { + this.progress.show(0, 0) + } + + hideProgress() { + this.progress.close() + } + /* END-USER-CODE */ } diff --git a/src/scenes/games/ninjaprogress/NinjaProgress.scene b/src/scenes/games/ninjaprogress/NinjaProgress.scene index 0eee75dd..22e659c9 100644 --- a/src/scenes/games/ninjaprogress/NinjaProgress.scene +++ b/src/scenes/games/ninjaprogress/NinjaProgress.scene @@ -74,38 +74,21 @@ "originX": 0.500374531835206 }, { - "type": "Container", - "id": "bfebc54f-e303-4129-8cb1-e5f6acb59318", + "prefabId": "4f090387-6719-455f-887b-a8bf5946be9f", + "id": "bd670da4-42f1-471a-9318-85ff9dbdae60", + "unlock": [ + "x", + "y", + "visible" + ], "label": "separator", "scope": "CLASS", "components": [], - "x": -20, - "y": -217, - "list": [ - { - "type": "Image", - "id": "20fedf31-3359-43b8-89e6-c202f3665ce8", - "label": "sep", - "components": [], - "texture": { - "key": "ninjaprogress", - "frame": "separator/separator" - }, - "x": 18 - }, - { - "type": "Image", - "id": "fbeb26e2-ad32-4223-962b-61ff561b3563", - "label": "arrow", - "components": [], - "texture": { - "key": "ninjaprogress", - "frame": "separator/arrow" - }, - "y": 9, - "originY": 0.5454545454545454 - } - ] + "x": -18, + "y": -214, + "visible": true, + "nestedPrefabs": [], + "list": [] }, { "type": "Image", diff --git a/src/scenes/games/ninjaprogress/Separator.js b/src/scenes/games/ninjaprogress/Separator.js new file mode 100644 index 00000000..ff22a5a0 --- /dev/null +++ b/src/scenes/games/ninjaprogress/Separator.js @@ -0,0 +1,87 @@ +/* START OF COMPILED CODE */ + +import BaseContainer from "../../base/BaseContainer"; +import SimpleButton from "../../components/SimpleButton"; +/* START-USER-IMPORTS */ +/* END-USER-IMPORTS */ + +export default class Separator extends BaseContainer { + + constructor(scene, x, y) { + super(scene, x ?? 0, y ?? 0); + + /** @type {Phaser.GameObjects.Image} */ + this.arrow; + + + // sep + const sep = scene.add.image(18, -3, "ninjaprogress", "separator/separator"); + this.add(sep); + + // button + const button = scene.add.image(0, -3, "ninjaprogress", "separator/button"); + this.add(button); + + // arrow + const arrow = scene.add.image(0, 6, "ninjaprogress", "separator/arrow"); + arrow.setOrigin(0.5, 0.5454545454545454); + this.add(arrow); + + // button (components) + const buttonSimpleButton = new SimpleButton(button); + buttonSimpleButton.callback = () => this.onClick(); + + this.arrow = arrow; + + /* START-USER-CTR-CODE */ + + this.tween + this.down = false + + this.yDiff = 574 + + /* END-USER-CTR-CODE */ + } + + + /* START-USER-CODE */ + + onClick() { + if (this.tween) { + return + } + + let duration = this.down ? 325 : 500 + let y = this.down ? this.y - this.yDiff : this.y + this.yDiff + let ease = this.down ? 'Quad.easeOut' : 'Quad.easeIn' + + this.down = !this.down + + if (this.down) { + this.parentContainer.hideProgress() + } + + this.tween = this.scene.tweens.add({ + targets: this, + duration: duration, + y: y, + ease: ease, + + onComplete: this.onTweenComplete, + onCompleteScope: this + }) + } + + onTweenComplete() { + this.arrow.flipY = this.down + this.tween = null + + if (!this.down) { + this.parentContainer.showProgress() + } + } + + /* END-USER-CODE */ +} + +/* END OF COMPILED CODE */ diff --git a/src/scenes/games/ninjaprogress/Separator.scene b/src/scenes/games/ninjaprogress/Separator.scene new file mode 100644 index 00000000..22b6cd3d --- /dev/null +++ b/src/scenes/games/ninjaprogress/Separator.scene @@ -0,0 +1,72 @@ +{ + "id": "4f090387-6719-455f-887b-a8bf5946be9f", + "sceneType": "PREFAB", + "settings": { + "compilerInsertSpaces": true, + "javaScriptInitFieldsInConstructor": true, + "exportClass": true, + "autoImport": true, + "superClassName": "BaseContainer", + "preloadMethodName": "", + "preloadPackFiles": [], + "createMethodName": "", + "borderWidth": 1520, + "borderHeight": 960 + }, + "displayList": [ + { + "type": "Container", + "id": "c6d135e1-2a4a-4b77-a666-bcdae81665f9", + "label": "container_1", + "components": [], + "list": [ + { + "type": "Image", + "id": "2d5f8b75-0c0b-4a5e-90a4-6abe9db5cc71", + "label": "sep", + "components": [], + "texture": { + "key": "ninjaprogress", + "frame": "separator/separator" + }, + "x": 18, + "y": -3 + }, + { + "type": "Image", + "id": "9727adbe-155c-48f6-b03b-79b85dcaf0a4", + "label": "button", + "components": [ + "SimpleButton" + ], + "SimpleButton.callback": "() => this.onClick()", + "texture": { + "key": "ninjaprogress", + "frame": "separator/button" + }, + "y": -3 + }, + { + "type": "Image", + "id": "91643b28-6d46-4265-9b91-21400c869581", + "label": "arrow", + "scope": "CLASS", + "components": [], + "texture": { + "key": "ninjaprogress", + "frame": "separator/arrow" + }, + "y": 6, + "originY": 0.5454545454545454 + } + ] + } + ], + "plainObjects": [], + "meta": { + "app": "Phaser Editor 2D - Scene Editor", + "url": "https://phasereditor2d.com", + "contentType": "phasereditor2d.core.scene.SceneContentType", + "version": 3 + } +} \ No newline at end of file From 148bc0c50b5aa31f2e0dc694463e6aa6dbef0be8 Mon Sep 17 00:00:00 2001 From: wizguin <16276645+wizguin@users.noreply.github.com> Date: Thu, 20 Apr 2023 17:03:30 +0100 Subject: [PATCH 113/200] ninjaprogress: Add CardsView --- src/scenes/games/ninjaprogress/CardsView.js | 53 +++++++++++ .../games/ninjaprogress/CardsView.scene | 88 +++++++++++++++++++ .../games/ninjaprogress/NinjaProgress.js | 29 +++++- .../games/ninjaprogress/NinjaProgress.scene | 17 +++- src/scenes/games/ninjaprogress/Separator.js | 8 ++ .../games/ninjaprogress/Separator.scene | 15 ++++ 6 files changed, 208 insertions(+), 2 deletions(-) create mode 100644 src/scenes/games/ninjaprogress/CardsView.js create mode 100644 src/scenes/games/ninjaprogress/CardsView.scene diff --git a/src/scenes/games/ninjaprogress/CardsView.js b/src/scenes/games/ninjaprogress/CardsView.js new file mode 100644 index 00000000..07194de3 --- /dev/null +++ b/src/scenes/games/ninjaprogress/CardsView.js @@ -0,0 +1,53 @@ +/* START OF COMPILED CODE */ + +import BaseContainer from "../../base/BaseContainer"; +import Button from "../../components/Button"; +/* START-USER-IMPORTS */ +/* END-USER-IMPORTS */ + +export default class CardsView extends BaseContainer { + + constructor(scene, x, y) { + super(scene, x ?? 760, y ?? 480); + + /** @type {Phaser.GameObjects.Image} */ + this.bg; + + + // bg + const bg = scene.add.image(0, 0, "ninjaprogress", "bg/2"); + this.add(bg); + + // scroll + const scroll = scene.add.image(470, 21, "ninjaprogress", "scroll/scroll"); + this.add(scroll); + + // down + const down = scene.add.image(470, 238, "ninjaprogress", "scroll/down"); + this.add(down); + + // up + const up = scene.add.image(470, -193, "ninjaprogress", "scroll/up"); + this.add(up); + + // down (components) + const downButton = new Button(down); + downButton.spriteName = "scroll/down"; + + // up (components) + const upButton = new Button(up); + upButton.spriteName = "scroll/up"; + + this.bg = bg; + + /* START-USER-CTR-CODE */ + /* END-USER-CTR-CODE */ + } + + + /* START-USER-CODE */ + /* END-USER-CODE */ +} + +/* END OF COMPILED CODE */ + diff --git a/src/scenes/games/ninjaprogress/CardsView.scene b/src/scenes/games/ninjaprogress/CardsView.scene new file mode 100644 index 00000000..17d05b83 --- /dev/null +++ b/src/scenes/games/ninjaprogress/CardsView.scene @@ -0,0 +1,88 @@ +{ + "id": "eebb7e39-e8a3-4ccc-b5b3-6241aca388da", + "sceneType": "PREFAB", + "settings": { + "compilerInsertSpaces": true, + "javaScriptInitFieldsInConstructor": true, + "exportClass": true, + "autoImport": true, + "superClassName": "BaseContainer", + "preloadMethodName": "", + "preloadPackFiles": [], + "createMethodName": "", + "borderWidth": 1520, + "borderHeight": 960 + }, + "displayList": [ + { + "type": "Container", + "id": "f2796d25-cfcd-4029-aa65-b5959b3df19b", + "label": "container_1", + "components": [], + "x": 760, + "y": 480, + "list": [ + { + "type": "Image", + "id": "bcdbd623-a5b9-4c7b-ba61-e5929f6e594d", + "label": "bg", + "scope": "CLASS", + "components": [], + "texture": { + "key": "ninjaprogress", + "frame": "bg/2" + } + }, + { + "type": "Image", + "id": "6c6a4641-6550-4814-855c-b9ccb30ce606", + "label": "scroll", + "components": [], + "texture": { + "key": "ninjaprogress", + "frame": "scroll/scroll" + }, + "x": 470, + "y": 21 + }, + { + "type": "Image", + "id": "12eaafd0-60f0-4c74-8499-f5f82274178b", + "label": "down", + "components": [ + "Button" + ], + "Button.spriteName": "scroll/down", + "texture": { + "key": "ninjaprogress", + "frame": "scroll/down" + }, + "x": 470, + "y": 238 + }, + { + "type": "Image", + "id": "5d509cd6-a79e-419b-94fb-6a8fed349bdf", + "label": "up", + "components": [ + "Button" + ], + "Button.spriteName": "scroll/up", + "texture": { + "key": "ninjaprogress", + "frame": "scroll/up" + }, + "x": 470, + "y": -193 + } + ] + } + ], + "plainObjects": [], + "meta": { + "app": "Phaser Editor 2D - Scene Editor", + "url": "https://phasereditor2d.com", + "contentType": "phasereditor2d.core.scene.SceneContentType", + "version": 3 + } +} \ No newline at end of file diff --git a/src/scenes/games/ninjaprogress/NinjaProgress.js b/src/scenes/games/ninjaprogress/NinjaProgress.js index 1bc1fe78..521b222a 100644 --- a/src/scenes/games/ninjaprogress/NinjaProgress.js +++ b/src/scenes/games/ninjaprogress/NinjaProgress.js @@ -19,6 +19,8 @@ export default class NinjaProgress extends BaseContainer { constructor(scene, x, y) { super(scene, x ?? 760, y ?? 480); + /** @type {Phaser.GameObjects.Rectangle} */ + this.cardsViewRect; /** @type {ProgressView} */ this.progress; /** @type {Separator} */ @@ -33,9 +35,16 @@ export default class NinjaProgress extends BaseContainer { this.add(block); // bg - const bg = scene.add.image(0, 51, "ninjaprogress", "bg"); + const bg = scene.add.image(0, 51, "ninjaprogress", "bg/1"); this.add(bg); + // cardsViewRect + const cardsViewRect = scene.add.rectangle(-584, -210, 1168, 542); + cardsViewRect.setOrigin(0, 0); + cardsViewRect.visible = false; + cardsViewRect.isFilled = true; + this.add(cardsViewRect); + // progress const progress = new ProgressView(scene, 0, 0); this.add(progress); @@ -66,10 +75,14 @@ export default class NinjaProgress extends BaseContainer { xButtonButton.spriteName = "close"; xButtonButton.callback = () => this.close(); + this.cardsViewRect = cardsViewRect; this.progress = progress; this.separator = separator; /* START-USER-CTR-CODE */ + + this.createCardsViewMask() + /* END-USER-CTR-CODE */ } @@ -84,6 +97,20 @@ export default class NinjaProgress extends BaseContainer { this.progress.close() } + createCardsViewMask() { + let rect = this.cardsViewRect + let graphics = this.scene.make.graphics() + + // World position + let matrix = rect.getWorldTransformMatrix() + + graphics.fillRect(matrix.getX(0, 0), matrix.getY(0, 0), rect.width, rect.height) + + let mask = graphics.createGeometryMask() + + this.separator.cards.setMask(mask) + } + /* END-USER-CODE */ } diff --git a/src/scenes/games/ninjaprogress/NinjaProgress.scene b/src/scenes/games/ninjaprogress/NinjaProgress.scene index 22e659c9..d9922504 100644 --- a/src/scenes/games/ninjaprogress/NinjaProgress.scene +++ b/src/scenes/games/ninjaprogress/NinjaProgress.scene @@ -42,10 +42,25 @@ "components": [], "texture": { "key": "ninjaprogress", - "frame": "bg" + "frame": "bg/1" }, "y": 51 }, + { + "type": "Rectangle", + "id": "f4dfcd8f-5bc5-4f39-9f7a-963abaae952a", + "label": "cardsViewRect", + "scope": "CLASS", + "components": [], + "x": -584, + "y": -210, + "originX": 0, + "originY": 0, + "visible": false, + "isFilled": true, + "width": 1168, + "height": 542 + }, { "prefabId": "69fb792c-79d1-47f9-a9aa-152d9e190c9d", "id": "eb43e92d-7d06-471a-a937-c8b14e00548f", diff --git a/src/scenes/games/ninjaprogress/Separator.js b/src/scenes/games/ninjaprogress/Separator.js index ff22a5a0..efd3f08d 100644 --- a/src/scenes/games/ninjaprogress/Separator.js +++ b/src/scenes/games/ninjaprogress/Separator.js @@ -1,6 +1,7 @@ /* START OF COMPILED CODE */ import BaseContainer from "../../base/BaseContainer"; +import CardsView from "./CardsView"; import SimpleButton from "../../components/SimpleButton"; /* START-USER-IMPORTS */ /* END-USER-IMPORTS */ @@ -10,10 +11,16 @@ export default class Separator extends BaseContainer { constructor(scene, x, y) { super(scene, x ?? 0, y ?? 0); + /** @type {CardsView} */ + this.cards; /** @type {Phaser.GameObjects.Image} */ this.arrow; + // cards + const cards = new CardsView(scene, 18, -322); + this.add(cards); + // sep const sep = scene.add.image(18, -3, "ninjaprogress", "separator/separator"); this.add(sep); @@ -31,6 +38,7 @@ export default class Separator extends BaseContainer { const buttonSimpleButton = new SimpleButton(button); buttonSimpleButton.callback = () => this.onClick(); + this.cards = cards; this.arrow = arrow; /* START-USER-CTR-CODE */ diff --git a/src/scenes/games/ninjaprogress/Separator.scene b/src/scenes/games/ninjaprogress/Separator.scene index 22b6cd3d..f707964d 100644 --- a/src/scenes/games/ninjaprogress/Separator.scene +++ b/src/scenes/games/ninjaprogress/Separator.scene @@ -20,6 +20,21 @@ "label": "container_1", "components": [], "list": [ + { + "prefabId": "eebb7e39-e8a3-4ccc-b5b3-6241aca388da", + "id": "ecd14e47-fbbf-4cfa-8a9b-988be08f4c61", + "unlock": [ + "x", + "y" + ], + "label": "cards", + "scope": "CLASS", + "components": [], + "x": 18, + "y": -322, + "nestedPrefabs": [], + "list": [] + }, { "type": "Image", "id": "2d5f8b75-0c0b-4a5e-90a4-6abe9db5cc71", From c1418c06c2d3bfd4ca76aa0b1a07936fec39d119 Mon Sep 17 00:00:00 2001 From: wizguin <16276645+wizguin@users.noreply.github.com> Date: Thu, 20 Apr 2023 19:08:59 +0100 Subject: [PATCH 114/200] ninjaprogress: Moved views --- src/scenes/games/ninjaprogress/NinjaProgress.js | 2 +- src/scenes/games/ninjaprogress/Separator.js | 2 +- src/scenes/games/ninjaprogress/{ => views}/CardsView.js | 4 ++-- src/scenes/games/ninjaprogress/{ => views}/CardsView.scene | 0 src/scenes/games/ninjaprogress/{ => views}/ProgressView.js | 4 ++-- src/scenes/games/ninjaprogress/{ => views}/ProgressView.scene | 0 6 files changed, 6 insertions(+), 6 deletions(-) rename src/scenes/games/ninjaprogress/{ => views}/CardsView.js (91%) rename src/scenes/games/ninjaprogress/{ => views}/CardsView.scene (100%) rename src/scenes/games/ninjaprogress/{ => views}/ProgressView.js (97%) rename src/scenes/games/ninjaprogress/{ => views}/ProgressView.scene (100%) diff --git a/src/scenes/games/ninjaprogress/NinjaProgress.js b/src/scenes/games/ninjaprogress/NinjaProgress.js index 521b222a..6e768602 100644 --- a/src/scenes/games/ninjaprogress/NinjaProgress.js +++ b/src/scenes/games/ninjaprogress/NinjaProgress.js @@ -8,7 +8,7 @@ export const preload = { import BaseContainer from "../../base/BaseContainer"; import Interactive from "../../components/Interactive"; -import ProgressView from "./ProgressView"; +import ProgressView from "./views/ProgressView"; import Separator from "./Separator"; import Button from "../../components/Button"; /* START-USER-IMPORTS */ diff --git a/src/scenes/games/ninjaprogress/Separator.js b/src/scenes/games/ninjaprogress/Separator.js index efd3f08d..14894642 100644 --- a/src/scenes/games/ninjaprogress/Separator.js +++ b/src/scenes/games/ninjaprogress/Separator.js @@ -1,7 +1,7 @@ /* START OF COMPILED CODE */ import BaseContainer from "../../base/BaseContainer"; -import CardsView from "./CardsView"; +import CardsView from "./views/CardsView"; import SimpleButton from "../../components/SimpleButton"; /* START-USER-IMPORTS */ /* END-USER-IMPORTS */ diff --git a/src/scenes/games/ninjaprogress/CardsView.js b/src/scenes/games/ninjaprogress/views/CardsView.js similarity index 91% rename from src/scenes/games/ninjaprogress/CardsView.js rename to src/scenes/games/ninjaprogress/views/CardsView.js index 07194de3..53ac2334 100644 --- a/src/scenes/games/ninjaprogress/CardsView.js +++ b/src/scenes/games/ninjaprogress/views/CardsView.js @@ -1,7 +1,7 @@ /* START OF COMPILED CODE */ -import BaseContainer from "../../base/BaseContainer"; -import Button from "../../components/Button"; +import BaseContainer from "../../../base/BaseContainer"; +import Button from "../../../components/Button"; /* START-USER-IMPORTS */ /* END-USER-IMPORTS */ diff --git a/src/scenes/games/ninjaprogress/CardsView.scene b/src/scenes/games/ninjaprogress/views/CardsView.scene similarity index 100% rename from src/scenes/games/ninjaprogress/CardsView.scene rename to src/scenes/games/ninjaprogress/views/CardsView.scene diff --git a/src/scenes/games/ninjaprogress/ProgressView.js b/src/scenes/games/ninjaprogress/views/ProgressView.js similarity index 97% rename from src/scenes/games/ninjaprogress/ProgressView.js rename to src/scenes/games/ninjaprogress/views/ProgressView.js index da14ed7f..95d62797 100644 --- a/src/scenes/games/ninjaprogress/ProgressView.js +++ b/src/scenes/games/ninjaprogress/views/ProgressView.js @@ -1,7 +1,7 @@ /* START OF COMPILED CODE */ -import BaseContainer from "../../base/BaseContainer"; -import Button from "../../components/Button"; +import BaseContainer from "../../../base/BaseContainer"; +import Button from "../../../components/Button"; /* START-USER-IMPORTS */ /* END-USER-IMPORTS */ diff --git a/src/scenes/games/ninjaprogress/ProgressView.scene b/src/scenes/games/ninjaprogress/views/ProgressView.scene similarity index 100% rename from src/scenes/games/ninjaprogress/ProgressView.scene rename to src/scenes/games/ninjaprogress/views/ProgressView.scene From 1c707c63bc11c01b3e85c920d4682c3608f3aa88 Mon Sep 17 00:00:00 2001 From: wizguin <16276645+wizguin@users.noreply.github.com> Date: Thu, 20 Apr 2023 21:54:41 +0100 Subject: [PATCH 115/200] ninjaprogress: Get stats from server --- src/engine/interface/InterfaceController.js | 4 ++ .../games/ninjaprogress/NinjaProgress.js | 47 ++++++++++++++++++- .../games/ninjaprogress/NinjaProgress.scene | 4 +- src/scenes/games/ninjaprogress/Separator.js | 26 +++++++++- 4 files changed, 78 insertions(+), 3 deletions(-) diff --git a/src/engine/interface/InterfaceController.js b/src/engine/interface/InterfaceController.js index 10c01d9b..1c563c4f 100644 --- a/src/engine/interface/InterfaceController.js +++ b/src/engine/interface/InterfaceController.js @@ -138,6 +138,10 @@ export default class InterfaceController extends BaseScene { } showWidget(widget) { + if (widget.visible) { + widget.close() + } + if (widget.widgetLayer) { widget.widgetLayer.bringToTop(widget) } diff --git a/src/scenes/games/ninjaprogress/NinjaProgress.js b/src/scenes/games/ninjaprogress/NinjaProgress.js index 6e768602..231b2b11 100644 --- a/src/scenes/games/ninjaprogress/NinjaProgress.js +++ b/src/scenes/games/ninjaprogress/NinjaProgress.js @@ -47,6 +47,7 @@ export default class NinjaProgress extends BaseContainer { // progress const progress = new ProgressView(scene, 0, 0); + progress.visible = false; this.add(progress); // frame2 @@ -81,6 +82,10 @@ export default class NinjaProgress extends BaseContainer { /* START-USER-CTR-CODE */ + this.ninjaRank + this.ninjaProgress + this.ninjaCards + this.createCardsViewMask() /* END-USER-CTR-CODE */ @@ -89,8 +94,48 @@ export default class NinjaProgress extends BaseContainer { /* START-USER-CODE */ + addListeners() { + this.network.events.on('get_ninja', this.handleGetNinja, this) + } + + removeListeners() { + this.network.events.off('get_ninja', this.handleGetNinja, this) + } + + show() { + this.addListeners() + + this.network.send('get_ninja') + + super.show() + } + + close() { + this.removeListeners() + this.reset() + + super.close() + } + + reset() { + this.separator.close() + this.progress.close() + } + + handleGetNinja(args) { + this.ninjaRank = args.rank + this.ninjaProgress = args.progress + this.ninjaCards = args.cards + + this.showProgress() + + this.separator.setEnable(true) + } + showProgress() { - this.progress.show(0, 0) + if (!this.progress.down) { + this.progress.show(this.ninjaRank, this.ninjaProgress) + } } hideProgress() { diff --git a/src/scenes/games/ninjaprogress/NinjaProgress.scene b/src/scenes/games/ninjaprogress/NinjaProgress.scene index d9922504..afd20f6f 100644 --- a/src/scenes/games/ninjaprogress/NinjaProgress.scene +++ b/src/scenes/games/ninjaprogress/NinjaProgress.scene @@ -66,13 +66,15 @@ "id": "eb43e92d-7d06-471a-a937-c8b14e00548f", "unlock": [ "x", - "y" + "y", + "visible" ], "label": "progress", "scope": "CLASS", "components": [], "x": 0, "y": 0, + "visible": false, "nestedPrefabs": [], "list": [] }, diff --git a/src/scenes/games/ninjaprogress/Separator.js b/src/scenes/games/ninjaprogress/Separator.js index 14894642..58e8104a 100644 --- a/src/scenes/games/ninjaprogress/Separator.js +++ b/src/scenes/games/ninjaprogress/Separator.js @@ -43,9 +43,14 @@ export default class Separator extends BaseContainer { /* START-USER-CTR-CODE */ + this.enable = false + this.tween this.down = false + this.startX = this.x + this.startY = this.y + this.yDiff = 574 /* END-USER-CTR-CODE */ @@ -54,8 +59,12 @@ export default class Separator extends BaseContainer { /* START-USER-CODE */ + setEnable(enable) { + this.enable = enable + } + onClick() { - if (this.tween) { + if (this.tween || !this.enable) { return } @@ -89,6 +98,21 @@ export default class Separator extends BaseContainer { } } + close() { + if (this.tween) { + this.tween.remove() + this.tween = null + } + + this.down = false + this.arrow.flipY = false + + this.x = this.startX + this.y = this.startY + + this.setEnable(false) + } + /* END-USER-CODE */ } From efb7fd0eaf9365af3290767a47178e9685641491 Mon Sep 17 00:00:00 2001 From: wizguin <16276645+wizguin@users.noreply.github.com> Date: Thu, 20 Apr 2023 22:01:08 +0100 Subject: [PATCH 116/200] ninjaprogress: Progress view button --- src/scenes/games/ninjaprogress/views/ProgressView.js | 5 +++++ src/scenes/games/ninjaprogress/views/ProgressView.scene | 1 + 2 files changed, 6 insertions(+) diff --git a/src/scenes/games/ninjaprogress/views/ProgressView.js b/src/scenes/games/ninjaprogress/views/ProgressView.js index 95d62797..7d1c46be 100644 --- a/src/scenes/games/ninjaprogress/views/ProgressView.js +++ b/src/scenes/games/ninjaprogress/views/ProgressView.js @@ -92,6 +92,7 @@ export default class ProgressView extends BaseContainer { // cardsButton (components) const cardsButtonButton = new Button(cardsButton); cardsButtonButton.spriteName = "button"; + cardsButtonButton.callback = () => this.onButtonClick(); this.nextBelt = nextBelt; this.currentBelt = currentBelt; @@ -156,6 +157,10 @@ export default class ProgressView extends BaseContainer { this.currentBelt.visible = !ninjaVisible } + onButtonClick() { + this.parentContainer.separator.onClick() + } + /* END-USER-CODE */ } diff --git a/src/scenes/games/ninjaprogress/views/ProgressView.scene b/src/scenes/games/ninjaprogress/views/ProgressView.scene index d7d2dab0..00a1ff56 100644 --- a/src/scenes/games/ninjaprogress/views/ProgressView.scene +++ b/src/scenes/games/ninjaprogress/views/ProgressView.scene @@ -30,6 +30,7 @@ "Button" ], "Button.spriteName": "button", + "Button.callback": "() => this.onButtonClick()", "texture": { "key": "ninjaprogress", "frame": "button" From 9ab7c4e9ed6fae78058a255dedf4af5345de8359 Mon Sep 17 00:00:00 2001 From: wizguin <16276645+wizguin@users.noreply.github.com> Date: Thu, 20 Apr 2023 22:22:12 +0100 Subject: [PATCH 117/200] ninjaprogress: setCardsNum --- .../games/ninjaprogress/NinjaProgress.js | 3 +++ .../games/ninjaprogress/views/ProgressView.js | 14 ++++++++++++ .../ninjaprogress/views/ProgressView.scene | 22 +++++++++++++++++++ 3 files changed, 39 insertions(+) diff --git a/src/scenes/games/ninjaprogress/NinjaProgress.js b/src/scenes/games/ninjaprogress/NinjaProgress.js index 231b2b11..04e11396 100644 --- a/src/scenes/games/ninjaprogress/NinjaProgress.js +++ b/src/scenes/games/ninjaprogress/NinjaProgress.js @@ -120,6 +120,7 @@ export default class NinjaProgress extends BaseContainer { reset() { this.separator.close() this.progress.close() + this.progress.setCardsNum(0) } handleGetNinja(args) { @@ -127,6 +128,8 @@ export default class NinjaProgress extends BaseContainer { this.ninjaProgress = args.progress this.ninjaCards = args.cards + this.progress.setCardsNum(args.cards.length) + this.showProgress() this.separator.setEnable(true) diff --git a/src/scenes/games/ninjaprogress/views/ProgressView.js b/src/scenes/games/ninjaprogress/views/ProgressView.js index 7d1c46be..2f126d57 100644 --- a/src/scenes/games/ninjaprogress/views/ProgressView.js +++ b/src/scenes/games/ninjaprogress/views/ProgressView.js @@ -10,6 +10,8 @@ export default class ProgressView extends BaseContainer { constructor(scene, x, y) { super(scene, x ?? 760, y ?? 480); + /** @type {Phaser.GameObjects.Text} */ + this.cardsNum; /** @type {Phaser.GameObjects.Image} */ this.nextBelt; /** @type {Phaser.GameObjects.Image} */ @@ -35,6 +37,13 @@ export default class ProgressView extends BaseContainer { const cards = scene.add.image(68, 245, "ninjaprogress", "cards"); this.add(cards); + // cardsNum + const cardsNum = scene.add.text(64, 248, "", {}); + cardsNum.setOrigin(0.5, 0.5); + cardsNum.text = "0"; + cardsNum.setStyle({ "align": "center", "fixedWidth":100,"fontFamily": "Arial", "fontSize": "48px", "fontStyle": "bold", "stroke": "#000", "strokeThickness":8,"shadow.blur":2,"shadow.stroke":true,"shadow.fill":true}); + this.add(cardsNum); + // cardsText const cardsText = scene.add.text(-81, 254, "", {}); cardsText.setOrigin(0.5, 0.5); @@ -94,6 +103,7 @@ export default class ProgressView extends BaseContainer { cardsButtonButton.spriteName = "button"; cardsButtonButton.callback = () => this.onButtonClick(); + this.cardsNum = cardsNum; this.nextBelt = nextBelt; this.currentBelt = currentBelt; this.nextText = nextText; @@ -142,6 +152,10 @@ export default class ProgressView extends BaseContainer { this.bar.setFrame(`progress/${progress}`) } + setCardsNum(num) { + this.cardsNum.text = num + } + setVisibleElements(rank) { let nextVisible = rank < 9 let senseiVisible = rank == 9 diff --git a/src/scenes/games/ninjaprogress/views/ProgressView.scene b/src/scenes/games/ninjaprogress/views/ProgressView.scene index 00a1ff56..38947e1a 100644 --- a/src/scenes/games/ninjaprogress/views/ProgressView.scene +++ b/src/scenes/games/ninjaprogress/views/ProgressView.scene @@ -50,6 +50,28 @@ "x": 68, "y": 245 }, + { + "type": "Text", + "id": "179eb58d-0975-484c-b228-cc6276263375", + "label": "cardsNum", + "scope": "CLASS", + "components": [], + "x": 64, + "y": 248, + "originX": 0.5, + "originY": 0.5, + "text": "0", + "fixedWidth": 100, + "align": "center", + "fontFamily": "Arial", + "fontSize": "48px", + "fontStyle": "bold", + "stroke": "#000", + "strokeThickness": 8, + "shadow.stroke": true, + "shadow.fill": true, + "shadow.blur": 2 + }, { "type": "Text", "id": "928a8a3c-c2c0-4c2b-8b73-0b1bcd0cfe0e", From 947f01a51bff91029044ff8830a0a71e7ced85a9 Mon Sep 17 00:00:00 2001 From: wizguin <16276645+wizguin@users.noreply.github.com> Date: Thu, 20 Apr 2023 22:26:50 +0100 Subject: [PATCH 118/200] ninjaprogress: Add empty cards/grid to CardsView --- .../games/ninjaprogress/views/CardsView.js | 48 +++++++ .../games/ninjaprogress/views/CardsView.scene | 8 +- .../ninjaprogress/views/CardsViewCard.js | 85 ++++++++++++ .../ninjaprogress/views/CardsViewCard.scene | 131 ++++++++++++++++++ 4 files changed, 271 insertions(+), 1 deletion(-) create mode 100644 src/scenes/games/ninjaprogress/views/CardsViewCard.js create mode 100644 src/scenes/games/ninjaprogress/views/CardsViewCard.scene diff --git a/src/scenes/games/ninjaprogress/views/CardsView.js b/src/scenes/games/ninjaprogress/views/CardsView.js index 53ac2334..90b071c1 100644 --- a/src/scenes/games/ninjaprogress/views/CardsView.js +++ b/src/scenes/games/ninjaprogress/views/CardsView.js @@ -3,6 +3,9 @@ import BaseContainer from "../../../base/BaseContainer"; import Button from "../../../components/Button"; /* START-USER-IMPORTS */ + +import CardsViewCard from './CardsViewCard' + /* END-USER-IMPORTS */ export default class CardsView extends BaseContainer { @@ -12,6 +15,8 @@ export default class CardsView extends BaseContainer { /** @type {Phaser.GameObjects.Image} */ this.bg; + /** @type {Array} */ + this.cards; // bg @@ -30,6 +35,9 @@ export default class CardsView extends BaseContainer { const up = scene.add.image(470, -193, "ninjaprogress", "scroll/up"); this.add(up); + // lists + const cards = []; + // down (components) const downButton = new Button(down); downButton.spriteName = "scroll/down"; @@ -39,13 +47,53 @@ export default class CardsView extends BaseContainer { upButton.spriteName = "scroll/up"; this.bg = bg; + this.cards = cards; /* START-USER-CTR-CODE */ + + this.startX = -478 + this.startY = -146 + + this.width = 5 + this.height = 3 + + this.cellWidth = 188 + this.cellHeight = 166 + + this.createCards() + /* END-USER-CTR-CODE */ } /* START-USER-CODE */ + + createCards() { + for (let i = 0; i < this.width * this.height; i++) { + let card = new CardsViewCard(this.scene, this.startX, this.startY) + + this.add(card) + this.cards.push(card) + } + + this.createGrid() + } + + createGrid() { + Phaser.Actions.GridAlign(this.cards, { + width: this.width, + height: this.height, + + cellWidth: this.cellWidth, + cellHeight: this.cellHeight, + + position: Phaser.Display.Align.CENTER, + + x: this.startX, + y: this.startY + }) + } + /* END-USER-CODE */ } diff --git a/src/scenes/games/ninjaprogress/views/CardsView.scene b/src/scenes/games/ninjaprogress/views/CardsView.scene index 17d05b83..f5b1e258 100644 --- a/src/scenes/games/ninjaprogress/views/CardsView.scene +++ b/src/scenes/games/ninjaprogress/views/CardsView.scene @@ -84,5 +84,11 @@ "url": "https://phasereditor2d.com", "contentType": "phasereditor2d.core.scene.SceneContentType", "version": 3 - } + }, + "lists": [ + { + "id": "5f9fb9e1-bb62-4599-b6e1-05cdd4f4555c", + "label": "cards" + } + ] } \ No newline at end of file diff --git a/src/scenes/games/ninjaprogress/views/CardsViewCard.js b/src/scenes/games/ninjaprogress/views/CardsViewCard.js new file mode 100644 index 00000000..648c57e5 --- /dev/null +++ b/src/scenes/games/ninjaprogress/views/CardsViewCard.js @@ -0,0 +1,85 @@ +/* START OF COMPILED CODE */ + +import BaseContainer from "../../../base/BaseContainer"; +/* START-USER-IMPORTS */ +/* END-USER-IMPORTS */ + +export default class CardsViewCard extends BaseContainer { + + constructor(scene, x, y) { + super(scene, x ?? 760, y ?? 480); + + /** @type {Phaser.GameObjects.Image} */ + this.glow; + /** @type {Phaser.GameObjects.Image} */ + this.back; + /** @type {Phaser.GameObjects.Image} */ + this.icon; + /** @type {Phaser.GameObjects.Image} */ + this.color; + /** @type {Phaser.GameObjects.Image} */ + this.element; + /** @type {Phaser.GameObjects.Text} */ + this.value; + + + // glow + const glow = scene.add.image(1, 0, "ninjaprogress", "card/glow0001"); + glow.setOrigin(0.503030303030303, 0.5); + glow.visible = false; + this.add(glow); + + // back + const back = scene.add.image(0, 0, "ninjaprogress", "card/back"); + back.scaleX = 0.95; + back.scaleY = 0.95; + back.setOrigin(0.5038167938931297, 0.5); + this.add(back); + + // shadow + const shadow = scene.add.image(3, 3, "ninjaprogress", "card/shadow"); + shadow.setOrigin(0.5038167938931297, 0.5); + this.add(shadow); + + // icon + const icon = scene.add.image(0, 0, "_MISSING"); + icon.visible = false; + this.add(icon); + + // color + const color = scene.add.image(0, 0, "ninjaprogress", "card/color"); + color.setOrigin(0.5038167938931297, 0.5); + color.tintTopLeft = 1132705; + color.tintTopRight = 1132705; + color.tintBottomLeft = 1132705; + color.tintBottomRight = 1132705; + this.add(color); + + // element + const element = scene.add.image(-47, -54, "ninjaprogress", "card/f"); + element.setOrigin(0.5, 0.5185185185185185); + this.add(element); + + // value + const value = scene.add.text(-66, -38, "", {}); + value.text = "88"; + value.setStyle({ "align": "center", "color": "#000", "fixedWidth":36,"fontFamily": "Arial", "fontSize": "26px", "fontStyle": "bold" }); + this.add(value); + + this.glow = glow; + this.back = back; + this.icon = icon; + this.color = color; + this.element = element; + this.value = value; + + /* START-USER-CTR-CODE */ + /* END-USER-CTR-CODE */ + } + + + /* START-USER-CODE */ + /* END-USER-CODE */ +} + +/* END OF COMPILED CODE */ diff --git a/src/scenes/games/ninjaprogress/views/CardsViewCard.scene b/src/scenes/games/ninjaprogress/views/CardsViewCard.scene new file mode 100644 index 00000000..11a9b0e6 --- /dev/null +++ b/src/scenes/games/ninjaprogress/views/CardsViewCard.scene @@ -0,0 +1,131 @@ +{ + "id": "9f9b5b6f-5629-4026-a28d-0bfd8b2ac1e4", + "sceneType": "PREFAB", + "settings": { + "compilerInsertSpaces": true, + "javaScriptInitFieldsInConstructor": true, + "exportClass": true, + "autoImport": true, + "superClassName": "BaseContainer", + "preloadMethodName": "", + "preloadPackFiles": [], + "createMethodName": "", + "borderWidth": 1520, + "borderHeight": 960 + }, + "displayList": [ + { + "type": "Container", + "id": "f9520288-babf-4d1e-9df3-6de2014f5bf8", + "label": "container_1", + "components": [], + "x": 760, + "y": 480, + "list": [ + { + "type": "Image", + "id": "695f8494-eea7-464d-97fa-98dec9180ffe", + "label": "glow", + "scope": "CLASS", + "components": [], + "texture": { + "key": "ninjaprogress", + "frame": "card/glow0001" + }, + "x": 1, + "originX": 0.503030303030303, + "visible": false + }, + { + "type": "Image", + "id": "0b8f3a7d-39ce-44f5-96ed-57f43fb888e7", + "label": "back", + "scope": "CLASS", + "components": [], + "texture": { + "key": "ninjaprogress", + "frame": "card/back" + }, + "scaleX": 0.95, + "scaleY": 0.95, + "originX": 0.5038167938931297 + }, + { + "type": "Image", + "id": "e1ca6d79-b0a8-49ef-a40a-2d60d05bdf90", + "label": "shadow", + "components": [], + "texture": { + "key": "ninjaprogress", + "frame": "card/shadow" + }, + "x": 3, + "y": 3, + "originX": 0.5038167938931297 + }, + { + "type": "Image", + "id": "3aa33900-d940-437c-8155-e66c64f3b560", + "label": "icon", + "scope": "CLASS", + "components": [], + "texture": {}, + "visible": false + }, + { + "type": "Image", + "id": "30e60b4b-9fe0-40bf-b4a7-b2d698495564", + "label": "color", + "scope": "CLASS", + "components": [], + "texture": { + "key": "ninjaprogress", + "frame": "card/color" + }, + "originX": 0.5038167938931297, + "tintTopLeft": "#1148a1", + "tintTopRight": "#1148a1", + "tintBottomLeft": "#1148a1", + "tintBottomRight": "#1148a1" + }, + { + "type": "Image", + "id": "229219ee-a4bd-4dc7-a844-2977401125c8", + "label": "element", + "scope": "CLASS", + "components": [], + "texture": { + "key": "ninjaprogress", + "frame": "card/f" + }, + "x": -47, + "y": -54, + "originY": 0.5185185185185185 + }, + { + "type": "Text", + "id": "eed3170b-7b07-4cdc-adcd-133f2a8e8bb7", + "label": "value", + "scope": "CLASS", + "components": [], + "x": -66, + "y": -38, + "text": "88", + "fixedWidth": 36, + "align": "center", + "fontFamily": "Arial", + "fontSize": "26px", + "fontStyle": "bold", + "color": "#000" + } + ] + } + ], + "plainObjects": [], + "meta": { + "app": "Phaser Editor 2D - Scene Editor", + "url": "https://phasereditor2d.com", + "contentType": "phasereditor2d.core.scene.SceneContentType", + "version": 3 + } +} \ No newline at end of file From ef0cbccf75f14cae5fd5abd2f2c7cebb88e9d912 Mon Sep 17 00:00:00 2001 From: wizguin <16276645+wizguin@users.noreply.github.com> Date: Fri, 21 Apr 2023 12:15:31 +0100 Subject: [PATCH 119/200] ninjaprogress: Load cards --- .../games/ninjaprogress/NinjaProgress.js | 9 +++- .../games/ninjaprogress/views/CardsView.js | 32 +++++++++++++++ .../ninjaprogress/views/CardsViewCard.js | 41 ++++++++++++++++++- .../ninjaprogress/views/CardsViewCard.scene | 2 +- 4 files changed, 80 insertions(+), 4 deletions(-) diff --git a/src/scenes/games/ninjaprogress/NinjaProgress.js b/src/scenes/games/ninjaprogress/NinjaProgress.js index 04e11396..2d47d6ca 100644 --- a/src/scenes/games/ninjaprogress/NinjaProgress.js +++ b/src/scenes/games/ninjaprogress/NinjaProgress.js @@ -119,6 +119,8 @@ export default class NinjaProgress extends BaseContainer { reset() { this.separator.close() + this.separator.cards.setCards([]) + this.progress.close() this.progress.setCardsNum(0) } @@ -129,9 +131,10 @@ export default class NinjaProgress extends BaseContainer { this.ninjaCards = args.cards this.progress.setCardsNum(args.cards.length) - this.showProgress() + this.setCards() + this.separator.setEnable(true) } @@ -145,6 +148,10 @@ export default class NinjaProgress extends BaseContainer { this.progress.close() } + setCards() { + this.separator.cards.setCards(this.ninjaCards) + } + createCardsViewMask() { let rect = this.cardsViewRect let graphics = this.scene.make.graphics() diff --git a/src/scenes/games/ninjaprogress/views/CardsView.js b/src/scenes/games/ninjaprogress/views/CardsView.js index 90b071c1..69fba0ba 100644 --- a/src/scenes/games/ninjaprogress/views/CardsView.js +++ b/src/scenes/games/ninjaprogress/views/CardsView.js @@ -4,6 +4,7 @@ import BaseContainer from "../../../base/BaseContainer"; import Button from "../../../components/Button"; /* START-USER-IMPORTS */ +import CardLoader from '@engine/loaders/CardLoader' import CardsViewCard from './CardsViewCard' /* END-USER-IMPORTS */ @@ -60,6 +61,7 @@ export default class CardsView extends BaseContainer { this.cellWidth = 188 this.cellHeight = 166 + this.cardLoader = new CardLoader(scene) this.createCards() /* END-USER-CTR-CODE */ @@ -94,6 +96,36 @@ export default class CardsView extends BaseContainer { }) } + setCards(ninjaCards) { + for (let i = 0; i < this.cards.length; i++) { + let prefab = this.cards[i] + + prefab.removeIcon() + + if (!ninjaCards[i]) { + prefab.id = null + prefab.close() + + continue + } + + let card = ninjaCards[i] + let key = this.cardLoader.getKey(card.card_id) + + prefab.id = card.card_id + + this.cardLoader.loadCard(card, () => this.onCardLoad(key, card, prefab)) + + prefab.show(card) + } + } + + onCardLoad(key, card, prefab) { + if (prefab.id == card.card_id) { + prefab.setIcon(key) + } + } + /* END-USER-CODE */ } diff --git a/src/scenes/games/ninjaprogress/views/CardsViewCard.js b/src/scenes/games/ninjaprogress/views/CardsViewCard.js index 648c57e5..573c581e 100644 --- a/src/scenes/games/ninjaprogress/views/CardsViewCard.js +++ b/src/scenes/games/ninjaprogress/views/CardsViewCard.js @@ -2,6 +2,9 @@ import BaseContainer from "../../../base/BaseContainer"; /* START-USER-IMPORTS */ + +import layout from '@scenes/games/card/layout' + /* END-USER-IMPORTS */ export default class CardsViewCard extends BaseContainer { @@ -9,7 +12,7 @@ export default class CardsViewCard extends BaseContainer { constructor(scene, x, y) { super(scene, x ?? 760, y ?? 480); - /** @type {Phaser.GameObjects.Image} */ + /** @type {Phaser.GameObjects.Sprite} */ this.glow; /** @type {Phaser.GameObjects.Image} */ this.back; @@ -24,7 +27,7 @@ export default class CardsViewCard extends BaseContainer { // glow - const glow = scene.add.image(1, 0, "ninjaprogress", "card/glow0001"); + const glow = scene.add.sprite(1, 0, "ninjaprogress", "card/glow0001"); glow.setOrigin(0.503030303030303, 0.5); glow.visible = false; this.add(glow); @@ -74,11 +77,45 @@ export default class CardsViewCard extends BaseContainer { this.value = value; /* START-USER-CTR-CODE */ + + this.id + + this.icon.scale = 0.7 + + this.glow.anims.play('ninjaprogress/glow') + /* END-USER-CTR-CODE */ } /* START-USER-CODE */ + + show(card) { + let tint = layout.colors[card.color].color + + this.value.text = card.value + this.color.tint = tint + + this.element.setFrame(`card/${card.element}`) + + if (card.power_id > 0) { + this.glow.tint = tint + } + + this.glow.visible = card.power_id > 0 + + super.show() + } + + setIcon(key) { + this.icon.setTexture(key) + this.icon.visible = true + } + + removeIcon() { + this.icon.visible = false + } + /* END-USER-CODE */ } diff --git a/src/scenes/games/ninjaprogress/views/CardsViewCard.scene b/src/scenes/games/ninjaprogress/views/CardsViewCard.scene index 11a9b0e6..ac0b20bf 100644 --- a/src/scenes/games/ninjaprogress/views/CardsViewCard.scene +++ b/src/scenes/games/ninjaprogress/views/CardsViewCard.scene @@ -23,7 +23,7 @@ "y": 480, "list": [ { - "type": "Image", + "type": "Sprite", "id": "695f8494-eea7-464d-97fa-98dec9180ffe", "label": "glow", "scope": "CLASS", From 0ca25316a06120e00cacf4d349dbc3829bb04205 Mon Sep 17 00:00:00 2001 From: wizguin <16276645+wizguin@users.noreply.github.com> Date: Fri, 21 Apr 2023 12:45:16 +0100 Subject: [PATCH 120/200] ninjaprogress: Add pagination --- .../games/ninjaprogress/NinjaProgress.js | 2 + .../games/ninjaprogress/views/CardsView.js | 45 +++++++++++++++++-- .../games/ninjaprogress/views/CardsView.scene | 2 + 3 files changed, 46 insertions(+), 3 deletions(-) diff --git a/src/scenes/games/ninjaprogress/NinjaProgress.js b/src/scenes/games/ninjaprogress/NinjaProgress.js index 2d47d6ca..a23452a0 100644 --- a/src/scenes/games/ninjaprogress/NinjaProgress.js +++ b/src/scenes/games/ninjaprogress/NinjaProgress.js @@ -123,6 +123,8 @@ export default class NinjaProgress extends BaseContainer { this.progress.close() this.progress.setCardsNum(0) + + this.separator.cards.page = 1 } handleGetNinja(args) { diff --git a/src/scenes/games/ninjaprogress/views/CardsView.js b/src/scenes/games/ninjaprogress/views/CardsView.js index 69fba0ba..deb6f844 100644 --- a/src/scenes/games/ninjaprogress/views/CardsView.js +++ b/src/scenes/games/ninjaprogress/views/CardsView.js @@ -42,10 +42,12 @@ export default class CardsView extends BaseContainer { // down (components) const downButton = new Button(down); downButton.spriteName = "scroll/down"; + downButton.callback = () => this.nextPage(); // up (components) const upButton = new Button(up); upButton.spriteName = "scroll/up"; + upButton.callback = () => this.prevPage(); this.bg = bg; this.cards = cards; @@ -61,6 +63,11 @@ export default class CardsView extends BaseContainer { this.cellWidth = 188 this.cellHeight = 166 + this.page = 1 + this.pageSize = this.width * this.height + + this.ninjaCards = [] + this.cardLoader = new CardLoader(scene) this.createCards() @@ -70,8 +77,12 @@ export default class CardsView extends BaseContainer { /* START-USER-CODE */ + get maxPage() { + return Math.ceil(this.ninjaCards.length / this.pageSize) + } + createCards() { - for (let i = 0; i < this.width * this.height; i++) { + for (let i = 0; i < this.pageSize; i++) { let card = new CardsViewCard(this.scene, this.startX, this.startY) this.add(card) @@ -97,19 +108,27 @@ export default class CardsView extends BaseContainer { } setCards(ninjaCards) { + this.ninjaCards = ninjaCards + + this.showPage() + } + + showPage() { + let page = this.ninjaCards.slice((this.page - 1) * this.pageSize, this.page * this.pageSize) + for (let i = 0; i < this.cards.length; i++) { let prefab = this.cards[i] prefab.removeIcon() - if (!ninjaCards[i]) { + if (!page[i]) { prefab.id = null prefab.close() continue } - let card = ninjaCards[i] + let card = page[i] let key = this.cardLoader.getKey(card.card_id) prefab.id = card.card_id @@ -120,6 +139,26 @@ export default class CardsView extends BaseContainer { } } + prevPage() { + let page = this.page - 1 + if (page < 1) { + return + } + + this.page = page + this.showPage() + } + + nextPage() { + let page = this.page + 1 + if (page > this.maxPage) { + return + } + + this.page = page + this.showPage() + } + onCardLoad(key, card, prefab) { if (prefab.id == card.card_id) { prefab.setIcon(key) diff --git a/src/scenes/games/ninjaprogress/views/CardsView.scene b/src/scenes/games/ninjaprogress/views/CardsView.scene index f5b1e258..e5cb70a9 100644 --- a/src/scenes/games/ninjaprogress/views/CardsView.scene +++ b/src/scenes/games/ninjaprogress/views/CardsView.scene @@ -53,6 +53,7 @@ "Button" ], "Button.spriteName": "scroll/down", + "Button.callback": "() => this.nextPage()", "texture": { "key": "ninjaprogress", "frame": "scroll/down" @@ -68,6 +69,7 @@ "Button" ], "Button.spriteName": "scroll/up", + "Button.callback": "() => this.prevPage()", "texture": { "key": "ninjaprogress", "frame": "scroll/up" From 0f4ddfb1d9ae84a3a996238b9b1c26f9c3a9c19f Mon Sep 17 00:00:00 2001 From: wizguin <16276645+wizguin@users.noreply.github.com> Date: Fri, 21 Apr 2023 13:36:05 +0100 Subject: [PATCH 121/200] ninjaprogress: Add update buttons interactive --- src/scenes/games/ninjaprogress/Separator.js | 4 +++ .../games/ninjaprogress/views/CardsView.js | 33 ++++++++++++++++++- .../games/ninjaprogress/views/CardsView.scene | 2 ++ 3 files changed, 38 insertions(+), 1 deletion(-) diff --git a/src/scenes/games/ninjaprogress/Separator.js b/src/scenes/games/ninjaprogress/Separator.js index 58e8104a..a719c565 100644 --- a/src/scenes/games/ninjaprogress/Separator.js +++ b/src/scenes/games/ninjaprogress/Separator.js @@ -68,6 +68,8 @@ export default class Separator extends BaseContainer { return } + this.cards.disableButtons() + let duration = this.down ? 325 : 500 let y = this.down ? this.y - this.yDiff : this.y + this.yDiff let ease = this.down ? 'Quad.easeOut' : 'Quad.easeIn' @@ -96,6 +98,8 @@ export default class Separator extends BaseContainer { if (!this.down) { this.parentContainer.showProgress() } + + this.cards.updateButtons() } close() { diff --git a/src/scenes/games/ninjaprogress/views/CardsView.js b/src/scenes/games/ninjaprogress/views/CardsView.js index deb6f844..c5ad1221 100644 --- a/src/scenes/games/ninjaprogress/views/CardsView.js +++ b/src/scenes/games/ninjaprogress/views/CardsView.js @@ -16,6 +16,10 @@ export default class CardsView extends BaseContainer { /** @type {Phaser.GameObjects.Image} */ this.bg; + /** @type {Phaser.GameObjects.Image} */ + this.down; + /** @type {Phaser.GameObjects.Image} */ + this.up; /** @type {Array} */ this.cards; @@ -50,6 +54,8 @@ export default class CardsView extends BaseContainer { upButton.callback = () => this.prevPage(); this.bg = bg; + this.down = down; + this.up = up; this.cards = cards; /* START-USER-CTR-CODE */ @@ -137,6 +143,8 @@ export default class CardsView extends BaseContainer { prefab.show(card) } + + this.updateButtons() } prevPage() { @@ -165,8 +173,31 @@ export default class CardsView extends BaseContainer { } } + updateButtons() { + if (!this.parentContainer.down) { + this.disableButtons() + return + } + + let upEnabled = this.page > 1 + let downEnabled = this.page < this.maxPage + + this.setButtons(upEnabled, downEnabled) + } + + disableButtons() { + this.setButtons(false, false) + } + + setButtons(upEnabled, downEnabled) { + this.up.input.enabled = upEnabled + this.down.input.enabled = downEnabled + + this.up.alpha = upEnabled ? 1 : 0.5 + this.down.alpha = downEnabled ? 1 : 0.5 + } + /* END-USER-CODE */ } /* END OF COMPILED CODE */ - diff --git a/src/scenes/games/ninjaprogress/views/CardsView.scene b/src/scenes/games/ninjaprogress/views/CardsView.scene index e5cb70a9..df230c44 100644 --- a/src/scenes/games/ninjaprogress/views/CardsView.scene +++ b/src/scenes/games/ninjaprogress/views/CardsView.scene @@ -49,6 +49,7 @@ "type": "Image", "id": "12eaafd0-60f0-4c74-8499-f5f82274178b", "label": "down", + "scope": "CLASS", "components": [ "Button" ], @@ -65,6 +66,7 @@ "type": "Image", "id": "5d509cd6-a79e-419b-94fb-6a8fed349bdf", "label": "up", + "scope": "CLASS", "components": [ "Button" ], From ba9806e8b2249faed64d1bbee924ad7d2bb19292 Mon Sep 17 00:00:00 2001 From: wizguin <16276645+wizguin@users.noreply.github.com> Date: Fri, 21 Apr 2023 13:40:52 +0100 Subject: [PATCH 122/200] ninjaprogress: Add ninja hideout sprite --- .../games/ninjaprogress/views/ProgressView.js | 9 +++++++++ .../games/ninjaprogress/views/ProgressView.scene | 14 ++++++++++++++ 2 files changed, 23 insertions(+) diff --git a/src/scenes/games/ninjaprogress/views/ProgressView.js b/src/scenes/games/ninjaprogress/views/ProgressView.js index 2f126d57..642966a5 100644 --- a/src/scenes/games/ninjaprogress/views/ProgressView.js +++ b/src/scenes/games/ninjaprogress/views/ProgressView.js @@ -26,6 +26,8 @@ export default class ProgressView extends BaseContainer { this.progressText; /** @type {Phaser.GameObjects.Image} */ this.sensei; + /** @type {Phaser.GameObjects.Image} */ + this.hideout; // cardsButton @@ -98,6 +100,11 @@ export default class ProgressView extends BaseContainer { sensei.visible = false; this.add(sensei); + // hideout + const hideout = scene.add.image(-26, -6, "ninjaprogress", "hideout"); + hideout.visible = false; + this.add(hideout); + // cardsButton (components) const cardsButtonButton = new Button(cardsButton); cardsButtonButton.spriteName = "button"; @@ -111,6 +118,7 @@ export default class ProgressView extends BaseContainer { this.bar = bar; this.progressText = progressText; this.sensei = sensei; + this.hideout = hideout; /* START-USER-CTR-CODE */ /* END-USER-CTR-CODE */ @@ -166,6 +174,7 @@ export default class ProgressView extends BaseContainer { this.nextBelt.visible = nextVisible this.sensei.visible = senseiVisible + this.hideout.visible = ninjaVisible this.currentText.visible = !ninjaVisible this.currentBelt.visible = !ninjaVisible diff --git a/src/scenes/games/ninjaprogress/views/ProgressView.scene b/src/scenes/games/ninjaprogress/views/ProgressView.scene index 38947e1a..b6e05f92 100644 --- a/src/scenes/games/ninjaprogress/views/ProgressView.scene +++ b/src/scenes/games/ninjaprogress/views/ProgressView.scene @@ -210,6 +210,20 @@ "y": -14, "originY": 0.5023255813953489, "visible": false + }, + { + "type": "Image", + "id": "29c6e148-233f-4cbc-959a-f4b295425d1f", + "label": "hideout", + "scope": "CLASS", + "components": [], + "texture": { + "key": "ninjaprogress", + "frame": "hideout" + }, + "x": -26, + "y": -6, + "visible": false } ] } From e31d4283439b0767cb5a905eec8b1e584214a62a Mon Sep 17 00:00:00 2001 From: wizguin <16276645+wizguin@users.noreply.github.com> Date: Fri, 21 Apr 2023 14:04:17 +0100 Subject: [PATCH 123/200] ninjaprogress: Update sensei/ninja progress view --- .../games/ninjaprogress/views/ProgressView.js | 34 ++++++-- .../ninjaprogress/views/ProgressView.scene | 82 +++++++++++++++---- 2 files changed, 95 insertions(+), 21 deletions(-) diff --git a/src/scenes/games/ninjaprogress/views/ProgressView.js b/src/scenes/games/ninjaprogress/views/ProgressView.js index 642966a5..874ffe2c 100644 --- a/src/scenes/games/ninjaprogress/views/ProgressView.js +++ b/src/scenes/games/ninjaprogress/views/ProgressView.js @@ -24,9 +24,9 @@ export default class ProgressView extends BaseContainer { this.bar; /** @type {Phaser.GameObjects.Text} */ this.progressText; - /** @type {Phaser.GameObjects.Image} */ + /** @type {Phaser.GameObjects.Container} */ this.sensei; - /** @type {Phaser.GameObjects.Image} */ + /** @type {Phaser.GameObjects.Container} */ this.hideout; @@ -95,16 +95,40 @@ export default class ProgressView extends BaseContainer { this.add(progressText); // sensei - const sensei = scene.add.image(128, -14, "ninjaprogress", "sensei"); - sensei.setOrigin(0.5, 0.5023255813953489); + const sensei = scene.add.container(12, -14); sensei.visible = false; this.add(sensei); + // senseiImage + const senseiImage = scene.add.image(116, 0, "ninjaprogress", "sensei"); + senseiImage.setOrigin(0.5, 0.5023255813953489); + sensei.add(senseiImage); + + // senseiText + const senseiText = scene.add.text(0, 20, "", {}); + senseiText.setOrigin(0.5, 0.5); + senseiText.text = "Well done, grasshopper. You have earned your\nblack belt. Take the next step of your training\njourney and challenge Sensei to become a ninja."; + senseiText.setStyle({ "align": "center", "color": "#333", "fixedWidth":600,"fontFamily": "Burbank Small", "fontSize": "26px" }); + senseiText.setLineSpacing(8); + sensei.add(senseiText); + // hideout - const hideout = scene.add.image(-26, -6, "ninjaprogress", "hideout"); + const hideout = scene.add.container(-26, -6); hideout.visible = false; this.add(hideout); + // hideoutImage + const hideoutImage = scene.add.image(0, 0, "ninjaprogress", "hideout"); + hideout.add(hideoutImage); + + // hideoutText + const hideoutText = scene.add.text(132, 10, "", {}); + hideoutText.setOrigin(0.5, 0.5); + hideoutText.text = "Congratulations, ninja! You are a wise Card-Jitsu\nmaster and you now have access to the Ninja Hideout."; + hideoutText.setStyle({ "align": "center", "color": "#333", "fixedWidth":800,"fontFamily": "Burbank Small", "fontSize": "26px" }); + hideoutText.setLineSpacing(8); + hideout.add(hideoutText); + // cardsButton (components) const cardsButtonButton = new Button(cardsButton); cardsButtonButton.spriteName = "button"; diff --git a/src/scenes/games/ninjaprogress/views/ProgressView.scene b/src/scenes/games/ninjaprogress/views/ProgressView.scene index b6e05f92..6e56371f 100644 --- a/src/scenes/games/ninjaprogress/views/ProgressView.scene +++ b/src/scenes/games/ninjaprogress/views/ProgressView.scene @@ -197,33 +197,83 @@ "color": "#333" }, { - "type": "Image", - "id": "a8b59277-06bc-450f-a0c6-408956531166", + "type": "Container", + "id": "a91499ce-58e4-4159-866a-6074a3bd6bd8", "label": "sensei", "scope": "CLASS", "components": [], - "texture": { - "key": "ninjaprogress", - "frame": "sensei" - }, - "x": 128, + "x": 12, "y": -14, - "originY": 0.5023255813953489, - "visible": false + "visible": false, + "list": [ + { + "type": "Image", + "id": "a8b59277-06bc-450f-a0c6-408956531166", + "label": "senseiImage", + "components": [], + "texture": { + "key": "ninjaprogress", + "frame": "sensei" + }, + "x": 116, + "originY": 0.5023255813953489 + }, + { + "type": "Text", + "id": "57ed6934-c5fb-4f95-8746-20adfbcdfd66", + "label": "senseiText", + "components": [], + "y": 20, + "originX": 0.5, + "originY": 0.5, + "text": "Well done, grasshopper. You have earned your\nblack belt. Take the next step of your training\njourney and challenge Sensei to become a ninja.", + "fixedWidth": 600, + "lineSpacing": 8, + "align": "center", + "fontFamily": "Burbank Small", + "fontSize": "26px", + "color": "#333" + } + ] }, { - "type": "Image", - "id": "29c6e148-233f-4cbc-959a-f4b295425d1f", + "type": "Container", + "id": "73fc1120-7bec-42f7-a3ff-c1ef70dbdf4b", "label": "hideout", "scope": "CLASS", "components": [], - "texture": { - "key": "ninjaprogress", - "frame": "hideout" - }, "x": -26, "y": -6, - "visible": false + "visible": false, + "list": [ + { + "type": "Image", + "id": "29c6e148-233f-4cbc-959a-f4b295425d1f", + "label": "hideoutImage", + "components": [], + "texture": { + "key": "ninjaprogress", + "frame": "hideout" + } + }, + { + "type": "Text", + "id": "7b63e695-ade2-4079-9399-8ac8fa14d8b7", + "label": "hideoutText", + "components": [], + "x": 132, + "y": 10, + "originX": 0.5, + "originY": 0.5, + "text": "Congratulations, ninja! You are a wise Card-Jitsu\nmaster and you now have access to the Ninja Hideout.", + "fixedWidth": 800, + "lineSpacing": 8, + "align": "center", + "fontFamily": "Burbank Small", + "fontSize": "26px", + "color": "#333" + } + ] } ] } From 9a7ba60d20eed777fca9f1800d73ce83a718db73 Mon Sep 17 00:00:00 2001 From: wizguin <16276645+wizguin@users.noreply.github.com> Date: Fri, 21 Apr 2023 16:46:07 +0100 Subject: [PATCH 124/200] Update card icon positioning --- src/scenes/games/card/card/CardJitsuCard.js | 3 ++- src/scenes/games/card/card/CardJitsuCard.scene | 6 ++++-- src/scenes/games/ninjaprogress/views/CardsViewCard.js | 7 ++++--- src/scenes/games/ninjaprogress/views/CardsViewCard.scene | 6 ++++++ 4 files changed, 16 insertions(+), 6 deletions(-) diff --git a/src/scenes/games/card/card/CardJitsuCard.js b/src/scenes/games/card/card/CardJitsuCard.js index 7879e120..02ea4256 100644 --- a/src/scenes/games/card/card/CardJitsuCard.js +++ b/src/scenes/games/card/card/CardJitsuCard.js @@ -63,7 +63,8 @@ export default class CardJitsuCard extends BaseContainer { this.add(glow); // icon - const icon = scene.add.sprite(95, 107, "_MISSING"); + const icon = scene.add.sprite(1, 1, "_MISSING"); + icon.setOrigin(0, 0); icon.visible = false; this.add(icon); diff --git a/src/scenes/games/card/card/CardJitsuCard.scene b/src/scenes/games/card/card/CardJitsuCard.scene index ded6ddc4..11a922df 100644 --- a/src/scenes/games/card/card/CardJitsuCard.scene +++ b/src/scenes/games/card/card/CardJitsuCard.scene @@ -94,8 +94,10 @@ "scope": "CLASS", "components": [], "texture": {}, - "x": 95, - "y": 107, + "x": 1, + "y": 1, + "originX": 0, + "originY": 0, "visible": false }, { diff --git a/src/scenes/games/ninjaprogress/views/CardsViewCard.js b/src/scenes/games/ninjaprogress/views/CardsViewCard.js index 573c581e..51d98464 100644 --- a/src/scenes/games/ninjaprogress/views/CardsViewCard.js +++ b/src/scenes/games/ninjaprogress/views/CardsViewCard.js @@ -45,7 +45,10 @@ export default class CardsViewCard extends BaseContainer { this.add(shadow); // icon - const icon = scene.add.image(0, 0, "_MISSING"); + const icon = scene.add.image(-66, -74, "_MISSING"); + icon.scaleX = 0.7; + icon.scaleY = 0.7; + icon.setOrigin(0, 0); icon.visible = false; this.add(icon); @@ -80,8 +83,6 @@ export default class CardsViewCard extends BaseContainer { this.id - this.icon.scale = 0.7 - this.glow.anims.play('ninjaprogress/glow') /* END-USER-CTR-CODE */ diff --git a/src/scenes/games/ninjaprogress/views/CardsViewCard.scene b/src/scenes/games/ninjaprogress/views/CardsViewCard.scene index ac0b20bf..d682d590 100644 --- a/src/scenes/games/ninjaprogress/views/CardsViewCard.scene +++ b/src/scenes/games/ninjaprogress/views/CardsViewCard.scene @@ -70,6 +70,12 @@ "scope": "CLASS", "components": [], "texture": {}, + "x": -66, + "y": -74, + "scaleX": 0.7, + "scaleY": 0.7, + "originX": 0, + "originY": 0, "visible": false }, { From abe29e6cb5d8b0cc76d5b71c391ed1349574dfcd Mon Sep 17 00:00:00 2001 From: wizguin <16276645+wizguin@users.noreply.github.com> Date: Wed, 26 Apr 2023 15:38:57 +0100 Subject: [PATCH 125/200] cardjitsu: Updated battle loading/playing system --- src/engine/loaders/BattleLoader.js | 110 ++++++++++++++++---- src/scenes/games/card/CardJitsu.js | 68 +++++++----- src/scenes/games/card/CardJitsu.scene | 4 +- src/scenes/games/card/CardJitsuBattle.js | 59 +++++++++-- src/scenes/games/card/CardJitsuPlayer.js | 16 +-- src/scenes/games/card/card/CardJitsuCard.js | 2 +- 6 files changed, 191 insertions(+), 68 deletions(-) diff --git a/src/engine/loaders/BattleLoader.js b/src/engine/loaders/BattleLoader.js index c3463818..49a47660 100644 --- a/src/engine/loaders/BattleLoader.js +++ b/src/engine/loaders/BattleLoader.js @@ -6,46 +6,110 @@ export default class BattleLoader extends BaseLoader { constructor(scene) { super(scene) - this.baseURL = '/assets/media/games/card/battles/' - this.keyPrefix = '' + this.addedPacks = [] + } + + loadBattles(battles, callback) { + for (let battle of battles) { + this.loadBattle(battle) + } + + this.once('complete', () => { + callback() + }) + + this.start() + } + + loadBattle(battle) { + let key = `${battle}-pack` + let url = `/assets/media/games/card/battles/${battle}/${key}.json` + + this.addedPacks.push(key) - this.maxParallelDownloads = 1 + this.pack(key, url) } - loadBattle(card, callback) { - if (card.powerId == 0) { - this.loadBattleSegment(`${card.elementId}_attack`) - this.loadBattleSegment(`${card.elementId}_react`) + clearPacks() { + this.reset() + this.off('complete') + + while (this.addedPacks.length) { + let key = this.addedPacks.pop() + + this.clearPack(key) } + } - if (card.powerId != 0) { - this.loadBattleSegment(`pow_${card.id}_attack`) - this.loadBattleSegment(`pow_${card.id}_react`) + clearPack(key) { + if (!this.jsonExists(key)) { + return } - this.once('complete', () => callback()) + let json = this.scene.cache.json.get(key) - this.start() + let sections = Object.values(json).filter(value => 'files' in value) + + for (let section of sections) { + this.clearFiles(section) + } + + this.removeFromCache(this.scene.cache.json, key) } - loadBattleSegment(battle) { - let key = this.getKey(battle) + clearFiles(section) { + for (let file of section.files) { + this.clearFile(file) + } + } - if (this.checkComplete('json', key, () => { - this.onFileComplete(key) - })) { - return + clearFile(file) { + switch (file.type) { + case 'multiatlas': + this.removeFromCache(this.scene.textures, file.key) + this.clearAnims(file.key) + break + + default: + this.removeFromCache(this.scene.cache[file.type], file.key) + break + } + } + + clearAnims(textureKey) { + let entries = this.scene.anims.anims.entries + + for (let animationKey in entries) { + let animation = entries[animationKey] + + if (this.animUsingTexture(animation, textureKey)) { + this.scene.anims.remove(animationKey) + } } + } - this.multiatlas(key, `${battle}.json`) + animUsingTexture(animation, textureKey) { + return !!animation.frames.find(frame => frame.textureKey == textureKey) } - onFileComplete(key) { - if (!this.textureExists(key)) { - return + removeFromCache(cache, key) { + if (cache.exists(key)) { + cache.remove(key) } + } + + reset() { + this.inflight.each(file => this.abortFile(file)) + + super.reset() + } + + abortFile(file) { + // Aborted file never gets added to cache + file.xhrLoader.abort() - console.log(key, 'completed') + // Removes from inflight with success value false + file.loader.nextFile(file, false) } } diff --git a/src/scenes/games/card/CardJitsu.js b/src/scenes/games/card/CardJitsu.js index d16c93ed..505136f5 100644 --- a/src/scenes/games/card/CardJitsu.js +++ b/src/scenes/games/card/CardJitsu.js @@ -52,11 +52,11 @@ export default class CardJitsu extends GameScene { this.add.image(760, 480, "cardjitsu", "bg"); // player2 - const player2 = new CardJitsuPlayer(this, 760, 315); + const player2 = new CardJitsuPlayer(this, 760, 480); this.add.existing(player2); // player1 - const player1 = new CardJitsuPlayer(this, 760, 315); + const player1 = new CardJitsuPlayer(this, 760, 480); this.add.existing(player1); player1.scaleX = -1; player1.scaleY = 1; @@ -117,6 +117,16 @@ export default class CardJitsu extends GameScene { /* START-USER-CODE */ + preload() { + super.preload() + + let url = 'assets/media/games/card/battles/' + + this.load.pack('walk-pack', `${url}/walk/walk-pack.json`) + this.load.pack('ambient-pack', `${url}/ambient/ambient-pack.json`) + this.load.pack('tie-pack', `${url}/tie/tie-pack.json`) + } + create() { super.create() @@ -148,6 +158,8 @@ export default class CardJitsu extends GameScene { this.addListeners() this.network.send('start_game') + + this.events.once('shutdown', this.onShutdown, this) } // probably a better way than needing 2 functions for this @@ -287,9 +299,9 @@ export default class CardJitsu extends GameScene { let winCard = this.players[winner].pick - this.battleLoader.loadBattle(winCard, () => { - this.judge(winner, winCard) - }) + let battles = this.getBattleNames(winCard) + + this.battleLoader.loadBattles(battles, () => this.judge(winner, winCard)) } onDealCardLoad(key, card) { @@ -328,21 +340,27 @@ export default class CardJitsu extends GameScene { this.showCloseGamePrompt() } + getBattleNames(card) { + let prefix = card.powerId > 0 ? `pow_${card.id}` : card.elementId + + return [`${prefix}_attack`, `${prefix}_react`] + } + + getOppositeSeat(seat) { + return (seat + 1) % 2 + } + playBattle(battle, winSeat = null) { if (winSeat == null) { - this.player1.playBattle(battle) - this.player2.playBattle(battle) - + this.players.forEach(player => player.playBattle(battle)) return } - if (winSeat == this.myPlayer.seat) { - this.myPlayer.playBattle(`${battle}_attack`) - this.opponent.playBattle(`${battle}_react`) - } else { - this.myPlayer.playBattle(`${battle}_react`) - this.opponent.playBattle(`${battle}_attack`) - } + let winner = this.players[winSeat] + let loser = this.players[this.getOppositeSeat(winSeat)] + + winner.playBattle(`${battle}_attack`) + loser.playBattle(`${battle}_react`) } createCard() { @@ -359,7 +377,7 @@ export default class CardJitsu extends GameScene { } timeUp() { - let random = Phaser.Math.RND.pick(this.myPlayer.dealtCards) + let random = Phaser.Math.RND.pick(this.myPlayer.dealtNotNull) this.pickCard(random) } @@ -380,8 +398,7 @@ export default class CardJitsu extends GameScene { } judgeTie() { - this.myPlayer.cardLose() - this.opponent.cardLose() + this.players.forEach(player => player.cardLose()) this.playBattle('tie') } @@ -401,15 +418,9 @@ export default class CardJitsu extends GameScene { } judgePlayBattle(winSeat, winCard) { - if (winCard.powerId == 0) { - this.playBattle(winCard.elementId, winSeat) - return - } + let battle = winCard.powerId == 0 ? winCard.elementId : `pow_${winCard.id}` - if (winCard.powerId != 0) { - this.playBattle(`pow_${winCard.id}`, winSeat) - return - } + this.playBattle(battle, winSeat) } playGameOver(winSeat) { @@ -467,6 +478,11 @@ export default class CardJitsu extends GameScene { this.world.client.sendJoinLastRoom() } + onShutdown() { + // Temp solution until memory management update + this.battleLoader.clearPacks() + } + /* END-USER-CODE */ } diff --git a/src/scenes/games/card/CardJitsu.scene b/src/scenes/games/card/CardJitsu.scene index cce26071..ba9a9940 100644 --- a/src/scenes/games/card/CardJitsu.scene +++ b/src/scenes/games/card/CardJitsu.scene @@ -42,7 +42,7 @@ "scope": "CLASS", "components": [], "x": 760, - "y": 315, + "y": 480, "nestedPrefabs": [], "list": [] }, @@ -61,7 +61,7 @@ "scope": "CLASS", "components": [], "x": 760, - "y": 315, + "y": 480, "scaleX": -1, "scaleY": 1, "nestedPrefabs": [], diff --git a/src/scenes/games/card/CardJitsuBattle.js b/src/scenes/games/card/CardJitsuBattle.js index 00e4718f..62508a26 100644 --- a/src/scenes/games/card/CardJitsuBattle.js +++ b/src/scenes/games/card/CardJitsuBattle.js @@ -6,6 +6,8 @@ export default class CardJitsuBattle { this.scene = player.scene this.currentBattle + this.currentConfig + this.list = {} this.animating = false @@ -43,14 +45,21 @@ export default class CardJitsuBattle { this.currentBattle = battle + // Loaded from battle config.json file + this.currentConfig = this.getConfig() + // Sprite names mapped to layer and frames - let config = this.getBattleConfig() + let spritesConfig = this.getSpritesConfig() - this.createSprites(config) + this.createSprites(spritesConfig) this.playAnims() } - getBattleConfig() { + getConfig() { + return this.scene.cache.json.get(`${this.currentBattle}_config`) || {} + } + + getSpritesConfig() { let frames = this.scene.textures.get(this.currentBattle).getFrameNames() let config = {} @@ -118,24 +127,58 @@ export default class CardJitsuBattle { } playAnims() { - for (let sprite of Object.values(this.list)) { + let values = Object.values(this.list) + + if (!values.length) { + return + } + + this.addAnimEvents(values) + + for (let sprite of values) { if (sprite.anim) { sprite.play(sprite.anim) } } this.animating = true + } + + addAnimEvents(values) { + // Only add events to one sprite instead of all + let first = values[0] + + first.once('animationcomplete', () => this.onAnimComplete(first)) - // Only add this event to one sprite instead of all - let first = Object.values(this.list)[0] - first.once('animationcomplete', this.onAnimationComplete, this) + if (!this.currentConfig.sounds) { + return + } + + // Sound events + first.once('animationstart', (anim, frame) => this.onAnimUpdate(frame)) + + first.on('animationupdate', (anim, frame) => this.onAnimUpdate(frame)) } - onAnimationComplete() { + onAnimComplete(first) { + first.off('animationupdate') + this.animating = false this.scene.checkBattleComplete() } + onAnimUpdate(frame) { + let index = frame.index + + if (index in this.currentConfig.sounds) { + this.playSound(index) + } + } + + playSound(key) { + this.scene.soundManager.play(this.currentConfig.sounds[key]) + } + setColor(color) { if (this.body) { this.body.tint = color diff --git a/src/scenes/games/card/CardJitsuPlayer.js b/src/scenes/games/card/CardJitsuPlayer.js index 4318819b..6f07ca2c 100644 --- a/src/scenes/games/card/CardJitsuPlayer.js +++ b/src/scenes/games/card/CardJitsuPlayer.js @@ -41,6 +41,10 @@ export default class CardJitsuPlayer extends BaseContainer { return this.scene.usernames[this.seat] } + get dealtNotNull() { + return this.dealtCards.filter(Boolean) + } + getElementWins(element) { return this.wins.filter(win => win.elementId == element) } @@ -116,18 +120,14 @@ export default class CardJitsuPlayer extends BaseContainer { } enableCards() { - for (let dealt of this.dealtCards) { - if (dealt) { - dealt.enableInput() - } + for (let dealt of this.dealtNotNull) { + dealt.enableInput() } } disableCards() { - for (let dealt of this.dealtCards) { - if (dealt) { - dealt.disableInput() - } + for (let dealt of this.dealtNotNull) { + dealt.disableInput() } } diff --git a/src/scenes/games/card/card/CardJitsuCard.js b/src/scenes/games/card/card/CardJitsuCard.js index 02ea4256..846a6d32 100644 --- a/src/scenes/games/card/card/CardJitsuCard.js +++ b/src/scenes/games/card/card/CardJitsuCard.js @@ -273,7 +273,7 @@ export default class CardJitsuCard extends BaseContainer { return } - for (let card of this.player.dealtCards) { + for (let card of this.player.dealtNotNull) { if (card.tween) { return } From d96dd867aa412f3e9aa6b21e61eed8f52cac5261 Mon Sep 17 00:00:00 2001 From: wizguin <16276645+wizguin@users.noreply.github.com> Date: Fri, 28 Apr 2023 16:24:25 +0100 Subject: [PATCH 126/200] cardjitsu: Add power card hint --- src/scenes/games/card/card/CardJitsuCard.js | 28 ++++++- .../games/card/card/CardJitsuCard.scene | 17 ++++ src/scenes/games/card/card/CardJitsuHint.js | 59 ++++++++++++++ .../games/card/card/CardJitsuHint.scene | 77 +++++++++++++++++++ 4 files changed, 178 insertions(+), 3 deletions(-) create mode 100644 src/scenes/games/card/card/CardJitsuHint.js create mode 100644 src/scenes/games/card/card/CardJitsuHint.scene diff --git a/src/scenes/games/card/card/CardJitsuCard.js b/src/scenes/games/card/card/CardJitsuCard.js index 846a6d32..3d949252 100644 --- a/src/scenes/games/card/card/CardJitsuCard.js +++ b/src/scenes/games/card/card/CardJitsuCard.js @@ -2,6 +2,7 @@ import BaseContainer from "../../../base/BaseContainer"; import CardJitsuThumb from "./CardJitsuThumb"; +import CardJitsuHint from "./CardJitsuHint"; /* START-USER-IMPORTS */ import layout from '../layout' @@ -33,6 +34,8 @@ export default class CardJitsuCard extends BaseContainer { this.value; /** @type {CardJitsuThumb} */ this.thumbnail; + /** @type {CardJitsuHint} */ + this.hint; // shadow @@ -99,6 +102,11 @@ export default class CardJitsuCard extends BaseContainer { thumbnail.visible = false; this.add(thumbnail); + // hint + const hint = new CardJitsuHint(scene, 95, -120); + hint.visible = false; + this.add(hint); + this.shadow = shadow; this.hover = hover; this.back = back; @@ -109,6 +117,7 @@ export default class CardJitsuCard extends BaseContainer { this.disabled = disabled; this.value = value; this.thumbnail = thumbnail; + this.hint = hint; /* START-USER-CTR-CODE */ @@ -117,6 +126,7 @@ export default class CardJitsuCard extends BaseContainer { this.id this.powerId + this.description this.elementId this.spacer @@ -157,19 +167,25 @@ export default class CardJitsuCard extends BaseContainer { this.tweenToDealt(empty) } + get isPowerCard() { + return this.powerId > 0 + } + updateCard(card) { let tint = layout.colors[card.color].color this.id = card.card_id - this.powerId = card.power_id this.elementId = card.element + this.powerId = card.power_id + this.description = card.description || "" + this.value.text = card.value this.color.tint = tint this.element.setFrame(`card/${card.element}`) - if (card.power_id > 0) { + if (this.isPowerCard) { this.glow.tint = tint } @@ -251,7 +267,7 @@ export default class CardJitsuCard extends BaseContainer { this.element.visible = show this.color.visible = show this.icon.visible = show - this.glow.visible = show && this.powerId > 0 + this.glow.visible = show && this.isPowerCard } tweenToDealt(empty) { @@ -388,10 +404,16 @@ export default class CardJitsuCard extends BaseContainer { onOver() { this.hover.visible = true + + if (this.isPowerCard) { + this.hint.show() + } } onOut() { this.hover.visible = false + + this.hint.close() } updateDepth() { diff --git a/src/scenes/games/card/card/CardJitsuCard.scene b/src/scenes/games/card/card/CardJitsuCard.scene index 11a922df..cfa8e43e 100644 --- a/src/scenes/games/card/card/CardJitsuCard.scene +++ b/src/scenes/games/card/card/CardJitsuCard.scene @@ -181,6 +181,23 @@ "visible": false, "nestedPrefabs": [], "list": [] + }, + { + "prefabId": "f7bc21d3-944c-4122-96b0-93ea4388bcff", + "id": "0d7b3b9b-993f-444e-83fa-2198e18910f7", + "unlock": [ + "x", + "y", + "visible" + ], + "label": "hint", + "scope": "CLASS", + "components": [], + "x": 95, + "y": -120, + "visible": false, + "nestedPrefabs": [], + "list": [] } ] } diff --git a/src/scenes/games/card/card/CardJitsuHint.js b/src/scenes/games/card/card/CardJitsuHint.js new file mode 100644 index 00000000..ac72a325 --- /dev/null +++ b/src/scenes/games/card/card/CardJitsuHint.js @@ -0,0 +1,59 @@ +/* START OF COMPILED CODE */ + +import BaseContainer from "../../../base/BaseContainer"; +/* START-USER-IMPORTS */ +/* END-USER-IMPORTS */ + +export default class CardJitsuHint extends BaseContainer { + + constructor(scene, x, y) { + super(scene, x ?? 760, y ?? 480); + + /** @type {Phaser.GameObjects.Image} */ + this.icon; + /** @type {Phaser.GameObjects.Text} */ + this.description; + + + // hint + const hint = scene.add.image(0, 0, "cardjitsu", "card/hint"); + this.add(hint); + + // icon + const icon = scene.add.image(0, -87, "cardjitsu", "card/power/1"); + icon.setOrigin(0.5, 0.5135135135135135); + this.add(icon); + + // description + const description = scene.add.text(0, 0, "", {}); + description.setOrigin(0.5, 0.5); + description.setStyle({ "align": "center", "color": "#000", "fixedWidth":300,"fixedHeight":130,"fontFamily": "CCComiccrazy", "fontSize": "24px", "fontStyle": "bold" }); + description.setLineSpacing(1); + description.setWordWrapWidth(300, true); + this.add(description); + + this.icon = icon; + this.description = description; + + /* START-USER-CTR-CODE */ + + this.description.setResolution(1) + + /* END-USER-CTR-CODE */ + } + + + /* START-USER-CODE */ + + show() { + this.icon.setFrame(`card/power/${this.parentContainer.powerId}`) + + this.description.text = this.parentContainer.description + + super.show() + } + + /* END-USER-CODE */ +} + +/* END OF COMPILED CODE */ diff --git a/src/scenes/games/card/card/CardJitsuHint.scene b/src/scenes/games/card/card/CardJitsuHint.scene new file mode 100644 index 00000000..5c6b8df3 --- /dev/null +++ b/src/scenes/games/card/card/CardJitsuHint.scene @@ -0,0 +1,77 @@ +{ + "id": "f7bc21d3-944c-4122-96b0-93ea4388bcff", + "sceneType": "PREFAB", + "settings": { + "compilerInsertSpaces": true, + "javaScriptInitFieldsInConstructor": true, + "exportClass": true, + "autoImport": true, + "superClassName": "BaseContainer", + "preloadMethodName": "", + "preloadPackFiles": [], + "createMethodName": "", + "borderWidth": 1520, + "borderHeight": 960 + }, + "displayList": [ + { + "type": "Container", + "id": "d1a28e21-a0ab-469f-ad9f-3aeeee456248", + "label": "container_1", + "components": [], + "x": 760, + "y": 480, + "list": [ + { + "type": "Image", + "id": "92c4b27a-4d26-4219-b33d-a64e40d6491e", + "label": "hint", + "components": [], + "texture": { + "key": "cardjitsu", + "frame": "card/hint" + } + }, + { + "type": "Image", + "id": "0e24a1b2-3bc4-408f-98aa-72a985b57917", + "label": "icon", + "scope": "CLASS", + "components": [], + "texture": { + "key": "cardjitsu", + "frame": "card/power/1" + }, + "y": -87, + "originY": 0.5135135135135135 + }, + { + "type": "Text", + "id": "4bfbda05-5539-4e91-ad28-78eb4d2d0cd8", + "label": "description", + "scope": "CLASS", + "components": [], + "originX": 0.5, + "originY": 0.5, + "fixedWidth": 300, + "fixedHeight": 130, + "lineSpacing": 1, + "align": "center", + "fontFamily": "CCComiccrazy", + "fontSize": "24px", + "fontStyle": "bold", + "color": "#000", + "wordWrapWidth": 300, + "wordWrapUseAdvanced": true + } + ] + } + ], + "plainObjects": [], + "meta": { + "app": "Phaser Editor 2D - Scene Editor", + "url": "https://phasereditor2d.com", + "contentType": "phasereditor2d.core.scene.SceneContentType", + "version": 3 + } +} \ No newline at end of file From 31713146d4285c4e72617ea0e35168bcd065ec93 Mon Sep 17 00:00:00 2001 From: wizguin <16276645+wizguin@users.noreply.github.com> Date: Sun, 7 May 2023 17:31:10 +0100 Subject: [PATCH 127/200] cardjitsu: Add CardJitsuPower & moving powers --- src/scenes/games/card/CardJitsu.js | 73 +++++++- src/scenes/games/card/Rules.js | 29 +++ src/scenes/games/card/layout.js | 28 ++- src/scenes/games/card/power/CardJitsuPower.js | 172 ++++++++++++++++++ src/scenes/games/card/power/States.js | 5 + 5 files changed, 305 insertions(+), 2 deletions(-) create mode 100644 src/scenes/games/card/Rules.js create mode 100644 src/scenes/games/card/power/CardJitsuPower.js create mode 100644 src/scenes/games/card/power/States.js diff --git a/src/scenes/games/card/CardJitsu.js b/src/scenes/games/card/CardJitsu.js index 505136f5..53b67105 100644 --- a/src/scenes/games/card/CardJitsu.js +++ b/src/scenes/games/card/CardJitsu.js @@ -9,6 +9,9 @@ import CardJitsuClock from "./clock/CardJitsuClock"; import BattleLoader from '@engine/loaders/BattleLoader' import CardLoader from '@engine/loaders/CardLoader' import CardJitsuCard from './card/CardJitsuCard' +import CardJitsuPower from './power/CardJitsuPower' + +import Rules from './Rules' /* END-USER-IMPORTS */ @@ -149,6 +152,10 @@ export default class CardJitsu extends GameScene { ease: 'Cubic' }) + // Power effects + this.activePowers = [] + this.powersQueue = [] + this.events.on('battle_complete', this.onBattleComplete, this) this.started = false @@ -301,9 +308,72 @@ export default class CardJitsu extends GameScene { let battles = this.getBattleNames(winCard) - this.battleLoader.loadBattles(battles, () => this.judge(winner, winCard)) + this.checkPowersOnPlayed() + this.checkPowerOnScored(this.players[winner], winCard) + + this.events.once('powers_complete', () => this.judge(winner, winCard)) + + this.processPowers() } + // powers start + + checkPowersOnPlayed() { + this.checkPowerOnPlayed(this.player1, this.player1.pick) + this.checkPowerOnPlayed(this.player2, this.player2.pick) + } + + checkPowerOnPlayed(player, card) { + if (this.hasPower(card) && Rules.onPlayed.includes(card.powerId)) { + this.addPower(player, card) + } + } + + checkPowerOnScored(player, card) { + if (this.hasPower(card) && !Rules.onPlayed.includes(card.powerId)) { + this.addPower(player, card) + } + } + + hasPower(card) { + return card.powerId > 0 + } + + addPower(player, card) { + let power = new CardJitsuPower(this, player, card) + + this.add.existing(power) + + this.activePowers.push(power) + } + + removePower(power) { + let index = this.activePowers.indexOf(power) + + this.activePowers.splice(index, 1) + } + + processPowers() { + this.powersQueue = this.activePowers.slice() + + console.log(this.powersQueue) + + this.nextPower() + } + + nextPower() { + if (!this.powersQueue.length) { + this.events.emit('powers_complete') + return + } + + let next = this.powersQueue.shift() + + next.process() + } + + // powers end + onDealCardLoad(key, card) { let cardPrefab = this.createCard() @@ -474,6 +544,7 @@ export default class CardJitsu extends GameScene { this.events.off('battle_complete') this.events.off('flipped') this.events.off('remove_pick') + this.events.off('powers_complete') this.world.client.sendJoinLastRoom() } diff --git a/src/scenes/games/card/Rules.js b/src/scenes/games/card/Rules.js new file mode 100644 index 00000000..0d44267a --- /dev/null +++ b/src/scenes/games/card/Rules.js @@ -0,0 +1,29 @@ +export default { + onPlayed: [1, 16, 17, 18], + currentRound: [4, 5, 6, 7, 8, 9, 10, 11, 12, 16, 17, 18], + affectsOwnPlayer: [2], + + discardElements: { + 4: 's', + 5: 'w', + 6: 'f' + }, + discardColors: { + 7: 'r', + 8: 'b', + 9: 'g', + 10: 'y', + 11: 'o', + 12: 'p' + }, + replacements: { + 16: ['w', 'f'], + 17: ['s', 'w'], + 18: ['f', 's'] + }, + limiters: { + 13: 's', + 14: 'f', + 15: 'w' + } +} diff --git a/src/scenes/games/card/layout.js b/src/scenes/games/card/layout.js index cb510927..5124c13f 100644 --- a/src/scenes/games/card/layout.js +++ b/src/scenes/games/card/layout.js @@ -59,7 +59,33 @@ const layout = { x: 1140, y: 340 } - ] + ], + power: { + top: [ + { + x: 410, + y: 70 + }, + { + x: 950, + y: 70 + }, + { + x: 716, + y: 120 + } + ], + pick: [ + { + x: 500, + y: 220 + }, + { + x: 900, + y: 220 + } + ] + } }, spacer: { dealtFront: 150, diff --git a/src/scenes/games/card/power/CardJitsuPower.js b/src/scenes/games/card/power/CardJitsuPower.js new file mode 100644 index 00000000..b922597c --- /dev/null +++ b/src/scenes/games/card/power/CardJitsuPower.js @@ -0,0 +1,172 @@ +import layout from '../layout' +import Rules from '../Rules' +import States from './States' + + +export default class CardJitsuPower extends Phaser.GameObjects.Sprite { + + constructor(scene, player, card) { + const pos = layout.pos.power.pick[player.seat] + const powerId = card.powerId + + super(scene, pos.x, pos.y, 'cardjitsu', `power/${powerId}`) + + this.player = player + this.card = card + this.powerId = powerId + + this.state = States.Pick + this.tween + + this.visible = false + + this.setOrigin(0, 0) + } + + get isCurrentRound() { + return Rules.currentRound.includes(this.powerId) + } + + get isAffectsOwnPlayer() { + return Rules.affectsOwnPlayer.includes(this.powerId) + } + + get isDiscardElement() { + return this.powerId in Rules.discardElements + } + + get isDiscardColor() { + return this.powerId in Rules.discardColors + } + + get isReplacement() { + return this.powerId in Rules.replacements + } + + get isLimiter() { + return this.powerId in Rules.limiters + } + + process() { + this.visible = true + + if (this.state == States.Active && this.isLimiter) { + this.onStateProcessed() + return + } + + let target = this.getTarget() + + this.tweenTo(target.x, target.y) + + this.tween.once('complete', this.onTweenComplete, this) + } + + tweenTo(x, y) { + this.tween = this.scene.tweens.add({ + targets: this, + duration: 1000, + + x: x, + y: y, + + ease: 'Cubic.easeOut' + }) + } + + onTweenComplete() { + this.onStateProcessed() + } + + onStateProcessed() { + this.updateState() + + switch (this.state) { + case States.Active: + this.updateActive() + break + + case States.Complete: + this.removePower() + break + + default: + this.nextPower() + break + } + } + + updateActive() { + if (this.isCurrentRound) { + this.startRemove() + } else { + this.nextPower() + } + } + + getTarget() { + let seat = this.player.seat + let oppositeSeat = this.scene.getOppositeSeat(seat) + + return this.state == States.Active + ? this.getActiveTarget(seat, oppositeSeat) + : this.getPickTarget(seat, oppositeSeat) + } + + getPickTarget(seat, oppositeSeat) { + let top = layout.pos.power.top + + if (this.powerId == 1) { + return top[2] + } + + if (this.isAffectsOwnPlayer) { + return top[seat] + } + + if (this.isReplacement) { + return layout.pos.power.pick[oppositeSeat] + } + + return top[oppositeSeat] + } + + getActiveTarget(seat, oppositeSeat) { + let pick = layout.pos.power.pick + + if (this.powerId == 1) { + this.visible = false + } + + if (this.isAffectsOwnPlayer) { + return pick[seat] + } + + return pick[oppositeSeat] + } + + updateState() { + this.state = this.getNextState() + } + + getNextState() { + return (this.state + 1) % Object.keys(States).length + } + + nextPower() { + this.scene.nextPower() + } + + startRemove() { + this.scene.time.delayedCall(250, () => this.removePower()) + } + + removePower() { + this.scene.removePower(this) + + this.nextPower() + + this.destroy() + } + +} diff --git a/src/scenes/games/card/power/States.js b/src/scenes/games/card/power/States.js new file mode 100644 index 00000000..b3ddc078 --- /dev/null +++ b/src/scenes/games/card/power/States.js @@ -0,0 +1,5 @@ +export default { + Pick: 0, + Active: 1, + Complete: 2 +} From ece8f5300b3abcdcce9ac10db06eab5e6f76d17d Mon Sep 17 00:00:00 2001 From: wizguin <16276645+wizguin@users.noreply.github.com> Date: Mon, 8 May 2023 12:56:13 +0100 Subject: [PATCH 128/200] cardjitsu: Handle reverse power effect --- src/scenes/games/card/CardJitsu.js | 28 +++++-- src/scenes/games/card/card/CardJitsuCard.js | 27 +++---- .../games/card/card/CardJitsuCard.scene | 5 +- src/scenes/games/card/power/CardJitsuPower.js | 80 +++++++++++++++---- 4 files changed, 100 insertions(+), 40 deletions(-) diff --git a/src/scenes/games/card/CardJitsu.js b/src/scenes/games/card/CardJitsu.js index 53b67105..c1c420ac 100644 --- a/src/scenes/games/card/CardJitsu.js +++ b/src/scenes/games/card/CardJitsu.js @@ -300,20 +300,26 @@ export default class CardJitsu extends GameScene { onFlipped(winner) { if (winner == -1) { - this.judgeTie() - return + this.onFlippedTie() + } else { + this.onFlippedWin(winner) } - let winCard = this.players[winner].pick + this.checkPowersOnPlayed() - let battles = this.getBattleNames(winCard) + this.processPowers() + } + + onFlippedTie() { + this.events.once('powers_complete', this.judgeTie, this) + } + + onFlippedWin(winner) { + let winCard = this.players[winner].pick - this.checkPowersOnPlayed() this.checkPowerOnScored(this.players[winner], winCard) this.events.once('powers_complete', () => this.judge(winner, winCard)) - - this.processPowers() } // powers start @@ -340,6 +346,14 @@ export default class CardJitsu extends GameScene { } addPower(player, card) { + if (card.powerId == 1) { + let hasReverse = this.activePowers.some(power => power.isReverseEffect & power.isPick) + + if (hasReverse) { + return + } + } + let power = new CardJitsuPower(this, player, card) this.add.existing(power) diff --git a/src/scenes/games/card/card/CardJitsuCard.js b/src/scenes/games/card/card/CardJitsuCard.js index 3d949252..fb1c4e20 100644 --- a/src/scenes/games/card/card/CardJitsuCard.js +++ b/src/scenes/games/card/card/CardJitsuCard.js @@ -31,7 +31,7 @@ export default class CardJitsuCard extends BaseContainer { /** @type {Phaser.GameObjects.Image} */ this.disabled; /** @type {Phaser.GameObjects.Text} */ - this.value; + this.valueText; /** @type {CardJitsuThumb} */ this.thumbnail; /** @type {CardJitsuHint} */ @@ -55,9 +55,8 @@ export default class CardJitsuCard extends BaseContainer { this.add(back); // glow - const glow = scene.add.sprite(95, 104, "cardjitsu", "card/glow0001"); + const glow = scene.add.sprite(95, 105, "cardjitsu", "card/glow0001"); glow.setOrigin(0.5008695652173913, 0.5); - glow.visible = false; glow.alpha = 0.5; glow.alphaTopLeft = 0.5; glow.alphaTopRight = 0.5; @@ -91,11 +90,11 @@ export default class CardJitsuCard extends BaseContainer { disabled.visible = false; this.add(disabled); - // value - const value = scene.add.text(1, 48, "", {}); - value.text = "88"; - value.setStyle({ "align": "center", "color": "#000", "fixedWidth":52,"fontFamily": "Arial", "fontSize": "38px", "fontStyle": "bold" }); - this.add(value); + // valueText + const valueText = scene.add.text(1, 48, "", {}); + valueText.text = "88"; + valueText.setStyle({ "align": "center", "color": "#000", "fixedWidth":52,"fontFamily": "Arial", "fontSize": "38px", "fontStyle": "bold" }); + this.add(valueText); // thumbnail const thumbnail = new CardJitsuThumb(scene, 47, 45); @@ -115,7 +114,7 @@ export default class CardJitsuCard extends BaseContainer { this.color = color; this.element = element; this.disabled = disabled; - this.value = value; + this.valueText = valueText; this.thumbnail = thumbnail; this.hint = hint; @@ -175,12 +174,12 @@ export default class CardJitsuCard extends BaseContainer { let tint = layout.colors[card.color].color this.id = card.card_id - this.elementId = card.element - this.powerId = card.power_id - this.description = card.description || "" + this.elementId = card.element + this.value = card.value + this.description = card.description || '' - this.value.text = card.value + this.valueText.text = card.value this.color.tint = tint this.element.setFrame(`card/${card.element}`) @@ -263,7 +262,7 @@ export default class CardJitsuCard extends BaseContainer { showFrontSprites(show) { this.thumbnail.visible = false this.back.visible = !show - this.value.visible = show + this.valueText.visible = show this.element.visible = show this.color.visible = show this.icon.visible = show diff --git a/src/scenes/games/card/card/CardJitsuCard.scene b/src/scenes/games/card/card/CardJitsuCard.scene index cfa8e43e..3d475676 100644 --- a/src/scenes/games/card/card/CardJitsuCard.scene +++ b/src/scenes/games/card/card/CardJitsuCard.scene @@ -78,9 +78,8 @@ "frame": "card/glow0001" }, "x": 95, - "y": 104, + "y": 105, "originX": 0.5008695652173913, - "visible": false, "alpha": 0.5, "alphaTopLeft": 0.5, "alphaTopRight": 0.5, @@ -152,7 +151,7 @@ { "type": "Text", "id": "10b504e1-dd20-411b-83e8-31df0743d59c", - "label": "value", + "label": "valueText", "scope": "CLASS", "components": [], "x": 1, diff --git a/src/scenes/games/card/power/CardJitsuPower.js b/src/scenes/games/card/power/CardJitsuPower.js index b922597c..4f7355c3 100644 --- a/src/scenes/games/card/power/CardJitsuPower.js +++ b/src/scenes/games/card/power/CardJitsuPower.js @@ -47,19 +47,46 @@ export default class CardJitsuPower extends Phaser.GameObjects.Sprite { return this.powerId in Rules.limiters } + get isPick() { + return this.state == States.Pick + } + + get isActive() { + return this.state == States.Active + } + + get isComplete() { + return this.state == States.Complete + } + + get isReverseEffect() { + return this.powerId == 1 + } + process() { this.visible = true - if (this.state == States.Active && this.isLimiter) { + let target = this.getTarget() + + // No target + if (!target) { this.onStateProcessed() return } - let target = this.getTarget() + // Target not moved + if (this.isTargetSame(target)) { + this.scene.time.delayedCall(1000, () => this.onStateProcessed()) + return + } this.tweenTo(target.x, target.y) - this.tween.once('complete', this.onTweenComplete, this) + this.tween.once('complete', this.onStateProcessed, this) + } + + isTargetSame(target) { + return target.x == this.x && target.y == this.y } tweenTo(x, y) { @@ -74,10 +101,6 @@ export default class CardJitsuPower extends Phaser.GameObjects.Sprite { }) } - onTweenComplete() { - this.onStateProcessed() - } - onStateProcessed() { this.updateState() @@ -89,10 +112,6 @@ export default class CardJitsuPower extends Phaser.GameObjects.Sprite { case States.Complete: this.removePower() break - - default: - this.nextPower() - break } } @@ -108,7 +127,7 @@ export default class CardJitsuPower extends Phaser.GameObjects.Sprite { let seat = this.player.seat let oppositeSeat = this.scene.getOppositeSeat(seat) - return this.state == States.Active + return this.isActive ? this.getActiveTarget(seat, oppositeSeat) : this.getPickTarget(seat, oppositeSeat) } @@ -116,7 +135,7 @@ export default class CardJitsuPower extends Phaser.GameObjects.Sprite { getPickTarget(seat, oppositeSeat) { let top = layout.pos.power.top - if (this.powerId == 1) { + if (this.isReverseEffect) { return top[2] } @@ -134,17 +153,46 @@ export default class CardJitsuPower extends Phaser.GameObjects.Sprite { getActiveTarget(seat, oppositeSeat) { let pick = layout.pos.power.pick - if (this.powerId == 1) { - this.visible = false + if (this.isReverseEffect) { + return this.getReverseEffectTarget(seat, oppositeSeat) } if (this.isAffectsOwnPlayer) { return pick[seat] } + if (this.isLimiter) { + return null + } + return pick[oppositeSeat] } + getReverseEffectTarget(seat, oppositeSeat) { + let opponentCard = this.scene.players[oppositeSeat].pick + let pick = layout.pos.power.pick + + if (this.card.elementId != opponentCard.elementId) { + this.playPoof() + return this + } + + if (this.card.value > opponentCard.value) { + return pick[oppositeSeat] + } + + if (this.card.value < opponentCard.value) { + return pick[seat] + } + + this.playPoof() + return this + } + + playPoof() { + this.anims.play('power/poof') + } + updateState() { this.state = this.getNextState() } @@ -158,7 +206,7 @@ export default class CardJitsuPower extends Phaser.GameObjects.Sprite { } startRemove() { - this.scene.time.delayedCall(250, () => this.removePower()) + this.scene.time.delayedCall(500, () => this.removePower()) } removePower() { From 1657fda2312406356f7296ccebe6d2b5ee71e5ee Mon Sep 17 00:00:00 2001 From: wizguin <16276645+wizguin@users.noreply.github.com> Date: Wed, 17 May 2023 16:34:37 +0100 Subject: [PATCH 129/200] cardjitsu: Discard effects --- src/scenes/games/card/CardJitsu.js | 18 +++++++- src/scenes/games/card/CardJitsuPlayer.js | 32 ++++++++++++++ src/scenes/games/card/card/CardJitsuCard.js | 43 +++++++++++-------- .../games/card/card/CardJitsuCard.scene | 2 +- src/scenes/games/card/power/CardJitsuPower.js | 15 +++++++ 5 files changed, 91 insertions(+), 19 deletions(-) diff --git a/src/scenes/games/card/CardJitsu.js b/src/scenes/games/card/CardJitsu.js index c1c420ac..dbb4adfa 100644 --- a/src/scenes/games/card/CardJitsu.js +++ b/src/scenes/games/card/CardJitsu.js @@ -457,11 +457,27 @@ export default class CardJitsu extends GameScene { allCardsDealt() { this.myPlayer.enableCards() + let limit = this.activePowers.find(power => power.isLimiter && power.player != this.myPlayer) + + if (limit) { + this.disableElements(limit) + } + this.clock.start() } + disableElements(power) { + let element = Rules.limiters[power.powerId] + + for (let card of this.myPlayer.dealtNotNull) { + if (card.elementId == element) { + card.disableCard() + } + } + } + timeUp() { - let random = Phaser.Math.RND.pick(this.myPlayer.dealtNotNull) + let random = Phaser.Math.RND.pick(this.myPlayer.dealtNotNull.filter(card => !card.disabled.visible)) this.pickCard(random) } diff --git a/src/scenes/games/card/CardJitsuPlayer.js b/src/scenes/games/card/CardJitsuPlayer.js index 6f07ca2c..8e9f9dea 100644 --- a/src/scenes/games/card/CardJitsuPlayer.js +++ b/src/scenes/games/card/CardJitsuPlayer.js @@ -49,6 +49,10 @@ export default class CardJitsuPlayer extends BaseContainer { return this.wins.filter(win => win.elementId == element) } + getColorWins(color) { + return this.wins.filter(win => win.color == color) + } + set(user) { this.seat = this.scene.players.indexOf(this) @@ -135,6 +139,34 @@ export default class CardJitsuPlayer extends BaseContainer { return find.map(id => this.wins.find(win => win.id == id)).filter(Boolean) } + discardElement(element) { + let elementWins = this.getElementWins(element) + + if (elementWins.length) { + this.discardCard(elementWins.pop()) + } + } + + discardColor(color) { + let colorWins = this.getColorWins(color) + + if (colorWins.length) { + this.discardCard(colorWins.pop()) + } + } + + discardCard(card) { + this.wins.splice(this.wins.indexOf(card), 1) + + card.destroy() + } + + arrangeWinCards() { + for (let card of this.wins) { + card.tweenToWin() + } + } + /* END-USER-CODE */ } diff --git a/src/scenes/games/card/card/CardJitsuCard.js b/src/scenes/games/card/card/CardJitsuCard.js index fb1c4e20..b7091e57 100644 --- a/src/scenes/games/card/card/CardJitsuCard.js +++ b/src/scenes/games/card/card/CardJitsuCard.js @@ -25,7 +25,7 @@ export default class CardJitsuCard extends BaseContainer { /** @type {Phaser.GameObjects.Sprite} */ this.icon; /** @type {Phaser.GameObjects.Image} */ - this.color; + this.colorSprite; /** @type {Phaser.GameObjects.Image} */ this.element; /** @type {Phaser.GameObjects.Image} */ @@ -70,14 +70,14 @@ export default class CardJitsuCard extends BaseContainer { icon.visible = false; this.add(icon); - // color - const color = scene.add.image(95, 107, "cardjitsu", "card/color"); - color.setOrigin(0.5010660980810234, 0.500945179584121); - color.tintTopLeft = 1132705; - color.tintTopRight = 1132705; - color.tintBottomLeft = 1132705; - color.tintBottomRight = 1132705; - this.add(color); + // colorSprite + const colorSprite = scene.add.image(95, 107, "cardjitsu", "card/color"); + colorSprite.setOrigin(0.5010660980810234, 0.500945179584121); + colorSprite.tintTopLeft = 1132705; + colorSprite.tintTopRight = 1132705; + colorSprite.tintBottomLeft = 1132705; + colorSprite.tintBottomRight = 1132705; + this.add(colorSprite); // element const element = scene.add.image(28, 28, "cardjitsu", "card/f"); @@ -111,7 +111,7 @@ export default class CardJitsuCard extends BaseContainer { this.back = back; this.glow = glow; this.icon = icon; - this.color = color; + this.colorSprite = colorSprite; this.element = element; this.disabled = disabled; this.valueText = valueText; @@ -177,10 +177,11 @@ export default class CardJitsuCard extends BaseContainer { this.powerId = card.power_id this.elementId = card.element this.value = card.value + this.color = card.color this.description = card.description || '' this.valueText.text = card.value - this.color.tint = tint + this.colorSprite.tint = tint this.element.setFrame(`card/${card.element}`) @@ -264,7 +265,7 @@ export default class CardJitsuCard extends BaseContainer { this.back.visible = !show this.valueText.visible = show this.element.visible = show - this.color.visible = show + this.colorSprite.visible = show this.icon.visible = show this.glow.visible = show && this.isPowerCard } @@ -308,9 +309,10 @@ export default class CardJitsuCard extends BaseContainer { tweenToWin() { let pos = layout.pos.wins[this.player.seat][this.elementId] - let wins = this.player.getElementWins(this.elementId).length + let wins = this.player.getElementWins(this.elementId) + let index = wins.indexOf(this) + 1 - let y = pos.y + (this.spacer * wins) + let y = pos.y + (this.spacer * index) this.tweenTo(pos.x, y) @@ -384,12 +386,14 @@ export default class CardJitsuCard extends BaseContainer { } enableInput() { - this.setSize(this.color.width, this.color.height) + this.setSize(this.colorSprite.width, this.colorSprite.height) this.setInteractive() // Offset - this.input.hitArea.x = this.color.x - this.input.hitArea.y = this.color.y + this.input.hitArea.x = this.colorSprite.x + this.input.hitArea.y = this.colorSprite.y + + this.disabled.visible = false } disableInput() { @@ -397,6 +401,11 @@ export default class CardJitsuCard extends BaseContainer { this.onOut() } + disableCard() { + this.disableInput() + this.disabled.visible = true + } + onUp() { this.scene.pickCard(this) } diff --git a/src/scenes/games/card/card/CardJitsuCard.scene b/src/scenes/games/card/card/CardJitsuCard.scene index 3d475676..02907113 100644 --- a/src/scenes/games/card/card/CardJitsuCard.scene +++ b/src/scenes/games/card/card/CardJitsuCard.scene @@ -102,7 +102,7 @@ { "type": "Image", "id": "168cd85e-361d-4eae-8447-978bb7df8dc6", - "label": "color", + "label": "colorSprite", "scope": "CLASS", "components": [], "texture": { diff --git a/src/scenes/games/card/power/CardJitsuPower.js b/src/scenes/games/card/power/CardJitsuPower.js index 4f7355c3..6685961f 100644 --- a/src/scenes/games/card/power/CardJitsuPower.js +++ b/src/scenes/games/card/power/CardJitsuPower.js @@ -213,8 +213,23 @@ export default class CardJitsuPower extends Phaser.GameObjects.Sprite { this.scene.removePower(this) this.nextPower() + this.afterRemove() this.destroy() } + afterRemove() { + let opponent = this.scene.players[this.scene.getOppositeSeat(this.player.seat)] + + if (this.isDiscardElement) { + opponent.discardElement(Rules.discardElements[this.powerId]) + } + + if (this.isDiscardColor) { + opponent.discardColor(Rules.discardColors[this.powerId]) + } + + opponent.arrangeWinCards() + } + } From dcee728c30db85ab6491134e621cbba230b28850 Mon Sep 17 00:00:00 2001 From: wizguin <16276645+wizguin@users.noreply.github.com> Date: Wed, 17 May 2023 16:58:50 +0100 Subject: [PATCH 130/200] cardjitsu: Clean up disabling cards --- src/scenes/games/card/CardJitsu.js | 12 ++++-------- src/scenes/games/card/CardJitsuPlayer.js | 12 ++++++++++++ src/scenes/games/card/card/CardJitsuCard.js | 4 ++++ 3 files changed, 20 insertions(+), 8 deletions(-) diff --git a/src/scenes/games/card/CardJitsu.js b/src/scenes/games/card/CardJitsu.js index dbb4adfa..d5cf6660 100644 --- a/src/scenes/games/card/CardJitsu.js +++ b/src/scenes/games/card/CardJitsu.js @@ -460,24 +460,20 @@ export default class CardJitsu extends GameScene { let limit = this.activePowers.find(power => power.isLimiter && power.player != this.myPlayer) if (limit) { - this.disableElements(limit) + this.disableElement(limit) } this.clock.start() } - disableElements(power) { + disableElement(power) { let element = Rules.limiters[power.powerId] - for (let card of this.myPlayer.dealtNotNull) { - if (card.elementId == element) { - card.disableCard() - } - } + this.myPlayer.disableElement(element) } timeUp() { - let random = Phaser.Math.RND.pick(this.myPlayer.dealtNotNull.filter(card => !card.disabled.visible)) + let random = Phaser.Math.RND.pick(this.myPlayer.pickableCards) this.pickCard(random) } diff --git a/src/scenes/games/card/CardJitsuPlayer.js b/src/scenes/games/card/CardJitsuPlayer.js index 8e9f9dea..3d145888 100644 --- a/src/scenes/games/card/CardJitsuPlayer.js +++ b/src/scenes/games/card/CardJitsuPlayer.js @@ -45,6 +45,10 @@ export default class CardJitsuPlayer extends BaseContainer { return this.dealtCards.filter(Boolean) } + get pickableCards() { + return this.dealtNotNull.filter(card => !card.isDisabled) + } + getElementWins(element) { return this.wins.filter(win => win.elementId == element) } @@ -139,6 +143,14 @@ export default class CardJitsuPlayer extends BaseContainer { return find.map(id => this.wins.find(win => win.id == id)).filter(Boolean) } + disableElement(element) { + for (let card of this.dealtNotNull) { + if (card.elementId == element) { + card.disableCard() + } + } + } + discardElement(element) { let elementWins = this.getElementWins(element) diff --git a/src/scenes/games/card/card/CardJitsuCard.js b/src/scenes/games/card/card/CardJitsuCard.js index b7091e57..60a3ff09 100644 --- a/src/scenes/games/card/card/CardJitsuCard.js +++ b/src/scenes/games/card/card/CardJitsuCard.js @@ -146,6 +146,10 @@ export default class CardJitsuCard extends BaseContainer { /* START-USER-CODE */ + get isDisabled() { + return this.disabled.visible + } + init(player, state, card = null) { if (!player.dealtCards.includes(null)) { return From 48f7fc8b5a187c3e924549b131214399c2ad63fd Mon Sep 17 00:00:00 2001 From: wizguin <16276645+wizguin@users.noreply.github.com> Date: Thu, 18 May 2023 23:19:41 +0100 Subject: [PATCH 131/200] cardjitsu: Handle no cards game over --- src/scenes/games/card/CardJitsu.js | 49 ++++++++++++++++++++++-------- 1 file changed, 37 insertions(+), 12 deletions(-) diff --git a/src/scenes/games/card/CardJitsu.js b/src/scenes/games/card/CardJitsu.js index d5cf6660..a129bfb0 100644 --- a/src/scenes/games/card/CardJitsu.js +++ b/src/scenes/games/card/CardJitsu.js @@ -244,7 +244,7 @@ export default class CardJitsu extends GameScene { handleWinner(args) { // Remove original handler - this.events.off('battle_complete', this.onBattleComplete, this) + this.events.off('battle_complete') this.events.once('battle_complete', () => this.onLastBattle(args.winner, args.cards)) } @@ -402,7 +402,7 @@ export default class CardJitsu extends GameScene { cardPrefab.icon.setTexture(key) } - onLastBattle(winSeat, winCards) { + onLastBattle(winSeat, winCards = []) { this.playBattle('ambient') let winner = this.players[winSeat] @@ -412,7 +412,7 @@ export default class CardJitsu extends GameScene { cards[i].tweenToOver(i) } - this.time.delayedCall(1000, () => this.playGameOver(winSeat)) + this.time.delayedCall(1000, () => this.playGameOver(winSeat, !winCards.length)) } onCloseClick() { @@ -456,14 +456,17 @@ export default class CardJitsu extends GameScene { allCardsDealt() { this.myPlayer.enableCards() + this.updateDisabledCards() + this.clock.start() + } + + updateDisabledCards() { let limit = this.activePowers.find(power => power.isLimiter && power.player != this.myPlayer) if (limit) { this.disableElement(limit) } - - this.clock.start() } disableElement(power) { @@ -473,12 +476,20 @@ export default class CardJitsu extends GameScene { } timeUp() { - let random = Phaser.Math.RND.pick(this.myPlayer.pickableCards) + let pickable = this.myPlayer.pickableCards + + if (pickable.length) { + let random = Phaser.Math.RND.pick(pickable) - this.pickCard(random) + this.pickCard(random) + } } pickCard(card) { + if (!this.myPlayer.pickableCards.includes(card)) { + return + } + this.myPlayer.pickCard(card) this.network.send('pick_card', { card: card.id }) @@ -519,10 +530,10 @@ export default class CardJitsu extends GameScene { this.playBattle(battle, winSeat) } - playGameOver(winSeat) { + playGameOver(winSeat, hasNoCards) { this.playBattle('tie') - let callback = () => this.time.delayedCall(500, () => this.showGameOverPrompt(winSeat)) + let callback = () => this.time.delayedCall(500, () => this.showGameOverPrompt(winSeat, hasNoCards)) this.events.once('battle_complete', callback) } @@ -535,16 +546,30 @@ export default class CardJitsu extends GameScene { }) } - showGameOverPrompt(winSeat) { - let username = this.players[winSeat].username + showGameOverPrompt(winSeat, hasNoCards) { + let message = this.getGameOverMessage(winSeat, hasNoCards) - this.interface.prompt.showWindow(this.getFormatString('wins', username), 'single', () => { + this.interface.prompt.showWindow(message, 'single', () => { this.winsPromptCallback() this.interface.prompt.window.visible = false }) } + getGameOverMessage(winSeat, hasNoCards) { + let username = this.players[winSeat].username + let message = this.getFormatString('wins', username) + + if (!hasNoCards) { + return message + } + + let loserUsername = this.players[this.getOppositeSeat(winSeat)].username + let loserMessage = this.getFormatString('has_no_cards', loserUsername) + + return `${loserMessage}\n${message}` + } + winsPromptCallback() { if (!this.rankUp) { this.sendLeaveGame() From ebc100c4b8d72e1177db7042a1283d91e91c4c59 Mon Sep 17 00:00:00 2001 From: wizguin <16276645+wizguin@users.noreply.github.com> Date: Fri, 19 May 2023 00:39:53 +0100 Subject: [PATCH 132/200] cardjitsu: discard color --- src/scenes/games/card/CardJitsuPlayer.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/scenes/games/card/CardJitsuPlayer.js b/src/scenes/games/card/CardJitsuPlayer.js index 3d145888..7f3b43ff 100644 --- a/src/scenes/games/card/CardJitsuPlayer.js +++ b/src/scenes/games/card/CardJitsuPlayer.js @@ -162,8 +162,12 @@ export default class CardJitsuPlayer extends BaseContainer { discardColor(color) { let colorWins = this.getColorWins(color) + // Order by element + let order = { f: 1, w: 2, s: 3 } + colorWins.sort((a, b) => order[a.elementId] - order[b.elementId]) + if (colorWins.length) { - this.discardCard(colorWins.pop()) + this.discardCard(colorWins.shift()) } } From a4d5a0e4de35b5b9ae94df655a0261974ab08c8d Mon Sep 17 00:00:00 2001 From: wizguin <16276645+wizguin@users.noreply.github.com> Date: Fri, 19 May 2023 16:46:42 +0100 Subject: [PATCH 133/200] cardjitsu: Switch to ruffle for battle anims --- src/scenes/games/card/CardJitsu.js | 84 ++++++++++++++++++++++----- src/scenes/games/card/CardJitsu.scene | 1 + 2 files changed, 72 insertions(+), 13 deletions(-) diff --git a/src/scenes/games/card/CardJitsu.js b/src/scenes/games/card/CardJitsu.js index a129bfb0..680fda27 100644 --- a/src/scenes/games/card/CardJitsu.js +++ b/src/scenes/games/card/CardJitsu.js @@ -20,6 +20,8 @@ export default class CardJitsu extends GameScene { constructor() { super("CardJitsu"); + /** @type {Phaser.GameObjects.Image} */ + this.bg; /** @type {CardJitsuPlayer} */ this.player2; /** @type {CardJitsuPlayer} */ @@ -39,6 +41,9 @@ export default class CardJitsu extends GameScene { /* START-USER-CTR-CODE */ + + window.card = this + /* END-USER-CTR-CODE */ } @@ -52,7 +57,7 @@ export default class CardJitsu extends GameScene { _create() { // bg - this.add.image(760, 480, "cardjitsu", "bg"); + const bg = this.add.image(760, 480, "cardjitsu", "bg"); // player2 const player2 = new CardJitsuPlayer(this, 760, 480); @@ -105,6 +110,7 @@ export default class CardJitsu extends GameScene { closeButton.spriteName = "close"; closeButton.callback = () => this.onCloseClick(); + this.bg = bg; this.player2 = player2; this.player1 = player1; this.clock = clock; @@ -130,7 +136,16 @@ export default class CardJitsu extends GameScene { this.load.pack('tie-pack', `${url}/tie/tie-pack.json`) } - create() { + async create() { + this.container = this.add.dom(760, 480) + this.container.visible = false + + this.battlesPath = 'assets/media/flash/battles/' + + this.events.once('emulator_ready', this.onEmulatorReady, this) + + this.player = await this.loadEmulator() + super.create() this.myPlayer @@ -164,7 +179,6 @@ export default class CardJitsu extends GameScene { this.rankUp = null this.addListeners() - this.network.send('start_game') this.events.once('shutdown', this.onShutdown, this) } @@ -195,6 +209,57 @@ export default class CardJitsu extends GameScene { this.network.events.off('award', this.handleAward, this) } + async loadEmulator() { + const ruffle = window.RufflePlayer.newest() + const player = ruffle.createPlayer() + + this.container.setElement(player, { + width: '100%', + height: '100%', + pointerEvents: 'auto' + }) + + // Position dom below canvas + this.game.domContainer.style.zIndex = -10 + + await player.load({ + url: 'assets/media/flash/battle.swf', + allowScriptAccess: true, + menu: false, + contextMenu: false, + scale: 'noborder', + autoplay: 'on', + + logLevel: 'info', + splashScreen: false + }) + + return player + } + + onEmulatorReady() { + this.bg.visible = false + this.container.visible = true + + this.network.send('start_game') + } + + getBattlesPath() { + return this.battlesPath + } + + getColor(seat) { + return this.players[seat].color + } + + getSensei(seat) { + return this.players[seat].sensei + } + + getRank(seat) { + return this.players[seat].rank + } + handleStartGame(args) { for (let user of args.users) { this.setPlayer(user, args.users.indexOf(user)) @@ -435,16 +500,7 @@ export default class CardJitsu extends GameScene { } playBattle(battle, winSeat = null) { - if (winSeat == null) { - this.players.forEach(player => player.playBattle(battle)) - return - } - - let winner = this.players[winSeat] - let loser = this.players[this.getOppositeSeat(winSeat)] - - winner.playBattle(`${battle}_attack`) - loser.playBattle(`${battle}_react`) + this.player.loadBattle(battle, winSeat) } createCard() { @@ -597,6 +653,8 @@ export default class CardJitsu extends GameScene { this.events.off('remove_pick') this.events.off('powers_complete') + this.game.domContainer.style.zIndex = 'auto' + this.world.client.sendJoinLastRoom() } diff --git a/src/scenes/games/card/CardJitsu.scene b/src/scenes/games/card/CardJitsu.scene index ba9a9940..058de3b1 100644 --- a/src/scenes/games/card/CardJitsu.scene +++ b/src/scenes/games/card/CardJitsu.scene @@ -21,6 +21,7 @@ "type": "Image", "id": "c12c3e43-59eb-4f80-ad9a-810a06c53763", "label": "bg", + "scope": "CLASS", "components": [], "texture": { "key": "cardjitsu", From 90591dcbaceeee68676a2b1246d96f553de16c9f Mon Sep 17 00:00:00 2001 From: wizguin <16276645+wizguin@users.noreply.github.com> Date: Fri, 19 May 2023 16:58:07 +0100 Subject: [PATCH 134/200] cardjitsu: Remove html5 battle anims code --- src/engine/loaders/BattleLoader.js | 115 ------------ src/scenes/games/card/CardJitsu.js | 21 --- src/scenes/games/card/CardJitsuBattle.js | 221 ----------------------- src/scenes/games/card/CardJitsuPlayer.js | 31 +--- 4 files changed, 3 insertions(+), 385 deletions(-) delete mode 100644 src/engine/loaders/BattleLoader.js delete mode 100644 src/scenes/games/card/CardJitsuBattle.js diff --git a/src/engine/loaders/BattleLoader.js b/src/engine/loaders/BattleLoader.js deleted file mode 100644 index 49a47660..00000000 --- a/src/engine/loaders/BattleLoader.js +++ /dev/null @@ -1,115 +0,0 @@ -import BaseLoader from './BaseLoader' - - -export default class BattleLoader extends BaseLoader { - - constructor(scene) { - super(scene) - - this.addedPacks = [] - } - - loadBattles(battles, callback) { - for (let battle of battles) { - this.loadBattle(battle) - } - - this.once('complete', () => { - callback() - }) - - this.start() - } - - loadBattle(battle) { - let key = `${battle}-pack` - let url = `/assets/media/games/card/battles/${battle}/${key}.json` - - this.addedPacks.push(key) - - this.pack(key, url) - } - - clearPacks() { - this.reset() - this.off('complete') - - while (this.addedPacks.length) { - let key = this.addedPacks.pop() - - this.clearPack(key) - } - } - - clearPack(key) { - if (!this.jsonExists(key)) { - return - } - - let json = this.scene.cache.json.get(key) - - let sections = Object.values(json).filter(value => 'files' in value) - - for (let section of sections) { - this.clearFiles(section) - } - - this.removeFromCache(this.scene.cache.json, key) - } - - clearFiles(section) { - for (let file of section.files) { - this.clearFile(file) - } - } - - clearFile(file) { - switch (file.type) { - case 'multiatlas': - this.removeFromCache(this.scene.textures, file.key) - this.clearAnims(file.key) - break - - default: - this.removeFromCache(this.scene.cache[file.type], file.key) - break - } - } - - clearAnims(textureKey) { - let entries = this.scene.anims.anims.entries - - for (let animationKey in entries) { - let animation = entries[animationKey] - - if (this.animUsingTexture(animation, textureKey)) { - this.scene.anims.remove(animationKey) - } - } - } - - animUsingTexture(animation, textureKey) { - return !!animation.frames.find(frame => frame.textureKey == textureKey) - } - - removeFromCache(cache, key) { - if (cache.exists(key)) { - cache.remove(key) - } - } - - reset() { - this.inflight.each(file => this.abortFile(file)) - - super.reset() - } - - abortFile(file) { - // Aborted file never gets added to cache - file.xhrLoader.abort() - - // Removes from inflight with success value false - file.loader.nextFile(file, false) - } - -} diff --git a/src/scenes/games/card/CardJitsu.js b/src/scenes/games/card/CardJitsu.js index 680fda27..3f122f16 100644 --- a/src/scenes/games/card/CardJitsu.js +++ b/src/scenes/games/card/CardJitsu.js @@ -6,7 +6,6 @@ import Button from "../../components/Button"; import CardJitsuClock from "./clock/CardJitsuClock"; /* START-USER-IMPORTS */ -import BattleLoader from '@engine/loaders/BattleLoader' import CardLoader from '@engine/loaders/CardLoader' import CardJitsuCard from './card/CardJitsuCard' import CardJitsuPower from './power/CardJitsuPower' @@ -152,7 +151,6 @@ export default class CardJitsu extends GameScene { this.opponent // Loader - this.battleLoader = new BattleLoader(this) this.cardLoader = new CardLoader(this) this.onDealCardLoad = this.onDealCardLoad.bind(this) @@ -179,8 +177,6 @@ export default class CardJitsu extends GameScene { this.rankUp = null this.addListeners() - - this.events.once('shutdown', this.onShutdown, this) } // probably a better way than needing 2 functions for this @@ -351,12 +347,6 @@ export default class CardJitsu extends GameScene { } } - checkBattleComplete() { - if (!this.player1.animating && !this.player2.animating) { - this.events.emit('battle_complete') - } - } - onBattleComplete() { this.playBattle('ambient') @@ -489,12 +479,6 @@ export default class CardJitsu extends GameScene { this.showCloseGamePrompt() } - getBattleNames(card) { - let prefix = card.powerId > 0 ? `pow_${card.id}` : card.elementId - - return [`${prefix}_attack`, `${prefix}_react`] - } - getOppositeSeat(seat) { return (seat + 1) % 2 } @@ -658,11 +642,6 @@ export default class CardJitsu extends GameScene { this.world.client.sendJoinLastRoom() } - onShutdown() { - // Temp solution until memory management update - this.battleLoader.clearPacks() - } - /* END-USER-CODE */ } diff --git a/src/scenes/games/card/CardJitsuBattle.js b/src/scenes/games/card/CardJitsuBattle.js deleted file mode 100644 index 62508a26..00000000 --- a/src/scenes/games/card/CardJitsuBattle.js +++ /dev/null @@ -1,221 +0,0 @@ -export default class CardJitsuBattle { - - constructor(player) { - this.player = player - - this.scene = player.scene - - this.currentBattle - this.currentConfig - - this.list = {} - - this.animating = false - - // can be moved somewhere else - this.beltColors = [16777215, 16776960, 16737792, 3394560, 13260, 13369344, 6684927, 6697728, 4473924, 4473924] - } - - get body() { - return this.list.body - } - - get frontArm() { - return this.list.frontarm - } - - get backArm() { - return this.list.backarm - } - - get belt() { - return this.list.belt - } - - get beltLine() { - return this.list.beltline - } - - get sensei() { - return this.list.sensei - } - - play(battle) { - this.clear() - - this.currentBattle = battle - - // Loaded from battle config.json file - this.currentConfig = this.getConfig() - - // Sprite names mapped to layer and frames - let spritesConfig = this.getSpritesConfig() - - this.createSprites(spritesConfig) - this.playAnims() - } - - getConfig() { - return this.scene.cache.json.get(`${this.currentBattle}_config`) || {} - } - - getSpritesConfig() { - let frames = this.scene.textures.get(this.currentBattle).getFrameNames() - - let config = {} - - for (let f of frames) { - let [layer, name, frame] = f.split('_') - - if (!(name in config)) { - config[name] = { - layer: parseInt(layer), - frames: 0 - } - } - - frame = parseInt(frame) - - if (config[name].frames < frame) { - config[name].frames = frame - } - } - - return config - } - - createSprites(config) { - for (let name in config) { - let spriteConfig = config[name] - - let sprite = this.scene.add.sprite(0, 0, this.currentBattle, `${spriteConfig.layer}_${name}_1`) - sprite.layer = spriteConfig.layer - - this.player.add(sprite) - - this.list[name] = sprite - - sprite.anim = this.createAnim(name, spriteConfig) - } - - this.player.sort('layer') - } - - createAnim(name, spriteConfig) { - if (spriteConfig.frames <= 1) { - return - } - - let key = `${this.currentBattle}/${name}` - - if (this.scene.anims.exists(key)) { - return this.scene.anims.get(key) - } - - let repeat = (this.currentBattle == 'ambient') ? -1 : 0 - - return this.scene.anims.create({ - key: key, - frames: this.scene.anims.generateFrameNames(this.currentBattle, { - prefix: `${spriteConfig.layer}_${name}_`, - start: 1, - end: spriteConfig.frames - }), - frameRate: 24, - repeat: repeat - }) - } - - playAnims() { - let values = Object.values(this.list) - - if (!values.length) { - return - } - - this.addAnimEvents(values) - - for (let sprite of values) { - if (sprite.anim) { - sprite.play(sprite.anim) - } - } - - this.animating = true - } - - addAnimEvents(values) { - // Only add events to one sprite instead of all - let first = values[0] - - first.once('animationcomplete', () => this.onAnimComplete(first)) - - if (!this.currentConfig.sounds) { - return - } - - // Sound events - first.once('animationstart', (anim, frame) => this.onAnimUpdate(frame)) - - first.on('animationupdate', (anim, frame) => this.onAnimUpdate(frame)) - } - - onAnimComplete(first) { - first.off('animationupdate') - - this.animating = false - this.scene.checkBattleComplete() - } - - onAnimUpdate(frame) { - let index = frame.index - - if (index in this.currentConfig.sounds) { - this.playSound(index) - } - } - - playSound(key) { - this.scene.soundManager.play(this.currentConfig.sounds[key]) - } - - setColor(color) { - if (this.body) { - this.body.tint = color - } - - if (this.frontArm) { - this.frontArm.tint = color - } - - if (this.backArm) { - this.backArm.tint = color - } - } - - setBelt(rank) { - if (rank < 1) { - this.hideBelt() - return - } - - let color = this.beltColors[rank - 1] - - if (this.belt) { - this.belt.tint = color - } - } - - hideBelt() { - this.belt.visible = false - this.beltLine.visible = false - } - - clear() { - for (let child in this.list) { - this.list[child].destroy() - delete this.list[child] - } - } - -} diff --git a/src/scenes/games/card/CardJitsuPlayer.js b/src/scenes/games/card/CardJitsuPlayer.js index 7f3b43ff..575b140c 100644 --- a/src/scenes/games/card/CardJitsuPlayer.js +++ b/src/scenes/games/card/CardJitsuPlayer.js @@ -2,9 +2,6 @@ import BaseContainer from "../../base/BaseContainer"; /* START-USER-IMPORTS */ - -import CardJitsuBattle from './CardJitsuBattle' - /* END-USER-IMPORTS */ export default class CardJitsuPlayer extends BaseContainer { @@ -16,11 +13,10 @@ export default class CardJitsuPlayer extends BaseContainer { this.seat this.username - this.rank - this.sensei - this.battle = new CardJitsuBattle(this) this.color + this.sensei + this.rank this.dealtCards = new Array(5).fill(null) this.pick @@ -33,10 +29,6 @@ export default class CardJitsuPlayer extends BaseContainer { /* START-USER-CODE */ - get animating() { - return this.battle.animating - } - get usernameText() { return this.scene.usernames[this.seat] } @@ -63,28 +55,11 @@ export default class CardJitsuPlayer extends BaseContainer { this.username = user.username this.usernameText.text = user.username.toUpperCase() - this.rank = user.ninjaRank - this.color = this.world.getColor(user.color) this.sensei = user.sensei || false - } - setColor(color) { - this.battle.setColor(color) - } - - setBelt(rank) { - this.battle.setBelt(this.sensei ? 0 : rank) - } - - playBattle(battle) { - this.battle.play(battle) - - this.battle.sensei.visible = this.sensei - - this.setColor(this.color) - this.setBelt(this.rank) + this.rank = user.ninjaRank } pickCard(card) { From 1fa757169e7363e5d7346f7867243609635ef277 Mon Sep 17 00:00:00 2001 From: wizguin <16276645+wizguin@users.noreply.github.com> Date: Fri, 19 May 2023 17:02:44 +0100 Subject: [PATCH 135/200] cardjitsu: Remove temp clock functions --- src/scenes/games/card/clock/CardJitsuClock.js | 4 ---- 1 file changed, 4 deletions(-) diff --git a/src/scenes/games/card/clock/CardJitsuClock.js b/src/scenes/games/card/clock/CardJitsuClock.js index 4c1e1124..b88732da 100644 --- a/src/scenes/games/card/clock/CardJitsuClock.js +++ b/src/scenes/games/card/clock/CardJitsuClock.js @@ -42,10 +42,6 @@ export default class CardJitsuClock extends BaseContainer { this.timer = scene.time.addEvent(this.timerConfig) - // temp - window.s = () => this.start() - window.st = () => this.stop() - /* END-USER-CTR-CODE */ } From 5b7c2bde9f810a913e91fbcc80b462b0ee14be99 Mon Sep 17 00:00:00 2001 From: wizguin <16276645+wizguin@users.noreply.github.com> Date: Sat, 15 Jul 2023 16:35:05 +0100 Subject: [PATCH 136/200] add isClientUsername function --- src/engine/world/WorldController.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/engine/world/WorldController.js b/src/engine/world/WorldController.js index 00046493..c916790d 100644 --- a/src/engine/world/WorldController.js +++ b/src/engine/world/WorldController.js @@ -100,6 +100,10 @@ export default class WorldController extends BaseScene { return buddy.online } + isClientUsername(username) { + return username.toLowerCase() === this.client.penguin.username.toLowerCase() + } + getColor(id) { return this.crumbs.colors[id - 1] || this.crumbs.colors[0] } From 3d16751b52f0475b8a8dcbc34d2a41f68fbd60df Mon Sep 17 00:00:00 2001 From: wizguin <16276645+wizguin@users.noreply.github.com> Date: Sat, 15 Jul 2023 16:36:18 +0100 Subject: [PATCH 137/200] Add max width and height to game config --- src/data/game.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/data/game.js b/src/data/game.js index 3465053a..d9a92f7e 100644 --- a/src/data/game.js +++ b/src/data/game.js @@ -17,6 +17,9 @@ const game = { width: 1520, height: 960, + maxWidth: 1520, + maxHeight: 960, + transparent: true, roundPixels: true, From 3af9ee7f23c978fa5ee00f787392a9ab6bed2d2a Mon Sep 17 00:00:00 2001 From: wizguin <16276645+wizguin@users.noreply.github.com> Date: Sat, 15 Jul 2023 16:36:47 +0100 Subject: [PATCH 138/200] Update fonts --- assets/styles/fonts.css | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/assets/styles/fonts.css b/assets/styles/fonts.css index 7cc9488b..38fe7c6a 100644 --- a/assets/styles/fonts.css +++ b/assets/styles/fonts.css @@ -41,6 +41,12 @@ src: url('../fonts/CCComicrazy-Roman.woff2'); } +@font-face { + font-family: 'CCComiccrazy Bold'; + font-weight: bold; + src: url('../fonts/CCComicrazy_Bold.woff2'); +} + @font-face { font-family: 'CCFaceFront'; src: url('../fonts/CCFaceFront.woff2'); From fa1239a0da5636b6aaf30af402727f01fb87d297 Mon Sep 17 00:00:00 2001 From: wizguin <16276645+wizguin@users.noreply.github.com> Date: Sat, 15 Jul 2023 16:39:02 +0100 Subject: [PATCH 139/200] Update fonts --- src/data/fonts.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/data/fonts.js b/src/data/fonts.js index 981e3b1f..9fc21672 100644 --- a/src/data/fonts.js +++ b/src/data/fonts.js @@ -5,7 +5,7 @@ const fonts = { 'Arial Narrow:n4,n7', 'Asterisk:n4', 'Burbank Small:n4,n7', - 'CCComiccrazy:n4', + 'CCComiccrazy:n4,n7', 'CCFaceFront:n4,i7' ], urls: [ From d9d439a4d26d7afeb7b13f63f37b3044aa1812bf Mon Sep 17 00:00:00 2001 From: wizguin <16276645+wizguin@users.noreply.github.com> Date: Sat, 15 Jul 2023 20:44:59 +0100 Subject: [PATCH 140/200] cardjitsu: Sensei talk anims --- .../games/sensei/widget/SenseiSprite.js | 40 ++++++++++++++----- .../games/sensei/widget/SenseiSprite.scene | 18 ++++----- .../games/sensei/widget/SenseiWidget.js | 4 ++ 3 files changed, 43 insertions(+), 19 deletions(-) diff --git a/src/scenes/games/sensei/widget/SenseiSprite.js b/src/scenes/games/sensei/widget/SenseiSprite.js index 2e35be92..b74f8e92 100644 --- a/src/scenes/games/sensei/widget/SenseiSprite.js +++ b/src/scenes/games/sensei/widget/SenseiSprite.js @@ -9,39 +9,39 @@ export default class SenseiSprite extends BaseContainer { constructor(scene, x, y) { super(scene, x ?? 0, y ?? 0); - /** @type {Phaser.GameObjects.Image} */ + /** @type {Phaser.GameObjects.Sprite} */ this.base; - /** @type {Phaser.GameObjects.Image} */ + /** @type {Phaser.GameObjects.Sprite} */ this.beard; - /** @type {Phaser.GameObjects.Image} */ + /** @type {Phaser.GameObjects.Sprite} */ this.beak; - /** @type {Phaser.GameObjects.Image} */ + /** @type {Phaser.GameObjects.Sprite} */ this.eyebrows; - /** @type {Phaser.GameObjects.Image} */ + /** @type {Phaser.GameObjects.Sprite} */ this.front; // base - const base = scene.add.image(0, 0, "sensei", "sensei/talk/base/base"); + const base = scene.add.sprite(0, 0, "sensei", "sensei/talk/base/base0001"); base.setOrigin(0.501039501039501, 0.5); this.add(base); // beard - const beard = scene.add.image(64, 120, "sensei", "sensei/talk/beard/beard0001"); + const beard = scene.add.sprite(66, 118, "sensei", "sensei/talk/beard/beard0001"); this.add(beard); // beak - const beak = scene.add.image(84, -111, "sensei", "sensei/talk/beak/beak0001"); + const beak = scene.add.sprite(84, -111, "sensei", "sensei/talk/beak/beak0001"); beak.setOrigin(0.5, 0.5037593984962406); this.add(beak); // eyebrows - const eyebrows = scene.add.image(45, -148, "sensei", "sensei/talk/eyebrows/eyebrows0001"); + const eyebrows = scene.add.sprite(45, -148, "sensei", "sensei/talk/eyebrows/eyebrows0001"); eyebrows.setOrigin(0.5, 0.5027624309392266); this.add(eyebrows); // front - const front = scene.add.image(71, 182, "sensei", "sensei/talk/front/front"); + const front = scene.add.sprite(71, 182, "sensei", "sensei/talk/front/front0001"); front.setOrigin(0.5009487666034156, 0.5); this.add(front); @@ -52,11 +52,31 @@ export default class SenseiSprite extends BaseContainer { this.front = front; /* START-USER-CTR-CODE */ + + this.playWait() + /* END-USER-CTR-CODE */ } /* START-USER-CODE */ + + playTalk() { + this.playAnims('talk') + } + + playWait() { + this.playAnims('wait') + } + + playAnims(key) { + this.base.play(`${key}/base`) + this.beak.play(`${key}/beak`) + this.beard.play(`${key}/beard`) + this.eyebrows.play(`${key}/eyebrows`) + this.front.play(`${key}/front`) + } + /* END-USER-CODE */ } diff --git a/src/scenes/games/sensei/widget/SenseiSprite.scene b/src/scenes/games/sensei/widget/SenseiSprite.scene index 09ee0866..13157041 100644 --- a/src/scenes/games/sensei/widget/SenseiSprite.scene +++ b/src/scenes/games/sensei/widget/SenseiSprite.scene @@ -21,19 +21,19 @@ "components": [], "list": [ { - "type": "Image", + "type": "Sprite", "id": "239209aa-cd82-49d7-bc0d-7e1526fcf9a0", "label": "base", "scope": "CLASS", "components": [], "texture": { "key": "sensei", - "frame": "sensei/talk/base/base" + "frame": "sensei/talk/base/base0001" }, "originX": 0.501039501039501 }, { - "type": "Image", + "type": "Sprite", "id": "10bcd89a-7f3b-422c-95a3-591f6bdfd528", "label": "beard", "scope": "CLASS", @@ -42,11 +42,11 @@ "key": "sensei", "frame": "sensei/talk/beard/beard0001" }, - "x": 64, - "y": 120 + "x": 66, + "y": 118 }, { - "type": "Image", + "type": "Sprite", "id": "1f15b8e8-4bc2-4d8d-be15-5da03a121018", "label": "beak", "scope": "CLASS", @@ -60,7 +60,7 @@ "originY": 0.5037593984962406 }, { - "type": "Image", + "type": "Sprite", "id": "8368fd3d-03ce-4524-b9cd-84f9b22c76b8", "label": "eyebrows", "scope": "CLASS", @@ -74,14 +74,14 @@ "originY": 0.5027624309392266 }, { - "type": "Image", + "type": "Sprite", "id": "f8ddd89e-07bd-4d19-a71e-2f7c0ccb247c", "label": "front", "scope": "CLASS", "components": [], "texture": { "key": "sensei", - "frame": "sensei/talk/front/front" + "frame": "sensei/talk/front/front0001" }, "x": 71, "y": 182, diff --git a/src/scenes/games/sensei/widget/SenseiWidget.js b/src/scenes/games/sensei/widget/SenseiWidget.js index 62b88981..f2a725d0 100644 --- a/src/scenes/games/sensei/widget/SenseiWidget.js +++ b/src/scenes/games/sensei/widget/SenseiWidget.js @@ -190,10 +190,14 @@ export default class SenseiWidget extends BaseContainer { showSpeech(text) { // todo: strings file this.speech.show(text) + + this.sensei.playTalk() } hideSpeech() { this.speech.close() + + this.sensei.playWait() } hideAll() { From 9e0ee42edf2b3bab79ba40f49655886ff998dbce Mon Sep 17 00:00:00 2001 From: wizguin <16276645+wizguin@users.noreply.github.com> Date: Mon, 17 Jul 2023 11:50:08 +0100 Subject: [PATCH 141/200] cardjitsu: Fixed sensei repeating anim --- src/scenes/games/sensei/Sensei.js | 2 ++ src/scenes/games/sensei/menu/SenseiMenu.js | 2 -- src/scenes/games/sensei/widget/SenseiSprite.js | 8 ++++++++ src/scenes/games/sensei/widget/SenseiWidget.js | 3 +++ src/scenes/games/sensei/widget/SenseiWidget.scene | 1 + 5 files changed, 14 insertions(+), 2 deletions(-) diff --git a/src/scenes/games/sensei/Sensei.js b/src/scenes/games/sensei/Sensei.js index ba6dd2b6..dde579ee 100644 --- a/src/scenes/games/sensei/Sensei.js +++ b/src/scenes/games/sensei/Sensei.js @@ -72,6 +72,8 @@ export default class Sensei extends GameScene { create() { super.create() + this.sensei.bg.on('pointerover', this.sensei.hideSpeech, this.sensei) + this.showMenu('start') } diff --git a/src/scenes/games/sensei/menu/SenseiMenu.js b/src/scenes/games/sensei/menu/SenseiMenu.js index 40a83a02..5a0ed263 100644 --- a/src/scenes/games/sensei/menu/SenseiMenu.js +++ b/src/scenes/games/sensei/menu/SenseiMenu.js @@ -60,7 +60,6 @@ export default class SenseiMenu extends BaseContainer { icon: 'menu/icon/belt', over: this.competitionOver, - out: this.hideSpeech, up: this.competitionUp }, { @@ -68,7 +67,6 @@ export default class SenseiMenu extends BaseContainer { icon: 'menu/icon/sensei', over: this.senseiOver, - out: this.hideSpeech, up: this.senseiUp } ] diff --git a/src/scenes/games/sensei/widget/SenseiSprite.js b/src/scenes/games/sensei/widget/SenseiSprite.js index b74f8e92..93fac76b 100644 --- a/src/scenes/games/sensei/widget/SenseiSprite.js +++ b/src/scenes/games/sensei/widget/SenseiSprite.js @@ -53,6 +53,8 @@ export default class SenseiSprite extends BaseContainer { /* START-USER-CTR-CODE */ + this.currentAnim + this.playWait() /* END-USER-CTR-CODE */ @@ -70,6 +72,12 @@ export default class SenseiSprite extends BaseContainer { } playAnims(key) { + if (key === this.currentAnim) { + return + } + + this.currentAnim = key + this.base.play(`${key}/base`) this.beak.play(`${key}/beak`) this.beard.play(`${key}/beard`) diff --git a/src/scenes/games/sensei/widget/SenseiWidget.js b/src/scenes/games/sensei/widget/SenseiWidget.js index f2a725d0..dc7c770e 100644 --- a/src/scenes/games/sensei/widget/SenseiWidget.js +++ b/src/scenes/games/sensei/widget/SenseiWidget.js @@ -19,6 +19,8 @@ export default class SenseiWidget extends BaseContainer { constructor(scene, x, y) { super(scene, x ?? 415, y ?? 353); + /** @type {Phaser.GameObjects.Image} */ + this.bg; /** @type {SenseiSprite} */ this.sensei; /** @type {SenseiBelt} */ @@ -56,6 +58,7 @@ export default class SenseiWidget extends BaseContainer { // bg (components) new Interactive(bg); + this.bg = bg; this.sensei = sensei; this.belt = belt; this.speech = speech; diff --git a/src/scenes/games/sensei/widget/SenseiWidget.scene b/src/scenes/games/sensei/widget/SenseiWidget.scene index cf5f86e8..60013c53 100644 --- a/src/scenes/games/sensei/widget/SenseiWidget.scene +++ b/src/scenes/games/sensei/widget/SenseiWidget.scene @@ -26,6 +26,7 @@ "type": "Image", "id": "06e66bb6-5a49-4833-8a26-681a8126ce3b", "label": "bg", + "scope": "CLASS", "components": [ "Interactive" ], From 66ca43c21f8fa68ce4acbb4b2d5db075ca154d01 Mon Sep 17 00:00:00 2001 From: wizguin <16276645+wizguin@users.noreply.github.com> Date: Mon, 17 Jul 2023 20:57:31 +0100 Subject: [PATCH 142/200] cardjitsu: Add open/close functionality to help --- src/scenes/games/card/CardJitsu.js | 16 ++- src/scenes/games/card/CardJitsu.scene | 18 +-- src/scenes/games/card/help/CardJitsuHelp.js | 109 ++++++++++++++++++ .../games/card/help/CardJitsuHelp.scene | 50 ++++++++ 4 files changed, 183 insertions(+), 10 deletions(-) create mode 100644 src/scenes/games/card/help/CardJitsuHelp.js create mode 100644 src/scenes/games/card/help/CardJitsuHelp.scene diff --git a/src/scenes/games/card/CardJitsu.js b/src/scenes/games/card/CardJitsu.js index 3f122f16..2a9886ef 100644 --- a/src/scenes/games/card/CardJitsu.js +++ b/src/scenes/games/card/CardJitsu.js @@ -3,6 +3,7 @@ import GameScene from "../GameScene"; import CardJitsuPlayer from "./CardJitsuPlayer"; import Button from "../../components/Button"; +import CardJitsuHelp from "./help/CardJitsuHelp"; import CardJitsuClock from "./clock/CardJitsuClock"; /* START-USER-IMPORTS */ @@ -25,6 +26,10 @@ export default class CardJitsu extends GameScene { this.player2; /** @type {CardJitsuPlayer} */ this.player1; + /** @type {CardJitsuHelp} */ + this.help; + /** @type {Phaser.GameObjects.Image} */ + this.frame; /** @type {CardJitsuClock} */ this.clock; /** @type {Phaser.GameObjects.Image} */ @@ -72,8 +77,8 @@ export default class CardJitsu extends GameScene { const close = this.add.image(1464, 57, "cardjitsu", "close"); // help - const help = this.add.image(754, 26, "cardjitsu", "help"); - help.setOrigin(0.5005370569280344, 0.5004436557231589); + const help = new CardJitsuHelp(this, 754, 24); + this.add.existing(help); // panel const panel = this.add.image(760, 854, "cardjitsu", "panel"); @@ -112,6 +117,8 @@ export default class CardJitsu extends GameScene { this.bg = bg; this.player2 = player2; this.player1 = player1; + this.help = help; + this.frame = frame; this.clock = clock; this.spinner = spinner; this.username2 = username2; @@ -177,6 +184,9 @@ export default class CardJitsu extends GameScene { this.rankUp = null this.addListeners() + + this.help.depth = 2000 + this.frame.depth = 2001 } // probably a better way than needing 2 functions for this @@ -499,6 +509,7 @@ export default class CardJitsu extends GameScene { this.updateDisabledCards() this.clock.start() + this.help.unlock() } updateDisabledCards() { @@ -534,6 +545,7 @@ export default class CardJitsu extends GameScene { this.network.send('pick_card', { card: card.id }) this.clock.stop() + this.help.lock() } judge(winner, winCard) { diff --git a/src/scenes/games/card/CardJitsu.scene b/src/scenes/games/card/CardJitsu.scene index 058de3b1..77bf8406 100644 --- a/src/scenes/games/card/CardJitsu.scene +++ b/src/scenes/games/card/CardJitsu.scene @@ -85,18 +85,19 @@ "y": 57 }, { - "type": "Image", + "prefabId": "94535fbd-178b-46f2-a995-1dd72d803895", "id": "a1e810c2-0719-4c82-b4c9-f0d891121829", + "unlock": [ + "x", + "y" + ], "label": "help", + "scope": "CLASS", "components": [], - "texture": { - "key": "cardjitsu", - "frame": "help" - }, "x": 754, - "y": 26, - "originX": 0.5005370569280344, - "originY": 0.5004436557231589 + "y": 24, + "nestedPrefabs": [], + "list": [] }, { "type": "Image", @@ -115,6 +116,7 @@ "type": "Image", "id": "9e6b3a10-20e4-48fb-95b7-8e3259b670c4", "label": "frame", + "scope": "CLASS", "components": [], "texture": { "key": "cardjitsu", diff --git a/src/scenes/games/card/help/CardJitsuHelp.js b/src/scenes/games/card/help/CardJitsuHelp.js new file mode 100644 index 00000000..34048421 --- /dev/null +++ b/src/scenes/games/card/help/CardJitsuHelp.js @@ -0,0 +1,109 @@ +/* START OF COMPILED CODE */ + +import BaseContainer from "../../../base/BaseContainer"; +import SimpleButton from "../../../components/SimpleButton"; +/* START-USER-IMPORTS */ +/* END-USER-IMPORTS */ + +export default class CardJitsuHelp extends BaseContainer { + + constructor(scene, x, y) { + super(scene, x ?? 0, y ?? 0); + + // help + const help = scene.add.image(0, 0, "cardjitsu", "help"); + help.setOrigin(0.5005370569280344, 0.5004436557231589); + this.add(help); + + // help (components) + const helpSimpleButton = new SimpleButton(help); + helpSimpleButton.hoverCallback = () => this.onOver(); + helpSimpleButton.hoverOutCallback = () => this.onOut(); + helpSimpleButton.pixelPerfect = true; + + /* START-USER-CTR-CODE */ + + this.closedY = this.y + this.openY = this.y + 464 + + this.tween + + this.State = { + Closed: 0, + Open: 1 + } + + this.currentState = this.State.Closed + this.locked = true + + /* END-USER-CTR-CODE */ + } + + /* START-USER-CODE */ + + onOver() { + if (this.tween || this.currentState === this.State.Open || this.locked) { + return + } + + this.tween = this.scene.tweens.add({ + targets: this, + duration: 500, + y: this.openY, + ease: Phaser.Math.Easing.Cubic.Out, + + onComplete: () => this.onOpened() + }) + } + + onOut() { + if (this.tween || this.currentState === this.State.Closed || this.locked) { + return + } + + this.tween = this.scene.tweens.add({ + targets: this, + duration: 400, + y: this.closedY, + + onComplete: () => this.onClosed() + }) + } + + onOpened() { + this.currentState = this.State.Open + this.removeTween() + } + + onClosed() { + this.currentState = this.State.Closed + this.removeTween() + } + + close() { + this.y = this.closedY + this.onClosed() + } + + lock() { + this.locked = true + this.close() + } + + unlock() { + this.locked = false + } + + removeTween() { + if (!this.tween) { + return + } + + this.tween.remove() + this.tween = null + } + + /* END-USER-CODE */ +} + +/* END OF COMPILED CODE */ diff --git a/src/scenes/games/card/help/CardJitsuHelp.scene b/src/scenes/games/card/help/CardJitsuHelp.scene new file mode 100644 index 00000000..b56be0b0 --- /dev/null +++ b/src/scenes/games/card/help/CardJitsuHelp.scene @@ -0,0 +1,50 @@ +{ + "id": "94535fbd-178b-46f2-a995-1dd72d803895", + "sceneType": "PREFAB", + "settings": { + "compilerInsertSpaces": true, + "javaScriptInitFieldsInConstructor": true, + "exportClass": true, + "autoImport": true, + "superClassName": "BaseContainer", + "preloadMethodName": "", + "preloadPackFiles": [], + "createMethodName": "", + "borderWidth": 1520, + "borderHeight": 960 + }, + "displayList": [ + { + "type": "Container", + "id": "4645b7a2-5b6f-4953-9ebd-1226540eb5b4", + "label": "container_1", + "components": [], + "list": [ + { + "type": "Image", + "id": "ab83195e-cec8-49c5-a5b2-1eb80dc96830", + "label": "help", + "components": [ + "SimpleButton" + ], + "SimpleButton.hoverCallback": "() => this.onOver()", + "SimpleButton.hoverOutCallback": "() => this.onOut()", + "SimpleButton.pixelPerfect": true, + "texture": { + "key": "cardjitsu", + "frame": "help" + }, + "originX": 0.5005370569280344, + "originY": 0.5004436557231589 + } + ] + } + ], + "plainObjects": [], + "meta": { + "app": "Phaser Editor 2D - Scene Editor", + "url": "https://phasereditor2d.com", + "contentType": "phasereditor2d.core.scene.SceneContentType", + "version": 3 + } +} \ No newline at end of file From c6c69d549da6da23d1458557c4fbfbfd3dfe601a Mon Sep 17 00:00:00 2001 From: wizguin <16276645+wizguin@users.noreply.github.com> Date: Tue, 18 Jul 2023 12:27:13 +0100 Subject: [PATCH 143/200] cardjitsu: Add help text --- src/scenes/games/card/help/CardJitsuHelp.js | 7 +++++++ src/scenes/games/card/help/CardJitsuHelp.scene | 16 ++++++++++++++++ 2 files changed, 23 insertions(+) diff --git a/src/scenes/games/card/help/CardJitsuHelp.js b/src/scenes/games/card/help/CardJitsuHelp.js index 34048421..aa6731ee 100644 --- a/src/scenes/games/card/help/CardJitsuHelp.js +++ b/src/scenes/games/card/help/CardJitsuHelp.js @@ -15,6 +15,13 @@ export default class CardJitsuHelp extends BaseContainer { help.setOrigin(0.5005370569280344, 0.5004436557231589); this.add(help); + // text + const text = scene.add.text(0, -275, "", {}); + text.setOrigin(0.5, 0.5); + text.text = "If tied, the highest number wins."; + text.setStyle({ "align": "center", "color": "#333", "fixedWidth":828,"fixedHeight":50,"fontFamily": "Burbank Small", "fontSize": "32px" }); + this.add(text); + // help (components) const helpSimpleButton = new SimpleButton(help); helpSimpleButton.hoverCallback = () => this.onOver(); diff --git a/src/scenes/games/card/help/CardJitsuHelp.scene b/src/scenes/games/card/help/CardJitsuHelp.scene index b56be0b0..3044ce76 100644 --- a/src/scenes/games/card/help/CardJitsuHelp.scene +++ b/src/scenes/games/card/help/CardJitsuHelp.scene @@ -36,6 +36,22 @@ }, "originX": 0.5005370569280344, "originY": 0.5004436557231589 + }, + { + "type": "Text", + "id": "108802b2-880c-4a19-893e-a4ddb0e4763f", + "label": "text", + "components": [], + "y": -275, + "originX": 0.5, + "originY": 0.5, + "text": "If tied, the highest number wins.", + "fixedWidth": 828, + "fixedHeight": 50, + "align": "center", + "fontFamily": "Burbank Small", + "fontSize": "32px", + "color": "#333" } ] } From 14f213e18918631c2c06693355fe1fb52aa8ab61 Mon Sep 17 00:00:00 2001 From: wizguin <16276645+wizguin@users.noreply.github.com> Date: Tue, 18 Jul 2023 15:47:26 +0100 Subject: [PATCH 144/200] cardjitsu: Added close button sound --- src/scenes/games/card/CardJitsu.js | 21 +++++++++++++++------ src/scenes/games/card/CardJitsu.scene | 3 ++- 2 files changed, 17 insertions(+), 7 deletions(-) diff --git a/src/scenes/games/card/CardJitsu.js b/src/scenes/games/card/CardJitsu.js index 2a9886ef..b13a8309 100644 --- a/src/scenes/games/card/CardJitsu.js +++ b/src/scenes/games/card/CardJitsu.js @@ -26,6 +26,8 @@ export default class CardJitsu extends GameScene { this.player2; /** @type {CardJitsuPlayer} */ this.player1; + /** @type {Phaser.GameObjects.Image} */ + this.closeButton; /** @type {CardJitsuHelp} */ this.help; /** @type {Phaser.GameObjects.Image} */ @@ -73,8 +75,8 @@ export default class CardJitsu extends GameScene { player1.scaleX = -1; player1.scaleY = 1; - // close - const close = this.add.image(1464, 57, "cardjitsu", "close"); + // closeButton + const closeButton = this.add.image(1464, 57, "cardjitsu", "close"); // help const help = new CardJitsuHelp(this, 754, 24); @@ -109,14 +111,15 @@ export default class CardJitsu extends GameScene { const players = [player1, player2]; const usernames = [username1, username2]; - // close (components) - const closeButton = new Button(close); - closeButton.spriteName = "close"; - closeButton.callback = () => this.onCloseClick(); + // closeButton (components) + const closeButtonButton = new Button(closeButton); + closeButtonButton.spriteName = "close"; + closeButtonButton.callback = () => this.onCloseClick(); this.bg = bg; this.player2 = player2; this.player1 = player1; + this.closeButton = closeButton; this.help = help; this.frame = frame; this.clock = clock; @@ -187,6 +190,8 @@ export default class CardJitsu extends GameScene { this.help.depth = 2000 this.frame.depth = 2001 + + this.closeButton.on('pointerdown', this.playCloseSound, this) } // probably a better way than needing 2 functions for this @@ -654,6 +659,10 @@ export default class CardJitsu extends GameScene { this.world.client.sendJoinLastRoom() } + playCloseSound() { + this.soundManager.play('switch') + } + /* END-USER-CODE */ } diff --git a/src/scenes/games/card/CardJitsu.scene b/src/scenes/games/card/CardJitsu.scene index 77bf8406..848e3518 100644 --- a/src/scenes/games/card/CardJitsu.scene +++ b/src/scenes/games/card/CardJitsu.scene @@ -71,7 +71,8 @@ { "type": "Image", "id": "7a0d7dac-7b59-4a80-bc52-f98bbe8639bd", - "label": "close", + "label": "closeButton", + "scope": "CLASS", "components": [ "Button" ], From 5557a0552e2e29c5846674131998194d74a22ad7 Mon Sep 17 00:00:00 2001 From: wizguin <16276645+wizguin@users.noreply.github.com> Date: Wed, 19 Jul 2023 22:22:02 +0100 Subject: [PATCH 145/200] Fixed issue with widgets closing in showWidget --- src/engine/interface/InterfaceController.js | 4 ---- 1 file changed, 4 deletions(-) diff --git a/src/engine/interface/InterfaceController.js b/src/engine/interface/InterfaceController.js index 1c563c4f..10c01d9b 100644 --- a/src/engine/interface/InterfaceController.js +++ b/src/engine/interface/InterfaceController.js @@ -138,10 +138,6 @@ export default class InterfaceController extends BaseScene { } showWidget(widget) { - if (widget.visible) { - widget.close() - } - if (widget.widgetLayer) { widget.widgetLayer.bringToTop(widget) } From fee0dfdcc84e479586da38b47e6a2f8157f20270 Mon Sep 17 00:00:00 2001 From: wizguin <16276645+wizguin@users.noreply.github.com> Date: Sat, 22 Jul 2023 21:48:16 +0100 Subject: [PATCH 146/200] Added music to card jitsu --- src/scenes/games/card/CardJitsu.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/scenes/games/card/CardJitsu.js b/src/scenes/games/card/CardJitsu.js index b13a8309..6b64b3e1 100644 --- a/src/scenes/games/card/CardJitsu.js +++ b/src/scenes/games/card/CardJitsu.js @@ -50,6 +50,8 @@ export default class CardJitsu extends GameScene { window.card = this + this.music = '116' + /* END-USER-CTR-CODE */ } From ebba39a4c7ebf33b09c7b4dea3503d10165e8492 Mon Sep 17 00:00:00 2001 From: wizguin <16276645+wizguin@users.noreply.github.com> Date: Wed, 26 Jul 2023 14:27:25 +0100 Subject: [PATCH 147/200] cardjitsu: Added instruction prefabs --- .../instructions/ninjabelts/NinjaBelts.js | 51 +++++++++++++ .../instructions/ninjabelts/NinjaBelts.scene | 73 +++++++++++++++++++ .../ninjainstructions/NinjaInstructions.js | 51 +++++++++++++ .../ninjainstructions/NinjaInstructions.scene | 73 +++++++++++++++++++ 4 files changed, 248 insertions(+) create mode 100644 src/scenes/interface/instructions/ninjabelts/NinjaBelts.js create mode 100644 src/scenes/interface/instructions/ninjabelts/NinjaBelts.scene create mode 100644 src/scenes/interface/instructions/ninjainstructions/NinjaInstructions.js create mode 100644 src/scenes/interface/instructions/ninjainstructions/NinjaInstructions.scene diff --git a/src/scenes/interface/instructions/ninjabelts/NinjaBelts.js b/src/scenes/interface/instructions/ninjabelts/NinjaBelts.js new file mode 100644 index 00000000..8a2129ae --- /dev/null +++ b/src/scenes/interface/instructions/ninjabelts/NinjaBelts.js @@ -0,0 +1,51 @@ +export const preload = { + key: 'ninjabelts-pack', + url: 'assets/media/interface/instructions/ninjabelts/ninjabelts-pack.json', + loadString: '' +} + +/* START OF COMPILED CODE */ + +import BaseContainer from "../../../base/BaseContainer"; +import Interactive from "../../../components/Interactive"; +import Button from "../../../components/Button"; +/* START-USER-IMPORTS */ +/* END-USER-IMPORTS */ + +export default class NinjaBelts extends BaseContainer { + + constructor(scene, x, y) { + super(scene, x ?? 760, y ?? 480); + + // block + const block = scene.add.rectangle(0, 0, 1520, 960); + block.isFilled = true; + block.fillColor = 0; + block.fillAlpha = 0.2; + this.add(block); + + // bg + const bg = scene.add.image(0, -24, "ninjabelts", "bg"); + this.add(bg); + + // close + const close = scene.add.image(216, -399, "ninjabelts", "close"); + this.add(close); + + // block (components) + new Interactive(block); + + // close (components) + const closeButton = new Button(close); + closeButton.spriteName = "close"; + closeButton.callback = () => this.close(); + + /* START-USER-CTR-CODE */ + /* END-USER-CTR-CODE */ + } + + /* START-USER-CODE */ + /* END-USER-CODE */ +} + +/* END OF COMPILED CODE */ diff --git a/src/scenes/interface/instructions/ninjabelts/NinjaBelts.scene b/src/scenes/interface/instructions/ninjabelts/NinjaBelts.scene new file mode 100644 index 00000000..0d561672 --- /dev/null +++ b/src/scenes/interface/instructions/ninjabelts/NinjaBelts.scene @@ -0,0 +1,73 @@ +{ + "id": "0b35598f-c5d1-4f33-afad-43fd460f959a", + "sceneType": "PREFAB", + "settings": { + "compilerInsertSpaces": true, + "javaScriptInitFieldsInConstructor": true, + "exportClass": true, + "autoImport": true, + "superClassName": "BaseContainer", + "preloadMethodName": "", + "preloadPackFiles": [], + "createMethodName": "", + "borderWidth": 1520, + "borderHeight": 960 + }, + "displayList": [ + { + "type": "Container", + "id": "37458a2b-3844-483f-b834-fac9d35b618b", + "label": "container_1", + "x": 760, + "y": 480, + "list": [ + { + "type": "Rectangle", + "id": "b7cfc003-3ecc-487f-8eee-a2571916ac7f", + "label": "block", + "components": [ + "Interactive" + ], + "isFilled": true, + "fillColor": "#000000", + "fillAlpha": 0.2, + "width": 1520, + "height": 960 + }, + { + "type": "Image", + "id": "19d25413-a385-4e9f-9857-51bd99aff7c4", + "label": "bg", + "texture": { + "key": "ninjabelts", + "frame": "bg" + }, + "y": -24 + }, + { + "type": "Image", + "id": "b7aac7a3-2340-4824-99cc-eae0a589dd3d", + "label": "close", + "components": [ + "Button" + ], + "Button.spriteName": "close", + "Button.callback": "() => this.close()", + "texture": { + "key": "ninjabelts", + "frame": "close" + }, + "x": 216, + "y": -399 + } + ] + } + ], + "plainObjects": [], + "meta": { + "app": "Phaser Editor 2D - Scene Editor", + "url": "https://phasereditor2d.com", + "contentType": "phasereditor2d.core.scene.SceneContentType", + "version": 4 + } +} \ No newline at end of file diff --git a/src/scenes/interface/instructions/ninjainstructions/NinjaInstructions.js b/src/scenes/interface/instructions/ninjainstructions/NinjaInstructions.js new file mode 100644 index 00000000..c7ac4bfb --- /dev/null +++ b/src/scenes/interface/instructions/ninjainstructions/NinjaInstructions.js @@ -0,0 +1,51 @@ +export const preload = { + key: 'ninjainstructions-pack', + url: 'assets/media/interface/instructions/ninjainstructions/ninjainstructions-pack.json', + loadString: '' +} + +/* START OF COMPILED CODE */ + +import BaseContainer from "../../../base/BaseContainer"; +import Interactive from "../../../components/Interactive"; +import Button from "../../../components/Button"; +/* START-USER-IMPORTS */ +/* END-USER-IMPORTS */ + +export default class NinjaInstructions extends BaseContainer { + + constructor(scene, x, y) { + super(scene, x ?? 760, y ?? 480); + + // block + const block = scene.add.rectangle(0, 0, 1520, 960); + block.isFilled = true; + block.fillColor = 0; + block.fillAlpha = 0.2; + this.add(block); + + // bg + const bg = scene.add.image(0, -24, "ninjainstructions", "bg"); + this.add(bg); + + // close + const close = scene.add.image(216, -399, "ninjainstructions", "close"); + this.add(close); + + // block (components) + new Interactive(block); + + // close (components) + const closeButton = new Button(close); + closeButton.spriteName = "close"; + closeButton.callback = () => this.close(); + + /* START-USER-CTR-CODE */ + /* END-USER-CTR-CODE */ + } + + /* START-USER-CODE */ + /* END-USER-CODE */ +} + +/* END OF COMPILED CODE */ diff --git a/src/scenes/interface/instructions/ninjainstructions/NinjaInstructions.scene b/src/scenes/interface/instructions/ninjainstructions/NinjaInstructions.scene new file mode 100644 index 00000000..b459dc72 --- /dev/null +++ b/src/scenes/interface/instructions/ninjainstructions/NinjaInstructions.scene @@ -0,0 +1,73 @@ +{ + "id": "1df77fc4-8fe1-4fbe-9607-335bbd0715d1", + "sceneType": "PREFAB", + "settings": { + "compilerInsertSpaces": true, + "javaScriptInitFieldsInConstructor": true, + "exportClass": true, + "autoImport": true, + "superClassName": "BaseContainer", + "preloadMethodName": "", + "preloadPackFiles": [], + "createMethodName": "", + "borderWidth": 1520, + "borderHeight": 960 + }, + "displayList": [ + { + "type": "Container", + "id": "90f3b620-7810-4e32-ae43-6e0cb91084d9", + "label": "container_1", + "x": 760, + "y": 480, + "list": [ + { + "type": "Rectangle", + "id": "62f29b87-a3db-4de4-8c18-c156a2b82e9b", + "label": "block", + "components": [ + "Interactive" + ], + "isFilled": true, + "fillColor": "#000000", + "fillAlpha": 0.2, + "width": 1520, + "height": 960 + }, + { + "type": "Image", + "id": "c1995031-6189-41a1-87ce-c923fe14fdfa", + "label": "bg", + "texture": { + "key": "ninjainstructions", + "frame": "bg" + }, + "y": -24 + }, + { + "type": "Image", + "id": "cabb9816-92a8-4c33-9252-32bf2511ecf5", + "label": "close", + "components": [ + "Button" + ], + "Button.spriteName": "close", + "Button.callback": "() => this.close()", + "texture": { + "key": "ninjainstructions", + "frame": "close" + }, + "x": 216, + "y": -399 + } + ] + } + ], + "plainObjects": [], + "meta": { + "app": "Phaser Editor 2D - Scene Editor", + "url": "https://phasereditor2d.com", + "contentType": "phasereditor2d.core.scene.SceneContentType", + "version": 4 + } +} \ No newline at end of file From 6a7259d2fec8fa860ca983cc0e98120a1d9d61d0 Mon Sep 17 00:00:00 2001 From: wizguin <16276645+wizguin@users.noreply.github.com> Date: Wed, 26 Jul 2023 14:29:33 +0100 Subject: [PATCH 148/200] cardjitsu: Added mat prefabs --- src/scenes/shared_prefabs/card/CardTable1.js | 54 ++++++++++++++ .../shared_prefabs/card/CardTable1.scene | 72 +++++++++++++++++++ src/scenes/shared_prefabs/card/CardTable2.js | 54 ++++++++++++++ .../shared_prefabs/card/CardTable2.scene | 72 +++++++++++++++++++ 4 files changed, 252 insertions(+) create mode 100644 src/scenes/shared_prefabs/card/CardTable1.js create mode 100644 src/scenes/shared_prefabs/card/CardTable1.scene create mode 100644 src/scenes/shared_prefabs/card/CardTable2.js create mode 100644 src/scenes/shared_prefabs/card/CardTable2.scene diff --git a/src/scenes/shared_prefabs/card/CardTable1.js b/src/scenes/shared_prefabs/card/CardTable1.js new file mode 100644 index 00000000..7ed0cbb7 --- /dev/null +++ b/src/scenes/shared_prefabs/card/CardTable1.js @@ -0,0 +1,54 @@ +/* START OF COMPILED CODE */ + +import BaseContainer from "../../base/BaseContainer"; +import Button from "../../components/Button"; +import ShowHint from "../../components/ShowHint"; +/* START-USER-IMPORTS */ +/* END-USER-IMPORTS */ + +export default class CardTable1 extends BaseContainer { + + constructor(scene, x, y) { + super(scene, x ?? 0, y ?? 0); + + /** @type {number} */ + this.moveToX = 0; + /** @type {number} */ + this.moveToY = 0; + + + // mat + const mat = scene.add.image(0, 0, "dojo", "mat/mat_1"); + mat.setOrigin(0.5018450184501845, 0.5); + this.add(mat); + + // mat (components) + const matButton = new Button(mat); + matButton.spriteName = "mat/mat_1"; + matButton.activeFrame = false; + matButton.pixelPerfect = true; + const matShowHint = new ShowHint(mat); + matShowHint.text = "card_hint"; + + /* START-USER-CTR-CODE */ + + mat.on('pointerup', (pointer) => this.onPointerUp(pointer)) + + /* END-USER-CTR-CODE */ + } + + + /* START-USER-CODE */ + + onPointerUp(pointer) { + if (pointer.button !== 0) { + return + } + + this.scene.world.client.sendMove(this.moveToX, this.moveToY) + } + + /* END-USER-CODE */ +} + +/* END OF COMPILED CODE */ diff --git a/src/scenes/shared_prefabs/card/CardTable1.scene b/src/scenes/shared_prefabs/card/CardTable1.scene new file mode 100644 index 00000000..582562f6 --- /dev/null +++ b/src/scenes/shared_prefabs/card/CardTable1.scene @@ -0,0 +1,72 @@ +{ + "id": "8adc32e3-5c26-46f8-b0a3-ceb8200598ec", + "sceneType": "PREFAB", + "settings": { + "compilerInsertSpaces": true, + "javaScriptInitFieldsInConstructor": true, + "exportClass": true, + "autoImport": true, + "superClassName": "BaseContainer", + "preloadMethodName": "", + "preloadPackFiles": [], + "createMethodName": "", + "borderWidth": 1520, + "borderHeight": 960 + }, + "displayList": [ + { + "type": "Container", + "id": "92e98aa4-f6b1-4b7b-bee2-08bc6a7b7bef", + "label": "container_1", + "list": [ + { + "type": "Image", + "id": "dd831ee5-3fa1-4d8e-adf4-273bf9ac6372", + "label": "mat", + "components": [ + "Button", + "ShowHint" + ], + "Button.spriteName": "mat/mat_1", + "Button.activeFrame": false, + "Button.pixelPerfect": true, + "ShowHint.text": "card_hint", + "texture": { + "key": "dojo", + "frame": "mat/mat_1" + }, + "originX": 0.5018450184501845 + } + ] + } + ], + "plainObjects": [], + "meta": { + "app": "Phaser Editor 2D - Scene Editor", + "url": "https://phasereditor2d.com", + "contentType": "phasereditor2d.core.scene.SceneContentType", + "version": 4 + }, + "prefabProperties": [ + { + "name": "moveToX", + "label": "moveToX", + "tooltip": "moveToX", + "defValue": 0, + "customDefinition": false, + "type": { + "id": "number" + } + }, + { + "name": "moveToY", + "label": "moveToY", + "tooltip": "moveToY", + "defValue": 0, + "customDefinition": false, + "type": { + "id": "number" + } + } + ] +} \ No newline at end of file diff --git a/src/scenes/shared_prefabs/card/CardTable2.js b/src/scenes/shared_prefabs/card/CardTable2.js new file mode 100644 index 00000000..aad4749a --- /dev/null +++ b/src/scenes/shared_prefabs/card/CardTable2.js @@ -0,0 +1,54 @@ +/* START OF COMPILED CODE */ + +import BaseContainer from "../../base/BaseContainer"; +import Button from "../../components/Button"; +import ShowHint from "../../components/ShowHint"; +/* START-USER-IMPORTS */ +/* END-USER-IMPORTS */ + +export default class CardTable2 extends BaseContainer { + + constructor(scene, x, y) { + super(scene, x ?? 0, y ?? 0); + + /** @type {number} */ + this.moveToX = 0; + /** @type {number} */ + this.moveToY = 0; + + + // mat + const mat = scene.add.image(0, 0, "dojo", "mat/mat_2"); + mat.setOrigin(0.5018450184501845, 0.5); + this.add(mat); + + // mat (components) + const matButton = new Button(mat); + matButton.spriteName = "mat/mat_2"; + matButton.activeFrame = false; + matButton.pixelPerfect = true; + const matShowHint = new ShowHint(mat); + matShowHint.text = "card_hint"; + + /* START-USER-CTR-CODE */ + + mat.on('pointerup', (pointer) => this.onPointerUp(pointer)) + + /* END-USER-CTR-CODE */ + } + + + /* START-USER-CODE */ + + onPointerUp(pointer) { + if (pointer.button !== 0) { + return + } + + this.scene.world.client.sendMove(this.moveToX, this.moveToY) + } + + /* END-USER-CODE */ +} + +/* END OF COMPILED CODE */ diff --git a/src/scenes/shared_prefabs/card/CardTable2.scene b/src/scenes/shared_prefabs/card/CardTable2.scene new file mode 100644 index 00000000..4b70d1f7 --- /dev/null +++ b/src/scenes/shared_prefabs/card/CardTable2.scene @@ -0,0 +1,72 @@ +{ + "id": "36e51c27-3069-47c0-8b43-7a47b5400852", + "sceneType": "PREFAB", + "settings": { + "compilerInsertSpaces": true, + "javaScriptInitFieldsInConstructor": true, + "exportClass": true, + "autoImport": true, + "superClassName": "BaseContainer", + "preloadMethodName": "", + "preloadPackFiles": [], + "createMethodName": "", + "borderWidth": 1520, + "borderHeight": 960 + }, + "displayList": [ + { + "type": "Container", + "id": "92e98aa4-f6b1-4b7b-bee2-08bc6a7b7bef", + "label": "container_1", + "list": [ + { + "type": "Image", + "id": "dd831ee5-3fa1-4d8e-adf4-273bf9ac6372", + "label": "mat", + "components": [ + "Button", + "ShowHint" + ], + "Button.spriteName": "mat/mat_2", + "Button.activeFrame": false, + "Button.pixelPerfect": true, + "ShowHint.text": "card_hint", + "texture": { + "key": "dojo", + "frame": "mat/mat_2" + }, + "originX": 0.5018450184501845 + } + ] + } + ], + "plainObjects": [], + "meta": { + "app": "Phaser Editor 2D - Scene Editor", + "url": "https://phasereditor2d.com", + "contentType": "phasereditor2d.core.scene.SceneContentType", + "version": 4 + }, + "prefabProperties": [ + { + "name": "moveToX", + "label": "moveToX", + "tooltip": "moveToX", + "defValue": 0, + "customDefinition": false, + "type": { + "id": "number" + } + }, + { + "name": "moveToY", + "label": "moveToY", + "tooltip": "moveToY", + "defValue": 0, + "customDefinition": false, + "type": { + "id": "number" + } + } + ] +} \ No newline at end of file From e8f77f41c928fdd20eb35e92dff2a18e3cd5a50f Mon Sep 17 00:00:00 2001 From: wizguin <16276645+wizguin@users.noreply.github.com> Date: Wed, 26 Jul 2023 16:32:01 +0100 Subject: [PATCH 149/200] cardjitsu: Updated dojo --- src/scenes/rooms/dojo/Dojo.js | 111 +++++++++++++++++++ src/scenes/rooms/dojo/Dojo.scene | 182 ++++++++++++++++++++++++++++++- 2 files changed, 291 insertions(+), 2 deletions(-) diff --git a/src/scenes/rooms/dojo/Dojo.js b/src/scenes/rooms/dojo/Dojo.js index 2a1ddc80..dbdc5e00 100644 --- a/src/scenes/rooms/dojo/Dojo.js +++ b/src/scenes/rooms/dojo/Dojo.js @@ -3,6 +3,9 @@ import RoomScene from "../RoomScene"; import Button from "../../components/Button"; import MoveTo from "../../components/MoveTo"; +import CardTable1 from "../../shared_prefabs/card/CardTable1"; +import CardTable2 from "../../shared_prefabs/card/CardTable2"; +import Zone from "../../components/Zone"; /* START-USER-IMPORTS */ /* END-USER-IMPORTS */ @@ -11,11 +14,21 @@ export default class Dojo extends RoomScene { constructor() { super("Dojo"); + /** @type {Phaser.GameObjects.Sprite} */ + this.sensei; + + /* START-USER-CTR-CODE */ this.roomTriggers = { 'door': () => this.triggerRoom(321, 780, 640), + 'sensei': () => this.triggerGame(951), + 'table200': () => {}, + 'table201': () => {}, + 'table202': () => {}, + 'table203': () => {} } + this.roomAnims = true /* END-USER-CTR-CODE */ } @@ -37,6 +50,56 @@ export default class Dojo extends RoomScene { const door = this.add.image(358, 421, "dojo", "door"); door.setOrigin(0, 0); + // sensei + const sensei = this.add.sprite(965, 373, "dojo", "sensei/sensei0001"); + sensei.setOrigin(0, 0); + + // tree + const tree = this.add.image(1198, 451, "dojo", "tree"); + tree.setOrigin(0, 0); + + // instructionsPoster + const instructionsPoster = this.add.image(631, 375, "dojo", "instructions_poster"); + instructionsPoster.setOrigin(0, 0); + + // instructions + const instructions = this.add.image(647, 381, "dojo", "instructions"); + instructions.setOrigin(0, 0); + + // legendPoster + const legendPoster = this.add.image(512, 375, "dojo", "legend_poster"); + legendPoster.setOrigin(0, 0); + + // legend + const legend = this.add.image(534, 382, "dojo", "legend"); + legend.setOrigin(0, 0); + + // table203 + const table203 = new CardTable1(this, 1188, 813); + this.add.existing(table203); + table203.scaleX = -1; + table203.scaleY = 1; + + // table202 + const table202 = new CardTable1(this, 358, 813); + this.add.existing(table202); + + // table201 + const table201 = new CardTable2(this, 930, 706); + this.add.existing(table201); + table201.scaleX = -1; + table201.scaleY = 1; + + // table200 + const table200 = new CardTable2(this, 616, 706); + this.add.existing(table200); + + // zone + const zone = this.add.rectangle(1096, 490, 246, 217); + zone.alpha = 0.5; + zone.isFilled = true; + zone.fillColor = 65280; + // door (components) const doorButton = new Button(door); doorButton.spriteName = "door"; @@ -46,10 +109,58 @@ export default class Dojo extends RoomScene { doorMoveTo.x = 400; doorMoveTo.y = 570; + // instructionsPoster (components) + const instructionsPosterButton = new Button(instructionsPoster); + instructionsPosterButton.spriteName = "instructions_poster"; + instructionsPosterButton.callback = () => this.interface.loadWidget('NinjaInstructions'); + instructionsPosterButton.activeFrame = false; + + // legendPoster (components) + const legendPosterButton = new Button(legendPoster); + legendPosterButton.spriteName = "legend_poster"; + legendPosterButton.callback = () => this.interface.loadWidget('NinjaBelts'); + legendPosterButton.activeFrame = false; + + // table203 (prefab fields) + table203.moveToX = 1160; + table203.moveToY = 750; + + // table202 (prefab fields) + table202.moveToX = 380; + table202.moveToY = 750; + + // table201 (prefab fields) + table201.moveToX = 920; + table201.moveToY = 650; + + // table200 (prefab fields) + table200.moveToX = 620; + table200.moveToY = 650; + + // zone (components) + const zoneZone = new Zone(zone); + zoneZone.hoverCallback = () => this.onSenseiOver(); + zoneZone.hoverOutCallback = () => this.onSenseiOut(); + const zoneMoveTo = new MoveTo(zone); + zoneMoveTo.x = 1096; + zoneMoveTo.y = 640; + + this.sensei = sensei; + this.events.emit("scene-awake"); } + /* START-USER-CODE */ + + onSenseiOver() { + this.sensei.play('sensei_over') + } + + onSenseiOut() { + this.sensei.play('sensei_out') + } + /* END-USER-CODE */ } diff --git a/src/scenes/rooms/dojo/Dojo.scene b/src/scenes/rooms/dojo/Dojo.scene index 52e91c06..5e96592c 100644 --- a/src/scenes/rooms/dojo/Dojo.scene +++ b/src/scenes/rooms/dojo/Dojo.scene @@ -21,7 +21,6 @@ "type": "Image", "id": "cdad28c5-a6ef-4041-b7a2-d1b67c1d0477", "label": "bg", - "components": [], "texture": { "key": "dojo", "frame": "bg" @@ -52,6 +51,185 @@ "y": 421, "originX": 0, "originY": 0 + }, + { + "type": "Sprite", + "id": "779d8848-0d5a-4c38-93b2-1a51b4c294ed", + "label": "sensei", + "scope": "CLASS", + "texture": { + "key": "dojo", + "frame": "sensei/sensei0001" + }, + "x": 965, + "y": 373, + "originX": 0, + "originY": 0 + }, + { + "type": "Image", + "id": "11187da2-2046-47b4-8601-6631421f43ee", + "label": "tree", + "texture": { + "key": "dojo", + "frame": "tree" + }, + "x": 1198, + "y": 451, + "originX": 0, + "originY": 0 + }, + { + "type": "Image", + "id": "cd9d3eb7-a7fe-4f75-9077-53b8c1a6eae5", + "label": "instructionsPoster", + "components": [ + "Button" + ], + "Button.spriteName": "instructions_poster", + "Button.callback": "() => this.interface.loadWidget('NinjaInstructions')", + "Button.activeFrame": false, + "texture": { + "key": "dojo", + "frame": "instructions_poster" + }, + "x": 631, + "y": 375, + "originX": 0, + "originY": 0 + }, + { + "type": "Image", + "id": "88e43778-3321-4a69-98e8-eadd7d082a6c", + "label": "instructions", + "texture": { + "key": "dojo", + "frame": "instructions" + }, + "x": 647, + "y": 381, + "originX": 0, + "originY": 0 + }, + { + "type": "Image", + "id": "6532e5fe-0d2d-483d-9631-2f8abf2f93e1", + "label": "legendPoster", + "components": [ + "Button" + ], + "Button.spriteName": "legend_poster", + "Button.callback": "() => this.interface.loadWidget('NinjaBelts')", + "Button.activeFrame": false, + "texture": { + "key": "dojo", + "frame": "legend_poster" + }, + "x": 512, + "y": 375, + "originX": 0, + "originY": 0 + }, + { + "type": "Image", + "id": "89add8ea-3226-4101-914b-de9e1f6c0d4f", + "label": "legend", + "texture": { + "key": "dojo", + "frame": "legend" + }, + "x": 534, + "y": 382, + "originX": 0, + "originY": 0 + }, + { + "prefabId": "8adc32e3-5c26-46f8-b0a3-ceb8200598ec", + "id": "4ed85538-b1e1-4391-864a-12165867f2d7", + "unlock": [ + "x", + "y", + "scaleX", + "scaleY", + "moveToX", + "moveToY" + ], + "label": "table203", + "moveToX": 1160, + "moveToY": 750, + "x": 1188, + "y": 813, + "scaleX": -1, + "scaleY": 1 + }, + { + "prefabId": "8adc32e3-5c26-46f8-b0a3-ceb8200598ec", + "id": "930e64d7-509f-4b66-b069-17ddd8228123", + "unlock": [ + "x", + "y", + "moveToX", + "moveToY" + ], + "label": "table202", + "moveToX": 380, + "moveToY": 750, + "x": 358, + "y": 813 + }, + { + "prefabId": "36e51c27-3069-47c0-8b43-7a47b5400852", + "id": "7353dd85-f3a9-44e6-a1b5-efce0d80b611", + "unlock": [ + "x", + "y", + "scaleX", + "scaleY", + "moveToX", + "moveToY" + ], + "label": "table201", + "moveToX": 920, + "moveToY": 650, + "x": 930, + "y": 706, + "scaleX": -1, + "scaleY": 1 + }, + { + "prefabId": "36e51c27-3069-47c0-8b43-7a47b5400852", + "id": "fb495e97-de4b-464b-91cc-e79480e53d2d", + "unlock": [ + "x", + "y", + "moveToX", + "moveToY" + ], + "label": "table200", + "moveToX": 620, + "moveToY": 650, + "x": 616, + "y": 706 + }, + { + "type": "Rectangle", + "id": "ddcfe359-2530-437e-8de5-d24516fa0c13", + "label": "zone", + "components": [ + "Zone", + "MoveTo" + ], + "Zone.hoverCallback": "() => this.onSenseiOver()", + "Zone.hoverOutCallback": "() => this.onSenseiOut()", + "MoveTo.x": "1096", + "MoveTo.y": "640", + "x": 1096, + "y": 490, + "alpha": 0.5, + "isFilled": true, + "fillColor": "#00ff00", + "width": 246, + "height": 217 } ], "plainObjects": [], @@ -59,6 +237,6 @@ "app": "Phaser Editor 2D - Scene Editor", "url": "https://phasereditor2d.com", "contentType": "phasereditor2d.core.scene.SceneContentType", - "version": 3 + "version": 4 } } \ No newline at end of file From ab1d9cad75bc796be254a3e23966b868ea18e7d6 Mon Sep 17 00:00:00 2001 From: wizguin <16276645+wizguin@users.noreply.github.com> Date: Thu, 27 Jul 2023 11:07:31 +0100 Subject: [PATCH 150/200] Fixed bug with inventory adding items as strings --- src/engine/network/plugins/plugins/Item.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/engine/network/plugins/plugins/Item.js b/src/engine/network/plugins/plugins/Item.js index be937e57..e7feac90 100644 --- a/src/engine/network/plugins/plugins/Item.js +++ b/src/engine/network/plugins/plugins/Item.js @@ -24,12 +24,14 @@ export default class Item extends Plugin { } addItem(args) { + const item = parseInt(args.item) + // If item already in inventory - if (this.client.inventory[args.slot].includes(args.item)) return + if (this.client.inventory[args.slot].includes(item)) return // Update player data this.client.coins = args.coins - this.client.inventory[args.slot].push(args.item) + this.client.inventory[args.slot].push(item) this.client.inventory[args.slot].sort((a, b) => a - b) // Update player card From 773937c52c49bc3fe8aaab79abade9ec6d8a1713 Mon Sep 17 00:00:00 2001 From: wizguin <16276645+wizguin@users.noreply.github.com> Date: Thu, 27 Jul 2023 11:59:23 +0100 Subject: [PATCH 151/200] cardjitsu: Added cards btn to dojo --- src/scenes/rooms/dojo/Dojo.js | 22 ++++++++++++++++++++++ src/scenes/rooms/dojo/Dojo.scene | 22 ++++++++++++++++++++++ 2 files changed, 44 insertions(+) diff --git a/src/scenes/rooms/dojo/Dojo.js b/src/scenes/rooms/dojo/Dojo.js index dbdc5e00..8ba9b570 100644 --- a/src/scenes/rooms/dojo/Dojo.js +++ b/src/scenes/rooms/dojo/Dojo.js @@ -16,6 +16,8 @@ export default class Dojo extends RoomScene { /** @type {Phaser.GameObjects.Sprite} */ this.sensei; + /** @type {Phaser.GameObjects.Image} */ + this.cards; /* START-USER-CTR-CODE */ @@ -100,6 +102,11 @@ export default class Dojo extends RoomScene { zone.isFilled = true; zone.fillColor = 65280; + // cards + const cards = this.add.image(1342, 819, "dojo", "cards"); + cards.setOrigin(0, 0); + cards.visible = false; + // door (components) const doorButton = new Button(door); doorButton.spriteName = "door"; @@ -145,7 +152,15 @@ export default class Dojo extends RoomScene { zoneMoveTo.x = 1096; zoneMoveTo.y = 640; + // cards (components) + const cardsButton = new Button(cards); + cardsButton.spriteName = "cards"; + cardsButton.callback = () => this.interface.loadWidget('NinjaProgress'); + cardsButton.activeFrame = false; + cardsButton.pixelPerfect = true; + this.sensei = sensei; + this.cards = cards; this.events.emit("scene-awake"); } @@ -153,6 +168,13 @@ export default class Dojo extends RoomScene { /* START-USER-CODE */ + create() { + super.create() + + this.cards.depth = 960 + this.cards.visible = this.world.client.inventory.award.includes(821) + } + onSenseiOver() { this.sensei.play('sensei_over') } diff --git a/src/scenes/rooms/dojo/Dojo.scene b/src/scenes/rooms/dojo/Dojo.scene index 5e96592c..0633723e 100644 --- a/src/scenes/rooms/dojo/Dojo.scene +++ b/src/scenes/rooms/dojo/Dojo.scene @@ -230,6 +230,28 @@ "fillColor": "#00ff00", "width": 246, "height": 217 + }, + { + "type": "Image", + "id": "f8368dcf-c97e-4fd6-8b91-a1e62e7bd9c1", + "label": "cards", + "scope": "CLASS", + "components": [ + "Button" + ], + "Button.spriteName": "cards", + "Button.callback": "() => this.interface.loadWidget('NinjaProgress')", + "Button.activeFrame": false, + "Button.pixelPerfect": true, + "texture": { + "key": "dojo", + "frame": "cards" + }, + "x": 1342, + "y": 819, + "originX": 0, + "originY": 0, + "visible": false } ], "plainObjects": [], From e2c0ec52b12083093d83a7ba50c5ef8205653d8d Mon Sep 17 00:00:00 2001 From: wizguin <16276645+wizguin@users.noreply.github.com> Date: Thu, 27 Jul 2023 11:59:39 +0100 Subject: [PATCH 152/200] Updated widgets.js --- src/data/widgets.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/data/widgets.js b/src/data/widgets.js index 72627566..65e05b88 100644 --- a/src/data/widgets.js +++ b/src/data/widgets.js @@ -6,6 +6,8 @@ const widgets = { 'FindFour': require('@scenes/games/four/FindFour'), 'Mancala': require('@scenes/games/mancala/Mancala'), 'Map': require('@scenes/interface/game/map/Map'), + 'NinjaBelts': require('@scenes/interface/instructions/ninjabelts/NinjaBelts'), + 'NinjaInstructions': require('@scenes/interface/instructions/ninjainstructions/NinjaInstructions'), 'NinjaProgress': require('@scenes/games/ninjaprogress/NinjaProgress'), 'Sensei': require('@scenes/games/sensei/widget/SenseiWidget') } From 75811b99d79a5ece9a8215fd78361f20389ada41 Mon Sep 17 00:00:00 2001 From: wizguin <16276645+wizguin@users.noreply.github.com> Date: Wed, 2 Aug 2023 21:43:11 +0100 Subject: [PATCH 153/200] cardjitsu: Add userHasDeck to dojo --- src/scenes/rooms/dojo/Dojo.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/scenes/rooms/dojo/Dojo.js b/src/scenes/rooms/dojo/Dojo.js index 8ba9b570..fa368813 100644 --- a/src/scenes/rooms/dojo/Dojo.js +++ b/src/scenes/rooms/dojo/Dojo.js @@ -168,11 +168,15 @@ export default class Dojo extends RoomScene { /* START-USER-CODE */ + get userHasDeck() { + return this.world.client.inventory.award.includes(821) + } + create() { super.create() this.cards.depth = 960 - this.cards.visible = this.world.client.inventory.award.includes(821) + this.cards.visible = this.userHasDeck } onSenseiOver() { From 8cfb2f9e02bd69b420531557bd486c9d9ee4fdd0 Mon Sep 17 00:00:00 2001 From: wizguin <16276645+wizguin@users.noreply.github.com> Date: Mon, 14 Aug 2023 16:43:40 +0100 Subject: [PATCH 154/200] cardjitsu: Refactor sensei widget --- .../games/sensei/widget/SenseiWidget.js | 188 ++++++++---------- .../games/sensei/widget/SenseiWidget.scene | 43 ++-- .../{SenseiBelt.js => award/SenseiAward.js} | 5 +- .../SenseiAward.scene} | 7 +- .../widget/{ => speech}/SenseiSpeech.js | 2 +- .../widget/{ => speech}/SenseiSpeech.scene | 5 +- .../widget/{ => sprite}/SenseiSprite.js | 2 +- .../widget/{ => sprite}/SenseiSprite.scene | 8 +- 8 files changed, 102 insertions(+), 158 deletions(-) rename src/scenes/games/sensei/widget/{SenseiBelt.js => award/SenseiAward.js} (95%) rename src/scenes/games/sensei/widget/{SenseiBelt.scene => award/SenseiAward.scene} (92%) rename src/scenes/games/sensei/widget/{ => speech}/SenseiSpeech.js (94%) rename src/scenes/games/sensei/widget/{ => speech}/SenseiSpeech.scene (93%) rename src/scenes/games/sensei/widget/{ => sprite}/SenseiSprite.js (97%) rename src/scenes/games/sensei/widget/{ => sprite}/SenseiSprite.scene (92%) diff --git a/src/scenes/games/sensei/widget/SenseiWidget.js b/src/scenes/games/sensei/widget/SenseiWidget.js index dc7c770e..a4d762bf 100644 --- a/src/scenes/games/sensei/widget/SenseiWidget.js +++ b/src/scenes/games/sensei/widget/SenseiWidget.js @@ -8,23 +8,26 @@ export const preload = { import BaseContainer from "../../../base/BaseContainer"; import Interactive from "../../../components/Interactive"; -import SenseiSprite from "./SenseiSprite"; -import SenseiBelt from "./SenseiBelt"; -import SenseiSpeech from "./SenseiSpeech"; +import SenseiSprite from "./sprite/SenseiSprite"; +import SenseiAward from "./award/SenseiAward"; +import SenseiSpeech from "./speech/SenseiSpeech"; /* START-USER-IMPORTS */ + +import * as sequences from '../config/SenseiSequences' + /* END-USER-IMPORTS */ export default class SenseiWidget extends BaseContainer { constructor(scene, x, y) { - super(scene, x ?? 415, y ?? 353); + super(scene, x ?? 0, y ?? 0); /** @type {Phaser.GameObjects.Image} */ this.bg; /** @type {SenseiSprite} */ - this.sensei; - /** @type {SenseiBelt} */ - this.belt; + this.senseiSprite; + /** @type {SenseiAward} */ + this.award; /** @type {SenseiSpeech} */ this.speech; /** @type {Phaser.GameObjects.Sprite} */ @@ -32,25 +35,25 @@ export default class SenseiWidget extends BaseContainer { // bg - const bg = scene.add.image(189, 212, "sensei", "bg"); + const bg = scene.add.image(604, 565, "sensei", "bg"); this.add(bg); - // sensei - const sensei = new SenseiSprite(scene, -237, -21); - this.add(sensei); + // senseiSprite + const senseiSprite = new SenseiSprite(scene, 178, 332); + this.add(senseiSprite); - // belt - const belt = new SenseiBelt(scene, 697, 218); - belt.visible = false; - this.add(belt); + // award + const award = new SenseiAward(scene, 1112, 571); + award.visible = false; + this.add(award); // speech - const speech = new SenseiSpeech(scene, 522, -149); + const speech = new SenseiSpeech(scene, 937, 204); speech.visible = false; this.add(speech); // hideout - const hideout = scene.add.sprite(573, 133, "sensei", "hideout/hideout0001"); + const hideout = scene.add.sprite(988, 486, "sensei", "hideout/hideout0001"); hideout.setOrigin(0.5005599104143337, 0.5); hideout.visible = false; this.add(hideout); @@ -59,39 +62,21 @@ export default class SenseiWidget extends BaseContainer { new Interactive(bg); this.bg = bg; - this.sensei = sensei; - this.belt = belt; + this.senseiSprite = senseiSprite; + this.award = award; this.speech = speech; this.hideout = hideout; /* START-USER-CTR-CODE */ - bg.on('pointerup', this.onBackgroundClick, this) - - this.menu - this.currentIndex = 0 - - // Menu sequences - this.menus = { - beltAward: [ - this.menuBeltAward, - this.menuBeltEarned, - this.leaveGame - ], - maskAward: [ - this.menuMaskStart, - this.menuMaskAward, - this.menuMaskEarned, - this.menuMaskHideout, - this.leaveGame - ] - } + this.currentSequence + this.currentSequenceIndex = 0 this.rankId = 1 this.beltNames = ['White', 'Yellow', 'Orange', 'Green', 'Blue', 'Red', 'Purple', 'Brown', 'Black'] - this.bindMenus() + this.addBackgroundEvent('pointerup', this.forwardSequence, this) /* END-USER-CTR-CODE */ } @@ -99,6 +84,10 @@ export default class SenseiWidget extends BaseContainer { /* START-USER-CODE */ + get beltName() { + return this.beltNames[this.rankId - 1] + } + show() { this.hideAll() @@ -108,105 +97,100 @@ export default class SenseiWidget extends BaseContainer { } close() { - this.menu = null - this.currentIndex = 0 + this.currentSequence = null + this.currentSequenceIndex = 0 this.hideAll() super.close() } - onBackgroundClick() { - this.updateMenu() + addBackgroundEvent(event, callback, context) { + this.bg.on(event, callback, context) } - loadMenu(menu) { - if (!(menu in this.menus)) { - return + rankUp(rank) { + this.rankId = rank + + if (rank > this.beltNames.length) { + this.startSequence(sequences.maskAward) + } else { + this.startSequence(sequences.beltAward) } + } - this.menu = this.menus[menu] - this.currentIndex = 0 + startSequence(sequence) { + // Pass SenseiWidget dependency + this.currentSequence = sequence(this) - this.updateMenu() + this.currentSequenceIndex = 0 + this.updateSequence() } - updateMenu() { - if (!this.menu) { + forwardSequence() { + if (!this.currentSequence) { return } - if (this.currentIndex >= this.menu.length) { + if (this.currentSequenceIndex === this.currentSequence.length - 1) { return } - this.menu[this.currentIndex]() - - this.currentIndex++ + this.currentSequenceIndex++ + this.updateSequence() } - rankUp(rank) { - this.rankId = rank - - if (rank > this.beltNames.length) { - this.loadMenu('maskAward') - } else { - this.loadMenu('beltAward') + updateSequence() { + if (!this.currentSequence) { + return } - } - menuBeltAward() { - this.showSpeech('Congratulations!\nMuch like the fearsome earthquake,\nYou have rocked the house.') + this.currentSequence[this.currentSequenceIndex]() } - menuBeltEarned() { - let beltName = this.beltNames[this.rankId - 1] - - this.showSpeech(`Well done. You have earned\na ${beltName} Belt for your efforts.\nI am proud of you.`) + showSpeech(text) { + this.speech.show(text) + this.playTalk() + } - this.belt.showBelt(this.rankId) + hideSpeech() { + this.speech.close() + this.playWait() } - menuMaskStart() { - this.showSpeech('The gentle lotus,\nCowers before the storm cloud.\nBut you... you did not.') + playTalk() { + this.senseiSprite.playTalk() } - menuMaskAward() { - this.showSpeech('Well done, grasshopper.\nYou have faced my skills, and won.\nAnd proven yourself.') + playWait() { + this.senseiSprite.playWait() } - menuMaskEarned() { - this.showSpeech('Now receive the mark\nOf a Card-Jitsu master,\nWith this ninja mask.') + showBelt() { + this.award.showBelt(this.rankId) + } - this.belt.showMask() + showMask() { + this.award.showMask() } - menuMaskHideout() { - this.belt.close() + hideAward() { + this.award.close() + } + showHideout() { this.hideout.visible = true this.hideout.play('hideout') - - this.showSpeech('You may now join us,\nIn the secret ninja hideout.\nCongratulations!') } - showSpeech(text) { - // todo: strings file - this.speech.show(text) - - this.sensei.playTalk() - } - - hideSpeech() { - this.speech.close() - - this.sensei.playWait() + hideHideout() { + this.hideout.visible = false } hideAll() { this.hideSpeech() - this.belt.close() - this.hideout.visible = false + this.hideAward() + this.hideHideout() } leaveGame() { @@ -214,20 +198,6 @@ export default class SenseiWidget extends BaseContainer { this.world.room.sendLeaveGame() } - bindMenus() { - for (let menu of Object.values(this.menus)) { - this.bindMenu(menu) - } - } - - bindMenu(menu) { - for (let i = 0; i < menu.length; i++) { - let item = menu[i] - - menu[i] = item.bind(this) - } - } - /* END-USER-CODE */ } diff --git a/src/scenes/games/sensei/widget/SenseiWidget.scene b/src/scenes/games/sensei/widget/SenseiWidget.scene index 60013c53..3393e47b 100644 --- a/src/scenes/games/sensei/widget/SenseiWidget.scene +++ b/src/scenes/games/sensei/widget/SenseiWidget.scene @@ -18,9 +18,6 @@ "type": "Container", "id": "6c8b4abc-527b-4fb7-86e5-ce92b00f7ca6", "label": "container_1", - "components": [], - "x": 415, - "y": 353, "list": [ { "type": "Image", @@ -34,8 +31,8 @@ "key": "sensei", "frame": "bg" }, - "x": 189, - "y": 212 + "x": 604, + "y": 565 }, { "prefabId": "05d04137-c915-4f19-ba6c-2d937cd558d7", @@ -44,13 +41,10 @@ "x", "y" ], - "label": "sensei", + "label": "senseiSprite", "scope": "CLASS", - "components": [], - "x": -237, - "y": -21, - "nestedPrefabs": [], - "list": [] + "x": 178, + "y": 332 }, { "prefabId": "897d8990-9358-4074-882a-e64ab2e43e6d", @@ -60,14 +54,11 @@ "y", "visible" ], - "label": "belt", + "label": "award", "scope": "CLASS", - "components": [], - "x": 697, - "y": 218, - "visible": false, - "nestedPrefabs": [], - "list": [] + "x": 1112, + "y": 571, + "visible": false }, { "prefabId": "21b5b7fb-31dc-48aa-beea-a780ae0fe510", @@ -79,25 +70,21 @@ ], "label": "speech", "scope": "CLASS", - "components": [], - "x": 522, - "y": -149, - "visible": false, - "nestedPrefabs": [], - "list": [] + "x": 937, + "y": 204, + "visible": false }, { "type": "Sprite", "id": "285d21e7-04d7-4494-a425-7cff536c0c7a", "label": "hideout", "scope": "CLASS", - "components": [], "texture": { "key": "sensei", "frame": "hideout/hideout0001" }, - "x": 573, - "y": 133, + "x": 988, + "y": 486, "originX": 0.5005599104143337, "visible": false } @@ -109,6 +96,6 @@ "app": "Phaser Editor 2D - Scene Editor", "url": "https://phasereditor2d.com", "contentType": "phasereditor2d.core.scene.SceneContentType", - "version": 3 + "version": 4 } } \ No newline at end of file diff --git a/src/scenes/games/sensei/widget/SenseiBelt.js b/src/scenes/games/sensei/widget/award/SenseiAward.js similarity index 95% rename from src/scenes/games/sensei/widget/SenseiBelt.js rename to src/scenes/games/sensei/widget/award/SenseiAward.js index 2521c74b..4cd38ce1 100644 --- a/src/scenes/games/sensei/widget/SenseiBelt.js +++ b/src/scenes/games/sensei/widget/award/SenseiAward.js @@ -1,10 +1,10 @@ /* START OF COMPILED CODE */ -import BaseContainer from "../../../base/BaseContainer"; +import BaseContainer from "../../../../base/BaseContainer"; /* START-USER-IMPORTS */ /* END-USER-IMPORTS */ -export default class SenseiBelt extends BaseContainer { +export default class SenseiAward extends BaseContainer { constructor(scene, x, y) { super(scene, x ?? 760, y ?? 480); @@ -69,6 +69,7 @@ export default class SenseiBelt extends BaseContainer { show() { super.show() + this.addTweens() } diff --git a/src/scenes/games/sensei/widget/SenseiBelt.scene b/src/scenes/games/sensei/widget/award/SenseiAward.scene similarity index 92% rename from src/scenes/games/sensei/widget/SenseiBelt.scene rename to src/scenes/games/sensei/widget/award/SenseiAward.scene index 58d2a828..7feb2d8e 100644 --- a/src/scenes/games/sensei/widget/SenseiBelt.scene +++ b/src/scenes/games/sensei/widget/award/SenseiAward.scene @@ -18,7 +18,6 @@ "type": "Container", "id": "4293c1e1-13e0-421c-b2c6-9861f7b3a64d", "label": "container_2", - "components": [], "x": 760, "y": 480, "list": [ @@ -27,7 +26,6 @@ "id": "5c3eb48a-06c1-43a3-b1de-e46dd3528d27", "label": "belt", "scope": "CLASS", - "components": [], "texture": { "key": "sensei", "frame": "belt/belt" @@ -39,7 +37,6 @@ "id": "6e2bd2fb-89af-4878-80f3-f79d68a62080", "label": "color", "scope": "CLASS", - "components": [], "texture": { "key": "sensei", "frame": "belt/color" @@ -53,7 +50,6 @@ "id": "562d5386-43e0-4b1c-aa6e-cfa33c8928f6", "label": "shadow", "scope": "CLASS", - "components": [], "texture": { "key": "sensei", "frame": "belt/shadow" @@ -67,7 +63,6 @@ "id": "ef2c6293-d6b9-4fc4-9d07-cbcbd5d7faa7", "label": "ninja", "scope": "CLASS", - "components": [], "texture": { "key": "sensei", "frame": "mask/mask" @@ -83,6 +78,6 @@ "app": "Phaser Editor 2D - Scene Editor", "url": "https://phasereditor2d.com", "contentType": "phasereditor2d.core.scene.SceneContentType", - "version": 3 + "version": 4 } } \ No newline at end of file diff --git a/src/scenes/games/sensei/widget/SenseiSpeech.js b/src/scenes/games/sensei/widget/speech/SenseiSpeech.js similarity index 94% rename from src/scenes/games/sensei/widget/SenseiSpeech.js rename to src/scenes/games/sensei/widget/speech/SenseiSpeech.js index 896ab900..e0068d6f 100644 --- a/src/scenes/games/sensei/widget/SenseiSpeech.js +++ b/src/scenes/games/sensei/widget/speech/SenseiSpeech.js @@ -1,6 +1,6 @@ /* START OF COMPILED CODE */ -import BaseContainer from "../../../base/BaseContainer"; +import BaseContainer from "../../../../base/BaseContainer"; /* START-USER-IMPORTS */ /* END-USER-IMPORTS */ diff --git a/src/scenes/games/sensei/widget/SenseiSpeech.scene b/src/scenes/games/sensei/widget/speech/SenseiSpeech.scene similarity index 93% rename from src/scenes/games/sensei/widget/SenseiSpeech.scene rename to src/scenes/games/sensei/widget/speech/SenseiSpeech.scene index f59fbedd..bca75c92 100644 --- a/src/scenes/games/sensei/widget/SenseiSpeech.scene +++ b/src/scenes/games/sensei/widget/speech/SenseiSpeech.scene @@ -18,7 +18,6 @@ "type": "Container", "id": "e5d528fa-be3b-4a85-ad3b-5d125d347631", "label": "container_2", - "components": [], "x": 760, "y": 480, "list": [ @@ -26,7 +25,6 @@ "type": "Image", "id": "39370fe4-3a26-44fa-b7ac-a9ed6d763109", "label": "bubble", - "components": [], "texture": { "key": "sensei", "frame": "bubble" @@ -38,7 +36,6 @@ "id": "9914f859-c661-4847-9b24-1a350014193a", "label": "dialog", "scope": "CLASS", - "components": [], "x": 26, "y": -72, "originX": 0.5, @@ -58,6 +55,6 @@ "app": "Phaser Editor 2D - Scene Editor", "url": "https://phasereditor2d.com", "contentType": "phasereditor2d.core.scene.SceneContentType", - "version": 3 + "version": 4 } } \ No newline at end of file diff --git a/src/scenes/games/sensei/widget/SenseiSprite.js b/src/scenes/games/sensei/widget/sprite/SenseiSprite.js similarity index 97% rename from src/scenes/games/sensei/widget/SenseiSprite.js rename to src/scenes/games/sensei/widget/sprite/SenseiSprite.js index 93fac76b..5d90fcb3 100644 --- a/src/scenes/games/sensei/widget/SenseiSprite.js +++ b/src/scenes/games/sensei/widget/sprite/SenseiSprite.js @@ -1,6 +1,6 @@ /* START OF COMPILED CODE */ -import BaseContainer from "../../../base/BaseContainer"; +import BaseContainer from "../../../../base/BaseContainer"; /* START-USER-IMPORTS */ /* END-USER-IMPORTS */ diff --git a/src/scenes/games/sensei/widget/SenseiSprite.scene b/src/scenes/games/sensei/widget/sprite/SenseiSprite.scene similarity index 92% rename from src/scenes/games/sensei/widget/SenseiSprite.scene rename to src/scenes/games/sensei/widget/sprite/SenseiSprite.scene index 13157041..4fe81e1b 100644 --- a/src/scenes/games/sensei/widget/SenseiSprite.scene +++ b/src/scenes/games/sensei/widget/sprite/SenseiSprite.scene @@ -18,14 +18,12 @@ "type": "Container", "id": "cd072e2a-a2e4-46a5-8808-9f05596ea6bf", "label": "container_2", - "components": [], "list": [ { "type": "Sprite", "id": "239209aa-cd82-49d7-bc0d-7e1526fcf9a0", "label": "base", "scope": "CLASS", - "components": [], "texture": { "key": "sensei", "frame": "sensei/talk/base/base0001" @@ -37,7 +35,6 @@ "id": "10bcd89a-7f3b-422c-95a3-591f6bdfd528", "label": "beard", "scope": "CLASS", - "components": [], "texture": { "key": "sensei", "frame": "sensei/talk/beard/beard0001" @@ -50,7 +47,6 @@ "id": "1f15b8e8-4bc2-4d8d-be15-5da03a121018", "label": "beak", "scope": "CLASS", - "components": [], "texture": { "key": "sensei", "frame": "sensei/talk/beak/beak0001" @@ -64,7 +60,6 @@ "id": "8368fd3d-03ce-4524-b9cd-84f9b22c76b8", "label": "eyebrows", "scope": "CLASS", - "components": [], "texture": { "key": "sensei", "frame": "sensei/talk/eyebrows/eyebrows0001" @@ -78,7 +73,6 @@ "id": "f8ddd89e-07bd-4d19-a71e-2f7c0ccb247c", "label": "front", "scope": "CLASS", - "components": [], "texture": { "key": "sensei", "frame": "sensei/talk/front/front0001" @@ -95,6 +89,6 @@ "app": "Phaser Editor 2D - Scene Editor", "url": "https://phasereditor2d.com", "contentType": "phasereditor2d.core.scene.SceneContentType", - "version": 3 + "version": 4 } } \ No newline at end of file From faf7952e6a91fa8dead9319d8e7c6e4832b502b0 Mon Sep 17 00:00:00 2001 From: wizguin <16276645+wizguin@users.noreply.github.com> Date: Mon, 14 Aug 2023 17:21:29 +0100 Subject: [PATCH 155/200] cardjitsu: Refactor sensei scene --- src/scenes/games/sensei/Sensei.js | 46 ++++++-- src/scenes/games/sensei/Sensei.scene | 20 +--- src/scenes/games/sensei/match/SenseiMatch.js | 2 +- src/scenes/games/sensei/menu/SenseiMenu.js | 107 ++++++------------ src/scenes/games/sensei/menu/SenseiMenu.scene | 24 +--- 5 files changed, 82 insertions(+), 117 deletions(-) diff --git a/src/scenes/games/sensei/Sensei.js b/src/scenes/games/sensei/Sensei.js index dde579ee..48803a18 100644 --- a/src/scenes/games/sensei/Sensei.js +++ b/src/scenes/games/sensei/Sensei.js @@ -14,7 +14,7 @@ export default class Sensei extends GameScene { super("Sensei"); /** @type {SenseiWidget} */ - this.sensei; + this.senseiWidget; /** @type {SenseiMenu} */ this.menu; /** @type {SenseiMatch} */ @@ -34,10 +34,10 @@ export default class Sensei extends GameScene { /** @returns {void} */ _create() { - // sensei - const sensei = new SenseiWidget(this); - this.add.existing(sensei); - sensei.visible = true; + // senseiWidget + const senseiWidget = new SenseiWidget(this); + this.add.existing(senseiWidget); + senseiWidget.visible = true; // menu const menu = new SenseiMenu(this, 1060, 774); @@ -59,7 +59,7 @@ export default class Sensei extends GameScene { xButtonButton.spriteName = "grey-button"; xButtonButton.callback = () => this.world.client.sendJoinLastRoom(); - this.sensei = sensei; + this.senseiWidget = senseiWidget; this.menu = menu; this.match = match; @@ -72,25 +72,51 @@ export default class Sensei extends GameScene { create() { super.create() - this.sensei.bg.on('pointerover', this.sensei.hideSpeech, this.sensei) + this.senseiWidget.addBackgroundEvent('pointerover', this.onBackgroundOver, this) - this.showMenu('start') + this.showStartMenu() + } + + onBackgroundOver() { + // Speech displayed when there is no menu should stick + if (!this.menu.visible) return + + // Speech displayed during menus other than the start menu should stick + if (!this.menu.isStartMenuActive) return + + this.senseiWidget.hideSpeech() + } + + startSequence(sequence) { + this.menu.close() + this.senseiWidget.startSequence(sequence) } showMenu(menu) { + this.senseiWidget.playWait() this.menu.show(menu) } + showStartMenu() { + this.menu.showStartMenu() + } + + showPreviousMenu() { + this.menu.showPreviousMenu() + } + showMatch() { + this.menu.close() + this.hideSpeech() this.match.show() } showSpeech(text) { - this.sensei.showSpeech(text) + this.senseiWidget.showSpeech(text) } hideSpeech() { - this.sensei.hideSpeech() + this.senseiWidget.hideSpeech() } stop() { diff --git a/src/scenes/games/sensei/Sensei.scene b/src/scenes/games/sensei/Sensei.scene index 3064770a..39561da7 100644 --- a/src/scenes/games/sensei/Sensei.scene +++ b/src/scenes/games/sensei/Sensei.scene @@ -23,12 +23,9 @@ "unlock": [ "visible" ], - "label": "sensei", + "label": "senseiWidget", "scope": "CLASS", - "components": [], - "visible": true, - "nestedPrefabs": [], - "list": [] + "visible": true }, { "prefabId": "717f221e-2a49-41a0-a3d4-1aabab9d9a0f", @@ -39,11 +36,8 @@ ], "label": "menu", "scope": "CLASS", - "components": [], "x": 1060, - "y": 774, - "nestedPrefabs": [], - "list": [] + "y": 774 }, { "type": "Image", @@ -65,7 +59,6 @@ "type": "Image", "id": "42c44031-0283-493f-84b0-702119a7182b", "label": "x", - "components": [], "texture": { "key": "main", "frame": "grey-x" @@ -83,12 +76,9 @@ ], "label": "match", "scope": "CLASS", - "components": [], "x": 1024, "y": 424, - "visible": false, - "nestedPrefabs": [], - "list": [] + "visible": false } ], "plainObjects": [], @@ -96,6 +86,6 @@ "app": "Phaser Editor 2D - Scene Editor", "url": "https://phasereditor2d.com", "contentType": "phasereditor2d.core.scene.SceneContentType", - "version": 3 + "version": 4 } } \ No newline at end of file diff --git a/src/scenes/games/sensei/match/SenseiMatch.js b/src/scenes/games/sensei/match/SenseiMatch.js index b9470a69..af8c5c62 100644 --- a/src/scenes/games/sensei/match/SenseiMatch.js +++ b/src/scenes/games/sensei/match/SenseiMatch.js @@ -126,7 +126,7 @@ export default class SenseiMatch extends BaseContainer { super.close() - this.scene.showMenu('start') + this.scene.showPreviousMenu() } handleJoinMatchmaking() { diff --git a/src/scenes/games/sensei/menu/SenseiMenu.js b/src/scenes/games/sensei/menu/SenseiMenu.js index 5a0ed263..5f9a9be8 100644 --- a/src/scenes/games/sensei/menu/SenseiMenu.js +++ b/src/scenes/games/sensei/menu/SenseiMenu.js @@ -3,6 +3,9 @@ import BaseContainer from "../../../base/BaseContainer"; import SenseiMenuItem from "./SenseiMenuItem"; /* START-USER-IMPORTS */ + +import * as menus from '../config/SenseiMenus' + /* END-USER-IMPORTS */ export default class SenseiMenu extends BaseContainer { @@ -53,26 +56,8 @@ export default class SenseiMenu extends BaseContainer { /* START-USER-CTR-CODE */ - this.menus = { - start: [ - { - text: 'Earn your belts', - icon: 'menu/icon/belt', - - over: this.competitionOver, - up: this.competitionUp - }, - { - text: 'Challenge Sensei', - icon: 'menu/icon/sensei', - - over: this.senseiOver, - up: this.senseiUp - } - ] - } - - this.bindMenus() + this.currentMenu + this.currentItems /* END-USER-CTR-CODE */ } @@ -83,88 +68,66 @@ export default class SenseiMenu extends BaseContainer { show(menu) { this.reset() - if (!(menu in this.menus)) { - return - } - - this.menu = this.menus[menu] + this.currentMenu = menu + // Pass SenseiMenu dependency + this.currentItems = this.currentMenu(this) this.updateMenu() super.show() } - updateMenu() { - if (!this.menu) { - return - } - - for (let i = 0; i < this.menu.length; i++) { - let config = this.menu[i] - - let item = this.items[i] - - item.show(config) - } - - this.resizeMenu() + get isStartMenuActive() { + return this.currentMenu === menus.start } - resizeMenu() { - this.bg.height = (this.menu.length * 61) + 78 + showStartMenu() { + this.show(menus.start) } - bindMenus() { - for (let menu of Object.values(this.menus)) { - this.bindMenu(menu) + showPreviousMenu() { + if (!this.currentMenu) { + this.showStartMenu() + return } - } - bindMenu(menu) { - for (let item of menu) { - this.bindItem(item) - } + // Use last menu stored in this.currentMenu + this.show(this.currentMenu) } - bindItem(item) { - if (item.over) { - item.over = item.over.bind(this) - } + updateMenu() { + for (let i = 0; i < this.currentItems.length; i++) { + const config = this.currentItems[i] + const item = this.items[i] - if (item.out) { - item.out = item.out.bind(this) + item.show(config) } - if (item.up) { - item.up = item.up.bind(this) - } - } - - competitionOver() { - this.scene.showSpeech('Do you wish to play\nAnd compete with another\nStudent, grasshopper?') + this.resizeMenu() } - competitionUp() { - this.close() - this.hideSpeech() - - this.scene.showMatch() + resizeMenu() { + this.bg.resize(this.bg.width, (this.currentItems.length * 61) + 78) } - senseiOver() { - this.scene.showSpeech('To become ninja,\nYou must challenge me and win.\nBut bring your black belt.') + startSequence(sequence) { + this.scene.startSequence(sequence) } - senseiUp() { - this.network.send('join_sensei') + showSpeech(text) { + this.scene.showSpeech(text) } hideSpeech() { this.scene.hideSpeech() } + showMatch() { + this.scene.showMatch() + } + reset() { - for (let item of this.items) { + for (const item of this.items) { item.close() } } diff --git a/src/scenes/games/sensei/menu/SenseiMenu.scene b/src/scenes/games/sensei/menu/SenseiMenu.scene index 35317c36..f1c19302 100644 --- a/src/scenes/games/sensei/menu/SenseiMenu.scene +++ b/src/scenes/games/sensei/menu/SenseiMenu.scene @@ -18,14 +18,12 @@ "type": "Container", "id": "cc188231-2b7e-4bcd-a7bc-6da884837ac6", "label": "container_1", - "components": [], "list": [ { "type": "NinePatchContainer", "id": "907491ca-6c4a-4227-a8f0-fd5774fb38af", "label": "bg", "scope": "CLASS", - "components": [], "texture": { "key": "sensei", "frame": "menu/bg" @@ -48,12 +46,9 @@ "visible" ], "label": "senseiMenuItem4", - "components": [], "x": 0, "y": 92, - "visible": false, - "nestedPrefabs": [], - "list": [] + "visible": false }, { "prefabId": "09107910-1b0d-415a-80fe-5bf424b8d97a", @@ -64,12 +59,9 @@ "visible" ], "label": "senseiMenuItem3", - "components": [], "x": 0, "y": 30, - "visible": false, - "nestedPrefabs": [], - "list": [] + "visible": false }, { "prefabId": "09107910-1b0d-415a-80fe-5bf424b8d97a", @@ -80,12 +72,9 @@ "visible" ], "label": "senseiMenuItem2", - "components": [], "x": 0, "y": -32, - "visible": false, - "nestedPrefabs": [], - "list": [] + "visible": false }, { "prefabId": "09107910-1b0d-415a-80fe-5bf424b8d97a", @@ -96,12 +85,9 @@ "visible" ], "label": "senseiMenuItem1", - "components": [], "x": 0, "y": -94, - "visible": false, - "nestedPrefabs": [], - "list": [] + "visible": false } ] } @@ -111,7 +97,7 @@ "app": "Phaser Editor 2D - Scene Editor", "url": "https://phasereditor2d.com", "contentType": "phasereditor2d.core.scene.SceneContentType", - "version": 3 + "version": 4 }, "lists": [ { From 7337d03d1fd740f22cf1b91a7990e0e88772b2a9 Mon Sep 17 00:00:00 2001 From: wizguin <16276645+wizguin@users.noreply.github.com> Date: Mon, 14 Aug 2023 17:38:17 +0100 Subject: [PATCH 156/200] cardjitsu: Rename senseiWidget in Sensei.js --- src/scenes/games/sensei/Sensei.js | 24 ++++++++++++------------ src/scenes/games/sensei/Sensei.scene | 2 +- 2 files changed, 13 insertions(+), 13 deletions(-) diff --git a/src/scenes/games/sensei/Sensei.js b/src/scenes/games/sensei/Sensei.js index 48803a18..18ead1a5 100644 --- a/src/scenes/games/sensei/Sensei.js +++ b/src/scenes/games/sensei/Sensei.js @@ -14,7 +14,7 @@ export default class Sensei extends GameScene { super("Sensei"); /** @type {SenseiWidget} */ - this.senseiWidget; + this.widget; /** @type {SenseiMenu} */ this.menu; /** @type {SenseiMatch} */ @@ -34,10 +34,10 @@ export default class Sensei extends GameScene { /** @returns {void} */ _create() { - // senseiWidget - const senseiWidget = new SenseiWidget(this); - this.add.existing(senseiWidget); - senseiWidget.visible = true; + // widget + const widget = new SenseiWidget(this); + this.add.existing(widget); + widget.visible = true; // menu const menu = new SenseiMenu(this, 1060, 774); @@ -59,7 +59,7 @@ export default class Sensei extends GameScene { xButtonButton.spriteName = "grey-button"; xButtonButton.callback = () => this.world.client.sendJoinLastRoom(); - this.senseiWidget = senseiWidget; + this.widget = widget; this.menu = menu; this.match = match; @@ -72,7 +72,7 @@ export default class Sensei extends GameScene { create() { super.create() - this.senseiWidget.addBackgroundEvent('pointerover', this.onBackgroundOver, this) + this.widget.addBackgroundEvent('pointerover', this.onBackgroundOver, this) this.showStartMenu() } @@ -84,16 +84,16 @@ export default class Sensei extends GameScene { // Speech displayed during menus other than the start menu should stick if (!this.menu.isStartMenuActive) return - this.senseiWidget.hideSpeech() + this.widget.hideSpeech() } startSequence(sequence) { this.menu.close() - this.senseiWidget.startSequence(sequence) + this.widget.startSequence(sequence) } showMenu(menu) { - this.senseiWidget.playWait() + this.widget.playWait() this.menu.show(menu) } @@ -112,11 +112,11 @@ export default class Sensei extends GameScene { } showSpeech(text) { - this.senseiWidget.showSpeech(text) + this.widget.showSpeech(text) } hideSpeech() { - this.senseiWidget.hideSpeech() + this.widget.hideSpeech() } stop() { diff --git a/src/scenes/games/sensei/Sensei.scene b/src/scenes/games/sensei/Sensei.scene index 39561da7..805a36e0 100644 --- a/src/scenes/games/sensei/Sensei.scene +++ b/src/scenes/games/sensei/Sensei.scene @@ -23,7 +23,7 @@ "unlock": [ "visible" ], - "label": "senseiWidget", + "label": "widget", "scope": "CLASS", "visible": true }, From b0249e414641f9e8d22e1e2daa2da86d72cf0b2f Mon Sep 17 00:00:00 2001 From: wizguin <16276645+wizguin@users.noreply.github.com> Date: Fri, 25 Aug 2023 22:55:58 +0100 Subject: [PATCH 157/200] cardjitsu: Add instructions container into Sensei --- src/scenes/games/sensei/Sensei.js | 9 ++++++ .../games/sensei/widget/SenseiWidget.js | 22 +++++++++------ .../games/sensei/widget/SenseiWidget.scene | 28 +++++++++---------- 3 files changed, 36 insertions(+), 23 deletions(-) diff --git a/src/scenes/games/sensei/Sensei.js b/src/scenes/games/sensei/Sensei.js index 18ead1a5..83bf51eb 100644 --- a/src/scenes/games/sensei/Sensei.js +++ b/src/scenes/games/sensei/Sensei.js @@ -6,6 +6,9 @@ import SenseiMenu from "./menu/SenseiMenu"; import Button from "../../components/Button"; import SenseiMatch from "./match/SenseiMatch"; /* START-USER-IMPORTS */ + +import SenseiInstructions from './instructions/SenseiInstructions' + /* END-USER-IMPORTS */ export default class Sensei extends GameScene { @@ -74,6 +77,11 @@ export default class Sensei extends GameScene { this.widget.addBackgroundEvent('pointerover', this.onBackgroundOver, this) + this.instructions = new SenseiInstructions(this) + + // Add instructions into widget + this.widget.addAt(this.instructions, this.widget.speechIndex) + this.showStartMenu() } @@ -93,6 +101,7 @@ export default class Sensei extends GameScene { } showMenu(menu) { + this.instructions.hideAll() this.widget.playWait() this.menu.show(menu) } diff --git a/src/scenes/games/sensei/widget/SenseiWidget.js b/src/scenes/games/sensei/widget/SenseiWidget.js index a4d762bf..ddf98ab8 100644 --- a/src/scenes/games/sensei/widget/SenseiWidget.js +++ b/src/scenes/games/sensei/widget/SenseiWidget.js @@ -26,12 +26,12 @@ export default class SenseiWidget extends BaseContainer { this.bg; /** @type {SenseiSprite} */ this.senseiSprite; + /** @type {Phaser.GameObjects.Sprite} */ + this.hideout; /** @type {SenseiAward} */ this.award; /** @type {SenseiSpeech} */ this.speech; - /** @type {Phaser.GameObjects.Sprite} */ - this.hideout; // bg @@ -42,6 +42,12 @@ export default class SenseiWidget extends BaseContainer { const senseiSprite = new SenseiSprite(scene, 178, 332); this.add(senseiSprite); + // hideout + const hideout = scene.add.sprite(988, 486, "sensei", "hideout/hideout0001"); + hideout.setOrigin(0.5005599104143337, 0.5); + hideout.visible = false; + this.add(hideout); + // award const award = new SenseiAward(scene, 1112, 571); award.visible = false; @@ -52,20 +58,14 @@ export default class SenseiWidget extends BaseContainer { speech.visible = false; this.add(speech); - // hideout - const hideout = scene.add.sprite(988, 486, "sensei", "hideout/hideout0001"); - hideout.setOrigin(0.5005599104143337, 0.5); - hideout.visible = false; - this.add(hideout); - // bg (components) new Interactive(bg); this.bg = bg; this.senseiSprite = senseiSprite; + this.hideout = hideout; this.award = award; this.speech = speech; - this.hideout = hideout; /* START-USER-CTR-CODE */ @@ -88,6 +88,10 @@ export default class SenseiWidget extends BaseContainer { return this.beltNames[this.rankId - 1] } + get speechIndex() { + return this.getIndex(this.speech) + } + show() { this.hideAll() diff --git a/src/scenes/games/sensei/widget/SenseiWidget.scene b/src/scenes/games/sensei/widget/SenseiWidget.scene index 3393e47b..2f24c083 100644 --- a/src/scenes/games/sensei/widget/SenseiWidget.scene +++ b/src/scenes/games/sensei/widget/SenseiWidget.scene @@ -46,6 +46,20 @@ "x": 178, "y": 332 }, + { + "type": "Sprite", + "id": "285d21e7-04d7-4494-a425-7cff536c0c7a", + "label": "hideout", + "scope": "CLASS", + "texture": { + "key": "sensei", + "frame": "hideout/hideout0001" + }, + "x": 988, + "y": 486, + "originX": 0.5005599104143337, + "visible": false + }, { "prefabId": "897d8990-9358-4074-882a-e64ab2e43e6d", "id": "d7b7ee82-0eb5-4a93-9f9f-ebb2c2c4eb8d", @@ -73,20 +87,6 @@ "x": 937, "y": 204, "visible": false - }, - { - "type": "Sprite", - "id": "285d21e7-04d7-4494-a425-7cff536c0c7a", - "label": "hideout", - "scope": "CLASS", - "texture": { - "key": "sensei", - "frame": "hideout/hideout0001" - }, - "x": 988, - "y": 486, - "originX": 0.5005599104143337, - "visible": false } ] } From cda5fbc082fbac041808c0c074026eff69e7c14a Mon Sep 17 00:00:00 2001 From: wizguin <16276645+wizguin@users.noreply.github.com> Date: Fri, 25 Aug 2023 23:06:04 +0100 Subject: [PATCH 158/200] cardjitsu: Added hideInstructions function --- src/scenes/games/sensei/Sensei.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/scenes/games/sensei/Sensei.js b/src/scenes/games/sensei/Sensei.js index 83bf51eb..d0dc138f 100644 --- a/src/scenes/games/sensei/Sensei.js +++ b/src/scenes/games/sensei/Sensei.js @@ -101,7 +101,7 @@ export default class Sensei extends GameScene { } showMenu(menu) { - this.instructions.hideAll() + this.hideInstructions() this.widget.playWait() this.menu.show(menu) } @@ -128,6 +128,10 @@ export default class Sensei extends GameScene { this.widget.hideSpeech() } + hideInstructions() { + this.instructions.hideAll() + } + stop() { this.match.close() From ea788fe5603b148c61bf663210af6c116fd5aa5c Mon Sep 17 00:00:00 2001 From: wizguin <16276645+wizguin@users.noreply.github.com> Date: Fri, 25 Aug 2023 23:10:00 +0100 Subject: [PATCH 159/200] cardjitsu: Added SenseiBubble --- .../instructions/bubble/SenseiBubble.js | 108 ++++++++++++++++++ .../instructions/bubble/SenseiBubble.scene | 95 +++++++++++++++ 2 files changed, 203 insertions(+) create mode 100644 src/scenes/games/sensei/instructions/bubble/SenseiBubble.js create mode 100644 src/scenes/games/sensei/instructions/bubble/SenseiBubble.scene diff --git a/src/scenes/games/sensei/instructions/bubble/SenseiBubble.js b/src/scenes/games/sensei/instructions/bubble/SenseiBubble.js new file mode 100644 index 00000000..5af5d163 --- /dev/null +++ b/src/scenes/games/sensei/instructions/bubble/SenseiBubble.js @@ -0,0 +1,108 @@ +/* START OF COMPILED CODE */ + +import BaseContainer from "../../../../base/BaseContainer"; +import SenseiBubbleWalk from "./SenseiBubbleWalk"; +/* START-USER-IMPORTS */ +/* END-USER-IMPORTS */ + +export default class SenseiBubble extends BaseContainer { + + constructor(scene, x, y) { + super(scene, x ?? 0, y ?? 0); + + /** @type {Phaser.GameObjects.Sprite} */ + this.bubble; + /** @type {SenseiBubbleWalk} */ + this.senseiBubbleWalk2; + /** @type {SenseiBubbleWalk} */ + this.senseiBubbleWalk1; + /** @type {Phaser.GameObjects.Image} */ + this.maskImage; + /** @type {SenseiBubbleWalk[]} */ + this.walks; + + + // bubble + const bubble = scene.add.sprite(0, 0, "sensei", "instructions/bubble/bubble0030"); + bubble.setOrigin(0.5006226650062267, 0.5008976660682226); + this.add(bubble); + + // senseiBubbleWalk2 + const senseiBubbleWalk2 = new SenseiBubbleWalk(scene, 226, 11); + this.add(senseiBubbleWalk2); + + // senseiBubbleWalk1 + const senseiBubbleWalk1 = new SenseiBubbleWalk(scene, -102, 11); + senseiBubbleWalk1.scaleX = -1; + senseiBubbleWalk1.scaleY = 1; + this.add(senseiBubbleWalk1); + + // maskImage + const maskImage = scene.add.image(0, 0, "sensei", "instructions/bubble/mask"); + maskImage.setOrigin(0.5006226650062267, 0.5008976660682226); + maskImage.visible = false; + this.add(maskImage); + + // lists + const walks = [senseiBubbleWalk1, senseiBubbleWalk2]; + + this.bubble = bubble; + this.senseiBubbleWalk2 = senseiBubbleWalk2; + this.senseiBubbleWalk1 = senseiBubbleWalk1; + this.maskImage = maskImage; + this.walks = walks; + + /* START-USER-CTR-CODE */ + + this.startWalkIndex = 29 + this.endWalkIndex = 87 + + bubble.on('animationupdate', this.onBubbleAnimUpdate, this) + + this.setMask() + + /* END-USER-CTR-CODE */ + } + + + /* START-USER-CODE */ + + show() { + super.show() + + this.bubble.play('instructions/bubble') + } + + setMask() { + const matrix = this.maskImage.getWorldTransformMatrix() + + // Set correct mask position + this.maskImage.x = matrix.getX(0, 0) + this.maskImage.y = matrix.getY(0, 0) + + const mask = this.maskImage.createBitmapMask() + + this.walks.forEach(walk => walk.setMask(mask)) + } + + onBubbleAnimUpdate(_, frame) { + switch (frame.index) { + case this.startWalkIndex: + this.walks.forEach(walk => walk.show()) + break + + case this.endWalkIndex: + this.walks.forEach(walk => walk.close()) + break + } + } + + stop() { + this.bubble.stop() + this.walks.forEach(walk => walk.close()) + } + + /* END-USER-CODE */ +} + +/* END OF COMPILED CODE */ diff --git a/src/scenes/games/sensei/instructions/bubble/SenseiBubble.scene b/src/scenes/games/sensei/instructions/bubble/SenseiBubble.scene new file mode 100644 index 00000000..1cdcccbb --- /dev/null +++ b/src/scenes/games/sensei/instructions/bubble/SenseiBubble.scene @@ -0,0 +1,95 @@ +{ + "id": "522cce2c-95b0-443c-8abd-e776fae3b36a", + "sceneType": "PREFAB", + "settings": { + "compilerInsertSpaces": true, + "javaScriptInitFieldsInConstructor": true, + "exportClass": true, + "autoImport": true, + "superClassName": "BaseContainer", + "preloadMethodName": "", + "preloadPackFiles": [], + "createMethodName": "", + "borderWidth": 1520, + "borderHeight": 960 + }, + "displayList": [ + { + "type": "Container", + "id": "ed22e9d6-0163-442d-9108-d016721a9d38", + "label": "container_1", + "list": [ + { + "type": "Sprite", + "id": "e84fd791-8652-4ec9-b010-e739f9ba3f91", + "label": "bubble", + "scope": "CLASS", + "texture": { + "key": "sensei", + "frame": "instructions/bubble/bubble0030" + }, + "originX": 0.5006226650062267, + "originY": 0.5008976660682226 + }, + { + "prefabId": "22a41d6c-54a1-45d7-b3ae-580a36389586", + "id": "4af4b1a6-f931-4986-9d71-401e2d976546", + "unlock": [ + "x", + "y" + ], + "label": "senseiBubbleWalk2", + "scope": "CLASS", + "x": 226, + "y": 11 + }, + { + "prefabId": "22a41d6c-54a1-45d7-b3ae-580a36389586", + "id": "1488d3e7-9e54-4d92-8641-6e0a434aec0c", + "unlock": [ + "x", + "y", + "scaleX", + "scaleY" + ], + "label": "senseiBubbleWalk1", + "scope": "CLASS", + "x": -102, + "y": 11, + "scaleX": -1, + "scaleY": 1 + }, + { + "type": "Image", + "id": "047fedb6-2c67-4b2f-9cb0-3033708b696c", + "label": "maskImage", + "scope": "CLASS", + "texture": { + "key": "sensei", + "frame": "instructions/bubble/mask" + }, + "originX": 0.5006226650062267, + "originY": 0.5008976660682226, + "visible": false + } + ] + } + ], + "plainObjects": [], + "meta": { + "app": "Phaser Editor 2D - Scene Editor", + "url": "https://phasereditor2d.com", + "contentType": "phasereditor2d.core.scene.SceneContentType", + "version": 4 + }, + "lists": [ + { + "id": "e48b384d-d017-4550-8aa7-33ee9a1985cb", + "label": "walks", + "objectIds": [ + "1488d3e7-9e54-4d92-8641-6e0a434aec0c", + "4af4b1a6-f931-4986-9d71-401e2d976546" + ] + } + ] +} \ No newline at end of file From 27b1310798e1080900a475df261f854f84d8e1e1 Mon Sep 17 00:00:00 2001 From: wizguin <16276645+wizguin@users.noreply.github.com> Date: Fri, 25 Aug 2023 23:13:10 +0100 Subject: [PATCH 160/200] cardjitsu: Added SenseiBubbleWalk --- .../instructions/bubble/SenseiBubbleWalk.js | 154 ++++++++++++++++ .../bubble/SenseiBubbleWalk.scene | 172 ++++++++++++++++++ 2 files changed, 326 insertions(+) create mode 100644 src/scenes/games/sensei/instructions/bubble/SenseiBubbleWalk.js create mode 100644 src/scenes/games/sensei/instructions/bubble/SenseiBubbleWalk.scene diff --git a/src/scenes/games/sensei/instructions/bubble/SenseiBubbleWalk.js b/src/scenes/games/sensei/instructions/bubble/SenseiBubbleWalk.js new file mode 100644 index 00000000..36ad9c16 --- /dev/null +++ b/src/scenes/games/sensei/instructions/bubble/SenseiBubbleWalk.js @@ -0,0 +1,154 @@ +/* START OF COMPILED CODE */ + +import BaseContainer from "../../../../base/BaseContainer"; +/* START-USER-IMPORTS */ +/* END-USER-IMPORTS */ + +export default class SenseiBubbleWalk extends BaseContainer { + + constructor(scene, x, y) { + super(scene, x ?? 0, y ?? 0); + + /** @type {Phaser.GameObjects.Sprite} */ + this.body; + /** @type {Phaser.GameObjects.Sprite} */ + this.sensei; + /** @type {Phaser.GameObjects.Sprite} */ + this.beltLine; + /** @type {Phaser.GameObjects.Sprite} */ + this.belt; + /** @type {Phaser.GameObjects.Sprite} */ + this.frontArm; + + + // backFoot + const backFoot = scene.add.sprite(0, 0, "sensei", "instructions/bubble/walk/1_instance3_1"); + this.add(backFoot); + + // frontFoot + const frontFoot = scene.add.sprite(0, 0, "sensei", "instructions/bubble/walk/2_instance5_1"); + this.add(frontFoot); + + // backArmLine + const backArmLine = scene.add.sprite(0, 0, "sensei", "instructions/bubble/walk/3_instance7_1"); + this.add(backArmLine); + + // backArm + const backArm = scene.add.sprite(0, 0, "sensei", "instructions/bubble/walk/4_backarm_1"); + this.add(backArm); + + // bodyLine + const bodyLine = scene.add.sprite(0, 0, "sensei", "instructions/bubble/walk/5_instance8_1"); + this.add(bodyLine); + + // body + const body = scene.add.sprite(0, 0, "sensei", "instructions/bubble/walk/6_body_1"); + this.add(body); + + // shadow + const shadow = scene.add.sprite(0, 0, "sensei", "instructions/bubble/walk/7_instance10_1"); + this.add(shadow); + + // eye + const eye = scene.add.sprite(0, 0, "sensei", "instructions/bubble/walk/8_instance11_1"); + this.add(eye); + + // pupil + const pupil = scene.add.sprite(0, 0, "sensei", "instructions/bubble/walk/9_instance13_1"); + this.add(pupil); + + // sensei + const sensei = scene.add.sprite(0, 0, "sensei", "instructions/bubble/walk/10_sensei_1"); + this.add(sensei); + + // beak + const beak = scene.add.sprite(0, 0, "sensei", "instructions/bubble/walk/11_instance18_1"); + this.add(beak); + + // beltLine + const beltLine = scene.add.sprite(0, 0, "sensei", "instructions/bubble/walk/12_beltline_1"); + this.add(beltLine); + + // belt + const belt = scene.add.sprite(0, 0, "sensei", "instructions/bubble/walk/13_belt_1"); + this.add(belt); + + // frontArmLine + const frontArmLine = scene.add.sprite(0, 0, "sensei", "instructions/bubble/walk/14_instance22_1"); + this.add(frontArmLine); + + // frontArm + const frontArm = scene.add.sprite(0, 0, "sensei", "instructions/bubble/walk/15_frontarm_1"); + this.add(frontArm); + + this.body = body; + this.sensei = sensei; + this.beltLine = beltLine; + this.belt = belt; + this.frontArm = frontArm; + + /* START-USER-CTR-CODE */ + + this.end = 70 + + this.createAnims() + + // Start hidden + this.close() + + /* END-USER-CTR-CODE */ + } + + + /* START-USER-CODE */ + + createAnims() { + this.list.forEach(child => this.createAnim(child)) + } + + createAnim(child) { + const animKey = this.getAnimKey(child) + + const frameNames = this.scene.anims.generateFrameNames('sensei', { + prefix: `${animKey}_`, + start: 1, + end: this.end + }) + + this.scene.anims.create({ + key: animKey, + frames: frameNames, + frameRate: 24, + repeat: 0 + }) + } + + playAnim(child) { + const animKey = this.getAnimKey(child) + + child.play(animKey) + } + + getAnimKey(child) { + const frameName = child.frame.name + + // Remove frame number (_1) from frameName + return frameName.split('_').slice(0, -1).join('_') + } + + show() { + this.list.forEach(child => this.playAnim(child)) + + super.show() + } + + close() { + super.close() + + this.list.forEach(child => child.stop()) + } + + /* END-USER-CODE */ +} + +/* END OF COMPILED CODE */ diff --git a/src/scenes/games/sensei/instructions/bubble/SenseiBubbleWalk.scene b/src/scenes/games/sensei/instructions/bubble/SenseiBubbleWalk.scene new file mode 100644 index 00000000..e148ec80 --- /dev/null +++ b/src/scenes/games/sensei/instructions/bubble/SenseiBubbleWalk.scene @@ -0,0 +1,172 @@ +{ + "id": "22a41d6c-54a1-45d7-b3ae-580a36389586", + "sceneType": "PREFAB", + "settings": { + "compilerInsertSpaces": true, + "javaScriptInitFieldsInConstructor": true, + "exportClass": true, + "autoImport": true, + "superClassName": "BaseContainer", + "preloadMethodName": "", + "preloadPackFiles": [], + "createMethodName": "", + "borderWidth": 1520, + "borderHeight": 960 + }, + "displayList": [ + { + "type": "Container", + "id": "86cdbc54-b5fc-4f5e-8838-6ba02ddec0ec", + "label": "container_1", + "list": [ + { + "type": "Sprite", + "id": "5d85551b-e50c-4b54-ab8a-a160d89c1115", + "label": "backFoot", + "texture": { + "key": "sensei", + "frame": "instructions/bubble/walk/1_instance3_1" + } + }, + { + "type": "Sprite", + "id": "e6d7478e-cf80-4fd1-a855-cd86e90aca1f", + "label": "frontFoot", + "texture": { + "key": "sensei", + "frame": "instructions/bubble/walk/2_instance5_1" + } + }, + { + "type": "Sprite", + "id": "ac1d2cc7-2274-4d78-a8d5-695f8c94d1af", + "label": "backArmLine", + "texture": { + "key": "sensei", + "frame": "instructions/bubble/walk/3_instance7_1" + } + }, + { + "type": "Sprite", + "id": "95574afd-4503-46de-adf3-cee52bccec64", + "label": "backArm", + "texture": { + "key": "sensei", + "frame": "instructions/bubble/walk/4_backarm_1" + } + }, + { + "type": "Sprite", + "id": "7eba80ed-9087-49e1-84c2-01880626f3d3", + "label": "bodyLine", + "texture": { + "key": "sensei", + "frame": "instructions/bubble/walk/5_instance8_1" + } + }, + { + "type": "Sprite", + "id": "4e1d6789-c309-4469-8fb4-21a090ad217d", + "label": "body", + "scope": "CLASS", + "texture": { + "key": "sensei", + "frame": "instructions/bubble/walk/6_body_1" + } + }, + { + "type": "Sprite", + "id": "8cd82544-a3da-402a-bc39-e81b876d9dd5", + "label": "shadow", + "texture": { + "key": "sensei", + "frame": "instructions/bubble/walk/7_instance10_1" + } + }, + { + "type": "Sprite", + "id": "9475c700-6ed4-4d94-8fe8-a95c6943d2f3", + "label": "eye", + "texture": { + "key": "sensei", + "frame": "instructions/bubble/walk/8_instance11_1" + } + }, + { + "type": "Sprite", + "id": "796fb263-66db-4602-9e3b-382a7978b006", + "label": "pupil", + "texture": { + "key": "sensei", + "frame": "instructions/bubble/walk/9_instance13_1" + } + }, + { + "type": "Sprite", + "id": "3eb3e714-566f-4467-9b67-3d81f5d9e2d4", + "label": "sensei", + "scope": "CLASS", + "texture": { + "key": "sensei", + "frame": "instructions/bubble/walk/10_sensei_1" + } + }, + { + "type": "Sprite", + "id": "9fe3e127-2e32-44f3-8f68-7f258d254035", + "label": "beak", + "texture": { + "key": "sensei", + "frame": "instructions/bubble/walk/11_instance18_1" + } + }, + { + "type": "Sprite", + "id": "d566321a-b1d5-4a57-9160-8348d14945dd", + "label": "beltLine", + "scope": "CLASS", + "texture": { + "key": "sensei", + "frame": "instructions/bubble/walk/12_beltline_1" + } + }, + { + "type": "Sprite", + "id": "11bc2ebc-2fe3-4b7b-8d6d-2be4e6b78c71", + "label": "belt", + "scope": "CLASS", + "texture": { + "key": "sensei", + "frame": "instructions/bubble/walk/13_belt_1" + } + }, + { + "type": "Sprite", + "id": "57c75665-de10-4c11-9a8d-671445622e44", + "label": "frontArmLine", + "texture": { + "key": "sensei", + "frame": "instructions/bubble/walk/14_instance22_1" + } + }, + { + "type": "Sprite", + "id": "46e37fd7-de04-4caa-a063-987cb236c355", + "label": "frontArm", + "scope": "CLASS", + "texture": { + "key": "sensei", + "frame": "instructions/bubble/walk/15_frontarm_1" + } + } + ] + } + ], + "plainObjects": [], + "meta": { + "app": "Phaser Editor 2D - Scene Editor", + "url": "https://phasereditor2d.com", + "contentType": "phasereditor2d.core.scene.SceneContentType", + "version": 4 + } +} \ No newline at end of file From 8a082af5e082a9fa031da7183bf01bead4cd49f1 Mon Sep 17 00:00:00 2001 From: wizguin <16276645+wizguin@users.noreply.github.com> Date: Sun, 27 Aug 2023 19:56:54 +0100 Subject: [PATCH 161/200] cardjitsu: Added customizing to SenseiBubbleWalk --- .../instructions/bubble/SenseiBubbleWalk.js | 33 +++++++++++++++++++ .../bubble/SenseiBubbleWalk.scene | 22 ++++++++++++- 2 files changed, 54 insertions(+), 1 deletion(-) diff --git a/src/scenes/games/sensei/instructions/bubble/SenseiBubbleWalk.js b/src/scenes/games/sensei/instructions/bubble/SenseiBubbleWalk.js index 36ad9c16..f71dca37 100644 --- a/src/scenes/games/sensei/instructions/bubble/SenseiBubbleWalk.js +++ b/src/scenes/games/sensei/instructions/bubble/SenseiBubbleWalk.js @@ -9,6 +9,8 @@ export default class SenseiBubbleWalk extends BaseContainer { constructor(scene, x, y) { super(scene, x ?? 0, y ?? 0); + /** @type {Phaser.GameObjects.Sprite} */ + this.backArm; /** @type {Phaser.GameObjects.Sprite} */ this.body; /** @type {Phaser.GameObjects.Sprite} */ @@ -19,6 +21,10 @@ export default class SenseiBubbleWalk extends BaseContainer { this.belt; /** @type {Phaser.GameObjects.Sprite} */ this.frontArm; + /** @type {Phaser.GameObjects.Sprite[]} */ + this.colorSprites; + /** @type {Phaser.GameObjects.Sprite[]} */ + this.beltSprites; // backFoot @@ -81,16 +87,25 @@ export default class SenseiBubbleWalk extends BaseContainer { const frontArm = scene.add.sprite(0, 0, "sensei", "instructions/bubble/walk/15_frontarm_1"); this.add(frontArm); + // lists + const colorSprites = [body, frontArm, backArm]; + const beltSprites = [belt, beltLine]; + + this.backArm = backArm; this.body = body; this.sensei = sensei; this.beltLine = beltLine; this.belt = belt; this.frontArm = frontArm; + this.colorSprites = colorSprites; + this.beltSprites = beltSprites; /* START-USER-CTR-CODE */ this.end = 70 + this.beltColors = [16777215, 16776960, 16737792, 3394560, 13260, 13369344, 6684927, 6697728, 4473924] + this.createAnims() // Start hidden @@ -102,6 +117,24 @@ export default class SenseiBubbleWalk extends BaseContainer { /* START-USER-CODE */ + setColor(color) { + this.colorSprites.forEach(sprite => sprite.tint = this.world.getColor(color)) + } + + setBelt(rank) { + const hasBelt = rank > 0 + + this.beltSprites.forEach(sprite => sprite.visible = hasBelt) + + if (hasBelt) { + this.belt.tint = this.beltColors[rank - 1] + } + } + + setSensei(sensei) { + this.sensei.visible = sensei + } + createAnims() { this.list.forEach(child => this.createAnim(child)) } diff --git a/src/scenes/games/sensei/instructions/bubble/SenseiBubbleWalk.scene b/src/scenes/games/sensei/instructions/bubble/SenseiBubbleWalk.scene index e148ec80..8a29c6b2 100644 --- a/src/scenes/games/sensei/instructions/bubble/SenseiBubbleWalk.scene +++ b/src/scenes/games/sensei/instructions/bubble/SenseiBubbleWalk.scene @@ -50,6 +50,7 @@ "type": "Sprite", "id": "95574afd-4503-46de-adf3-cee52bccec64", "label": "backArm", + "scope": "CLASS", "texture": { "key": "sensei", "frame": "instructions/bubble/walk/4_backarm_1" @@ -168,5 +169,24 @@ "url": "https://phasereditor2d.com", "contentType": "phasereditor2d.core.scene.SceneContentType", "version": 4 - } + }, + "lists": [ + { + "id": "f960adb1-5d55-452f-89d3-8adcfcf1119f", + "label": "colorSprites", + "objectIds": [ + "4e1d6789-c309-4469-8fb4-21a090ad217d", + "46e37fd7-de04-4caa-a063-987cb236c355", + "95574afd-4503-46de-adf3-cee52bccec64" + ] + }, + { + "id": "0c502c58-3bf0-401b-afb4-6ef8cf3fe967", + "label": "beltSprites", + "objectIds": [ + "11bc2ebc-2fe3-4b7b-8d6d-2be4e6b78c71", + "d566321a-b1d5-4a57-9160-8348d14945dd" + ] + } + ] } \ No newline at end of file From 49e01291debfff8dfb981eb01b676b22a7266607 Mon Sep 17 00:00:00 2001 From: wizguin <16276645+wizguin@users.noreply.github.com> Date: Sun, 27 Aug 2023 20:04:01 +0100 Subject: [PATCH 162/200] cardjitsu: Added showCompete and showBlackBelt --- .../instructions/bubble/SenseiBubble.js | 32 +++++++++++++++++++ 1 file changed, 32 insertions(+) diff --git a/src/scenes/games/sensei/instructions/bubble/SenseiBubble.js b/src/scenes/games/sensei/instructions/bubble/SenseiBubble.js index 5af5d163..6cfe6650 100644 --- a/src/scenes/games/sensei/instructions/bubble/SenseiBubble.js +++ b/src/scenes/games/sensei/instructions/bubble/SenseiBubble.js @@ -73,6 +73,38 @@ export default class SenseiBubble extends BaseContainer { this.bubble.play('instructions/bubble') } + get clientColor() { + return this.world.client.penguin.items.all.color.id + } + + showCompete() { + this.setPlayerWalk(0) + this.setOpponentWalk(6, 2) + + this.show() + } + + showBlackBelt() { + this.setPlayerWalk(9) + this.setOpponentWalk(14, 0, true) + + this.show() + } + + setPlayerWalk(rank) { + this.setWalk(this.walks[0], this.clientColor, rank) + } + + setOpponentWalk(color, rank, sensei = false) { + this.setWalk(this.walks[1], color, rank, sensei) + } + + setWalk(walk, color, rank, sensei = false) { + walk.setColor(color) + walk.setBelt(rank) + walk.setSensei(sensei) + } + setMask() { const matrix = this.maskImage.getWorldTransformMatrix() From 28df66ff962b081e5a02b10d5b5f515ed58d3b10 Mon Sep 17 00:00:00 2001 From: wizguin <16276645+wizguin@users.noreply.github.com> Date: Tue, 29 Aug 2023 11:11:05 +0100 Subject: [PATCH 163/200] cardsjitsu: Added instructions belt prefab --- .../sensei/instructions/belt/SenseiBelt.js | 89 +++++++++++++++++++ .../sensei/instructions/belt/SenseiBelt.scene | 72 +++++++++++++++ 2 files changed, 161 insertions(+) create mode 100644 src/scenes/games/sensei/instructions/belt/SenseiBelt.js create mode 100644 src/scenes/games/sensei/instructions/belt/SenseiBelt.scene diff --git a/src/scenes/games/sensei/instructions/belt/SenseiBelt.js b/src/scenes/games/sensei/instructions/belt/SenseiBelt.js new file mode 100644 index 00000000..69749b64 --- /dev/null +++ b/src/scenes/games/sensei/instructions/belt/SenseiBelt.js @@ -0,0 +1,89 @@ +/* START OF COMPILED CODE */ + +import BaseContainer from "../../../../base/BaseContainer"; +import SimpleButton from "../../../../components/SimpleButton"; +/* START-USER-IMPORTS */ +/* END-USER-IMPORTS */ + +export default class SenseiBelt extends BaseContainer { + + constructor(scene, x, y) { + super(scene, x ?? 0, y ?? 0); + + /** @type {Phaser.GameObjects.Image} */ + this.color; + + + // belt + const belt = scene.add.image(0, 0, "sensei", "instructions/belt/belt"); + belt.setOrigin(0.503030303030303, 0.5037037037037037); + this.add(belt); + + // color + const color = scene.add.image(1, -1, "sensei", "instructions/belt/color"); + color.setOrigin(0.503448275862069, 0.5); + this.add(color); + + // shadow + const shadow = scene.add.image(1, 4, "sensei", "instructions/belt/shadow"); + shadow.setOrigin(0.503448275862069, 0.5); + this.add(shadow); + + // belt (components) + const beltSimpleButton = new SimpleButton(belt); + beltSimpleButton.callback = () => this.onBeltClick(); + + this.color = color; + + /* START-USER-CTR-CODE */ + + this.current = 0 + this.beltColors = [16777215, 16776960, 16737792, 3394560, 13260, 13369344, 6684927, 6697728, 4473924] + + this.tween = null + + /* END-USER-CTR-CODE */ + } + + + /* START-USER-CODE */ + + show() { + this.current = 0 + + // Float + this.tween = this.scene.tweens.add({ + targets: this, + y: this.y + 10, + duration: 333, + repeat: -1, + yoyo: true, + ease: Phaser.Math.Easing.Quadratic.InOut + }) + + this.updateColor() + + super.show() + } + + onBeltClick() { + this.current = (this.current + 1) % this.beltColors.length + + this.updateColor() + } + + updateColor() { + this.color.tint = this.beltColors[this.current] + } + + stop() { + if (this.tween) { + this.tween.remove() + this.tween = null + } + } + + /* END-USER-CODE */ +} + +/* END OF COMPILED CODE */ diff --git a/src/scenes/games/sensei/instructions/belt/SenseiBelt.scene b/src/scenes/games/sensei/instructions/belt/SenseiBelt.scene new file mode 100644 index 00000000..b7fe3b04 --- /dev/null +++ b/src/scenes/games/sensei/instructions/belt/SenseiBelt.scene @@ -0,0 +1,72 @@ +{ + "id": "4f8d4522-9b0f-44e6-b42b-864b442c8610", + "sceneType": "PREFAB", + "settings": { + "compilerInsertSpaces": true, + "javaScriptInitFieldsInConstructor": true, + "exportClass": true, + "autoImport": true, + "superClassName": "BaseContainer", + "preloadMethodName": "", + "preloadPackFiles": [], + "createMethodName": "", + "borderWidth": 1520, + "borderHeight": 960 + }, + "displayList": [ + { + "type": "Container", + "id": "a003baf5-af83-437e-b5a5-b9e160ffe729", + "label": "container_1", + "list": [ + { + "type": "Image", + "id": "fa0da86e-f10c-45db-9fcc-5cc2bb7e828f", + "label": "belt", + "components": [ + "SimpleButton" + ], + "SimpleButton.callback": "() => this.onBeltClick()", + "texture": { + "key": "sensei", + "frame": "instructions/belt/belt" + }, + "originX": 0.503030303030303, + "originY": 0.5037037037037037 + }, + { + "type": "Image", + "id": "26263dde-bd9a-4b97-be6e-73708819290f", + "label": "color", + "scope": "CLASS", + "texture": { + "key": "sensei", + "frame": "instructions/belt/color" + }, + "x": 1, + "y": -1, + "originX": 0.503448275862069 + }, + { + "type": "Image", + "id": "3d77bfd2-99f5-4d34-bf08-b3aeccb56d78", + "label": "shadow", + "texture": { + "key": "sensei", + "frame": "instructions/belt/shadow" + }, + "x": 1, + "y": 4, + "originX": 0.503448275862069 + } + ] + } + ], + "plainObjects": [], + "meta": { + "app": "Phaser Editor 2D - Scene Editor", + "url": "https://phasereditor2d.com", + "contentType": "phasereditor2d.core.scene.SceneContentType", + "version": 4 + } +} \ No newline at end of file From f0f06d35f4ef04e93213971c9154e0e98e625014 Mon Sep 17 00:00:00 2001 From: wizguin <16276645+wizguin@users.noreply.github.com> Date: Tue, 29 Aug 2023 22:20:16 +0100 Subject: [PATCH 164/200] Add no purchase popup check when adding item --- src/engine/network/plugins/plugins/Item.js | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/engine/network/plugins/plugins/Item.js b/src/engine/network/plugins/plugins/Item.js index e7feac90..0a767529 100644 --- a/src/engine/network/plugins/plugins/Item.js +++ b/src/engine/network/plugins/plugins/Item.js @@ -40,6 +40,12 @@ export default class Item extends Plugin { // Update catalog coins this.interface.updateCatalogCoins(args.coins) + // Check no purchase popup + const data = this.crumbs.items[item] + if ('no_purchase_popup' in data && data.no_purchase_popup === 1) { + return + } + // Show prompt let text = `${args.name}\nhas been added to your inventory.` this.interface.prompt.showWindow(text, 'single') From a8c6c9e975a920f1b5913cf5b621edd8e3b63225 Mon Sep 17 00:00:00 2001 From: wizguin <16276645+wizguin@users.noreply.github.com> Date: Tue, 29 Aug 2023 22:21:01 +0100 Subject: [PATCH 165/200] cardjitsu: Play intro when user has no deck --- src/scenes/games/sensei/Sensei.js | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/src/scenes/games/sensei/Sensei.js b/src/scenes/games/sensei/Sensei.js index d0dc138f..c764a97d 100644 --- a/src/scenes/games/sensei/Sensei.js +++ b/src/scenes/games/sensei/Sensei.js @@ -8,6 +8,7 @@ import SenseiMatch from "./match/SenseiMatch"; /* START-USER-IMPORTS */ import SenseiInstructions from './instructions/SenseiInstructions' +import { intro } from './config/SenseiSequences' /* END-USER-IMPORTS */ @@ -72,6 +73,10 @@ export default class Sensei extends GameScene { /* START-USER-CODE */ + get userHasDeck() { + return this.world.client.inventory.award.includes(821) + } + create() { super.create() @@ -82,6 +87,11 @@ export default class Sensei extends GameScene { // Add instructions into widget this.widget.addAt(this.instructions, this.widget.speechIndex) + if (!this.userHasDeck) { + this.startSequence(intro) + return + } + this.showStartMenu() } @@ -101,7 +111,6 @@ export default class Sensei extends GameScene { } showMenu(menu) { - this.hideInstructions() this.widget.playWait() this.menu.show(menu) } From 321b502fba6313dee93f0ac7c5a0b8dfe4f39faa Mon Sep 17 00:00:00 2001 From: wizguin <16276645+wizguin@users.noreply.github.com> Date: Tue, 29 Aug 2023 22:21:41 +0100 Subject: [PATCH 166/200] cardjitsu: Add clickable deck to inventory --- .../interface/game/playercard/inventory/Inventory.js | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/scenes/interface/game/playercard/inventory/Inventory.js b/src/scenes/interface/game/playercard/inventory/Inventory.js index 84e42a84..33a4cc87 100644 --- a/src/scenes/interface/game/playercard/inventory/Inventory.js +++ b/src/scenes/interface/game/playercard/inventory/Inventory.js @@ -234,6 +234,8 @@ export default class Inventory extends BaseContainer { this.pageSize = 12 this.filter = null + this.cardDeckId = 821 + this.inventoryLoader = new InventoryLoader(scene, this) this.inventory_bg.setInteractive({ pixelPerfect: true }) @@ -302,6 +304,11 @@ export default class Inventory extends BaseContainer { if (!item || !item.id || !item.active) return + if (item.id === this.cardDeckId) { + this.interface.loadWidget('NinjaProgress') + return + } + this.network.send('update_player', { item: item.id }) } From 01071dc7ba2cacf40acc2eace8f83aeea8ab4a24 Mon Sep 17 00:00:00 2001 From: wizguin <16276645+wizguin@users.noreply.github.com> Date: Wed, 30 Aug 2023 14:38:54 +0100 Subject: [PATCH 167/200] cardjitsu: Add triggerMat function --- src/scenes/rooms/dojo/Dojo.js | 23 +++++++++++++++++++---- 1 file changed, 19 insertions(+), 4 deletions(-) diff --git a/src/scenes/rooms/dojo/Dojo.js b/src/scenes/rooms/dojo/Dojo.js index fa368813..01173830 100644 --- a/src/scenes/rooms/dojo/Dojo.js +++ b/src/scenes/rooms/dojo/Dojo.js @@ -25,10 +25,10 @@ export default class Dojo extends RoomScene { this.roomTriggers = { 'door': () => this.triggerRoom(321, 780, 640), 'sensei': () => this.triggerGame(951), - 'table200': () => {}, - 'table201': () => {}, - 'table202': () => {}, - 'table203': () => {} + 'table200': () => this.triggerMat(200), + 'table201': () => this.triggerMat(201), + 'table202': () => this.triggerMat(202), + 'table203': () => this.triggerMat(203) } this.roomAnims = true @@ -187,6 +187,21 @@ export default class Dojo extends RoomScene { this.sensei.play('sensei_out') } + triggerMat(id) { + if (!this.userHasDeck) { + this.interface.prompt.showWindow(this.getString('starter_deck_prompt')) + return + } + + const text = this.getString('card_prompt') + + this.interface.prompt.showWindow(text, 'dual', () => { + this.network.send('join_waddle', { waddle: id }) + + this.interface.prompt.window.visible = false + }) + } + /* END-USER-CODE */ } From 8554dd9a9cae9a229933812e63e1895c7ec8399b Mon Sep 17 00:00:00 2001 From: wizguin <16276645+wizguin@users.noreply.github.com> Date: Fri, 1 Sep 2023 00:22:50 +0100 Subject: [PATCH 168/200] Reimplement waddle ui --- src/engine/network/plugins/plugins/Waddle.js | 29 ++++ src/scenes/interface/game/main/Main.js | 25 ++- src/scenes/interface/game/main/Main.scene | 65 +++----- src/scenes/interface/game/waddle/Waddle.js | 133 +++++++++++++++ src/scenes/interface/game/waddle/Waddle.scene | 155 ++++++++++++++++++ .../game/waddle/waddle_item/WaddleItem.js | 93 +++++++++++ .../game/waddle/waddle_item/WaddleItem.scene | 67 ++++++++ src/scenes/rooms/RoomScene.js | 10 ++ 8 files changed, 529 insertions(+), 48 deletions(-) create mode 100644 src/engine/network/plugins/plugins/Waddle.js create mode 100644 src/scenes/interface/game/waddle/Waddle.js create mode 100644 src/scenes/interface/game/waddle/Waddle.scene create mode 100644 src/scenes/interface/game/waddle/waddle_item/WaddleItem.js create mode 100644 src/scenes/interface/game/waddle/waddle_item/WaddleItem.scene diff --git a/src/engine/network/plugins/plugins/Waddle.js b/src/engine/network/plugins/plugins/Waddle.js new file mode 100644 index 00000000..ee44e029 --- /dev/null +++ b/src/engine/network/plugins/plugins/Waddle.js @@ -0,0 +1,29 @@ +import Plugin from '../Plugin' + + +export default class Waddle extends Plugin { + + constructor(network) { + super(network) + this.events = { + 'get_waddles': this.getWaddles, + 'join_waddle': this.joinWaddle, + 'update_waddle': this.updateWaddle + } + } + + getWaddles(args) { + this.world.room.setWaddles(args.waddles) + } + + joinWaddle(args) { + this.interface.main.waddle.show(args.waddle, args.seat, args.game) + } + + updateWaddle(args) { + if (this.world.room.isReady) { + this.interface.main.waddle.updateWaddle(args.waddle, args.seat, args.username) + } + } + +} diff --git a/src/scenes/interface/game/main/Main.js b/src/scenes/interface/game/main/Main.js index a209f91e..270f631c 100644 --- a/src/scenes/interface/game/main/Main.js +++ b/src/scenes/interface/game/main/Main.js @@ -14,6 +14,7 @@ import Moderator from '../moderator/Moderator' import PlayerCard from '../playercard/PlayerCard' import Safe from '../floating/safe/Safe' import Settings from '../settings/Settings' +import Waddle from '../waddle/Waddle' /* START OF COMPILED CODE */ @@ -23,12 +24,12 @@ export default class Main extends BaseScene { constructor() { super("Main"); - /** @type {Phaser.GameObjects.Container} */ - this.onlinePopup; /** @type {Phaser.GameObjects.Image} */ this.popup; /** @type {Phaser.GameObjects.Text} */ this.popupText; + /** @type {Phaser.GameObjects.Container} */ + this.onlinePopup; /** @type {ChatLog} */ this.chatLog; /** @type {Phaser.GameObjects.Image} */ @@ -37,12 +38,14 @@ export default class Main extends BaseScene { this.request_button; /** @type {Phaser.GameObjects.Sprite} */ this.mod_m; - /** @type {Phaser.GameObjects.Layer} */ - this.widgetLayer; + /** @type {Waddle} */ + this.waddle; /** @type {Buddy} */ this.buddy; /** @type {PlayerCard} */ this.playerCard; + /** @type {Phaser.GameObjects.Layer} */ + this.widgetLayer; /** @type {ActionsMenu} */ this.actionsMenu; /** @type {EmotesMenu} */ @@ -53,7 +56,7 @@ export default class Main extends BaseScene { this.moderator; /** @type {Settings} */ this.settings; - /** @type {Array} */ + /** @type {Array} */ this.hideOnSleep; @@ -168,6 +171,11 @@ export default class Main extends BaseScene { // widgetLayer const widgetLayer = this.add.layer(); + // waddle + const waddle = new Waddle(this, 1099, 332); + waddle.visible = false; + widgetLayer.add(waddle); + // buddy const buddy = new Buddy(this, 1140, 436); buddy.visible = false; @@ -204,7 +212,7 @@ export default class Main extends BaseScene { settings.visible = false; // lists - const hideOnSleep = [settings, moderator, playerCard, buddy]; + const hideOnSleep = [settings, moderator, playerCard, buddy, waddle]; // dock (components) new Interactive(dock); @@ -307,16 +315,17 @@ export default class Main extends BaseScene { mod_buttonSimpleButton.hoverOutCallback = () => this.onModOut(); mod_buttonSimpleButton.callback = () => this.onModClick(); - this.onlinePopup = onlinePopup; this.popup = popup; this.popupText = popupText; + this.onlinePopup = onlinePopup; this.chatLog = chatLog; this.crosshair = crosshair; this.request_button = request_button; this.mod_m = mod_m; - this.widgetLayer = widgetLayer; + this.waddle = waddle; this.buddy = buddy; this.playerCard = playerCard; + this.widgetLayer = widgetLayer; this.actionsMenu = actionsMenu; this.emotesMenu = emotesMenu; this.safe = safe; diff --git a/src/scenes/interface/game/main/Main.scene b/src/scenes/interface/game/main/Main.scene index 67ab7134..01b1f080 100644 --- a/src/scenes/interface/game/main/Main.scene +++ b/src/scenes/interface/game/main/Main.scene @@ -65,7 +65,6 @@ "type": "Image", "id": "aa9caccb-a731-4b3b-bfe5-984fe2f6d4ac", "label": "chat_icon", - "components": [], "texture": { "key": "main", "frame": "chat-icon" @@ -95,7 +94,6 @@ "type": "Image", "id": "b192506d-5e8d-4220-98d0-60ad0d1e2e65", "label": "emote_icon", - "components": [], "texture": { "key": "main", "frame": "emote-icon" @@ -125,7 +123,6 @@ "type": "Image", "id": "e48d913a-1f46-4bcc-ae4b-2bb6b5e7add7", "label": "action_icon", - "components": [], "texture": { "key": "main", "frame": "action-icon" @@ -155,7 +152,6 @@ "type": "Image", "id": "0b686bbe-3796-4b9d-b965-ee59d7380e1f", "label": "snowball_icon", - "components": [], "texture": { "key": "main", "frame": "snowball-icon" @@ -185,7 +181,6 @@ "type": "Image", "id": "9891188b-feea-49f2-8a70-4d5e85546a7c", "label": "chat_send_icon", - "components": [], "texture": { "key": "main", "frame": "chat-icon" @@ -215,7 +210,6 @@ "type": "Image", "id": "71da470c-c4ad-4f6e-9aa1-ddc2aed0743f", "label": "badge_member", - "components": [], "texture": { "key": "main", "frame": "badge-member" @@ -245,7 +239,6 @@ "type": "Image", "id": "9fe13e03-fd99-450c-81f6-cf6220c3c28c", "label": "buddies_icon", - "components": [], "texture": { "key": "main", "frame": "buddies-icon" @@ -275,7 +268,6 @@ "type": "Image", "id": "c3de3562-d313-43a0-b5c1-fa0cc197473a", "label": "igloo_icon", - "components": [], "texture": { "key": "main", "frame": "igloo-icon" @@ -305,7 +297,6 @@ "type": "Image", "id": "2dd95bb8-62eb-4d8a-916e-734bc44b3c9d", "label": "help_icon", - "components": [], "texture": { "key": "main", "frame": "help-icon" @@ -318,7 +309,6 @@ "id": "fcd23835-76eb-4b24-bcc1-920fa5429d8f", "label": "onlinePopup", "scope": "CLASS", - "components": [], "x": 1155, "y": 849, "visible": false, @@ -328,7 +318,6 @@ "id": "795c7f78-2f45-46e5-b2dd-de88c796aa68", "label": "popup", "scope": "CLASS", - "components": [], "texture": { "key": "main", "frame": "buddy-online" @@ -340,7 +329,6 @@ "id": "7cf83357-cb16-4ae2-94c0-49e37796db74", "label": "popupText", "scope": "CLASS", - "components": [], "x": -6, "originX": 0.5, "originY": 0.5, @@ -361,10 +349,8 @@ ], "label": "chatLog", "scope": "CLASS", - "components": [], "x": 760, - "y": 12, - "nestedPrefabs": [] + "y": 12 }, { "type": "Image", @@ -472,7 +458,6 @@ "id": "6dca3f2a-91a7-4ed4-8cf2-5a0ddf89d4c9", "label": "mod_m", "scope": "CLASS", - "components": [], "texture": { "key": "main", "frame": "mod/m" @@ -485,8 +470,21 @@ "id": "a205badf-674d-4f0f-bb3e-e687b24d30e9", "label": "widgetLayer", "scope": "CLASS", - "components": [], "list": [ + { + "prefabId": "032db1d9-1eac-4321-b4b3-ef359e514589", + "id": "0040eb03-91ac-4caf-8c26-67b736b50f60", + "unlock": [ + "x", + "y", + "visible" + ], + "label": "waddle", + "scope": "CLASS", + "x": 1099, + "y": 332, + "visible": false + }, { "prefabId": "27889184-8ae4-4103-ab57-1cbad21b7401", "id": "9acd4a58-cbf9-4751-b96a-2822f121af9c", @@ -497,11 +495,9 @@ ], "label": "buddy", "scope": "CLASS", - "components": [], "x": 1140, "y": 436, - "visible": false, - "nestedPrefabs": [] + "visible": false }, { "prefabId": "aa26f680-5a55-46f1-b89f-e40211af8a8d", @@ -513,11 +509,9 @@ ], "label": "playerCard", "scope": "CLASS", - "components": [], "x": 446, "y": 436, - "visible": false, - "nestedPrefabs": [] + "visible": false } ] }, @@ -531,11 +525,9 @@ ], "label": "actionsMenu", "scope": "CLASS", - "components": [], "x": 366, "y": 864, - "visible": false, - "nestedPrefabs": [] + "visible": false }, { "prefabId": "0dee3174-7c8b-4158-b686-0fbea0d0c1f1", @@ -547,11 +539,9 @@ ], "label": "emotesMenu", "scope": "CLASS", - "components": [], "x": 306, "y": 864, - "visible": false, - "nestedPrefabs": [] + "visible": false }, { "prefabId": "847139cb-5cc3-48bc-be0b-14aabf820c56", @@ -563,11 +553,9 @@ ], "label": "safe", "scope": "CLASS", - "components": [], "x": 246, "y": 925, - "visible": false, - "nestedPrefabs": [] + "visible": false }, { "prefabId": "d44a536e-8824-4c11-8cdd-649f5629a29c", @@ -579,11 +567,9 @@ ], "label": "moderator", "scope": "CLASS", - "components": [], "x": 760, "y": 480, - "visible": false, - "nestedPrefabs": [] + "visible": false }, { "prefabId": "f2e8b538-6469-4a45-b23d-beac8cbf03a0", @@ -595,11 +581,9 @@ ], "label": "settings", "scope": "CLASS", - "components": [], "x": 760, "y": 480, - "visible": false, - "nestedPrefabs": [] + "visible": false } ], "plainObjects": [], @@ -607,7 +591,7 @@ "app": "Phaser Editor 2D - Scene Editor", "url": "https://phasereditor2d.com", "contentType": "phasereditor2d.core.scene.SceneContentType", - "version": 3 + "version": 4 }, "lists": [ { @@ -617,7 +601,8 @@ "4904443b-abe1-429f-9557-f064db674790", "7b10953c-f288-40da-8b3f-44af0dea100d", "9770a528-0c5a-4720-a6db-eabd53c787e1", - "9acd4a58-cbf9-4751-b96a-2822f121af9c" + "9acd4a58-cbf9-4751-b96a-2822f121af9c", + "0040eb03-91ac-4caf-8c26-67b736b50f60" ] } ] diff --git a/src/scenes/interface/game/waddle/Waddle.js b/src/scenes/interface/game/waddle/Waddle.js new file mode 100644 index 00000000..c8188cb1 --- /dev/null +++ b/src/scenes/interface/game/waddle/Waddle.js @@ -0,0 +1,133 @@ +/* START OF COMPILED CODE */ + +import BaseContainer from "../../../base/BaseContainer"; +import DraggableContainer from "../../../components/DraggableContainer"; +import WaddleItem from "./waddle_item/WaddleItem"; +import Button from "../../../components/Button"; +/* START-USER-IMPORTS */ +/* END-USER-IMPORTS */ + +export default class Waddle extends BaseContainer { + + constructor(scene, x, y) { + super(scene, x ?? 760, y ?? 480); + + /** @type {Phaser.GameObjects.Text} */ + this.text; + /** @type {WaddleItem[]} */ + this.items; + + + // bg + const bg = scene.add.image(0, -16, "main", "waddle"); + this.add(bg); + + // tab + const tab = scene.add.image(0, -190, "main", "tab-2"); + this.add(tab); + + // waddle_item_3 + const waddle_item_3 = new WaddleItem(scene, 0, 100); + this.add(waddle_item_3); + + // waddle_item_2 + const waddle_item_2 = new WaddleItem(scene, 0, 48); + this.add(waddle_item_2); + + // waddle_item_1 + const waddle_item_1 = new WaddleItem(scene, 0, -4); + this.add(waddle_item_1); + + // waddle_item + const waddle_item = new WaddleItem(scene, 0, -56); + this.add(waddle_item); + + // text + const text = scene.add.text(0, -122, "", {}); + text.setOrigin(0.5, 0.5); + text.setStyle({ "align": "center", "color": "#000000", "fixedWidth":420,"fontFamily": "Arial Narrow", "fontSize": "32px" }); + this.add(text); + + // x_button + const x_button = scene.add.image(178, -126, "main", "blue-button"); + this.add(x_button); + + // blue_x + const blue_x = scene.add.image(178, -128, "main", "blue-x"); + this.add(blue_x); + + // lists + const items = [waddle_item, waddle_item_1, waddle_item_2, waddle_item_3]; + + // this (components) + const thisDraggableContainer = new DraggableContainer(this); + thisDraggableContainer.handle = bg; + + // x_button (components) + const x_buttonButton = new Button(x_button); + x_buttonButton.spriteName = "blue-button"; + x_buttonButton.callback = () => this.close(); + + this.text = text; + this.items = items; + + /* START-USER-CTR-CODE */ + + this.activeWaddleId = null + + /* END-USER-CTR-CODE */ + } + + + /* START-USER-CODE */ + + get activeWaddle() { + return this.world.room.waddles[this.activeWaddleId] + } + + setText(game) { + this.text.text = this.getString(game) + } + + show(waddle, seat, game) { + this.activeWaddleId = waddle + this.enterSeat(waddle, seat) + + this.setText(game) + + this.items.map(item => item.hideItem()) + + for (let [index, username] of this.activeWaddle.entries()) { + this.items[index].setItem(username) + } + + super.show() + } + + close() { + this.network.send('leave_waddle') + + this.leaveSeat() + this.activeWaddleId = null + + super.close() + } + + updateWaddle(waddle, seat, username) { + if (waddle === this.activeWaddleId) { + this.items[seat].setItem(username) + } + } + + enterSeat() { + + } + + leaveSeat() { + + } + + /* END-USER-CODE */ +} + +/* END OF COMPILED CODE */ diff --git a/src/scenes/interface/game/waddle/Waddle.scene b/src/scenes/interface/game/waddle/Waddle.scene new file mode 100644 index 00000000..1c39bfee --- /dev/null +++ b/src/scenes/interface/game/waddle/Waddle.scene @@ -0,0 +1,155 @@ +{ + "id": "032db1d9-1eac-4321-b4b3-ef359e514589", + "sceneType": "PREFAB", + "settings": { + "compilerInsertSpaces": true, + "javaScriptInitFieldsInConstructor": true, + "exportClass": true, + "autoImport": true, + "superClassName": "BaseContainer", + "preloadMethodName": "", + "preloadPackFiles": [], + "createMethodName": "", + "borderWidth": 1520, + "borderHeight": 960 + }, + "displayList": [ + { + "type": "Container", + "id": "729c65f6-2998-4823-97ff-2ba3f648dd9a", + "label": "container_1", + "components": [ + "DraggableContainer" + ], + "DraggableContainer.handle": "bg", + "x": 760, + "y": 480, + "list": [ + { + "type": "Image", + "id": "0cec3224-ef6f-45d5-923a-3dbff900f144", + "label": "bg", + "texture": { + "key": "main", + "frame": "waddle" + }, + "y": -16 + }, + { + "type": "Image", + "id": "d38ec65c-43c9-47d1-8bba-246ed197fe3e", + "label": "tab", + "texture": { + "key": "main", + "frame": "tab-2" + }, + "y": -190 + }, + { + "prefabId": "64de3f26-671d-4f1f-acbf-49ffc1eeaa13", + "id": "bbf90d57-ecc8-4fb3-8815-2baa1aec66a7", + "unlock": [ + "x", + "y" + ], + "label": "waddle_item_3", + "x": 0, + "y": 100 + }, + { + "prefabId": "64de3f26-671d-4f1f-acbf-49ffc1eeaa13", + "id": "3588c486-0906-4565-b511-30925e03b354", + "unlock": [ + "x", + "y" + ], + "label": "waddle_item_2", + "x": 0, + "y": 48 + }, + { + "prefabId": "64de3f26-671d-4f1f-acbf-49ffc1eeaa13", + "id": "d72de3b8-e1eb-4a3d-9f4a-438af119150a", + "unlock": [ + "x", + "y" + ], + "label": "waddle_item_1", + "x": 0, + "y": -4 + }, + { + "prefabId": "64de3f26-671d-4f1f-acbf-49ffc1eeaa13", + "id": "7fb1cdfc-e641-4100-8c14-86058fbefa78", + "unlock": [ + "x", + "y" + ], + "label": "waddle_item", + "x": 0, + "y": -56 + }, + { + "type": "Text", + "id": "635f3877-d38a-4af7-b58d-0687b7fec219", + "label": "text", + "scope": "CLASS", + "y": -122, + "originX": 0.5, + "originY": 0.5, + "fixedWidth": 420, + "align": "center", + "fontFamily": "Arial Narrow", + "fontSize": "32px", + "color": "#000000" + }, + { + "type": "Image", + "id": "0de71d0d-c87f-4d7c-b0c5-3b77c406342c", + "label": "x_button", + "components": [ + "Button" + ], + "Button.spriteName": "blue-button", + "Button.callback": "() => this.close()", + "texture": { + "key": "main", + "frame": "blue-button" + }, + "x": 178, + "y": -126 + }, + { + "type": "Image", + "id": "fd73af25-c9a4-4206-b587-e346a9db89b5", + "label": "blue_x", + "texture": { + "key": "main", + "frame": "blue-x" + }, + "x": 178, + "y": -128 + } + ] + } + ], + "plainObjects": [], + "meta": { + "app": "Phaser Editor 2D - Scene Editor", + "url": "https://phasereditor2d.com", + "contentType": "phasereditor2d.core.scene.SceneContentType", + "version": 4 + }, + "lists": [ + { + "id": "17823bb3-1f2a-4ce2-9ec2-ca96304c0105", + "label": "items", + "objectIds": [ + "7fb1cdfc-e641-4100-8c14-86058fbefa78", + "d72de3b8-e1eb-4a3d-9f4a-438af119150a", + "3588c486-0906-4565-b511-30925e03b354", + "bbf90d57-ecc8-4fb3-8815-2baa1aec66a7" + ] + } + ] +} \ No newline at end of file diff --git a/src/scenes/interface/game/waddle/waddle_item/WaddleItem.js b/src/scenes/interface/game/waddle/waddle_item/WaddleItem.js new file mode 100644 index 00000000..e5773e38 --- /dev/null +++ b/src/scenes/interface/game/waddle/waddle_item/WaddleItem.js @@ -0,0 +1,93 @@ +/* START OF COMPILED CODE */ + +import BaseContainer from "../../../../base/BaseContainer"; +/* START-USER-IMPORTS */ +/* END-USER-IMPORTS */ + +export default class WaddleItem extends BaseContainer { + + constructor(scene, x, y) { + super(scene, x ?? 760, y ?? 480); + + /** @type {Phaser.GameObjects.Image} */ + this.icon; + /** @type {Phaser.GameObjects.Text} */ + this.username; + + + // waddle_item + const waddle_item = scene.add.image(0, 0, "main", "buddy/item"); + this.add(waddle_item); + + // icon + const icon = scene.add.image(-137, 0, "main", "buddy/icon-load"); + this.add(icon); + + // username + const username = scene.add.text(25, 0, "", {}); + username.setOrigin(0.5, 0.5); + username.text = "Empty"; + username.setStyle({ "fixedWidth":270,"fontFamily": "Arial", "fontSize": "24px" }); + this.add(username); + + this.icon = icon; + this.username = username; + + /* START-USER-CTR-CODE */ + + this.id = null + + this.spinnerTween = scene.tweens.add({ + targets: this.icon, + angle: { from: 0, to: 180 }, + duration: 900, + repeat: -1, + ease: 'Cubic' + }) + + /* END-USER-CTR-CODE */ + } + + + /* START-USER-CODE */ + + setItem(username) { + this.show() + + this.username.text = username ? username : 'Empty' + + if (username) { + this.stopSpinner() + + let texture = username.toLowerCase() == this.world.client.penguin.username.toLowerCase() + ? 'player' + : 'none' + + this.icon.setTexture('main', `buddy/icon-${texture}`) + + } else { + this.startSpinner() + + this.icon.setTexture('main', 'buddy/icon-load') + } + } + + hideItem() { + this.close() + this.stopSpinner() + } + + startSpinner() { + this.spinnerTween.seek(0) + this.spinnerTween.resume() + } + + stopSpinner() { + this.spinnerTween.pause() + this.icon.angle = 0 + } + + /* END-USER-CODE */ +} + +/* END OF COMPILED CODE */ diff --git a/src/scenes/interface/game/waddle/waddle_item/WaddleItem.scene b/src/scenes/interface/game/waddle/waddle_item/WaddleItem.scene new file mode 100644 index 00000000..a9031aa6 --- /dev/null +++ b/src/scenes/interface/game/waddle/waddle_item/WaddleItem.scene @@ -0,0 +1,67 @@ +{ + "id": "64de3f26-671d-4f1f-acbf-49ffc1eeaa13", + "sceneType": "PREFAB", + "settings": { + "compilerInsertSpaces": true, + "javaScriptInitFieldsInConstructor": true, + "exportClass": true, + "autoImport": true, + "superClassName": "BaseContainer", + "preloadMethodName": "", + "preloadPackFiles": [], + "createMethodName": "", + "borderWidth": 1520, + "borderHeight": 960 + }, + "displayList": [ + { + "type": "Container", + "id": "460fe828-2a5c-48b5-8e64-374780777136", + "label": "container_1", + "x": 760, + "y": 480, + "list": [ + { + "type": "Image", + "id": "13a92a5e-3ca1-4352-a27b-7613c2243d6b", + "label": "waddle_item", + "texture": { + "key": "main", + "frame": "buddy/item" + } + }, + { + "type": "Image", + "id": "93bfe9fd-2100-410e-928f-454002f9117d", + "label": "icon", + "scope": "CLASS", + "texture": { + "key": "main", + "frame": "buddy/icon-load" + }, + "x": -137 + }, + { + "type": "Text", + "id": "730363a5-60c9-4711-80a6-53256a41c9bd", + "label": "username", + "scope": "CLASS", + "x": 25, + "originX": 0.5, + "originY": 0.5, + "text": "Empty", + "fixedWidth": 270, + "fontFamily": "Arial", + "fontSize": "24px" + } + ] + } + ], + "plainObjects": [], + "meta": { + "app": "Phaser Editor 2D - Scene Editor", + "url": "https://phasereditor2d.com", + "contentType": "phasereditor2d.core.scene.SceneContentType", + "version": 4 + } +} \ No newline at end of file diff --git a/src/scenes/rooms/RoomScene.js b/src/scenes/rooms/RoomScene.js index e7a58d02..fef4066c 100644 --- a/src/scenes/rooms/RoomScene.js +++ b/src/scenes/rooms/RoomScene.js @@ -21,6 +21,7 @@ export default class RoomScene extends BaseScene { this.waiting = [] this.tables + this.waddles } get client() { @@ -46,6 +47,7 @@ export default class RoomScene extends BaseScene { this.setMusic() if (this.tables) this.sendGetTables() + if (this.waddles) this.sendGetWaddles() this.interface.showInterface() } @@ -102,6 +104,10 @@ export default class RoomScene extends BaseScene { this.network.send('get_tables') } + sendGetWaddles() { + this.network.send('get_waddles') + } + getTable(id) { return this[`table${id}`] } @@ -133,6 +139,10 @@ export default class RoomScene extends BaseScene { } } + setWaddles(waddles) { + this.waddles = waddles + } + onSnowballComplete(x, y) { // To be overridden in derived class } From 56d17011360eb2187d8c41c69b8aa76b73b2ddf4 Mon Sep 17 00:00:00 2001 From: wizguin <16276645+wizguin@users.noreply.github.com> Date: Sat, 2 Sep 2023 15:13:07 +0100 Subject: [PATCH 169/200] Implement waddle enter/leave seat --- src/engine/world/penguin/ClientController.js | 17 +++++++++++---- src/scenes/games/GameScene.js | 3 +++ src/scenes/interface/game/waddle/Waddle.js | 22 +++++++++++++++++--- src/scenes/rooms/RoomScene.js | 4 ++++ 4 files changed, 39 insertions(+), 7 deletions(-) diff --git a/src/engine/world/penguin/ClientController.js b/src/engine/world/penguin/ClientController.js index 0b797993..863e8673 100644 --- a/src/engine/world/penguin/ClientController.js +++ b/src/engine/world/penguin/ClientController.js @@ -271,14 +271,23 @@ export default class ClientController { this.network.send('join_table', { table: id }) } - sendMoveToSeat(table, seat) { - table = this.world.room.getTable(table) + sendMoveToSeat(id, seat, type = 'table') { + let container + + switch (type) { + case 'table': + container = this.world.room.getTable(id) + break + case 'waddle': + container = this.world.room.getWaddle(id) + break + } - if (!table) { + if (!container) { return } - seat = table[`seat${seat}`] + seat = container[`seat${seat}`] if (seat) { this.activeSeat = seat diff --git a/src/scenes/games/GameScene.js b/src/scenes/games/GameScene.js index c455e053..64e94f0a 100644 --- a/src/scenes/games/GameScene.js +++ b/src/scenes/games/GameScene.js @@ -27,7 +27,10 @@ export default class GameScene extends BaseScene { this._create() this.setMusic() + this.interface.hideLoading() + + this.world.client.activeSeat = null } stop() { diff --git a/src/scenes/interface/game/waddle/Waddle.js b/src/scenes/interface/game/waddle/Waddle.js index c8188cb1..0306ef78 100644 --- a/src/scenes/interface/game/waddle/Waddle.js +++ b/src/scenes/interface/game/waddle/Waddle.js @@ -85,6 +85,22 @@ export default class Waddle extends BaseContainer { return this.world.room.waddles[this.activeWaddleId] } + get activeWaddleContainer() { + return this.getWaddleContainer(this.activeWaddleId) + } + + getWaddleContainer(waddle) { + return this.world.room.getWaddle(waddle) + } + + getSeatPoint(waddle, seat) { + return this.getWaddleContainer(waddle)[`seat${seat}`] + } + + getDonePoint() { + return this.getWaddleContainer(waddle)[`done${seat}`] + } + setText(game) { this.text.text = this.getString(game) } @@ -119,12 +135,12 @@ export default class Waddle extends BaseContainer { } } - enterSeat() { - + enterSeat(waddle, seat) { + this.world.client.sendMoveToSeat(waddle, seat, 'waddle') } leaveSeat() { - + this.world.client.sendLeaveSeat() } /* END-USER-CODE */ diff --git a/src/scenes/rooms/RoomScene.js b/src/scenes/rooms/RoomScene.js index fef4066c..bd4a5b8d 100644 --- a/src/scenes/rooms/RoomScene.js +++ b/src/scenes/rooms/RoomScene.js @@ -112,6 +112,10 @@ export default class RoomScene extends BaseScene { return this[`table${id}`] } + getWaddle(id) { + return this[`waddle${id}`] + } + setTables(tables) { this.tables = tables From 92b56f50369cc1858bde6ea6166da719c6f58222 Mon Sep 17 00:00:00 2001 From: wizguin <16276645+wizguin@users.noreply.github.com> Date: Sat, 2 Sep 2023 15:14:37 +0100 Subject: [PATCH 170/200] cardjitsu: Updated waddle prefabs --- src/scenes/rooms/dojo/waddle/Waddle200.js | 93 ++++++++++++ src/scenes/rooms/dojo/waddle/Waddle200.scene | 136 +++++++++++++++++ src/scenes/rooms/dojo/waddle/Waddle201.js | 95 ++++++++++++ src/scenes/rooms/dojo/waddle/Waddle201.scene | 137 ++++++++++++++++++ src/scenes/rooms/dojo/waddle/Waddle202.js | 93 ++++++++++++ src/scenes/rooms/dojo/waddle/Waddle202.scene | 136 +++++++++++++++++ src/scenes/rooms/dojo/waddle/Waddle203.js | 95 ++++++++++++ src/scenes/rooms/dojo/waddle/Waddle203.scene | 137 ++++++++++++++++++ src/scenes/shared_prefabs/card/CardTable1.js | 54 ------- .../shared_prefabs/card/CardTable1.scene | 72 --------- src/scenes/shared_prefabs/card/CardTable2.js | 54 ------- .../shared_prefabs/card/CardTable2.scene | 72 --------- 12 files changed, 922 insertions(+), 252 deletions(-) create mode 100644 src/scenes/rooms/dojo/waddle/Waddle200.js create mode 100644 src/scenes/rooms/dojo/waddle/Waddle200.scene create mode 100644 src/scenes/rooms/dojo/waddle/Waddle201.js create mode 100644 src/scenes/rooms/dojo/waddle/Waddle201.scene create mode 100644 src/scenes/rooms/dojo/waddle/Waddle202.js create mode 100644 src/scenes/rooms/dojo/waddle/Waddle202.scene create mode 100644 src/scenes/rooms/dojo/waddle/Waddle203.js create mode 100644 src/scenes/rooms/dojo/waddle/Waddle203.scene delete mode 100644 src/scenes/shared_prefabs/card/CardTable1.js delete mode 100644 src/scenes/shared_prefabs/card/CardTable1.scene delete mode 100644 src/scenes/shared_prefabs/card/CardTable2.js delete mode 100644 src/scenes/shared_prefabs/card/CardTable2.scene diff --git a/src/scenes/rooms/dojo/waddle/Waddle200.js b/src/scenes/rooms/dojo/waddle/Waddle200.js new file mode 100644 index 00000000..c59ac331 --- /dev/null +++ b/src/scenes/rooms/dojo/waddle/Waddle200.js @@ -0,0 +1,93 @@ +/* START OF COMPILED CODE */ + +import BaseContainer from "../../../base/BaseContainer"; +import Button from "../../../components/Button"; +import ShowHint from "../../../components/ShowHint"; +import SeatPoint from "../../../shared_prefabs/seat/SeatPoint"; +/* START-USER-IMPORTS */ +/* END-USER-IMPORTS */ + +export default class Waddle200 extends BaseContainer { + + constructor(scene, x, y) { + super(scene, x ?? 0, y ?? 0); + + /** @type {SeatPoint} */ + this.done1; + /** @type {SeatPoint} */ + this.done0; + /** @type {SeatPoint} */ + this.seat1; + /** @type {SeatPoint} */ + this.seat0; + /** @type {number} */ + this.moveToX = 0; + /** @type {number} */ + this.moveToY = 0; + + + // mat + const mat = scene.add.image(0, 0, "dojo", "mat/mat_2"); + mat.setOrigin(0.5018450184501845, 0.5); + this.add(mat); + + // done1 + const done1 = new SeatPoint(scene, 51, -70); + done1.visible = false; + this.add(done1); + + // done0 + const done0 = new SeatPoint(scene, -49, -70); + done0.visible = false; + this.add(done0); + + // seat1 + const seat1 = new SeatPoint(scene, 71, -15); + seat1.visible = false; + this.add(seat1); + + // seat0 + const seat0 = new SeatPoint(scene, -60, -15); + seat0.visible = false; + this.add(seat0); + + // mat (components) + const matButton = new Button(mat); + matButton.spriteName = "mat/mat_2"; + matButton.activeFrame = false; + matButton.pixelPerfect = true; + const matShowHint = new ShowHint(mat); + matShowHint.text = "card_hint"; + + // seat1 (prefab fields) + seat1.sitFrame = 3; + seat1.donePoint = done1; + + // seat0 (prefab fields) + seat0.sitFrame = 7; + seat0.donePoint = done0; + + this.done1 = done1; + this.done0 = done0; + this.seat1 = seat1; + this.seat0 = seat0; + + /* START-USER-CTR-CODE */ + + mat.on('pointerup', (pointer) => { + if (pointer.button !== 0) { + return + } + + this.scene.world.client.sendMove(this.moveToX, this.moveToY) + }) + + /* END-USER-CTR-CODE */ + } + + + /* START-USER-CODE */ + /* END-USER-CODE */ +} + +/* END OF COMPILED CODE */ diff --git a/src/scenes/rooms/dojo/waddle/Waddle200.scene b/src/scenes/rooms/dojo/waddle/Waddle200.scene new file mode 100644 index 00000000..5cc71baa --- /dev/null +++ b/src/scenes/rooms/dojo/waddle/Waddle200.scene @@ -0,0 +1,136 @@ +{ + "id": "20915166-b810-4ea6-b9c1-62e694ee975c", + "sceneType": "PREFAB", + "settings": { + "compilerInsertSpaces": true, + "javaScriptInitFieldsInConstructor": true, + "exportClass": true, + "autoImport": true, + "superClassName": "BaseContainer", + "preloadMethodName": "", + "preloadPackFiles": [], + "createMethodName": "", + "borderWidth": 1520, + "borderHeight": 960 + }, + "displayList": [ + { + "type": "Container", + "id": "92e98aa4-f6b1-4b7b-bee2-08bc6a7b7bef", + "label": "container_1", + "list": [ + { + "type": "Image", + "id": "dd831ee5-3fa1-4d8e-adf4-273bf9ac6372", + "label": "mat", + "components": [ + "Button", + "ShowHint" + ], + "Button.spriteName": "mat/mat_2", + "Button.activeFrame": false, + "Button.pixelPerfect": true, + "ShowHint.text": "card_hint", + "texture": { + "key": "dojo", + "frame": "mat/mat_2" + }, + "originX": 0.5018450184501845 + }, + { + "prefabId": "3d402c83-0ef8-4993-bf56-3e076074ec9e", + "id": "8f21b06e-4da5-476f-b271-43aa77e5fe8a", + "unlock": [ + "x", + "y", + "visible" + ], + "label": "done1", + "scope": "CLASS", + "x": 51, + "y": -70, + "visible": false + }, + { + "prefabId": "3d402c83-0ef8-4993-bf56-3e076074ec9e", + "id": "8792809f-6079-417f-bf2c-dc42c7f25042", + "unlock": [ + "x", + "y", + "visible" + ], + "label": "done0", + "scope": "CLASS", + "x": -49, + "y": -70, + "visible": false + }, + { + "prefabId": "3d402c83-0ef8-4993-bf56-3e076074ec9e", + "id": "b3111e02-4116-43ee-98a5-e560f362f912", + "unlock": [ + "x", + "y", + "sitFrame", + "donePoint", + "visible" + ], + "label": "seat1", + "scope": "CLASS", + "sitFrame": 3, + "donePoint": "done1", + "x": 71, + "y": -15, + "visible": false + }, + { + "prefabId": "3d402c83-0ef8-4993-bf56-3e076074ec9e", + "id": "996b84da-2630-4710-9b87-35e06176a0d1", + "unlock": [ + "x", + "y", + "sitFrame", + "donePoint", + "visible" + ], + "label": "seat0", + "scope": "CLASS", + "sitFrame": 7, + "donePoint": "done0", + "x": -60, + "y": -15, + "visible": false + } + ] + } + ], + "plainObjects": [], + "meta": { + "app": "Phaser Editor 2D - Scene Editor", + "url": "https://phasereditor2d.com", + "contentType": "phasereditor2d.core.scene.SceneContentType", + "version": 4 + }, + "prefabProperties": [ + { + "name": "moveToX", + "label": "moveToX", + "tooltip": "moveToX", + "defValue": 0, + "customDefinition": false, + "type": { + "id": "number" + } + }, + { + "name": "moveToY", + "label": "moveToY", + "tooltip": "moveToY", + "defValue": 0, + "customDefinition": false, + "type": { + "id": "number" + } + } + ] +} \ No newline at end of file diff --git a/src/scenes/rooms/dojo/waddle/Waddle201.js b/src/scenes/rooms/dojo/waddle/Waddle201.js new file mode 100644 index 00000000..b2d9f364 --- /dev/null +++ b/src/scenes/rooms/dojo/waddle/Waddle201.js @@ -0,0 +1,95 @@ +/* START OF COMPILED CODE */ + +import BaseContainer from "../../../base/BaseContainer"; +import Button from "../../../components/Button"; +import ShowHint from "../../../components/ShowHint"; +import SeatPoint from "../../../shared_prefabs/seat/SeatPoint"; +/* START-USER-IMPORTS */ +/* END-USER-IMPORTS */ + +export default class Waddle201 extends BaseContainer { + + constructor(scene, x, y) { + super(scene, x ?? 0, y ?? 0); + + /** @type {SeatPoint} */ + this.done1; + /** @type {SeatPoint} */ + this.done0; + /** @type {SeatPoint} */ + this.seat1; + /** @type {SeatPoint} */ + this.seat0; + /** @type {number} */ + this.moveToX = 0; + /** @type {number} */ + this.moveToY = 0; + + + this.scaleX = -1; + + // mat + const mat = scene.add.image(0, 0, "dojo", "mat/mat_2"); + mat.setOrigin(0.5018450184501845, 0.5); + this.add(mat); + + // done1 + const done1 = new SeatPoint(scene, -49, -70); + done1.visible = false; + this.add(done1); + + // done0 + const done0 = new SeatPoint(scene, 51, -70); + done0.visible = false; + this.add(done0); + + // seat1 + const seat1 = new SeatPoint(scene, -60, -15); + seat1.visible = false; + this.add(seat1); + + // seat0 + const seat0 = new SeatPoint(scene, 71, -15); + seat0.visible = false; + this.add(seat0); + + // mat (components) + const matButton = new Button(mat); + matButton.spriteName = "mat/mat_2"; + matButton.activeFrame = false; + matButton.pixelPerfect = true; + const matShowHint = new ShowHint(mat); + matShowHint.text = "card_hint"; + + // seat1 (prefab fields) + seat1.sitFrame = 7; + seat1.donePoint = done0; + + // seat0 (prefab fields) + seat0.sitFrame = 7; + seat0.donePoint = done1; + + this.done1 = done1; + this.done0 = done0; + this.seat1 = seat1; + this.seat0 = seat0; + + /* START-USER-CTR-CODE */ + + mat.on('pointerup', (pointer) => { + if (pointer.button !== 0) { + return + } + + this.scene.world.client.sendMove(this.moveToX, this.moveToY) + }) + + /* END-USER-CTR-CODE */ + } + + + /* START-USER-CODE */ + /* END-USER-CODE */ +} + +/* END OF COMPILED CODE */ diff --git a/src/scenes/rooms/dojo/waddle/Waddle201.scene b/src/scenes/rooms/dojo/waddle/Waddle201.scene new file mode 100644 index 00000000..74fdd14f --- /dev/null +++ b/src/scenes/rooms/dojo/waddle/Waddle201.scene @@ -0,0 +1,137 @@ +{ + "id": "7554bcf3-656c-48ed-97c0-e431350f8ba5", + "sceneType": "PREFAB", + "settings": { + "compilerInsertSpaces": true, + "javaScriptInitFieldsInConstructor": true, + "exportClass": true, + "autoImport": true, + "superClassName": "BaseContainer", + "preloadMethodName": "", + "preloadPackFiles": [], + "createMethodName": "", + "borderWidth": 1520, + "borderHeight": 960 + }, + "displayList": [ + { + "type": "Container", + "id": "92e98aa4-f6b1-4b7b-bee2-08bc6a7b7bef", + "label": "container_1", + "scaleX": -1, + "list": [ + { + "type": "Image", + "id": "dd831ee5-3fa1-4d8e-adf4-273bf9ac6372", + "label": "mat", + "components": [ + "Button", + "ShowHint" + ], + "Button.spriteName": "mat/mat_2", + "Button.activeFrame": false, + "Button.pixelPerfect": true, + "ShowHint.text": "card_hint", + "texture": { + "key": "dojo", + "frame": "mat/mat_2" + }, + "originX": 0.5018450184501845 + }, + { + "prefabId": "3d402c83-0ef8-4993-bf56-3e076074ec9e", + "id": "c336d9d0-0e2b-4870-b1e8-2f5c9af610b1", + "unlock": [ + "x", + "y", + "visible" + ], + "label": "done1", + "scope": "CLASS", + "x": -49, + "y": -70, + "visible": false + }, + { + "prefabId": "3d402c83-0ef8-4993-bf56-3e076074ec9e", + "id": "28d94049-6730-4144-99b5-1c292edddc84", + "unlock": [ + "x", + "y", + "visible" + ], + "label": "done0", + "scope": "CLASS", + "x": 51, + "y": -70, + "visible": false + }, + { + "prefabId": "3d402c83-0ef8-4993-bf56-3e076074ec9e", + "id": "857d21c9-ecc6-4bdb-a431-92b238a712b0", + "unlock": [ + "x", + "y", + "sitFrame", + "donePoint", + "visible" + ], + "label": "seat1", + "scope": "CLASS", + "sitFrame": 7, + "donePoint": "done0", + "x": -60, + "y": -15, + "visible": false + }, + { + "prefabId": "3d402c83-0ef8-4993-bf56-3e076074ec9e", + "id": "6221be4c-7fee-4007-96f7-1b1500e20dd7", + "unlock": [ + "x", + "y", + "sitFrame", + "donePoint", + "visible" + ], + "label": "seat0", + "scope": "CLASS", + "sitFrame": 7, + "donePoint": "done1", + "x": 71, + "y": -15, + "visible": false + } + ] + } + ], + "plainObjects": [], + "meta": { + "app": "Phaser Editor 2D - Scene Editor", + "url": "https://phasereditor2d.com", + "contentType": "phasereditor2d.core.scene.SceneContentType", + "version": 4 + }, + "prefabProperties": [ + { + "name": "moveToX", + "label": "moveToX", + "tooltip": "moveToX", + "defValue": 0, + "customDefinition": false, + "type": { + "id": "number" + } + }, + { + "name": "moveToY", + "label": "moveToY", + "tooltip": "moveToY", + "defValue": 0, + "customDefinition": false, + "type": { + "id": "number" + } + } + ] +} \ No newline at end of file diff --git a/src/scenes/rooms/dojo/waddle/Waddle202.js b/src/scenes/rooms/dojo/waddle/Waddle202.js new file mode 100644 index 00000000..98ae59af --- /dev/null +++ b/src/scenes/rooms/dojo/waddle/Waddle202.js @@ -0,0 +1,93 @@ +/* START OF COMPILED CODE */ + +import BaseContainer from "../../../base/BaseContainer"; +import Button from "../../../components/Button"; +import ShowHint from "../../../components/ShowHint"; +import SeatPoint from "../../../shared_prefabs/seat/SeatPoint"; +/* START-USER-IMPORTS */ +/* END-USER-IMPORTS */ + +export default class Waddle202 extends BaseContainer { + + constructor(scene, x, y) { + super(scene, x ?? 0, y ?? 0); + + /** @type {SeatPoint} */ + this.done1; + /** @type {SeatPoint} */ + this.done0; + /** @type {SeatPoint} */ + this.seat1; + /** @type {SeatPoint} */ + this.seat0; + /** @type {number} */ + this.moveToX = 0; + /** @type {number} */ + this.moveToY = 0; + + + // mat + const mat = scene.add.image(0, 0, "dojo", "mat/mat_1"); + mat.setOrigin(0.5018450184501845, 0.5); + this.add(mat); + + // done1 + const done1 = new SeatPoint(scene, 69, -78); + done1.visible = false; + this.add(done1); + + // done0 + const done0 = new SeatPoint(scene, -30, -78); + done0.visible = false; + this.add(done0); + + // seat1 + const seat1 = new SeatPoint(scene, 77, -16); + seat1.visible = false; + this.add(seat1); + + // seat0 + const seat0 = new SeatPoint(scene, -54, -16); + seat0.visible = false; + this.add(seat0); + + // mat (components) + const matButton = new Button(mat); + matButton.spriteName = "mat/mat_1"; + matButton.activeFrame = false; + matButton.pixelPerfect = true; + const matShowHint = new ShowHint(mat); + matShowHint.text = "card_hint"; + + // seat1 (prefab fields) + seat1.sitFrame = 3; + seat1.donePoint = done1; + + // seat0 (prefab fields) + seat0.sitFrame = 7; + seat0.donePoint = done0; + + this.done1 = done1; + this.done0 = done0; + this.seat1 = seat1; + this.seat0 = seat0; + + /* START-USER-CTR-CODE */ + + mat.on('pointerup', (pointer) => { + if (pointer.button !== 0) { + return + } + + this.scene.world.client.sendMove(this.moveToX, this.moveToY) + }) + + /* END-USER-CTR-CODE */ + } + + + /* START-USER-CODE */ + /* END-USER-CODE */ +} + +/* END OF COMPILED CODE */ diff --git a/src/scenes/rooms/dojo/waddle/Waddle202.scene b/src/scenes/rooms/dojo/waddle/Waddle202.scene new file mode 100644 index 00000000..b892ae6a --- /dev/null +++ b/src/scenes/rooms/dojo/waddle/Waddle202.scene @@ -0,0 +1,136 @@ +{ + "id": "d6d50181-a9a9-48b9-b4a2-6096b1ad8542", + "sceneType": "PREFAB", + "settings": { + "compilerInsertSpaces": true, + "javaScriptInitFieldsInConstructor": true, + "exportClass": true, + "autoImport": true, + "superClassName": "BaseContainer", + "preloadMethodName": "", + "preloadPackFiles": [], + "createMethodName": "", + "borderWidth": 1520, + "borderHeight": 960 + }, + "displayList": [ + { + "type": "Container", + "id": "92e98aa4-f6b1-4b7b-bee2-08bc6a7b7bef", + "label": "container_1", + "list": [ + { + "type": "Image", + "id": "dd831ee5-3fa1-4d8e-adf4-273bf9ac6372", + "label": "mat", + "components": [ + "Button", + "ShowHint" + ], + "Button.spriteName": "mat/mat_1", + "Button.activeFrame": false, + "Button.pixelPerfect": true, + "ShowHint.text": "card_hint", + "texture": { + "key": "dojo", + "frame": "mat/mat_1" + }, + "originX": 0.5018450184501845 + }, + { + "prefabId": "3d402c83-0ef8-4993-bf56-3e076074ec9e", + "id": "15d4098a-2e57-4056-9c9e-14a81ad3362e", + "unlock": [ + "x", + "y", + "visible" + ], + "label": "done1", + "scope": "CLASS", + "x": 69, + "y": -78, + "visible": false + }, + { + "prefabId": "3d402c83-0ef8-4993-bf56-3e076074ec9e", + "id": "dbfd168d-a0ff-4e9b-a3c1-dc79843e1c10", + "unlock": [ + "x", + "y", + "visible" + ], + "label": "done0", + "scope": "CLASS", + "x": -30, + "y": -78, + "visible": false + }, + { + "prefabId": "3d402c83-0ef8-4993-bf56-3e076074ec9e", + "id": "e2529f8b-9377-4329-81b1-8038dbd04fcd", + "unlock": [ + "x", + "y", + "sitFrame", + "donePoint", + "visible" + ], + "label": "seat1", + "scope": "CLASS", + "sitFrame": 3, + "donePoint": "done1", + "x": 77, + "y": -16, + "visible": false + }, + { + "prefabId": "3d402c83-0ef8-4993-bf56-3e076074ec9e", + "id": "c5ebb9a9-0910-4792-b474-60a809e6e3ee", + "unlock": [ + "x", + "y", + "sitFrame", + "donePoint", + "visible" + ], + "label": "seat0", + "scope": "CLASS", + "sitFrame": 7, + "donePoint": "done0", + "x": -54, + "y": -16, + "visible": false + } + ] + } + ], + "plainObjects": [], + "meta": { + "app": "Phaser Editor 2D - Scene Editor", + "url": "https://phasereditor2d.com", + "contentType": "phasereditor2d.core.scene.SceneContentType", + "version": 4 + }, + "prefabProperties": [ + { + "name": "moveToX", + "label": "moveToX", + "tooltip": "moveToX", + "defValue": 0, + "customDefinition": false, + "type": { + "id": "number" + } + }, + { + "name": "moveToY", + "label": "moveToY", + "tooltip": "moveToY", + "defValue": 0, + "customDefinition": false, + "type": { + "id": "number" + } + } + ] +} \ No newline at end of file diff --git a/src/scenes/rooms/dojo/waddle/Waddle203.js b/src/scenes/rooms/dojo/waddle/Waddle203.js new file mode 100644 index 00000000..68feda0e --- /dev/null +++ b/src/scenes/rooms/dojo/waddle/Waddle203.js @@ -0,0 +1,95 @@ +/* START OF COMPILED CODE */ + +import BaseContainer from "../../../base/BaseContainer"; +import Button from "../../../components/Button"; +import ShowHint from "../../../components/ShowHint"; +import SeatPoint from "../../../shared_prefabs/seat/SeatPoint"; +/* START-USER-IMPORTS */ +/* END-USER-IMPORTS */ + +export default class Waddle203 extends BaseContainer { + + constructor(scene, x, y) { + super(scene, x ?? 0, y ?? 0); + + /** @type {SeatPoint} */ + this.done1; + /** @type {SeatPoint} */ + this.done0; + /** @type {SeatPoint} */ + this.seat1; + /** @type {SeatPoint} */ + this.seat0; + /** @type {number} */ + this.moveToX = 0; + /** @type {number} */ + this.moveToY = 0; + + + this.scaleX = -1; + + // mat + const mat = scene.add.image(0, 0, "dojo", "mat/mat_1"); + mat.setOrigin(0.5018450184501845, 0.5); + this.add(mat); + + // done1 + const done1 = new SeatPoint(scene, -30, -78); + done1.visible = false; + this.add(done1); + + // done0 + const done0 = new SeatPoint(scene, 69, -78); + done0.visible = false; + this.add(done0); + + // seat1 + const seat1 = new SeatPoint(scene, -54, -16); + seat1.visible = false; + this.add(seat1); + + // seat0 + const seat0 = new SeatPoint(scene, 77, -16); + seat0.visible = false; + this.add(seat0); + + // mat (components) + const matButton = new Button(mat); + matButton.spriteName = "mat/mat_1"; + matButton.activeFrame = false; + matButton.pixelPerfect = true; + const matShowHint = new ShowHint(mat); + matShowHint.text = "card_hint"; + + // seat1 (prefab fields) + seat1.sitFrame = 3; + seat1.donePoint = done0; + + // seat0 (prefab fields) + seat0.sitFrame = 7; + seat0.donePoint = done1; + + this.done1 = done1; + this.done0 = done0; + this.seat1 = seat1; + this.seat0 = seat0; + + /* START-USER-CTR-CODE */ + + mat.on('pointerup', (pointer) => { + if (pointer.button !== 0) { + return + } + + this.scene.world.client.sendMove(this.moveToX, this.moveToY) + }) + + /* END-USER-CTR-CODE */ + } + + + /* START-USER-CODE */ + /* END-USER-CODE */ +} + +/* END OF COMPILED CODE */ diff --git a/src/scenes/rooms/dojo/waddle/Waddle203.scene b/src/scenes/rooms/dojo/waddle/Waddle203.scene new file mode 100644 index 00000000..4f623fac --- /dev/null +++ b/src/scenes/rooms/dojo/waddle/Waddle203.scene @@ -0,0 +1,137 @@ +{ + "id": "d60128ff-4079-4464-b688-dbdea3c52e20", + "sceneType": "PREFAB", + "settings": { + "compilerInsertSpaces": true, + "javaScriptInitFieldsInConstructor": true, + "exportClass": true, + "autoImport": true, + "superClassName": "BaseContainer", + "preloadMethodName": "", + "preloadPackFiles": [], + "createMethodName": "", + "borderWidth": 1520, + "borderHeight": 960 + }, + "displayList": [ + { + "type": "Container", + "id": "92e98aa4-f6b1-4b7b-bee2-08bc6a7b7bef", + "label": "container_1", + "scaleX": -1, + "list": [ + { + "type": "Image", + "id": "dd831ee5-3fa1-4d8e-adf4-273bf9ac6372", + "label": "mat", + "components": [ + "Button", + "ShowHint" + ], + "Button.spriteName": "mat/mat_1", + "Button.activeFrame": false, + "Button.pixelPerfect": true, + "ShowHint.text": "card_hint", + "texture": { + "key": "dojo", + "frame": "mat/mat_1" + }, + "originX": 0.5018450184501845 + }, + { + "prefabId": "3d402c83-0ef8-4993-bf56-3e076074ec9e", + "id": "dbfd168d-a0ff-4e9b-a3c1-dc79843e1c10", + "unlock": [ + "x", + "y", + "visible" + ], + "label": "done1", + "scope": "CLASS", + "x": -30, + "y": -78, + "visible": false + }, + { + "prefabId": "3d402c83-0ef8-4993-bf56-3e076074ec9e", + "id": "15d4098a-2e57-4056-9c9e-14a81ad3362e", + "unlock": [ + "x", + "y", + "visible" + ], + "label": "done0", + "scope": "CLASS", + "x": 69, + "y": -78, + "visible": false + }, + { + "prefabId": "3d402c83-0ef8-4993-bf56-3e076074ec9e", + "id": "c5ebb9a9-0910-4792-b474-60a809e6e3ee", + "unlock": [ + "x", + "y", + "sitFrame", + "donePoint", + "visible" + ], + "label": "seat1", + "scope": "CLASS", + "sitFrame": 3, + "donePoint": "done0", + "x": -54, + "y": -16, + "visible": false + }, + { + "prefabId": "3d402c83-0ef8-4993-bf56-3e076074ec9e", + "id": "e2529f8b-9377-4329-81b1-8038dbd04fcd", + "unlock": [ + "x", + "y", + "sitFrame", + "donePoint", + "visible" + ], + "label": "seat0", + "scope": "CLASS", + "sitFrame": 7, + "donePoint": "done1", + "x": 77, + "y": -16, + "visible": false + } + ] + } + ], + "plainObjects": [], + "meta": { + "app": "Phaser Editor 2D - Scene Editor", + "url": "https://phasereditor2d.com", + "contentType": "phasereditor2d.core.scene.SceneContentType", + "version": 4 + }, + "prefabProperties": [ + { + "name": "moveToX", + "label": "moveToX", + "tooltip": "moveToX", + "defValue": 0, + "customDefinition": false, + "type": { + "id": "number" + } + }, + { + "name": "moveToY", + "label": "moveToY", + "tooltip": "moveToY", + "defValue": 0, + "customDefinition": false, + "type": { + "id": "number" + } + } + ] +} \ No newline at end of file diff --git a/src/scenes/shared_prefabs/card/CardTable1.js b/src/scenes/shared_prefabs/card/CardTable1.js deleted file mode 100644 index 7ed0cbb7..00000000 --- a/src/scenes/shared_prefabs/card/CardTable1.js +++ /dev/null @@ -1,54 +0,0 @@ -/* START OF COMPILED CODE */ - -import BaseContainer from "../../base/BaseContainer"; -import Button from "../../components/Button"; -import ShowHint from "../../components/ShowHint"; -/* START-USER-IMPORTS */ -/* END-USER-IMPORTS */ - -export default class CardTable1 extends BaseContainer { - - constructor(scene, x, y) { - super(scene, x ?? 0, y ?? 0); - - /** @type {number} */ - this.moveToX = 0; - /** @type {number} */ - this.moveToY = 0; - - - // mat - const mat = scene.add.image(0, 0, "dojo", "mat/mat_1"); - mat.setOrigin(0.5018450184501845, 0.5); - this.add(mat); - - // mat (components) - const matButton = new Button(mat); - matButton.spriteName = "mat/mat_1"; - matButton.activeFrame = false; - matButton.pixelPerfect = true; - const matShowHint = new ShowHint(mat); - matShowHint.text = "card_hint"; - - /* START-USER-CTR-CODE */ - - mat.on('pointerup', (pointer) => this.onPointerUp(pointer)) - - /* END-USER-CTR-CODE */ - } - - - /* START-USER-CODE */ - - onPointerUp(pointer) { - if (pointer.button !== 0) { - return - } - - this.scene.world.client.sendMove(this.moveToX, this.moveToY) - } - - /* END-USER-CODE */ -} - -/* END OF COMPILED CODE */ diff --git a/src/scenes/shared_prefabs/card/CardTable1.scene b/src/scenes/shared_prefabs/card/CardTable1.scene deleted file mode 100644 index 582562f6..00000000 --- a/src/scenes/shared_prefabs/card/CardTable1.scene +++ /dev/null @@ -1,72 +0,0 @@ -{ - "id": "8adc32e3-5c26-46f8-b0a3-ceb8200598ec", - "sceneType": "PREFAB", - "settings": { - "compilerInsertSpaces": true, - "javaScriptInitFieldsInConstructor": true, - "exportClass": true, - "autoImport": true, - "superClassName": "BaseContainer", - "preloadMethodName": "", - "preloadPackFiles": [], - "createMethodName": "", - "borderWidth": 1520, - "borderHeight": 960 - }, - "displayList": [ - { - "type": "Container", - "id": "92e98aa4-f6b1-4b7b-bee2-08bc6a7b7bef", - "label": "container_1", - "list": [ - { - "type": "Image", - "id": "dd831ee5-3fa1-4d8e-adf4-273bf9ac6372", - "label": "mat", - "components": [ - "Button", - "ShowHint" - ], - "Button.spriteName": "mat/mat_1", - "Button.activeFrame": false, - "Button.pixelPerfect": true, - "ShowHint.text": "card_hint", - "texture": { - "key": "dojo", - "frame": "mat/mat_1" - }, - "originX": 0.5018450184501845 - } - ] - } - ], - "plainObjects": [], - "meta": { - "app": "Phaser Editor 2D - Scene Editor", - "url": "https://phasereditor2d.com", - "contentType": "phasereditor2d.core.scene.SceneContentType", - "version": 4 - }, - "prefabProperties": [ - { - "name": "moveToX", - "label": "moveToX", - "tooltip": "moveToX", - "defValue": 0, - "customDefinition": false, - "type": { - "id": "number" - } - }, - { - "name": "moveToY", - "label": "moveToY", - "tooltip": "moveToY", - "defValue": 0, - "customDefinition": false, - "type": { - "id": "number" - } - } - ] -} \ No newline at end of file diff --git a/src/scenes/shared_prefabs/card/CardTable2.js b/src/scenes/shared_prefabs/card/CardTable2.js deleted file mode 100644 index aad4749a..00000000 --- a/src/scenes/shared_prefabs/card/CardTable2.js +++ /dev/null @@ -1,54 +0,0 @@ -/* START OF COMPILED CODE */ - -import BaseContainer from "../../base/BaseContainer"; -import Button from "../../components/Button"; -import ShowHint from "../../components/ShowHint"; -/* START-USER-IMPORTS */ -/* END-USER-IMPORTS */ - -export default class CardTable2 extends BaseContainer { - - constructor(scene, x, y) { - super(scene, x ?? 0, y ?? 0); - - /** @type {number} */ - this.moveToX = 0; - /** @type {number} */ - this.moveToY = 0; - - - // mat - const mat = scene.add.image(0, 0, "dojo", "mat/mat_2"); - mat.setOrigin(0.5018450184501845, 0.5); - this.add(mat); - - // mat (components) - const matButton = new Button(mat); - matButton.spriteName = "mat/mat_2"; - matButton.activeFrame = false; - matButton.pixelPerfect = true; - const matShowHint = new ShowHint(mat); - matShowHint.text = "card_hint"; - - /* START-USER-CTR-CODE */ - - mat.on('pointerup', (pointer) => this.onPointerUp(pointer)) - - /* END-USER-CTR-CODE */ - } - - - /* START-USER-CODE */ - - onPointerUp(pointer) { - if (pointer.button !== 0) { - return - } - - this.scene.world.client.sendMove(this.moveToX, this.moveToY) - } - - /* END-USER-CODE */ -} - -/* END OF COMPILED CODE */ diff --git a/src/scenes/shared_prefabs/card/CardTable2.scene b/src/scenes/shared_prefabs/card/CardTable2.scene deleted file mode 100644 index 4b70d1f7..00000000 --- a/src/scenes/shared_prefabs/card/CardTable2.scene +++ /dev/null @@ -1,72 +0,0 @@ -{ - "id": "36e51c27-3069-47c0-8b43-7a47b5400852", - "sceneType": "PREFAB", - "settings": { - "compilerInsertSpaces": true, - "javaScriptInitFieldsInConstructor": true, - "exportClass": true, - "autoImport": true, - "superClassName": "BaseContainer", - "preloadMethodName": "", - "preloadPackFiles": [], - "createMethodName": "", - "borderWidth": 1520, - "borderHeight": 960 - }, - "displayList": [ - { - "type": "Container", - "id": "92e98aa4-f6b1-4b7b-bee2-08bc6a7b7bef", - "label": "container_1", - "list": [ - { - "type": "Image", - "id": "dd831ee5-3fa1-4d8e-adf4-273bf9ac6372", - "label": "mat", - "components": [ - "Button", - "ShowHint" - ], - "Button.spriteName": "mat/mat_2", - "Button.activeFrame": false, - "Button.pixelPerfect": true, - "ShowHint.text": "card_hint", - "texture": { - "key": "dojo", - "frame": "mat/mat_2" - }, - "originX": 0.5018450184501845 - } - ] - } - ], - "plainObjects": [], - "meta": { - "app": "Phaser Editor 2D - Scene Editor", - "url": "https://phasereditor2d.com", - "contentType": "phasereditor2d.core.scene.SceneContentType", - "version": 4 - }, - "prefabProperties": [ - { - "name": "moveToX", - "label": "moveToX", - "tooltip": "moveToX", - "defValue": 0, - "customDefinition": false, - "type": { - "id": "number" - } - }, - { - "name": "moveToY", - "label": "moveToY", - "tooltip": "moveToY", - "defValue": 0, - "customDefinition": false, - "type": { - "id": "number" - } - } - ] -} \ No newline at end of file From a577e8d9c01346de5fe704786f612cc1994c5552 Mon Sep 17 00:00:00 2001 From: wizguin <16276645+wizguin@users.noreply.github.com> Date: Sat, 2 Sep 2023 15:15:08 +0100 Subject: [PATCH 171/200] cardjitsu: Updated dojo --- src/scenes/rooms/dojo/Dojo.js | 83 ++++++++++++++++++++------------ src/scenes/rooms/dojo/Dojo.scene | 62 ++++++++++++++++-------- 2 files changed, 94 insertions(+), 51 deletions(-) diff --git a/src/scenes/rooms/dojo/Dojo.js b/src/scenes/rooms/dojo/Dojo.js index 01173830..859f228f 100644 --- a/src/scenes/rooms/dojo/Dojo.js +++ b/src/scenes/rooms/dojo/Dojo.js @@ -3,8 +3,10 @@ import RoomScene from "../RoomScene"; import Button from "../../components/Button"; import MoveTo from "../../components/MoveTo"; -import CardTable1 from "../../shared_prefabs/card/CardTable1"; -import CardTable2 from "../../shared_prefabs/card/CardTable2"; +import Waddle203 from "./waddle/Waddle203"; +import Waddle202 from "./waddle/Waddle202"; +import Waddle201 from "./waddle/Waddle201"; +import Waddle200 from "./waddle/Waddle200"; import Zone from "../../components/Zone"; /* START-USER-IMPORTS */ /* END-USER-IMPORTS */ @@ -16,6 +18,14 @@ export default class Dojo extends RoomScene { /** @type {Phaser.GameObjects.Sprite} */ this.sensei; + /** @type {Waddle203} */ + this.waddle203; + /** @type {Waddle202} */ + this.waddle202; + /** @type {Waddle201} */ + this.waddle201; + /** @type {Waddle200} */ + this.waddle200; /** @type {Phaser.GameObjects.Image} */ this.cards; @@ -30,8 +40,11 @@ export default class Dojo extends RoomScene { 'table202': () => this.triggerMat(202), 'table203': () => this.triggerMat(203) } + this.roomAnims = true + this.waddles = {} + /* END-USER-CTR-CODE */ } @@ -53,7 +66,7 @@ export default class Dojo extends RoomScene { door.setOrigin(0, 0); // sensei - const sensei = this.add.sprite(965, 373, "dojo", "sensei/sensei0001"); + const sensei = this.add.sprite(973, 372, "dojo", "sensei/sensei0001"); sensei.setOrigin(0, 0); // tree @@ -76,25 +89,21 @@ export default class Dojo extends RoomScene { const legend = this.add.image(534, 382, "dojo", "legend"); legend.setOrigin(0, 0); - // table203 - const table203 = new CardTable1(this, 1188, 813); - this.add.existing(table203); - table203.scaleX = -1; - table203.scaleY = 1; + // waddle203 + const waddle203 = new Waddle203(this, 1188, 813); + this.add.existing(waddle203); - // table202 - const table202 = new CardTable1(this, 358, 813); - this.add.existing(table202); + // waddle202 + const waddle202 = new Waddle202(this, 358, 813); + this.add.existing(waddle202); - // table201 - const table201 = new CardTable2(this, 930, 706); - this.add.existing(table201); - table201.scaleX = -1; - table201.scaleY = 1; + // waddle201 + const waddle201 = new Waddle201(this, 930, 706); + this.add.existing(waddle201); - // table200 - const table200 = new CardTable2(this, 616, 706); - this.add.existing(table200); + // waddle200 + const waddle200 = new Waddle200(this, 616, 706); + this.add.existing(waddle200); // zone const zone = this.add.rectangle(1096, 490, 246, 217); @@ -107,6 +116,14 @@ export default class Dojo extends RoomScene { cards.setOrigin(0, 0); cards.visible = false; + // cauldronBack + const cauldronBack = this.add.image(918, 540, "dojo", "cauldron/back"); + cauldronBack.setOrigin(0, 0); + + // cauldronFront + const cauldronFront = this.add.image(926, 550, "dojo", "cauldron/front"); + cauldronFront.setOrigin(0, 0); + // door (components) const doorButton = new Button(door); doorButton.spriteName = "door"; @@ -128,21 +145,21 @@ export default class Dojo extends RoomScene { legendPosterButton.callback = () => this.interface.loadWidget('NinjaBelts'); legendPosterButton.activeFrame = false; - // table203 (prefab fields) - table203.moveToX = 1160; - table203.moveToY = 750; + // waddle203 (prefab fields) + waddle203.moveToX = 1160; + waddle203.moveToY = 750; - // table202 (prefab fields) - table202.moveToX = 380; - table202.moveToY = 750; + // waddle202 (prefab fields) + waddle202.moveToX = 380; + waddle202.moveToY = 750; - // table201 (prefab fields) - table201.moveToX = 920; - table201.moveToY = 650; + // waddle201 (prefab fields) + waddle201.moveToX = 920; + waddle201.moveToY = 650; - // table200 (prefab fields) - table200.moveToX = 620; - table200.moveToY = 650; + // waddle200 (prefab fields) + waddle200.moveToX = 620; + waddle200.moveToY = 650; // zone (components) const zoneZone = new Zone(zone); @@ -160,6 +177,10 @@ export default class Dojo extends RoomScene { cardsButton.pixelPerfect = true; this.sensei = sensei; + this.waddle203 = waddle203; + this.waddle202 = waddle202; + this.waddle201 = waddle201; + this.waddle200 = waddle200; this.cards = cards; this.events.emit("scene-awake"); diff --git a/src/scenes/rooms/dojo/Dojo.scene b/src/scenes/rooms/dojo/Dojo.scene index 0633723e..8721eb4e 100644 --- a/src/scenes/rooms/dojo/Dojo.scene +++ b/src/scenes/rooms/dojo/Dojo.scene @@ -61,8 +61,8 @@ "key": "dojo", "frame": "sensei/sensei0001" }, - "x": 965, - "y": 373, + "x": 973, + "y": 372, "originX": 0, "originY": 0 }, @@ -144,26 +144,23 @@ "originY": 0 }, { - "prefabId": "8adc32e3-5c26-46f8-b0a3-ceb8200598ec", + "prefabId": "d60128ff-4079-4464-b688-dbdea3c52e20", "id": "4ed85538-b1e1-4391-864a-12165867f2d7", "unlock": [ "x", "y", - "scaleX", - "scaleY", "moveToX", "moveToY" ], - "label": "table203", + "label": "waddle203", + "scope": "CLASS", "moveToX": 1160, "moveToY": 750, "x": 1188, - "y": 813, - "scaleX": -1, - "scaleY": 1 + "y": 813 }, { - "prefabId": "8adc32e3-5c26-46f8-b0a3-ceb8200598ec", + "prefabId": "d6d50181-a9a9-48b9-b4a2-6096b1ad8542", "id": "930e64d7-509f-4b66-b069-17ddd8228123", "unlock": [ "x", @@ -171,33 +168,31 @@ "moveToX", "moveToY" ], - "label": "table202", + "label": "waddle202", + "scope": "CLASS", "moveToX": 380, "moveToY": 750, "x": 358, "y": 813 }, { - "prefabId": "36e51c27-3069-47c0-8b43-7a47b5400852", + "prefabId": "7554bcf3-656c-48ed-97c0-e431350f8ba5", "id": "7353dd85-f3a9-44e6-a1b5-efce0d80b611", "unlock": [ "x", "y", - "scaleX", - "scaleY", "moveToX", "moveToY" ], - "label": "table201", + "label": "waddle201", + "scope": "CLASS", "moveToX": 920, "moveToY": 650, "x": 930, - "y": 706, - "scaleX": -1, - "scaleY": 1 + "y": 706 }, { - "prefabId": "36e51c27-3069-47c0-8b43-7a47b5400852", + "prefabId": "20915166-b810-4ea6-b9c1-62e694ee975c", "id": "fb495e97-de4b-464b-91cc-e79480e53d2d", "unlock": [ "x", @@ -205,7 +200,8 @@ "moveToX", "moveToY" ], - "label": "table200", + "label": "waddle200", + "scope": "CLASS", "moveToX": 620, "moveToY": 650, "x": 616, @@ -252,6 +248,32 @@ "originX": 0, "originY": 0, "visible": false + }, + { + "type": "Image", + "id": "f254b723-f462-4cbf-b100-dadcf1b8e2a0", + "label": "cauldronBack", + "texture": { + "key": "dojo", + "frame": "cauldron/back" + }, + "x": 918, + "y": 540, + "originX": 0, + "originY": 0 + }, + { + "type": "Image", + "id": "cb465f3b-f7c4-491c-9b8b-035cccf288c1", + "label": "cauldronFront", + "texture": { + "key": "dojo", + "frame": "cauldron/front" + }, + "x": 926, + "y": 550, + "originX": 0, + "originY": 0 } ], "plainObjects": [], From eca815f272fb233599d06036ab453825838db9df Mon Sep 17 00:00:00 2001 From: wizguin <16276645+wizguin@users.noreply.github.com> Date: Sat, 2 Sep 2023 17:30:05 +0100 Subject: [PATCH 172/200] cardjitsu: Added end sound effect --- src/scenes/games/card/CardJitsu.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/scenes/games/card/CardJitsu.js b/src/scenes/games/card/CardJitsu.js index 6b64b3e1..3248b69e 100644 --- a/src/scenes/games/card/CardJitsu.js +++ b/src/scenes/games/card/CardJitsu.js @@ -484,6 +484,8 @@ export default class CardJitsu extends GameScene { cards[i].tweenToOver(i) } + this.soundManager.play('end') + this.time.delayedCall(1000, () => this.playGameOver(winSeat, !winCards.length)) } From 1251ee5b9445d5d3f7b76b8d63b9ab04900d75e7 Mon Sep 17 00:00:00 2001 From: wizguin <16276645+wizguin@users.noreply.github.com> Date: Sat, 2 Sep 2023 17:31:06 +0100 Subject: [PATCH 173/200] cardjitsu: Added tie sound effect --- src/scenes/games/card/CardJitsu.js | 1 + 1 file changed, 1 insertion(+) diff --git a/src/scenes/games/card/CardJitsu.js b/src/scenes/games/card/CardJitsu.js index 3248b69e..4c9e5e05 100644 --- a/src/scenes/games/card/CardJitsu.js +++ b/src/scenes/games/card/CardJitsu.js @@ -569,6 +569,7 @@ export default class CardJitsu extends GameScene { this.players.forEach(player => player.cardLose()) this.playBattle('tie') + this.soundManager.play('tie') } judgeWin(winSeat, winCard) { From c11da21595ef493a397d09b1da38877012fec90a Mon Sep 17 00:00:00 2001 From: wizguin <16276645+wizguin@users.noreply.github.com> Date: Tue, 5 Sep 2023 17:19:18 +0100 Subject: [PATCH 174/200] cardjitsu: Added explode effect to losing card --- src/scenes/games/card/CardJitsuPlayer.js | 2 +- src/scenes/games/card/card/CardJitsuCard.js | 13 ++++ .../card/card/explosion/CardJitsuExplosion.js | 64 +++++++++++++++++++ .../card/explosion/CardJitsuExplosion.scene | 59 +++++++++++++++++ 4 files changed, 137 insertions(+), 1 deletion(-) create mode 100644 src/scenes/games/card/card/explosion/CardJitsuExplosion.js create mode 100644 src/scenes/games/card/card/explosion/CardJitsuExplosion.scene diff --git a/src/scenes/games/card/CardJitsuPlayer.js b/src/scenes/games/card/CardJitsuPlayer.js index 575b140c..1f5d8421 100644 --- a/src/scenes/games/card/CardJitsuPlayer.js +++ b/src/scenes/games/card/CardJitsuPlayer.js @@ -90,7 +90,7 @@ export default class CardJitsuPlayer extends BaseContainer { this.losses.push(this.pick) - this.pick.destroy() + this.pick.explode() this.removePick() } diff --git a/src/scenes/games/card/card/CardJitsuCard.js b/src/scenes/games/card/card/CardJitsuCard.js index 60a3ff09..a5eb7568 100644 --- a/src/scenes/games/card/card/CardJitsuCard.js +++ b/src/scenes/games/card/card/CardJitsuCard.js @@ -3,6 +3,7 @@ import BaseContainer from "../../../base/BaseContainer"; import CardJitsuThumb from "./CardJitsuThumb"; import CardJitsuHint from "./CardJitsuHint"; +import CardJitsuExplosion from "./explosion/CardJitsuExplosion"; /* START-USER-IMPORTS */ import layout from '../layout' @@ -36,6 +37,8 @@ export default class CardJitsuCard extends BaseContainer { this.thumbnail; /** @type {CardJitsuHint} */ this.hint; + /** @type {CardJitsuExplosion} */ + this.explosion; // shadow @@ -106,6 +109,11 @@ export default class CardJitsuCard extends BaseContainer { hint.visible = false; this.add(hint); + // explosion + const explosion = new CardJitsuExplosion(scene, 101, 129); + explosion.visible = false; + this.add(explosion); + this.shadow = shadow; this.hover = hover; this.back = back; @@ -117,6 +125,7 @@ export default class CardJitsuCard extends BaseContainer { this.valueText = valueText; this.thumbnail = thumbnail; this.hint = hint; + this.explosion = explosion; /* START-USER-CTR-CODE */ @@ -432,6 +441,10 @@ export default class CardJitsuCard extends BaseContainer { this.depth = this.y } + explode() { + this.explosion.show() + } + /* END-USER-CODE */ } diff --git a/src/scenes/games/card/card/explosion/CardJitsuExplosion.js b/src/scenes/games/card/card/explosion/CardJitsuExplosion.js new file mode 100644 index 00000000..d2aa45d8 --- /dev/null +++ b/src/scenes/games/card/card/explosion/CardJitsuExplosion.js @@ -0,0 +1,64 @@ +/* START OF COMPILED CODE */ + +import BaseContainer from "../../../../base/BaseContainer"; +/* START-USER-IMPORTS */ +/* END-USER-IMPORTS */ + +export default class CardJitsuExplosion extends BaseContainer { + + constructor(scene, x, y) { + super(scene, x ?? 0, y ?? 0); + + /** @type {Phaser.GameObjects.Sprite} */ + this.poof; + /** @type {Phaser.GameObjects.Sprite} */ + this.start; + + + // poof + const poof = scene.add.sprite(8, -24, "cardjitsu", "card/explosion/poof/poof0008"); + poof.setOrigin(0.5006501950585176, 0.5); + poof.visible = false; + this.add(poof); + + // start + const start = scene.add.sprite(0, 0, "cardjitsu", "card/explosion/start"); + start.setOrigin(0.5014577259475219, 0.5016722408026756); + start.visible = false; + this.add(start); + + this.poof = poof; + this.start = start; + + /* START-USER-CTR-CODE */ + /* END-USER-CTR-CODE */ + } + + + /* START-USER-CODE */ + + show() { + super.show() + + this.start.once('animationcomplete', this.showPoof, this) + this.start.play('card/explosion/start') + } + + showPoof() { + this.poof.once('animationcomplete', this.close, this) + this.poof.play('card/explosion/poof') + + this.soundManager.play('explosion', { volume: 1.5 }) + } + + close() { + super.close() + + // Destroy card + this.parentContainer.destroy() + } + + /* END-USER-CODE */ +} + +/* END OF COMPILED CODE */ diff --git a/src/scenes/games/card/card/explosion/CardJitsuExplosion.scene b/src/scenes/games/card/card/explosion/CardJitsuExplosion.scene new file mode 100644 index 00000000..ec3a57e2 --- /dev/null +++ b/src/scenes/games/card/card/explosion/CardJitsuExplosion.scene @@ -0,0 +1,59 @@ +{ + "id": "cb9a1643-8ee1-408f-89d0-0a8bbdb8ecee", + "sceneType": "PREFAB", + "settings": { + "compilerInsertSpaces": true, + "javaScriptInitFieldsInConstructor": true, + "exportClass": true, + "autoImport": true, + "superClassName": "BaseContainer", + "preloadMethodName": "", + "preloadPackFiles": [], + "createMethodName": "", + "borderWidth": 1520, + "borderHeight": 960 + }, + "displayList": [ + { + "type": "Container", + "id": "e7bfb279-18a7-49e4-9fa8-c3fe4c80d2f6", + "label": "container_1", + "list": [ + { + "type": "Sprite", + "id": "391966aa-0909-4214-b9fd-6150194390dc", + "label": "poof", + "scope": "CLASS", + "texture": { + "key": "cardjitsu", + "frame": "card/explosion/poof/poof0008" + }, + "x": 8, + "y": -24, + "originX": 0.5006501950585176, + "visible": false + }, + { + "type": "Sprite", + "id": "4d21bfc4-c243-4863-8246-4369a55b0ede", + "label": "start", + "scope": "CLASS", + "texture": { + "key": "cardjitsu", + "frame": "card/explosion/start" + }, + "originX": 0.5014577259475219, + "originY": 0.5016722408026756, + "visible": false + } + ] + } + ], + "plainObjects": [], + "meta": { + "app": "Phaser Editor 2D - Scene Editor", + "url": "https://phasereditor2d.com", + "contentType": "phasereditor2d.core.scene.SceneContentType", + "version": 4 + } +} \ No newline at end of file From caaf1771c0f66923b44ee20be5f9217a4fd3b060 Mon Sep 17 00:00:00 2001 From: wizguin <16276645+wizguin@users.noreply.github.com> Date: Tue, 5 Sep 2023 17:26:43 +0100 Subject: [PATCH 175/200] cardjitsu: Accurate card font --- assets/styles/fonts.css | 6 ++++++ src/data/fonts.js | 1 + src/scenes/games/card/card/CardJitsuCard.js | 2 +- .../games/card/card/CardJitsuCard.scene | 2 +- .../ninjaprogress/views/CardsViewCard.js | 4 ++-- .../ninjaprogress/views/CardsViewCard.scene | 14 +++---------- .../games/ninjaprogress/views/ProgressView.js | 2 +- .../ninjaprogress/views/ProgressView.scene | 21 ++----------------- 8 files changed, 17 insertions(+), 35 deletions(-) diff --git a/assets/styles/fonts.css b/assets/styles/fonts.css index 38fe7c6a..4e92a223 100644 --- a/assets/styles/fonts.css +++ b/assets/styles/fonts.css @@ -25,6 +25,12 @@ src: url('../fonts/Asterisk.woff2'); } +@font-face { + font-family: 'Burbank Big Regular'; + font-weight: bold; + src: url('../fonts/Burbank Big Regular Bold.woff2'); +} + @font-face { font-family: 'Burbank Small'; src: url('../fonts/Burbank Small Medium.woff2'); diff --git a/src/data/fonts.js b/src/data/fonts.js index 9fc21672..d422d044 100644 --- a/src/data/fonts.js +++ b/src/data/fonts.js @@ -4,6 +4,7 @@ const fonts = { 'Arial:n4,n7', 'Arial Narrow:n4,n7', 'Asterisk:n4', + 'Burbank Big Regular:n7', 'Burbank Small:n4,n7', 'CCComiccrazy:n4,n7', 'CCFaceFront:n4,i7' diff --git a/src/scenes/games/card/card/CardJitsuCard.js b/src/scenes/games/card/card/CardJitsuCard.js index a5eb7568..bdd94246 100644 --- a/src/scenes/games/card/card/CardJitsuCard.js +++ b/src/scenes/games/card/card/CardJitsuCard.js @@ -96,7 +96,7 @@ export default class CardJitsuCard extends BaseContainer { // valueText const valueText = scene.add.text(1, 48, "", {}); valueText.text = "88"; - valueText.setStyle({ "align": "center", "color": "#000", "fixedWidth":52,"fontFamily": "Arial", "fontSize": "38px", "fontStyle": "bold" }); + valueText.setStyle({ "align": "center", "color": "#000", "fixedWidth":52,"fontFamily": "Burbank Big Regular", "fontSize": "38px", "fontStyle": "bold" }); this.add(valueText); // thumbnail diff --git a/src/scenes/games/card/card/CardJitsuCard.scene b/src/scenes/games/card/card/CardJitsuCard.scene index 02907113..74ff7d39 100644 --- a/src/scenes/games/card/card/CardJitsuCard.scene +++ b/src/scenes/games/card/card/CardJitsuCard.scene @@ -159,7 +159,7 @@ "text": "88", "fixedWidth": 52, "align": "center", - "fontFamily": "Arial", + "fontFamily": "Burbank Big Regular", "fontSize": "38px", "fontStyle": "bold", "color": "#000" diff --git a/src/scenes/games/ninjaprogress/views/CardsViewCard.js b/src/scenes/games/ninjaprogress/views/CardsViewCard.js index 51d98464..b5cbd2b9 100644 --- a/src/scenes/games/ninjaprogress/views/CardsViewCard.js +++ b/src/scenes/games/ninjaprogress/views/CardsViewCard.js @@ -67,9 +67,9 @@ export default class CardsViewCard extends BaseContainer { this.add(element); // value - const value = scene.add.text(-66, -38, "", {}); + const value = scene.add.text(-66, -40, "", {}); value.text = "88"; - value.setStyle({ "align": "center", "color": "#000", "fixedWidth":36,"fontFamily": "Arial", "fontSize": "26px", "fontStyle": "bold" }); + value.setStyle({ "align": "center", "color": "#000", "fixedWidth":36,"fontFamily": "Burbank Big Regular", "fontSize": "26px", "fontStyle": "bold" }); this.add(value); this.glow = glow; diff --git a/src/scenes/games/ninjaprogress/views/CardsViewCard.scene b/src/scenes/games/ninjaprogress/views/CardsViewCard.scene index d682d590..4dce8b09 100644 --- a/src/scenes/games/ninjaprogress/views/CardsViewCard.scene +++ b/src/scenes/games/ninjaprogress/views/CardsViewCard.scene @@ -18,7 +18,6 @@ "type": "Container", "id": "f9520288-babf-4d1e-9df3-6de2014f5bf8", "label": "container_1", - "components": [], "x": 760, "y": 480, "list": [ @@ -27,7 +26,6 @@ "id": "695f8494-eea7-464d-97fa-98dec9180ffe", "label": "glow", "scope": "CLASS", - "components": [], "texture": { "key": "ninjaprogress", "frame": "card/glow0001" @@ -41,7 +39,6 @@ "id": "0b8f3a7d-39ce-44f5-96ed-57f43fb888e7", "label": "back", "scope": "CLASS", - "components": [], "texture": { "key": "ninjaprogress", "frame": "card/back" @@ -54,7 +51,6 @@ "type": "Image", "id": "e1ca6d79-b0a8-49ef-a40a-2d60d05bdf90", "label": "shadow", - "components": [], "texture": { "key": "ninjaprogress", "frame": "card/shadow" @@ -68,7 +64,6 @@ "id": "3aa33900-d940-437c-8155-e66c64f3b560", "label": "icon", "scope": "CLASS", - "components": [], "texture": {}, "x": -66, "y": -74, @@ -83,7 +78,6 @@ "id": "30e60b4b-9fe0-40bf-b4a7-b2d698495564", "label": "color", "scope": "CLASS", - "components": [], "texture": { "key": "ninjaprogress", "frame": "card/color" @@ -99,7 +93,6 @@ "id": "229219ee-a4bd-4dc7-a844-2977401125c8", "label": "element", "scope": "CLASS", - "components": [], "texture": { "key": "ninjaprogress", "frame": "card/f" @@ -113,13 +106,12 @@ "id": "eed3170b-7b07-4cdc-adcd-133f2a8e8bb7", "label": "value", "scope": "CLASS", - "components": [], "x": -66, - "y": -38, + "y": -40, "text": "88", "fixedWidth": 36, "align": "center", - "fontFamily": "Arial", + "fontFamily": "Burbank Big Regular", "fontSize": "26px", "fontStyle": "bold", "color": "#000" @@ -132,6 +124,6 @@ "app": "Phaser Editor 2D - Scene Editor", "url": "https://phasereditor2d.com", "contentType": "phasereditor2d.core.scene.SceneContentType", - "version": 3 + "version": 4 } } \ No newline at end of file diff --git a/src/scenes/games/ninjaprogress/views/ProgressView.js b/src/scenes/games/ninjaprogress/views/ProgressView.js index 874ffe2c..1d0ff4c5 100644 --- a/src/scenes/games/ninjaprogress/views/ProgressView.js +++ b/src/scenes/games/ninjaprogress/views/ProgressView.js @@ -43,7 +43,7 @@ export default class ProgressView extends BaseContainer { const cardsNum = scene.add.text(64, 248, "", {}); cardsNum.setOrigin(0.5, 0.5); cardsNum.text = "0"; - cardsNum.setStyle({ "align": "center", "fixedWidth":100,"fontFamily": "Arial", "fontSize": "48px", "fontStyle": "bold", "stroke": "#000", "strokeThickness":8,"shadow.blur":2,"shadow.stroke":true,"shadow.fill":true}); + cardsNum.setStyle({ "align": "center", "fixedWidth":100,"fontFamily": "Burbank Big Regular", "fontSize": "48px", "fontStyle": "bold", "stroke": "#000", "strokeThickness":8,"shadow.blur":2,"shadow.stroke":true,"shadow.fill":true}); this.add(cardsNum); // cardsText diff --git a/src/scenes/games/ninjaprogress/views/ProgressView.scene b/src/scenes/games/ninjaprogress/views/ProgressView.scene index 6e56371f..c98c88a5 100644 --- a/src/scenes/games/ninjaprogress/views/ProgressView.scene +++ b/src/scenes/games/ninjaprogress/views/ProgressView.scene @@ -18,7 +18,6 @@ "type": "Container", "id": "e79a212e-9595-46b8-930e-6c5f2e0e62c0", "label": "container_1", - "components": [], "x": 760, "y": 480, "list": [ @@ -42,7 +41,6 @@ "type": "Image", "id": "7b9b4fe8-ae89-45a4-abb5-b027bf877c8b", "label": "cards", - "components": [], "texture": { "key": "ninjaprogress", "frame": "cards" @@ -55,7 +53,6 @@ "id": "179eb58d-0975-484c-b228-cc6276263375", "label": "cardsNum", "scope": "CLASS", - "components": [], "x": 64, "y": 248, "originX": 0.5, @@ -63,7 +60,7 @@ "text": "0", "fixedWidth": 100, "align": "center", - "fontFamily": "Arial", + "fontFamily": "Burbank Big Regular", "fontSize": "48px", "fontStyle": "bold", "stroke": "#000", @@ -76,7 +73,6 @@ "type": "Text", "id": "928a8a3c-c2c0-4c2b-8b73-0b1bcd0cfe0e", "label": "cardsText", - "components": [], "x": -81, "y": 254, "originX": 0.5, @@ -93,7 +89,6 @@ "type": "Image", "id": "076ce9cb-e64c-4dcc-be8a-e351954f6d6a", "label": "progressBg", - "components": [], "texture": { "key": "ninjaprogress", "frame": "progress" @@ -104,7 +99,6 @@ "id": "d269ba3b-46d9-4af2-8920-62965ed19bf6", "label": "nextBelt", "scope": "CLASS", - "components": [], "texture": { "key": "ninjaprogress", "frame": "next/1" @@ -119,7 +113,6 @@ "id": "a85434a7-54ef-4c09-99d2-857f010bf8fc", "label": "currentBelt", "scope": "CLASS", - "components": [], "texture": { "key": "ninjaprogress", "frame": "belt/1" @@ -133,7 +126,6 @@ "id": "21d65873-cc17-4483-be74-d80f8a55abad", "label": "nextText", "scope": "CLASS", - "components": [], "x": 244, "y": -42, "originX": 0.5, @@ -151,7 +143,6 @@ "id": "d70717d1-7680-46ce-9783-b2a5963bcbdd", "label": "currentText", "scope": "CLASS", - "components": [], "x": -256, "y": -42, "originX": 0.5, @@ -168,7 +159,6 @@ "id": "429725a8-bb97-4868-9739-0025aa45eead", "label": "bar", "scope": "CLASS", - "components": [], "texture": { "key": "ninjaprogress", "frame": "progress/1" @@ -182,7 +172,6 @@ "id": "c60c1252-f381-4260-b587-06924e6e85b7", "label": "progressText", "scope": "CLASS", - "components": [], "x": -192, "y": 8, "originX": 1, @@ -201,7 +190,6 @@ "id": "a91499ce-58e4-4159-866a-6074a3bd6bd8", "label": "sensei", "scope": "CLASS", - "components": [], "x": 12, "y": -14, "visible": false, @@ -210,7 +198,6 @@ "type": "Image", "id": "a8b59277-06bc-450f-a0c6-408956531166", "label": "senseiImage", - "components": [], "texture": { "key": "ninjaprogress", "frame": "sensei" @@ -222,7 +209,6 @@ "type": "Text", "id": "57ed6934-c5fb-4f95-8746-20adfbcdfd66", "label": "senseiText", - "components": [], "y": 20, "originX": 0.5, "originY": 0.5, @@ -241,7 +227,6 @@ "id": "73fc1120-7bec-42f7-a3ff-c1ef70dbdf4b", "label": "hideout", "scope": "CLASS", - "components": [], "x": -26, "y": -6, "visible": false, @@ -250,7 +235,6 @@ "type": "Image", "id": "29c6e148-233f-4cbc-959a-f4b295425d1f", "label": "hideoutImage", - "components": [], "texture": { "key": "ninjaprogress", "frame": "hideout" @@ -260,7 +244,6 @@ "type": "Text", "id": "7b63e695-ade2-4079-9399-8ac8fa14d8b7", "label": "hideoutText", - "components": [], "x": 132, "y": 10, "originX": 0.5, @@ -283,6 +266,6 @@ "app": "Phaser Editor 2D - Scene Editor", "url": "https://phasereditor2d.com", "contentType": "phasereditor2d.core.scene.SceneContentType", - "version": 3 + "version": 4 } } \ No newline at end of file From c37d8d5a980b6a919d0aa1db64b971c30a1197dc Mon Sep 17 00:00:00 2001 From: wizguin <16276645+wizguin@users.noreply.github.com> Date: Tue, 5 Sep 2023 18:06:26 +0100 Subject: [PATCH 176/200] cardjitsu: Tweaked card --- src/scenes/games/card/card/CardJitsuCard.js | 10 +-- .../games/card/card/CardJitsuCard.scene | 69 ++++++++----------- 2 files changed, 33 insertions(+), 46 deletions(-) diff --git a/src/scenes/games/card/card/CardJitsuCard.js b/src/scenes/games/card/card/CardJitsuCard.js index bdd94246..f6a23c46 100644 --- a/src/scenes/games/card/card/CardJitsuCard.js +++ b/src/scenes/games/card/card/CardJitsuCard.js @@ -43,23 +43,21 @@ export default class CardJitsuCard extends BaseContainer { // shadow const shadow = scene.add.image(99, 111, "cardjitsu", "card/shadow"); - shadow.setOrigin(0.5010660980810234, 0.500945179584121); this.add(shadow); // hover - const hover = scene.add.image(97, 108, "cardjitsu", "card/hover"); + const hover = scene.add.image(95, 107, "cardjitsu", "card/hover"); hover.visible = false; this.add(hover); // back const back = scene.add.image(95, 107, "cardjitsu", "card/back"); - back.setOrigin(0.5010660980810234, 0.500945179584121); back.visible = false; this.add(back); // glow const glow = scene.add.sprite(95, 105, "cardjitsu", "card/glow0001"); - glow.setOrigin(0.5008695652173913, 0.5); + glow.visible = false; glow.alpha = 0.5; glow.alphaTopLeft = 0.5; glow.alphaTopRight = 0.5; @@ -75,7 +73,6 @@ export default class CardJitsuCard extends BaseContainer { // colorSprite const colorSprite = scene.add.image(95, 107, "cardjitsu", "card/color"); - colorSprite.setOrigin(0.5010660980810234, 0.500945179584121); colorSprite.tintTopLeft = 1132705; colorSprite.tintTopRight = 1132705; colorSprite.tintBottomLeft = 1132705; @@ -84,12 +81,11 @@ export default class CardJitsuCard extends BaseContainer { // element const element = scene.add.image(28, 28, "cardjitsu", "card/f"); - element.setOrigin(0.5, 0.5051546391752577); + element.setOrigin(0.5116279069767442, 0.5128205128205128); this.add(element); // disabled const disabled = scene.add.image(95, 107, "cardjitsu", "card/disabled"); - disabled.setOrigin(0.5010660980810234, 0.500945179584121); disabled.visible = false; this.add(disabled); diff --git a/src/scenes/games/card/card/CardJitsuCard.scene b/src/scenes/games/card/card/CardJitsuCard.scene index 74ff7d39..2d873272 100644 --- a/src/scenes/games/card/card/CardJitsuCard.scene +++ b/src/scenes/games/card/card/CardJitsuCard.scene @@ -18,68 +18,59 @@ "type": "Container", "id": "6c346f50-1d14-4573-89dc-cad5ae046a9c", "label": "container_1", - "components": [], "x": 750, "y": 1000, "list": [ { "type": "Image", - "id": "61942b80-3e84-485c-9be6-1ec3407c6c04", + "id": "947a2411-722b-4b2f-9f67-60ba43f40807", "label": "shadow", "scope": "CLASS", - "components": [], "texture": { "key": "cardjitsu", "frame": "card/shadow" }, "x": 99, - "y": 111, - "originX": 0.5010660980810234, - "originY": 0.500945179584121 + "y": 111 }, { "type": "Image", - "id": "26f85f1a-b09b-4f2a-af66-f661a3d84dd2", + "id": "468a9224-d66e-4a4e-abac-23255c005723", "label": "hover", "scope": "CLASS", - "components": [], "texture": { "key": "cardjitsu", "frame": "card/hover" }, - "x": 97, - "y": 108, + "x": 95, + "y": 107, "visible": false }, { "type": "Image", - "id": "2ca4c8b6-b5b4-4c42-9d50-485b8caec74f", + "id": "e2a1144d-f852-45e0-820c-963e0b038b76", "label": "back", "scope": "CLASS", - "components": [], "texture": { "key": "cardjitsu", "frame": "card/back" }, "x": 95, "y": 107, - "originX": 0.5010660980810234, - "originY": 0.500945179584121, "visible": false }, { "type": "Sprite", - "id": "ce8b4112-2ec8-4825-85c3-ac09dfc6629d", + "id": "a753f951-e279-4ec6-9e49-d1af7527c434", "label": "glow", "scope": "CLASS", - "components": [], "texture": { "key": "cardjitsu", "frame": "card/glow0001" }, "x": 95, "y": 105, - "originX": 0.5008695652173913, + "visible": false, "alpha": 0.5, "alphaTopLeft": 0.5, "alphaTopRight": 0.5, @@ -91,7 +82,6 @@ "id": "9aca60f5-218c-4d87-a2ad-c661e35b5f74", "label": "icon", "scope": "CLASS", - "components": [], "texture": {}, "x": 1, "y": 1, @@ -101,18 +91,15 @@ }, { "type": "Image", - "id": "168cd85e-361d-4eae-8447-978bb7df8dc6", + "id": "c6c0d21a-8e8a-4c4f-b867-7a5ae4b43e0e", "label": "colorSprite", "scope": "CLASS", - "components": [], "texture": { "key": "cardjitsu", "frame": "card/color" }, "x": 95, "y": 107, - "originX": 0.5010660980810234, - "originY": 0.500945179584121, "tintTopLeft": "#1148a1", "tintTopRight": "#1148a1", "tintBottomLeft": "#1148a1", @@ -120,32 +107,29 @@ }, { "type": "Image", - "id": "783f90f6-7493-44a9-bbf1-68add522e7c5", + "id": "28a70a05-3a13-4981-ba5e-01ec1a854dec", "label": "element", "scope": "CLASS", - "components": [], "texture": { "key": "cardjitsu", "frame": "card/f" }, "x": 28, "y": 28, - "originY": 0.5051546391752577 + "originX": 0.5116279069767442, + "originY": 0.5128205128205128 }, { "type": "Image", - "id": "045d53fd-0832-402d-bb4e-c2c88b7563e0", + "id": "efa94a48-8431-4d8e-81e2-294e2a7f2846", "label": "disabled", "scope": "CLASS", - "components": [], "texture": { "key": "cardjitsu", "frame": "card/disabled" }, "x": 95, "y": 107, - "originX": 0.5010660980810234, - "originY": 0.500945179584121, "visible": false }, { @@ -153,7 +137,6 @@ "id": "10b504e1-dd20-411b-83e8-31df0743d59c", "label": "valueText", "scope": "CLASS", - "components": [], "x": 1, "y": 48, "text": "88", @@ -174,12 +157,9 @@ ], "label": "thumbnail", "scope": "CLASS", - "components": [], "x": 47, "y": 45, - "visible": false, - "nestedPrefabs": [], - "list": [] + "visible": false }, { "prefabId": "f7bc21d3-944c-4122-96b0-93ea4388bcff", @@ -191,12 +171,23 @@ ], "label": "hint", "scope": "CLASS", - "components": [], "x": 95, "y": -120, - "visible": false, - "nestedPrefabs": [], - "list": [] + "visible": false + }, + { + "prefabId": "cb9a1643-8ee1-408f-89d0-0a8bbdb8ecee", + "id": "fb57c098-d2be-4f60-acf1-428eeb021c87", + "unlock": [ + "x", + "y", + "visible" + ], + "label": "explosion", + "scope": "CLASS", + "x": 101, + "y": 129, + "visible": false } ] } @@ -206,6 +197,6 @@ "app": "Phaser Editor 2D - Scene Editor", "url": "https://phasereditor2d.com", "contentType": "phasereditor2d.core.scene.SceneContentType", - "version": 3 + "version": 4 } } \ No newline at end of file From 50e48e5f45a50f5cede2ab80bc241c7406ad0417 Mon Sep 17 00:00:00 2001 From: wizguin <16276645+wizguin@users.noreply.github.com> Date: Tue, 5 Sep 2023 18:07:09 +0100 Subject: [PATCH 177/200] cardjitsu: Added delay after card flip --- src/scenes/games/card/card/CardJitsuCard.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/scenes/games/card/card/CardJitsuCard.js b/src/scenes/games/card/card/CardJitsuCard.js index f6a23c46..b089186a 100644 --- a/src/scenes/games/card/card/CardJitsuCard.js +++ b/src/scenes/games/card/card/CardJitsuCard.js @@ -370,7 +370,7 @@ export default class CardJitsuCard extends BaseContainer { flip() { let timeline = this.scene.tweens.createTimeline({ - onComplete: () => this.scene.events.emit('flipped') + onComplete: () => this.scene.time.delayedCall(500, () => this.scene.events.emit('flipped')) }) timeline.add({ From 4426d3bf498e32d18d6cc667e403193d759b910e Mon Sep 17 00:00:00 2001 From: wizguin <16276645+wizguin@users.noreply.github.com> Date: Tue, 5 Sep 2023 18:12:54 +0100 Subject: [PATCH 178/200] cardjitsu: Tweak findWins to use won order --- src/scenes/games/card/CardJitsuPlayer.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/scenes/games/card/CardJitsuPlayer.js b/src/scenes/games/card/CardJitsuPlayer.js index 1f5d8421..be019531 100644 --- a/src/scenes/games/card/CardJitsuPlayer.js +++ b/src/scenes/games/card/CardJitsuPlayer.js @@ -115,7 +115,7 @@ export default class CardJitsuPlayer extends BaseContainer { } findWins(find) { - return find.map(id => this.wins.find(win => win.id == id)).filter(Boolean) + return this.wins.filter(card => find.includes(card.id)) } disableElement(element) { From b146c0ea24608e0476fc57426ddfc28899278e88 Mon Sep 17 00:00:00 2001 From: wizguin <16276645+wizguin@users.noreply.github.com> Date: Wed, 6 Sep 2023 11:00:58 +0100 Subject: [PATCH 179/200] cardjitsu: Added SenseiCards --- .../sensei/instructions/cards/SenseiCards.js | 126 ++++++++++++++++++ .../instructions/cards/SenseiCards.scene | 56 ++++++++ 2 files changed, 182 insertions(+) create mode 100644 src/scenes/games/sensei/instructions/cards/SenseiCards.js create mode 100644 src/scenes/games/sensei/instructions/cards/SenseiCards.scene diff --git a/src/scenes/games/sensei/instructions/cards/SenseiCards.js b/src/scenes/games/sensei/instructions/cards/SenseiCards.js new file mode 100644 index 00000000..4fab9b91 --- /dev/null +++ b/src/scenes/games/sensei/instructions/cards/SenseiCards.js @@ -0,0 +1,126 @@ +/* START OF COMPILED CODE */ + +import BaseContainer from "../../../../base/BaseContainer"; +/* START-USER-IMPORTS */ +/* END-USER-IMPORTS */ + +export default class SenseiCards extends BaseContainer { + + constructor(scene, x, y) { + super(scene, x ?? 0, y ?? 0); + + /** @type {Phaser.GameObjects.Sprite} */ + this.glow; + + + // glow + const glow = scene.add.sprite(-62, -70, "sensei", "instructions/cards/glow/glow0001"); + this.add(glow); + + // cards + const cards = scene.add.image(-317, -158, "sensei", "instructions/cards/cards"); + cards.setOrigin(0.5007874015748032, 0.5); + this.add(cards); + + this.glow = glow; + + /* START-USER-CTR-CODE */ + + // Slide in from right + this.startX = this.x + 1046 + this.endX = this.x + + // Slide out to bottom + this.startY = this.y + this.endY = this.y + 792 + + this.tween = null + + this.bounceDelay = (1 / 24) * 1000 + + /* END-USER-CTR-CODE */ + } + + + /* START-USER-CODE */ + + show() { + this.removeTween() + + this.x = this.startX + this.y = this.startY + + this.glow.play('instructions/cards/glow') + + super.show() + + this.playShow() + } + + playShow() { + this.tween = this.scene.tweens.add({ + targets: this, + + x: { from: this.startX, to: this.endX }, + duration: 542, + + onComplete: () => this.onShowTweenComplete(), + }) + } + + onShowTweenComplete() { + // Create bounce effect at end of tween + this.scaleX = 1.035 + + // Reset scale + this.scene.time.delayedCall(this.bounceDelay, () => this.resetScale()) + } + + close() { + this.removeTween() + + this.x = this.endX + this.y = this.startY + + this.scaleY = 1.08 + + this.scene.time.delayedCall(this.bounceDelay, () => this.playClose()) + } + + playClose() { + this.resetScale() + + this.tween = this.scene.tweens.add({ + targets: this, + + y: { from: this.startY, to: this.endY }, + duration: 417 + }) + } + + stop() { + this.glow.stop() + + if (this.tween) { + this.removeTween() + } + } + + removeTween() { + if (!this.tween) { + return + } + + this.tween.remove() + this.tween = null + } + + resetScale() { + this.scaleX = 1 + this.scaleY = 1 + } + + /* END-USER-CODE */ +} + +/* END OF COMPILED CODE */ diff --git a/src/scenes/games/sensei/instructions/cards/SenseiCards.scene b/src/scenes/games/sensei/instructions/cards/SenseiCards.scene new file mode 100644 index 00000000..63685819 --- /dev/null +++ b/src/scenes/games/sensei/instructions/cards/SenseiCards.scene @@ -0,0 +1,56 @@ +{ + "id": "222ec92d-eefc-4309-a7b6-c43572c61a60", + "sceneType": "PREFAB", + "settings": { + "compilerInsertSpaces": true, + "javaScriptInitFieldsInConstructor": true, + "exportClass": true, + "autoImport": true, + "superClassName": "BaseContainer", + "preloadMethodName": "", + "preloadPackFiles": [], + "createMethodName": "", + "borderWidth": 1520, + "borderHeight": 960 + }, + "displayList": [ + { + "type": "Container", + "id": "a02827a6-649c-410a-895b-8393db17fcdd", + "label": "container_1", + "list": [ + { + "type": "Sprite", + "id": "5056498b-5368-4fda-8832-dd946f2c2564", + "label": "glow", + "scope": "CLASS", + "texture": { + "key": "sensei", + "frame": "instructions/cards/glow/glow0001" + }, + "x": -62, + "y": -70 + }, + { + "type": "Image", + "id": "741b5789-3f18-450c-9821-fcdb70ec480e", + "label": "cards", + "texture": { + "key": "sensei", + "frame": "instructions/cards/cards" + }, + "x": -317, + "y": -158, + "originX": 0.5007874015748032 + } + ] + } + ], + "plainObjects": [], + "meta": { + "app": "Phaser Editor 2D - Scene Editor", + "url": "https://phasereditor2d.com", + "contentType": "phasereditor2d.core.scene.SceneContentType", + "version": 4 + } +} \ No newline at end of file From 5c0284a0254fb1dc0187f6d285520adb72b0ced1 Mon Sep 17 00:00:00 2001 From: wizguin <16276645+wizguin@users.noreply.github.com> Date: Wed, 6 Sep 2023 15:08:42 +0100 Subject: [PATCH 180/200] cardjitsu: Added SenseiInstructions prefab --- .../sensei/instructions/SenseiInstructions.js | 216 ++++++++++++++++++ .../instructions/SenseiInstructions.scene | 202 ++++++++++++++++ 2 files changed, 418 insertions(+) create mode 100644 src/scenes/games/sensei/instructions/SenseiInstructions.js create mode 100644 src/scenes/games/sensei/instructions/SenseiInstructions.scene diff --git a/src/scenes/games/sensei/instructions/SenseiInstructions.js b/src/scenes/games/sensei/instructions/SenseiInstructions.js new file mode 100644 index 00000000..db3debe3 --- /dev/null +++ b/src/scenes/games/sensei/instructions/SenseiInstructions.js @@ -0,0 +1,216 @@ +/* START OF COMPILED CODE */ + +import BaseContainer from "../../../base/BaseContainer"; +import SenseiBubble from "./bubble/SenseiBubble"; +import SenseiBelt from "./belt/SenseiBelt"; +import SenseiCards from "./cards/SenseiCards"; +/* START-USER-IMPORTS */ +/* END-USER-IMPORTS */ + +export default class SenseiInstructions extends BaseContainer { + + constructor(scene, x, y) { + super(scene, x ?? 0, y ?? 0); + + /** @type {Phaser.GameObjects.Sprite} */ + this.ninja; + /** @type {SenseiBubble} */ + this.bubble; + /** @type {SenseiBelt} */ + this.belt; + /** @type {Phaser.GameObjects.Sprite} */ + this.help; + /** @type {Phaser.GameObjects.Sprite} */ + this.winDifferent; + /** @type {Phaser.GameObjects.Sprite} */ + this.winSame; + /** @type {Phaser.GameObjects.Sprite} */ + this.tie; + /** @type {Phaser.GameObjects.Sprite} */ + this.fire; + /** @type {Phaser.GameObjects.Sprite} */ + this.snow; + /** @type {Phaser.GameObjects.Sprite} */ + this.water; + /** @type {Phaser.GameObjects.Sprite} */ + this.pick; + /** @type {SenseiCards} */ + this.cards; + + + // ninja + const ninja = scene.add.sprite(1025, 558, "sensei", "instructions/ninja/ninja0035"); + ninja.setOrigin(0.5006226650062267, 0.5008976660682226); + ninja.visible = false; + this.add(ninja); + + // bubble + const bubble = new SenseiBubble(scene, 1025, 558); + bubble.visible = false; + this.add(bubble); + + // belt + const belt = new SenseiBelt(scene, 979, 547); + belt.visible = false; + this.add(belt); + + // help + const help = scene.add.sprite(1150, 646, "sensei", "instructions/help/help0001"); + help.setOrigin(0.5003996802557954, 0.5); + help.visible = false; + this.add(help); + + // winDifferent + const winDifferent = scene.add.sprite(987, 1335, "sensei", "instructions/win_different/win0091"); + winDifferent.visible = false; + this.add(winDifferent); + + // winSame + const winSame = scene.add.sprite(1826, 484, "sensei", "instructions/win_same/win0090"); + winSame.setOrigin(0.5002171081198437, 0.5); + winSame.visible = false; + this.add(winSame); + + // tie + const tie = scene.add.sprite(1093, 483, "sensei", "instructions/tie/tie0040"); + tie.setOrigin(0.5006353240152478, 0.5); + tie.visible = false; + this.add(tie); + + // fire + const fire = scene.add.sprite(1057, 440, "sensei", "instructions/fire/fire0056"); + fire.setOrigin(0.5007704160246533, 0.5016835016835017); + fire.visible = false; + this.add(fire); + + // snow + const snow = scene.add.sprite(949, 441, "sensei", "instructions/snow/snow0056"); + snow.setOrigin(0.5007898894154819, 0.5016835016835017); + snow.visible = false; + this.add(snow); + + // water + const water = scene.add.sprite(1057, 440, "sensei", "instructions/water/water0056"); + water.setOrigin(0.5007704160246533, 0.5016835016835017); + water.visible = false; + this.add(water); + + // pick + const pick = scene.add.sprite(1564, 1004, "sensei", "instructions/pick/pick0001"); + pick.visible = false; + this.add(pick); + + // cards + const cards = new SenseiCards(scene, 1378, 658); + cards.visible = true; + this.add(cards); + + this.ninja = ninja; + this.bubble = bubble; + this.belt = belt; + this.help = help; + this.winDifferent = winDifferent; + this.winSame = winSame; + this.tie = tie; + this.fire = fire; + this.snow = snow; + this.water = water; + this.pick = pick; + this.cards = cards; + + /* START-USER-CTR-CODE */ + + this.hideAll() + + /* END-USER-CTR-CODE */ + } + + + /* START-USER-CODE */ + + showCards() { + this.hideAll() + + this.cards.show() + } + + hideCards() { + this.cards.close() + } + + showPick() { + this.showAndPlaySprite(this.pick, 'instructions/pick') + } + + showWater() { + this.showAndPlaySprite(this.water, 'instructions/water') + } + + showSnow() { + this.showAndPlaySprite(this.snow, 'instructions/snow') + } + + showFire() { + this.showAndPlaySprite(this.fire, 'instructions/fire') + } + + showTie() { + this.showAndPlaySprite(this.tie, 'instructions/tie') + } + + showWinSame() { + this.showAndPlaySprite(this.winSame, 'instructions/win_same') + } + + showWinDifferent() { + this.showAndPlaySprite(this.winDifferent, 'instructions/win_different') + } + + showHelp() { + this.showAndPlaySprite(this.help, 'instructions/help_start') + + this.help.once('animationcomplete-instructions/help_start', () => { + this.help.play('instructions/help_loop') + }) + } + + showCompete() { + this.hideAll() + + this.bubble.showCompete() + } + + showBelt() { + this.hideAll() + + this.belt.show() + } + + showBlackBelt() { + this.hideAll() + + this.bubble.showBlackBelt() + } + + showNinja() { + this.showAndPlaySprite(this.ninja, 'instructions/ninja') + } + + showAndPlaySprite(sprite, animKey) { + this.hideAll() + + sprite.visible = true + sprite.play(animKey) + } + + hideAll() { + this.each(child => { + child.stop() + child.visible = false + }) + } + + /* END-USER-CODE */ +} + +/* END OF COMPILED CODE */ diff --git a/src/scenes/games/sensei/instructions/SenseiInstructions.scene b/src/scenes/games/sensei/instructions/SenseiInstructions.scene new file mode 100644 index 00000000..c486bc89 --- /dev/null +++ b/src/scenes/games/sensei/instructions/SenseiInstructions.scene @@ -0,0 +1,202 @@ +{ + "id": "7b12f529-40c2-42c2-a0a5-f84d3040a7fe", + "sceneType": "PREFAB", + "settings": { + "compilerInsertSpaces": true, + "javaScriptInitFieldsInConstructor": true, + "exportClass": true, + "autoImport": true, + "superClassName": "BaseContainer", + "preloadMethodName": "", + "preloadPackFiles": [], + "createMethodName": "", + "borderWidth": 1520, + "borderHeight": 960 + }, + "displayList": [ + { + "type": "Container", + "id": "9c2d42b1-a753-45da-8ac2-31cf4a41cddc", + "label": "instructions", + "list": [ + { + "type": "Sprite", + "id": "26e917db-c028-470c-ba9e-317f90ba68b9", + "label": "ninja", + "scope": "CLASS", + "texture": { + "key": "sensei", + "frame": "instructions/ninja/ninja0035" + }, + "x": 1025, + "y": 558, + "originX": 0.5006226650062267, + "originY": 0.5008976660682226, + "visible": false + }, + { + "prefabId": "522cce2c-95b0-443c-8abd-e776fae3b36a", + "id": "d594291c-4950-4a6b-a4d9-2e444b76a38e", + "unlock": [ + "x", + "y", + "visible" + ], + "label": "bubble", + "scope": "CLASS", + "x": 1025, + "y": 558, + "visible": false + }, + { + "prefabId": "4f8d4522-9b0f-44e6-b42b-864b442c8610", + "id": "854bd9ca-ac7f-4714-bca1-ab60f0459c73", + "unlock": [ + "x", + "y", + "visible" + ], + "label": "belt", + "scope": "CLASS", + "x": 979, + "y": 547, + "visible": false + }, + { + "type": "Sprite", + "id": "aa86bf5a-4948-48e1-89da-ca19e1002398", + "label": "help", + "scope": "CLASS", + "texture": { + "key": "sensei", + "frame": "instructions/help/help0001" + }, + "x": 1150, + "y": 646, + "originX": 0.5003996802557954, + "visible": false + }, + { + "type": "Sprite", + "id": "5338c6ce-8dc9-4623-b334-53b971478d7c", + "label": "winDifferent", + "scope": "CLASS", + "texture": { + "key": "sensei", + "frame": "instructions/win_different/win0091" + }, + "x": 987, + "y": 1335, + "visible": false + }, + { + "type": "Sprite", + "id": "5e425442-0702-407d-9d28-a059391f8ce3", + "label": "winSame", + "scope": "CLASS", + "texture": { + "key": "sensei", + "frame": "instructions/win_same/win0090" + }, + "x": 1826, + "y": 484, + "originX": 0.5002171081198437, + "visible": false + }, + { + "type": "Sprite", + "id": "c89b4d82-979c-43dd-9196-62ee7c16a495", + "label": "tie", + "scope": "CLASS", + "texture": { + "key": "sensei", + "frame": "instructions/tie/tie0040" + }, + "x": 1093, + "y": 483, + "originX": 0.5006353240152478, + "visible": false + }, + { + "type": "Sprite", + "id": "90c0fd72-05a3-47e5-a4d6-5899099ed769", + "label": "fire", + "scope": "CLASS", + "texture": { + "key": "sensei", + "frame": "instructions/fire/fire0056" + }, + "x": 1057, + "y": 440, + "originX": 0.5007704160246533, + "originY": 0.5016835016835017, + "visible": false + }, + { + "type": "Sprite", + "id": "42e6ab7c-2bf1-4fd6-890c-85ffb6586851", + "label": "snow", + "scope": "CLASS", + "texture": { + "key": "sensei", + "frame": "instructions/snow/snow0056" + }, + "x": 949, + "y": 441, + "originX": 0.5007898894154819, + "originY": 0.5016835016835017, + "visible": false + }, + { + "type": "Sprite", + "id": "92e15995-dd48-4803-be48-7798b79c1b2b", + "label": "water", + "scope": "CLASS", + "texture": { + "key": "sensei", + "frame": "instructions/water/water0056" + }, + "x": 1057, + "y": 440, + "originX": 0.5007704160246533, + "originY": 0.5016835016835017, + "visible": false + }, + { + "type": "Sprite", + "id": "3339fcf5-d715-4ff5-8d81-db0b8c3a477e", + "label": "pick", + "scope": "CLASS", + "texture": { + "key": "sensei", + "frame": "instructions/pick/pick0001" + }, + "x": 1564, + "y": 1004, + "visible": false + }, + { + "prefabId": "222ec92d-eefc-4309-a7b6-c43572c61a60", + "id": "7702a0ab-d806-4596-be2d-7e15c4e692c1", + "unlock": [ + "x", + "y", + "visible" + ], + "label": "cards", + "scope": "CLASS", + "x": 1378, + "y": 658, + "visible": true + } + ] + } + ], + "plainObjects": [], + "meta": { + "app": "Phaser Editor 2D - Scene Editor", + "url": "https://phasereditor2d.com", + "contentType": "phasereditor2d.core.scene.SceneContentType", + "version": 4 + } +} \ No newline at end of file From 50ec2be5b1485096ae26efba6638ab3df10f54b9 Mon Sep 17 00:00:00 2001 From: wizguin <16276645+wizguin@users.noreply.github.com> Date: Wed, 6 Sep 2023 20:21:03 +0100 Subject: [PATCH 181/200] cardjitsu: Add dojo music --- src/scenes/rooms/dojo/Dojo.js | 1 + 1 file changed, 1 insertion(+) diff --git a/src/scenes/rooms/dojo/Dojo.js b/src/scenes/rooms/dojo/Dojo.js index 859f228f..04938c8a 100644 --- a/src/scenes/rooms/dojo/Dojo.js +++ b/src/scenes/rooms/dojo/Dojo.js @@ -42,6 +42,7 @@ export default class Dojo extends RoomScene { } this.roomAnims = true + this.music = 21 this.waddles = {} From 47f8e3d195d94986816e82a75032cc6e2527c6d1 Mon Sep 17 00:00:00 2001 From: wizguin <16276645+wizguin@users.noreply.github.com> Date: Thu, 7 Sep 2023 16:06:00 +0100 Subject: [PATCH 182/200] cardjitsu: Moved belt colors to own config file --- src/scenes/games/sensei/config/BeltColors.js | 1 + src/scenes/games/sensei/instructions/belt/SenseiBelt.js | 9 +++++---- .../games/sensei/instructions/bubble/SenseiBubbleWalk.js | 7 ++++--- src/scenes/games/sensei/widget/award/SenseiAward.js | 8 ++++---- 4 files changed, 14 insertions(+), 11 deletions(-) create mode 100644 src/scenes/games/sensei/config/BeltColors.js diff --git a/src/scenes/games/sensei/config/BeltColors.js b/src/scenes/games/sensei/config/BeltColors.js new file mode 100644 index 00000000..c28ac830 --- /dev/null +++ b/src/scenes/games/sensei/config/BeltColors.js @@ -0,0 +1 @@ +export default [16777215, 16776960, 16737792, 3394560, 13260, 13369344, 6684927, 6697728, 4473924] diff --git a/src/scenes/games/sensei/instructions/belt/SenseiBelt.js b/src/scenes/games/sensei/instructions/belt/SenseiBelt.js index 69749b64..72442051 100644 --- a/src/scenes/games/sensei/instructions/belt/SenseiBelt.js +++ b/src/scenes/games/sensei/instructions/belt/SenseiBelt.js @@ -3,6 +3,9 @@ import BaseContainer from "../../../../base/BaseContainer"; import SimpleButton from "../../../../components/SimpleButton"; /* START-USER-IMPORTS */ + +import BeltColors from '../../config/BeltColors' + /* END-USER-IMPORTS */ export default class SenseiBelt extends BaseContainer { @@ -38,8 +41,6 @@ export default class SenseiBelt extends BaseContainer { /* START-USER-CTR-CODE */ this.current = 0 - this.beltColors = [16777215, 16776960, 16737792, 3394560, 13260, 13369344, 6684927, 6697728, 4473924] - this.tween = null /* END-USER-CTR-CODE */ @@ -67,13 +68,13 @@ export default class SenseiBelt extends BaseContainer { } onBeltClick() { - this.current = (this.current + 1) % this.beltColors.length + this.current = (this.current + 1) % BeltColors.length this.updateColor() } updateColor() { - this.color.tint = this.beltColors[this.current] + this.color.tint = BeltColors[this.current] } stop() { diff --git a/src/scenes/games/sensei/instructions/bubble/SenseiBubbleWalk.js b/src/scenes/games/sensei/instructions/bubble/SenseiBubbleWalk.js index f71dca37..04ab7d54 100644 --- a/src/scenes/games/sensei/instructions/bubble/SenseiBubbleWalk.js +++ b/src/scenes/games/sensei/instructions/bubble/SenseiBubbleWalk.js @@ -2,6 +2,9 @@ import BaseContainer from "../../../../base/BaseContainer"; /* START-USER-IMPORTS */ + +import BeltColors from '../../config/BeltColors' + /* END-USER-IMPORTS */ export default class SenseiBubbleWalk extends BaseContainer { @@ -104,8 +107,6 @@ export default class SenseiBubbleWalk extends BaseContainer { this.end = 70 - this.beltColors = [16777215, 16776960, 16737792, 3394560, 13260, 13369344, 6684927, 6697728, 4473924] - this.createAnims() // Start hidden @@ -127,7 +128,7 @@ export default class SenseiBubbleWalk extends BaseContainer { this.beltSprites.forEach(sprite => sprite.visible = hasBelt) if (hasBelt) { - this.belt.tint = this.beltColors[rank - 1] + this.belt.tint = BeltColors[rank - 1] } } diff --git a/src/scenes/games/sensei/widget/award/SenseiAward.js b/src/scenes/games/sensei/widget/award/SenseiAward.js index 4cd38ce1..97426ec9 100644 --- a/src/scenes/games/sensei/widget/award/SenseiAward.js +++ b/src/scenes/games/sensei/widget/award/SenseiAward.js @@ -2,6 +2,9 @@ import BaseContainer from "../../../../base/BaseContainer"; /* START-USER-IMPORTS */ + +import BeltColors from '../../config/BeltColors' + /* END-USER-IMPORTS */ export default class SenseiAward extends BaseContainer { @@ -46,9 +49,6 @@ export default class SenseiAward extends BaseContainer { this.ninja = ninja; /* START-USER-CTR-CODE */ - - this.colors = [16777215, 16776960, 16737792, 3394560, 13260, 13369344, 6684927, 6697728, 4473924, 4473924] - /* END-USER-CTR-CODE */ } @@ -57,7 +57,7 @@ export default class SenseiAward extends BaseContainer { showBelt(rank) { this.showBeltSprites(true) - this.color.tint = this.colors[rank - 1] + this.color.tint = BeltColors[rank - 1] this.show() } From 7cfb25a3070cfe7c26f7998270da3b12e8eefef3 Mon Sep 17 00:00:00 2001 From: wizguin <16276645+wizguin@users.noreply.github.com> Date: Mon, 11 Sep 2023 11:10:36 +0100 Subject: [PATCH 183/200] cardjitsu: Update crumbs format --- src/engine/loaders/CardLoader.js | 4 ++-- src/scenes/games/card/card/CardJitsuCard.js | 4 ++-- src/scenes/games/ninjaprogress/views/CardsView.js | 6 +++--- src/scenes/games/ninjaprogress/views/CardsViewCard.js | 4 ++-- 4 files changed, 9 insertions(+), 9 deletions(-) diff --git a/src/engine/loaders/CardLoader.js b/src/engine/loaders/CardLoader.js index ea894b8b..3faf1b28 100644 --- a/src/engine/loaders/CardLoader.js +++ b/src/engine/loaders/CardLoader.js @@ -11,7 +11,7 @@ export default class CardLoader extends BaseLoader { } loadCard(card, callback) { - let key = this.getKey(card.card_id) + let key = this.getKey(card.id) if (this.checkComplete('image', key, () => { this.onFileComplete(key, card, callback) @@ -19,7 +19,7 @@ export default class CardLoader extends BaseLoader { return } - this.image(key, `${card.card_id}.png`) + this.image(key, `${card.id}.png`) this.start() } diff --git a/src/scenes/games/card/card/CardJitsuCard.js b/src/scenes/games/card/card/CardJitsuCard.js index b089186a..e7ca7984 100644 --- a/src/scenes/games/card/card/CardJitsuCard.js +++ b/src/scenes/games/card/card/CardJitsuCard.js @@ -182,8 +182,8 @@ export default class CardJitsuCard extends BaseContainer { updateCard(card) { let tint = layout.colors[card.color].color - this.id = card.card_id - this.powerId = card.power_id + this.id = card.id + this.powerId = card.powerId this.elementId = card.element this.value = card.value this.color = card.color diff --git a/src/scenes/games/ninjaprogress/views/CardsView.js b/src/scenes/games/ninjaprogress/views/CardsView.js index c5ad1221..7e77a6a7 100644 --- a/src/scenes/games/ninjaprogress/views/CardsView.js +++ b/src/scenes/games/ninjaprogress/views/CardsView.js @@ -135,9 +135,9 @@ export default class CardsView extends BaseContainer { } let card = page[i] - let key = this.cardLoader.getKey(card.card_id) + let key = this.cardLoader.getKey(card.id) - prefab.id = card.card_id + prefab.id = card.id this.cardLoader.loadCard(card, () => this.onCardLoad(key, card, prefab)) @@ -168,7 +168,7 @@ export default class CardsView extends BaseContainer { } onCardLoad(key, card, prefab) { - if (prefab.id == card.card_id) { + if (prefab.id == card.id) { prefab.setIcon(key) } } diff --git a/src/scenes/games/ninjaprogress/views/CardsViewCard.js b/src/scenes/games/ninjaprogress/views/CardsViewCard.js index b5cbd2b9..49f33087 100644 --- a/src/scenes/games/ninjaprogress/views/CardsViewCard.js +++ b/src/scenes/games/ninjaprogress/views/CardsViewCard.js @@ -99,11 +99,11 @@ export default class CardsViewCard extends BaseContainer { this.element.setFrame(`card/${card.element}`) - if (card.power_id > 0) { + if (card.powerId > 0) { this.glow.tint = tint } - this.glow.visible = card.power_id > 0 + this.glow.visible = card.powerId > 0 super.show() } From 2085d1b36d541c37ed9b2828768a967617e258e6 Mon Sep 17 00:00:00 2001 From: wizguin <16276645+wizguin@users.noreply.github.com> Date: Mon, 11 Sep 2023 12:32:32 +0100 Subject: [PATCH 184/200] cardjitsu: Fetch card description from crumbs --- src/scenes/games/card/card/CardJitsuCard.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/scenes/games/card/card/CardJitsuCard.js b/src/scenes/games/card/card/CardJitsuCard.js index e7ca7984..9b1910a3 100644 --- a/src/scenes/games/card/card/CardJitsuCard.js +++ b/src/scenes/games/card/card/CardJitsuCard.js @@ -187,7 +187,10 @@ export default class CardJitsuCard extends BaseContainer { this.elementId = card.element this.value = card.value this.color = card.color - this.description = card.description || '' + + this.description = this.powerId + ? this.getString(`pow_${this.powerId}`) + : '' this.valueText.text = card.value this.colorSprite.tint = tint From 7dbf149eb7b96ef7a9c94585d2802e8855eb3c56 Mon Sep 17 00:00:00 2001 From: wizguin <16276645+wizguin@users.noreply.github.com> Date: Mon, 11 Sep 2023 15:58:35 +0100 Subject: [PATCH 185/200] Added dojo cauldron smoke --- src/scenes/rooms/dojo/Dojo.js | 8 ++++++++ src/scenes/rooms/dojo/Dojo.scene | 12 ++++++++++++ 2 files changed, 20 insertions(+) diff --git a/src/scenes/rooms/dojo/Dojo.js b/src/scenes/rooms/dojo/Dojo.js index 04938c8a..f22ebf20 100644 --- a/src/scenes/rooms/dojo/Dojo.js +++ b/src/scenes/rooms/dojo/Dojo.js @@ -28,6 +28,8 @@ export default class Dojo extends RoomScene { this.waddle200; /** @type {Phaser.GameObjects.Image} */ this.cards; + /** @type {Phaser.GameObjects.Sprite} */ + this.cauldronSmoke; /* START-USER-CTR-CODE */ @@ -121,6 +123,9 @@ export default class Dojo extends RoomScene { const cauldronBack = this.add.image(918, 540, "dojo", "cauldron/back"); cauldronBack.setOrigin(0, 0); + // cauldronSmoke + const cauldronSmoke = this.add.sprite(954, 511, "dojo", "cauldron/smoke/smoke0001"); + // cauldronFront const cauldronFront = this.add.image(926, 550, "dojo", "cauldron/front"); cauldronFront.setOrigin(0, 0); @@ -183,6 +188,7 @@ export default class Dojo extends RoomScene { this.waddle201 = waddle201; this.waddle200 = waddle200; this.cards = cards; + this.cauldronSmoke = cauldronSmoke; this.events.emit("scene-awake"); } @@ -197,6 +203,8 @@ export default class Dojo extends RoomScene { create() { super.create() + this.cauldronSmoke.play('smoke') + this.cards.depth = 960 this.cards.visible = this.userHasDeck } diff --git a/src/scenes/rooms/dojo/Dojo.scene b/src/scenes/rooms/dojo/Dojo.scene index 8721eb4e..71048e85 100644 --- a/src/scenes/rooms/dojo/Dojo.scene +++ b/src/scenes/rooms/dojo/Dojo.scene @@ -262,6 +262,18 @@ "originX": 0, "originY": 0 }, + { + "type": "Sprite", + "id": "af14ada9-4962-47b2-a360-9f49189a5894", + "label": "cauldronSmoke", + "scope": "CLASS", + "texture": { + "key": "dojo", + "frame": "cauldron/smoke/smoke0001" + }, + "x": 954, + "y": 511 + }, { "type": "Image", "id": "cb465f3b-f7c4-491c-9b8b-035cccf288c1", From 238c0c704ffaa3b63fb1a01488ff9c87cbf8d30a Mon Sep 17 00:00:00 2001 From: wizguin <16276645+wizguin@users.noreply.github.com> Date: Mon, 11 Sep 2023 16:00:43 +0100 Subject: [PATCH 186/200] cardjitsu: Use strings.json --- src/scenes/games/card/CardJitsu.js | 2 +- src/scenes/games/card/help/CardJitsuHelp.js | 2 ++ src/scenes/games/sensei/match/SenseiMatch.js | 2 ++ src/scenes/games/sensei/match/SenseiMatch.scene | 17 +++-------------- src/scenes/games/sensei/widget/SenseiWidget.js | 6 ++---- 5 files changed, 10 insertions(+), 19 deletions(-) diff --git a/src/scenes/games/card/CardJitsu.js b/src/scenes/games/card/CardJitsu.js index 4c9e5e05..14daee34 100644 --- a/src/scenes/games/card/CardJitsu.js +++ b/src/scenes/games/card/CardJitsu.js @@ -627,7 +627,7 @@ export default class CardJitsu extends GameScene { } let loserUsername = this.players[this.getOppositeSeat(winSeat)].username - let loserMessage = this.getFormatString('has_no_cards', loserUsername) + let loserMessage = this.getFormatString('sudden_death', loserUsername) return `${loserMessage}\n${message}` } diff --git a/src/scenes/games/card/help/CardJitsuHelp.js b/src/scenes/games/card/help/CardJitsuHelp.js index aa6731ee..9714b4d9 100644 --- a/src/scenes/games/card/help/CardJitsuHelp.js +++ b/src/scenes/games/card/help/CardJitsuHelp.js @@ -30,6 +30,8 @@ export default class CardJitsuHelp extends BaseContainer { /* START-USER-CTR-CODE */ + text.text = this.getString('help_card') + this.closedY = this.y this.openY = this.y + 464 diff --git a/src/scenes/games/sensei/match/SenseiMatch.js b/src/scenes/games/sensei/match/SenseiMatch.js index af8c5c62..1ebf439c 100644 --- a/src/scenes/games/sensei/match/SenseiMatch.js +++ b/src/scenes/games/sensei/match/SenseiMatch.js @@ -80,6 +80,8 @@ export default class SenseiMatch extends BaseContainer { /* START-USER-CTR-CODE */ + message.text = this.getString('widget_wait') + // Spinner scene.tweens.add({ targets: spinner, diff --git a/src/scenes/games/sensei/match/SenseiMatch.scene b/src/scenes/games/sensei/match/SenseiMatch.scene index 32220b6c..485ac270 100644 --- a/src/scenes/games/sensei/match/SenseiMatch.scene +++ b/src/scenes/games/sensei/match/SenseiMatch.scene @@ -31,7 +31,6 @@ "type": "Image", "id": "5688e8cb-f7d7-45bc-b786-59a8031f6dc7", "label": "bg", - "components": [], "texture": { "key": "sensei", "frame": "match/window" @@ -46,11 +45,8 @@ ], "label": "opponent", "scope": "CLASS", - "components": [], "x": 0, - "y": 98, - "nestedPrefabs": [], - "list": [] + "y": 98 }, { "prefabId": "07fe953a-6cae-4a48-aa0d-6ab406415f4e", @@ -61,18 +57,14 @@ ], "label": "myPlayer", "scope": "CLASS", - "components": [], "x": 0, - "y": 46, - "nestedPrefabs": [], - "list": [] + "y": 46 }, { "type": "Text", "id": "7b204eaf-dbd4-42cb-8322-ce985fdd95fd", "label": "message", "scope": "CLASS", - "components": [], "y": -20, "originX": 0.5, "originY": 0.5, @@ -87,7 +79,6 @@ "id": "150d74b5-74fe-4764-9d54-4a697e9eda43", "label": "time", "scope": "CLASS", - "components": [], "y": -100, "originX": 0.5, "originY": 0.5, @@ -103,7 +94,6 @@ "id": "fd40b908-3817-45e9-9d72-e9fa95d657f1", "label": "spinner", "scope": "CLASS", - "components": [], "texture": { "key": "sensei", "frame": "match/spinner" @@ -131,7 +121,6 @@ "type": "Image", "id": "931e5701-f927-410a-9586-ec26268a6b61", "label": "xIcon", - "components": [], "texture": { "key": "main", "frame": "blue-x" @@ -147,6 +136,6 @@ "app": "Phaser Editor 2D - Scene Editor", "url": "https://phasereditor2d.com", "contentType": "phasereditor2d.core.scene.SceneContentType", - "version": 3 + "version": 4 } } \ No newline at end of file diff --git a/src/scenes/games/sensei/widget/SenseiWidget.js b/src/scenes/games/sensei/widget/SenseiWidget.js index ddf98ab8..be59b084 100644 --- a/src/scenes/games/sensei/widget/SenseiWidget.js +++ b/src/scenes/games/sensei/widget/SenseiWidget.js @@ -74,8 +74,6 @@ export default class SenseiWidget extends BaseContainer { this.rankId = 1 - this.beltNames = ['White', 'Yellow', 'Orange', 'Green', 'Blue', 'Red', 'Purple', 'Brown', 'Black'] - this.addBackgroundEvent('pointerup', this.forwardSequence, this) /* END-USER-CTR-CODE */ @@ -84,8 +82,8 @@ export default class SenseiWidget extends BaseContainer { /* START-USER-CODE */ - get beltName() { - return this.beltNames[this.rankId - 1] + get beltString() { + return this.getString(`belt_${this.rankId}`) } get speechIndex() { From 1a202e6902d0f370c37ca2af778c633e7bb3daa7 Mon Sep 17 00:00:00 2001 From: wizguin <16276645+wizguin@users.noreply.github.com> Date: Mon, 11 Sep 2023 16:00:58 +0100 Subject: [PATCH 187/200] cardjitsu: Clamp rank in SenseiWidget --- src/scenes/games/sensei/widget/SenseiWidget.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/scenes/games/sensei/widget/SenseiWidget.js b/src/scenes/games/sensei/widget/SenseiWidget.js index be59b084..1fd3f692 100644 --- a/src/scenes/games/sensei/widget/SenseiWidget.js +++ b/src/scenes/games/sensei/widget/SenseiWidget.js @@ -112,9 +112,9 @@ export default class SenseiWidget extends BaseContainer { } rankUp(rank) { - this.rankId = rank + this.rankId = Phaser.Math.Clamp(rank, 1, 9) - if (rank > this.beltNames.length) { + if (rank > 9) { this.startSequence(sequences.maskAward) } else { this.startSequence(sequences.beltAward) From 1b8c0fbebaaba92e7184e26fa0e46285a3fcb370 Mon Sep 17 00:00:00 2001 From: wizguin <16276645+wizguin@users.noreply.github.com> Date: Mon, 11 Sep 2023 16:12:42 +0100 Subject: [PATCH 188/200] cardjitsu: Prevent pick when already picked --- src/scenes/games/card/CardJitsu.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/scenes/games/card/CardJitsu.js b/src/scenes/games/card/CardJitsu.js index 14daee34..951bd8aa 100644 --- a/src/scenes/games/card/CardJitsu.js +++ b/src/scenes/games/card/CardJitsu.js @@ -546,7 +546,7 @@ export default class CardJitsu extends GameScene { } pickCard(card) { - if (!this.myPlayer.pickableCards.includes(card)) { + if (this.myPlayer.pick || !this.myPlayer.pickableCards.includes(card)) { return } From bd455dd6dfb0f43ca4247bec7c85c9d535fefae5 Mon Sep 17 00:00:00 2001 From: wizguin <16276645+wizguin@users.noreply.github.com> Date: Mon, 11 Sep 2023 19:45:46 +0100 Subject: [PATCH 189/200] cardjitsu: Added SenseiSequences --- .../games/sensei/config/SenseiSequences.js | 166 ++++++++++++++++++ 1 file changed, 166 insertions(+) create mode 100644 src/scenes/games/sensei/config/SenseiSequences.js diff --git a/src/scenes/games/sensei/config/SenseiSequences.js b/src/scenes/games/sensei/config/SenseiSequences.js new file mode 100644 index 00000000..add5f07d --- /dev/null +++ b/src/scenes/games/sensei/config/SenseiSequences.js @@ -0,0 +1,166 @@ +import * as menus from './SenseiMenus' + + +export function beltAward(widget) { + return [ + () => { + widget.showSpeech(widget.getString('help_award_congratulations')) + }, + () => { + widget.showSpeech(widget.getFormatString('help_award_belt_earned', widget.beltString)) + widget.showBelt() + }, + () => { + widget.leaveGame() + } + ] +} + +export function maskAward(widget) { + return [ + () => { + widget.showSpeech(widget.getString('help_defeat_sensei_intro')) + }, + () => { + widget.showSpeech(widget.getString('help_defeat_sensei_kowtows')) + }, + () => { + widget.showSpeech(widget.getString('help_defeat_sensei_gift')) + widget.showMask() + }, + () => { + widget.hideAward() + widget.showHideout() + widget.showSpeech(widget.getString('help_defeat_sensei_final')) + }, + () => { + widget.leaveGame() + } + ] +} + +export function intro(widget) { + return [ + () => { + widget.showSpeech(widget.getString('help_firsttime_welcome')) + }, + () => { + widget.startSequence(introCards) + } + ] +} + +export function introCards(widget) { + return [ + () => { + widget.showSpeech(widget.getString('help_firsttime_tobegin')) + widget.scene.instructions.showCards() + }, + () => { + widget.network.send('add_starter_deck') + + widget.scene.instructions.hideCards() + widget.scene.showMenu(menus.instrWhatDoIDo) + } + ] +} + +export function instrWhatDoIDo(widget) { + return [ + () => { + widget.showSpeech(widget.getString('help_firsttime_improve')) + widget.scene.instructions.showCompete() + }, + () => { + widget.scene.hideInstructions() + widget.showSpeech(widget.getString('help_firsttime_areyouready')) + }, + () => { + widget.scene.hideInstructions() + widget.scene.showMenu(menus.instrYesPlease) + } + ] +} + +export function instrHowToPlay(widget) { + return [ + () => { + widget.showSpeech(widget.getString('help_firsttime_pickacard')) + widget.scene.instructions.showPick() + }, + () => { + widget.showSpeech(widget.getString('help_firsttime_water')) + widget.scene.instructions.showWater() + }, + () => { + widget.showSpeech(widget.getString('help_firsttime_snow')) + widget.scene.instructions.showSnow() + }, + () => { + widget.showSpeech(widget.getString('help_firsttime_fire')) + widget.scene.instructions.showFire() + }, + () => { + widget.showSpeech(widget.getString('help_firsttime_tie')) + widget.scene.instructions.showTie() + }, + () => { + widget.hideSpeech() + widget.scene.hideInstructions() + widget.scene.showMenu(menus.instrHowToWin) + } + ] +} + +export function instrHowToWin(widget) { + return [ + () => { + widget.showSpeech(widget.getString('help_firsttime_howtowin')) + }, + () => { + widget.showSpeech(widget.getString('help_firsttime_winsame')) + widget.scene.instructions.showWinSame() + }, + () => { + widget.showSpeech(widget.getString('help_firsttime_windifferent')) + widget.scene.instructions.showWinDifferent() + }, + () => { + widget.showSpeech(widget.getString('help_firsttime_ingamehelp')) + widget.scene.instructions.showHelp() + }, + () => { + widget.hideSpeech() + widget.scene.hideInstructions() + widget.scene.showMenu(menus.instrHowToNinja) + } + ] +} + +export function instrHowToNinja(widget) { + return [ + () => { + widget.showSpeech(widget.getString('help_firsttime_joking')) + }, + () => { + widget.showSpeech(widget.getString('help_firsttime_gainexp')) + }, + () => { + widget.showSpeech(widget.getString('help_firsttime_belts')) + widget.scene.instructions.showBelt() + }, + () => { + widget.showSpeech(widget.getString('help_firsttime_fightme')) + widget.scene.instructions.showBlackBelt() + }, + () => { + widget.showSpeech(widget.getString('help_firsttime_ninja')) + widget.scene.instructions.showNinja() + }, + () => { + widget.hideSpeech() + widget.scene.hideInstructions() + widget.scene.showMenu(menus.instrCountMeIn) + } + ] +} From 54e440305987665849f4855e0582b19e9f164b85 Mon Sep 17 00:00:00 2001 From: wizguin <16276645+wizguin@users.noreply.github.com> Date: Mon, 11 Sep 2023 19:47:40 +0100 Subject: [PATCH 190/200] cardjitsu: Added SenseiMenus --- src/scenes/games/sensei/config/SenseiMenus.js | 135 ++++++++++++++++++ 1 file changed, 135 insertions(+) create mode 100644 src/scenes/games/sensei/config/SenseiMenus.js diff --git a/src/scenes/games/sensei/config/SenseiMenus.js b/src/scenes/games/sensei/config/SenseiMenus.js new file mode 100644 index 00000000..ac7a29a4 --- /dev/null +++ b/src/scenes/games/sensei/config/SenseiMenus.js @@ -0,0 +1,135 @@ +import * as sequences from './SenseiSequences' + + +export function start(menu) { + return [ + { + text: menu.getString('menu_title_competition'), + icon: 'menu/icon/belt', + + over: () => { + menu.showSpeech(menu.getString('menu_description_competition')) + }, + up: () => { + menu.showMatch() + } + }, + { + text: menu.getString('menu_title_sensei'), + icon: 'menu/icon/sensei', + + over: () => { + menu.showSpeech(menu.getString('menu_description_sensei')) + }, + up: () => { + menu.network.send('join_sensei') + } + }, + { + text: menu.getString('menu_title_instructions'), + icon: 'menu/icon/instructions', + + over: () => { + menu.showSpeech(menu.getString('menu_description_instructions')) + }, + up: () => { + menu.startSequence(sequences.instrHowToPlay) + } + } + ] +} + +export function instrWhatDoIDo(menu) { + return [ + { + text: menu.getString('help_response_whatdoido'), + + up: () => { + menu.startSequence(sequences.instrWhatDoIDo) + } + } + ] +} + +export function instrYesPlease(menu) { + return [ + { + text: menu.getString('help_response_yes'), + + up: () => { + menu.startSequence(sequences.instrHowToPlay) + } + }, + { + text: menu.getString('help_response_no', 'help_response_play'), + + up: () => { + menu.showMatch() + } + } + ] +} + +export function instrHowToWin(menu) { + return [ + { + text: menu.getString('help_response_howtowin'), + + up: () => { + menu.startSequence(sequences.instrHowToWin) + } + }, + { + text: menu.getString('help_response_cantwait', 'help_response_play'), + + up: () => { + menu.showMatch() + } + } + ] +} + +export function instrHowToNinja(menu) { + return [ + { + text: menu.getString('help_response_becomeninja'), + + up: () => { + menu.startSequence(sequences.instrHowToNinja) + } + }, + { + text: menu.getString('help_response_cantwait', 'help_response_play'), + + up: () => { + menu.showMatch() + } + } + ] +} + +export function instrCountMeIn(menu) { + return [ + { + text: menu.getString('help_response_countmein'), + + up: () => { + menu.showMatch() + } + }, + { + text: menu.getString('help_response_tellmeagain'), + + up: () => { + menu.startSequence(sequences.introCards) + } + }, + { + text: menu.getString('help_response_havetogo'), + + up: () => { + menu.world.client.sendJoinLastRoom() + } + } + ] +} From 38836de51153a322f1d5cce93dd577d49a1915a0 Mon Sep 17 00:00:00 2001 From: wizguin <16276645+wizguin@users.noreply.github.com> Date: Mon, 11 Sep 2023 21:55:35 +0100 Subject: [PATCH 191/200] Updated loading game scene --- src/engine/interface/InterfaceController.js | 6 ++++-- src/engine/world/room/RoomFactory.js | 8 +++++--- src/scenes/games/GameScene.js | 5 +++++ 3 files changed, 14 insertions(+), 5 deletions(-) diff --git a/src/engine/interface/InterfaceController.js b/src/engine/interface/InterfaceController.js index 10c01d9b..b401b0c3 100644 --- a/src/engine/interface/InterfaceController.js +++ b/src/engine/interface/InterfaceController.js @@ -94,8 +94,10 @@ export default class InterfaceController extends BaseScene { this.bringToTop('IglooEdit') } - bringToTop(key) { - this.scene.bringToTop(key) + bringToTop(key = null) { + if (key) { + this.scene.bringToTop(key) + } // Keeps InterfaceController scene always on top, for prompts this.scene.bringToTop() diff --git a/src/engine/world/room/RoomFactory.js b/src/engine/world/room/RoomFactory.js index e2b4e32e..5ff4a148 100644 --- a/src/engine/world/room/RoomFactory.js +++ b/src/engine/world/room/RoomFactory.js @@ -49,13 +49,15 @@ export default class RoomFactory { } createGame(args) { - let crumb = this.games[args.game] + let config = this.games[args.game] - if (crumb.flash) { - this.world.ruffle.bootGame(crumb) + if (config.flash) { + this.world.ruffle.bootGame(config) return } + + return this.createRoom({ room: args.game }) } } diff --git a/src/scenes/games/GameScene.js b/src/scenes/games/GameScene.js index 64e94f0a..57b23f69 100644 --- a/src/scenes/games/GameScene.js +++ b/src/scenes/games/GameScene.js @@ -29,10 +29,15 @@ export default class GameScene extends BaseScene { this.setMusic() this.interface.hideLoading() + this.interface.bringToTop() this.world.client.activeSeat = null } + preload() { + this._preload() + } + stop() { this.soundManager.stopAllButMusic() this.scene.stop() From 6223a74bb1abe79125319c1b70c0d1ff26523ae5 Mon Sep 17 00:00:00 2001 From: wizguin <16276645+wizguin@users.noreply.github.com> Date: Tue, 12 Sep 2023 09:31:53 +0100 Subject: [PATCH 192/200] cardjitsu: Instructions load strings --- src/scenes/interface/instructions/ninjabelts/NinjaBelts.js | 2 +- .../instructions/ninjainstructions/NinjaInstructions.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/scenes/interface/instructions/ninjabelts/NinjaBelts.js b/src/scenes/interface/instructions/ninjabelts/NinjaBelts.js index 8a2129ae..5e00bef0 100644 --- a/src/scenes/interface/instructions/ninjabelts/NinjaBelts.js +++ b/src/scenes/interface/instructions/ninjabelts/NinjaBelts.js @@ -1,7 +1,7 @@ export const preload = { key: 'ninjabelts-pack', url: 'assets/media/interface/instructions/ninjabelts/ninjabelts-pack.json', - loadString: '' + loadString: ['loading', 'ninjabelts'] } /* START OF COMPILED CODE */ diff --git a/src/scenes/interface/instructions/ninjainstructions/NinjaInstructions.js b/src/scenes/interface/instructions/ninjainstructions/NinjaInstructions.js index c7ac4bfb..8fd03b87 100644 --- a/src/scenes/interface/instructions/ninjainstructions/NinjaInstructions.js +++ b/src/scenes/interface/instructions/ninjainstructions/NinjaInstructions.js @@ -1,7 +1,7 @@ export const preload = { key: 'ninjainstructions-pack', url: 'assets/media/interface/instructions/ninjainstructions/ninjainstructions-pack.json', - loadString: '' + loadString: ['loading', 'ninjainstructions'] } /* START OF COMPILED CODE */ From 0082d54ed8e15a44c172780b3c14e74f7a744459 Mon Sep 17 00:00:00 2001 From: wizguin <16276645+wizguin@users.noreply.github.com> Date: Tue, 12 Sep 2023 16:39:42 +0100 Subject: [PATCH 193/200] cardjitsu: Separate sensei instructions textures --- src/scenes/games/sensei/Sensei.js | 1 + src/scenes/games/sensei/Sensei.scene | 3 +- .../sensei/instructions/SenseiInstructions.js | 20 +++---- .../instructions/SenseiInstructions.scene | 38 ++++++------ .../sensei/instructions/belt/SenseiBelt.js | 6 +- .../sensei/instructions/belt/SenseiBelt.scene | 12 ++-- .../instructions/bubble/SenseiBubble.js | 4 +- .../instructions/bubble/SenseiBubble.scene | 8 +-- .../instructions/bubble/SenseiBubbleWalk.js | 32 +++++----- .../bubble/SenseiBubbleWalk.scene | 60 +++++++++---------- .../sensei/instructions/cards/SenseiCards.js | 4 +- .../instructions/cards/SenseiCards.scene | 8 +-- 12 files changed, 99 insertions(+), 97 deletions(-) diff --git a/src/scenes/games/sensei/Sensei.js b/src/scenes/games/sensei/Sensei.js index c764a97d..2f920959 100644 --- a/src/scenes/games/sensei/Sensei.js +++ b/src/scenes/games/sensei/Sensei.js @@ -33,6 +33,7 @@ export default class Sensei extends GameScene { _preload() { this.load.pack("sensei-pack", "assets/media/games/sensei/sensei-pack.json"); + this.load.pack("senseiinstructions-pack", "assets/media/games/sensei/instructions/senseiinstructions-pack.json"); } /** @returns {void} */ diff --git a/src/scenes/games/sensei/Sensei.scene b/src/scenes/games/sensei/Sensei.scene index 805a36e0..575e5c85 100644 --- a/src/scenes/games/sensei/Sensei.scene +++ b/src/scenes/games/sensei/Sensei.scene @@ -9,7 +9,8 @@ "superClassName": "GameScene", "preloadMethodName": "_preload", "preloadPackFiles": [ - "yukon/assets/media/games/sensei/sensei-pack.json" + "yukon/assets/media/games/sensei/sensei-pack.json", + "yukon/assets/media/games/sensei/instructions/senseiinstructions-pack.json" ], "createMethodName": "_create", "sceneKey": "Sensei", diff --git a/src/scenes/games/sensei/instructions/SenseiInstructions.js b/src/scenes/games/sensei/instructions/SenseiInstructions.js index db3debe3..6f4b4f3f 100644 --- a/src/scenes/games/sensei/instructions/SenseiInstructions.js +++ b/src/scenes/games/sensei/instructions/SenseiInstructions.js @@ -39,7 +39,7 @@ export default class SenseiInstructions extends BaseContainer { // ninja - const ninja = scene.add.sprite(1025, 558, "sensei", "instructions/ninja/ninja0035"); + const ninja = scene.add.sprite(1025, 558, "senseiinstructions", "ninja/ninja0035"); ninja.setOrigin(0.5006226650062267, 0.5008976660682226); ninja.visible = false; this.add(ninja); @@ -55,54 +55,54 @@ export default class SenseiInstructions extends BaseContainer { this.add(belt); // help - const help = scene.add.sprite(1150, 646, "sensei", "instructions/help/help0001"); + const help = scene.add.sprite(1150, 646, "senseiinstructions", "help/help0001"); help.setOrigin(0.5003996802557954, 0.5); help.visible = false; this.add(help); // winDifferent - const winDifferent = scene.add.sprite(987, 1335, "sensei", "instructions/win_different/win0091"); + const winDifferent = scene.add.sprite(987, 1335, "senseiinstructions", "win_different/win0091"); winDifferent.visible = false; this.add(winDifferent); // winSame - const winSame = scene.add.sprite(1826, 484, "sensei", "instructions/win_same/win0090"); + const winSame = scene.add.sprite(1826, 484, "senseiinstructions", "win_same/win0090"); winSame.setOrigin(0.5002171081198437, 0.5); winSame.visible = false; this.add(winSame); // tie - const tie = scene.add.sprite(1093, 483, "sensei", "instructions/tie/tie0040"); + const tie = scene.add.sprite(1093, 483, "senseiinstructions", "tie/tie0040"); tie.setOrigin(0.5006353240152478, 0.5); tie.visible = false; this.add(tie); // fire - const fire = scene.add.sprite(1057, 440, "sensei", "instructions/fire/fire0056"); + const fire = scene.add.sprite(1057, 440, "senseiinstructions", "fire/fire0056"); fire.setOrigin(0.5007704160246533, 0.5016835016835017); fire.visible = false; this.add(fire); // snow - const snow = scene.add.sprite(949, 441, "sensei", "instructions/snow/snow0056"); + const snow = scene.add.sprite(949, 441, "senseiinstructions", "snow/snow0056"); snow.setOrigin(0.5007898894154819, 0.5016835016835017); snow.visible = false; this.add(snow); // water - const water = scene.add.sprite(1057, 440, "sensei", "instructions/water/water0056"); + const water = scene.add.sprite(1057, 440, "senseiinstructions", "water/water0056"); water.setOrigin(0.5007704160246533, 0.5016835016835017); water.visible = false; this.add(water); // pick - const pick = scene.add.sprite(1564, 1004, "sensei", "instructions/pick/pick0001"); + const pick = scene.add.sprite(1564, 1004, "senseiinstructions", "pick/pick0001"); pick.visible = false; this.add(pick); // cards const cards = new SenseiCards(scene, 1378, 658); - cards.visible = true; + cards.visible = false; this.add(cards); this.ninja = ninja; diff --git a/src/scenes/games/sensei/instructions/SenseiInstructions.scene b/src/scenes/games/sensei/instructions/SenseiInstructions.scene index c486bc89..703e086f 100644 --- a/src/scenes/games/sensei/instructions/SenseiInstructions.scene +++ b/src/scenes/games/sensei/instructions/SenseiInstructions.scene @@ -25,8 +25,8 @@ "label": "ninja", "scope": "CLASS", "texture": { - "key": "sensei", - "frame": "instructions/ninja/ninja0035" + "key": "senseiinstructions", + "frame": "ninja/ninja0035" }, "x": 1025, "y": 558, @@ -68,8 +68,8 @@ "label": "help", "scope": "CLASS", "texture": { - "key": "sensei", - "frame": "instructions/help/help0001" + "key": "senseiinstructions", + "frame": "help/help0001" }, "x": 1150, "y": 646, @@ -82,8 +82,8 @@ "label": "winDifferent", "scope": "CLASS", "texture": { - "key": "sensei", - "frame": "instructions/win_different/win0091" + "key": "senseiinstructions", + "frame": "win_different/win0091" }, "x": 987, "y": 1335, @@ -95,8 +95,8 @@ "label": "winSame", "scope": "CLASS", "texture": { - "key": "sensei", - "frame": "instructions/win_same/win0090" + "key": "senseiinstructions", + "frame": "win_same/win0090" }, "x": 1826, "y": 484, @@ -109,8 +109,8 @@ "label": "tie", "scope": "CLASS", "texture": { - "key": "sensei", - "frame": "instructions/tie/tie0040" + "key": "senseiinstructions", + "frame": "tie/tie0040" }, "x": 1093, "y": 483, @@ -123,8 +123,8 @@ "label": "fire", "scope": "CLASS", "texture": { - "key": "sensei", - "frame": "instructions/fire/fire0056" + "key": "senseiinstructions", + "frame": "fire/fire0056" }, "x": 1057, "y": 440, @@ -138,8 +138,8 @@ "label": "snow", "scope": "CLASS", "texture": { - "key": "sensei", - "frame": "instructions/snow/snow0056" + "key": "senseiinstructions", + "frame": "snow/snow0056" }, "x": 949, "y": 441, @@ -153,8 +153,8 @@ "label": "water", "scope": "CLASS", "texture": { - "key": "sensei", - "frame": "instructions/water/water0056" + "key": "senseiinstructions", + "frame": "water/water0056" }, "x": 1057, "y": 440, @@ -168,8 +168,8 @@ "label": "pick", "scope": "CLASS", "texture": { - "key": "sensei", - "frame": "instructions/pick/pick0001" + "key": "senseiinstructions", + "frame": "pick/pick0001" }, "x": 1564, "y": 1004, @@ -187,7 +187,7 @@ "scope": "CLASS", "x": 1378, "y": 658, - "visible": true + "visible": false } ] } diff --git a/src/scenes/games/sensei/instructions/belt/SenseiBelt.js b/src/scenes/games/sensei/instructions/belt/SenseiBelt.js index 72442051..05f029cb 100644 --- a/src/scenes/games/sensei/instructions/belt/SenseiBelt.js +++ b/src/scenes/games/sensei/instructions/belt/SenseiBelt.js @@ -18,17 +18,17 @@ export default class SenseiBelt extends BaseContainer { // belt - const belt = scene.add.image(0, 0, "sensei", "instructions/belt/belt"); + const belt = scene.add.image(0, 0, "senseiinstructions", "belt/belt"); belt.setOrigin(0.503030303030303, 0.5037037037037037); this.add(belt); // color - const color = scene.add.image(1, -1, "sensei", "instructions/belt/color"); + const color = scene.add.image(1, -1, "senseiinstructions", "belt/color"); color.setOrigin(0.503448275862069, 0.5); this.add(color); // shadow - const shadow = scene.add.image(1, 4, "sensei", "instructions/belt/shadow"); + const shadow = scene.add.image(1, 4, "senseiinstructions", "belt/shadow"); shadow.setOrigin(0.503448275862069, 0.5); this.add(shadow); diff --git a/src/scenes/games/sensei/instructions/belt/SenseiBelt.scene b/src/scenes/games/sensei/instructions/belt/SenseiBelt.scene index b7fe3b04..340d2455 100644 --- a/src/scenes/games/sensei/instructions/belt/SenseiBelt.scene +++ b/src/scenes/games/sensei/instructions/belt/SenseiBelt.scene @@ -28,8 +28,8 @@ ], "SimpleButton.callback": "() => this.onBeltClick()", "texture": { - "key": "sensei", - "frame": "instructions/belt/belt" + "key": "senseiinstructions", + "frame": "belt/belt" }, "originX": 0.503030303030303, "originY": 0.5037037037037037 @@ -40,8 +40,8 @@ "label": "color", "scope": "CLASS", "texture": { - "key": "sensei", - "frame": "instructions/belt/color" + "key": "senseiinstructions", + "frame": "belt/color" }, "x": 1, "y": -1, @@ -52,8 +52,8 @@ "id": "3d77bfd2-99f5-4d34-bf08-b3aeccb56d78", "label": "shadow", "texture": { - "key": "sensei", - "frame": "instructions/belt/shadow" + "key": "senseiinstructions", + "frame": "belt/shadow" }, "x": 1, "y": 4, diff --git a/src/scenes/games/sensei/instructions/bubble/SenseiBubble.js b/src/scenes/games/sensei/instructions/bubble/SenseiBubble.js index 6cfe6650..73342bfd 100644 --- a/src/scenes/games/sensei/instructions/bubble/SenseiBubble.js +++ b/src/scenes/games/sensei/instructions/bubble/SenseiBubble.js @@ -23,7 +23,7 @@ export default class SenseiBubble extends BaseContainer { // bubble - const bubble = scene.add.sprite(0, 0, "sensei", "instructions/bubble/bubble0030"); + const bubble = scene.add.sprite(0, 0, "senseiinstructions", "bubble/bubble0030"); bubble.setOrigin(0.5006226650062267, 0.5008976660682226); this.add(bubble); @@ -38,7 +38,7 @@ export default class SenseiBubble extends BaseContainer { this.add(senseiBubbleWalk1); // maskImage - const maskImage = scene.add.image(0, 0, "sensei", "instructions/bubble/mask"); + const maskImage = scene.add.image(0, 0, "senseiinstructions", "bubble/mask"); maskImage.setOrigin(0.5006226650062267, 0.5008976660682226); maskImage.visible = false; this.add(maskImage); diff --git a/src/scenes/games/sensei/instructions/bubble/SenseiBubble.scene b/src/scenes/games/sensei/instructions/bubble/SenseiBubble.scene index 1cdcccbb..98a0a535 100644 --- a/src/scenes/games/sensei/instructions/bubble/SenseiBubble.scene +++ b/src/scenes/games/sensei/instructions/bubble/SenseiBubble.scene @@ -25,8 +25,8 @@ "label": "bubble", "scope": "CLASS", "texture": { - "key": "sensei", - "frame": "instructions/bubble/bubble0030" + "key": "senseiinstructions", + "frame": "bubble/bubble0030" }, "originX": 0.5006226650062267, "originY": 0.5008976660682226 @@ -65,8 +65,8 @@ "label": "maskImage", "scope": "CLASS", "texture": { - "key": "sensei", - "frame": "instructions/bubble/mask" + "key": "senseiinstructions", + "frame": "bubble/mask" }, "originX": 0.5006226650062267, "originY": 0.5008976660682226, diff --git a/src/scenes/games/sensei/instructions/bubble/SenseiBubbleWalk.js b/src/scenes/games/sensei/instructions/bubble/SenseiBubbleWalk.js index 04ab7d54..0bf84f93 100644 --- a/src/scenes/games/sensei/instructions/bubble/SenseiBubbleWalk.js +++ b/src/scenes/games/sensei/instructions/bubble/SenseiBubbleWalk.js @@ -31,63 +31,63 @@ export default class SenseiBubbleWalk extends BaseContainer { // backFoot - const backFoot = scene.add.sprite(0, 0, "sensei", "instructions/bubble/walk/1_instance3_1"); + const backFoot = scene.add.sprite(0, 0, "senseiinstructions", "bubble/walk/1_instance3_1"); this.add(backFoot); // frontFoot - const frontFoot = scene.add.sprite(0, 0, "sensei", "instructions/bubble/walk/2_instance5_1"); + const frontFoot = scene.add.sprite(0, 0, "senseiinstructions", "bubble/walk/2_instance5_1"); this.add(frontFoot); // backArmLine - const backArmLine = scene.add.sprite(0, 0, "sensei", "instructions/bubble/walk/3_instance7_1"); + const backArmLine = scene.add.sprite(0, 0, "senseiinstructions", "bubble/walk/3_instance7_1"); this.add(backArmLine); // backArm - const backArm = scene.add.sprite(0, 0, "sensei", "instructions/bubble/walk/4_backarm_1"); + const backArm = scene.add.sprite(0, 0, "senseiinstructions", "bubble/walk/4_backarm_1"); this.add(backArm); // bodyLine - const bodyLine = scene.add.sprite(0, 0, "sensei", "instructions/bubble/walk/5_instance8_1"); + const bodyLine = scene.add.sprite(0, 0, "senseiinstructions", "bubble/walk/5_instance8_1"); this.add(bodyLine); // body - const body = scene.add.sprite(0, 0, "sensei", "instructions/bubble/walk/6_body_1"); + const body = scene.add.sprite(0, 0, "senseiinstructions", "bubble/walk/6_body_1"); this.add(body); // shadow - const shadow = scene.add.sprite(0, 0, "sensei", "instructions/bubble/walk/7_instance10_1"); + const shadow = scene.add.sprite(0, 0, "senseiinstructions", "bubble/walk/7_instance10_1"); this.add(shadow); // eye - const eye = scene.add.sprite(0, 0, "sensei", "instructions/bubble/walk/8_instance11_1"); + const eye = scene.add.sprite(0, 0, "senseiinstructions", "bubble/walk/8_instance11_1"); this.add(eye); // pupil - const pupil = scene.add.sprite(0, 0, "sensei", "instructions/bubble/walk/9_instance13_1"); + const pupil = scene.add.sprite(0, 0, "senseiinstructions", "bubble/walk/9_instance13_1"); this.add(pupil); // sensei - const sensei = scene.add.sprite(0, 0, "sensei", "instructions/bubble/walk/10_sensei_1"); + const sensei = scene.add.sprite(0, 0, "senseiinstructions", "bubble/walk/10_sensei_1"); this.add(sensei); // beak - const beak = scene.add.sprite(0, 0, "sensei", "instructions/bubble/walk/11_instance18_1"); + const beak = scene.add.sprite(0, 0, "senseiinstructions", "bubble/walk/11_instance18_1"); this.add(beak); // beltLine - const beltLine = scene.add.sprite(0, 0, "sensei", "instructions/bubble/walk/12_beltline_1"); + const beltLine = scene.add.sprite(0, 0, "senseiinstructions", "bubble/walk/12_beltline_1"); this.add(beltLine); // belt - const belt = scene.add.sprite(0, 0, "sensei", "instructions/bubble/walk/13_belt_1"); + const belt = scene.add.sprite(0, 0, "senseiinstructions", "bubble/walk/13_belt_1"); this.add(belt); // frontArmLine - const frontArmLine = scene.add.sprite(0, 0, "sensei", "instructions/bubble/walk/14_instance22_1"); + const frontArmLine = scene.add.sprite(0, 0, "senseiinstructions", "bubble/walk/14_instance22_1"); this.add(frontArmLine); // frontArm - const frontArm = scene.add.sprite(0, 0, "sensei", "instructions/bubble/walk/15_frontarm_1"); + const frontArm = scene.add.sprite(0, 0, "senseiinstructions", "bubble/walk/15_frontarm_1"); this.add(frontArm); // lists @@ -143,7 +143,7 @@ export default class SenseiBubbleWalk extends BaseContainer { createAnim(child) { const animKey = this.getAnimKey(child) - const frameNames = this.scene.anims.generateFrameNames('sensei', { + const frameNames = this.scene.anims.generateFrameNames('senseiinstructions', { prefix: `${animKey}_`, start: 1, end: this.end diff --git a/src/scenes/games/sensei/instructions/bubble/SenseiBubbleWalk.scene b/src/scenes/games/sensei/instructions/bubble/SenseiBubbleWalk.scene index 8a29c6b2..dd094eb5 100644 --- a/src/scenes/games/sensei/instructions/bubble/SenseiBubbleWalk.scene +++ b/src/scenes/games/sensei/instructions/bubble/SenseiBubbleWalk.scene @@ -24,8 +24,8 @@ "id": "5d85551b-e50c-4b54-ab8a-a160d89c1115", "label": "backFoot", "texture": { - "key": "sensei", - "frame": "instructions/bubble/walk/1_instance3_1" + "key": "senseiinstructions", + "frame": "bubble/walk/1_instance3_1" } }, { @@ -33,8 +33,8 @@ "id": "e6d7478e-cf80-4fd1-a855-cd86e90aca1f", "label": "frontFoot", "texture": { - "key": "sensei", - "frame": "instructions/bubble/walk/2_instance5_1" + "key": "senseiinstructions", + "frame": "bubble/walk/2_instance5_1" } }, { @@ -42,8 +42,8 @@ "id": "ac1d2cc7-2274-4d78-a8d5-695f8c94d1af", "label": "backArmLine", "texture": { - "key": "sensei", - "frame": "instructions/bubble/walk/3_instance7_1" + "key": "senseiinstructions", + "frame": "bubble/walk/3_instance7_1" } }, { @@ -52,8 +52,8 @@ "label": "backArm", "scope": "CLASS", "texture": { - "key": "sensei", - "frame": "instructions/bubble/walk/4_backarm_1" + "key": "senseiinstructions", + "frame": "bubble/walk/4_backarm_1" } }, { @@ -61,8 +61,8 @@ "id": "7eba80ed-9087-49e1-84c2-01880626f3d3", "label": "bodyLine", "texture": { - "key": "sensei", - "frame": "instructions/bubble/walk/5_instance8_1" + "key": "senseiinstructions", + "frame": "bubble/walk/5_instance8_1" } }, { @@ -71,8 +71,8 @@ "label": "body", "scope": "CLASS", "texture": { - "key": "sensei", - "frame": "instructions/bubble/walk/6_body_1" + "key": "senseiinstructions", + "frame": "bubble/walk/6_body_1" } }, { @@ -80,8 +80,8 @@ "id": "8cd82544-a3da-402a-bc39-e81b876d9dd5", "label": "shadow", "texture": { - "key": "sensei", - "frame": "instructions/bubble/walk/7_instance10_1" + "key": "senseiinstructions", + "frame": "bubble/walk/7_instance10_1" } }, { @@ -89,8 +89,8 @@ "id": "9475c700-6ed4-4d94-8fe8-a95c6943d2f3", "label": "eye", "texture": { - "key": "sensei", - "frame": "instructions/bubble/walk/8_instance11_1" + "key": "senseiinstructions", + "frame": "bubble/walk/8_instance11_1" } }, { @@ -98,8 +98,8 @@ "id": "796fb263-66db-4602-9e3b-382a7978b006", "label": "pupil", "texture": { - "key": "sensei", - "frame": "instructions/bubble/walk/9_instance13_1" + "key": "senseiinstructions", + "frame": "bubble/walk/9_instance13_1" } }, { @@ -108,8 +108,8 @@ "label": "sensei", "scope": "CLASS", "texture": { - "key": "sensei", - "frame": "instructions/bubble/walk/10_sensei_1" + "key": "senseiinstructions", + "frame": "bubble/walk/10_sensei_1" } }, { @@ -117,8 +117,8 @@ "id": "9fe3e127-2e32-44f3-8f68-7f258d254035", "label": "beak", "texture": { - "key": "sensei", - "frame": "instructions/bubble/walk/11_instance18_1" + "key": "senseiinstructions", + "frame": "bubble/walk/11_instance18_1" } }, { @@ -127,8 +127,8 @@ "label": "beltLine", "scope": "CLASS", "texture": { - "key": "sensei", - "frame": "instructions/bubble/walk/12_beltline_1" + "key": "senseiinstructions", + "frame": "bubble/walk/12_beltline_1" } }, { @@ -137,8 +137,8 @@ "label": "belt", "scope": "CLASS", "texture": { - "key": "sensei", - "frame": "instructions/bubble/walk/13_belt_1" + "key": "senseiinstructions", + "frame": "bubble/walk/13_belt_1" } }, { @@ -146,8 +146,8 @@ "id": "57c75665-de10-4c11-9a8d-671445622e44", "label": "frontArmLine", "texture": { - "key": "sensei", - "frame": "instructions/bubble/walk/14_instance22_1" + "key": "senseiinstructions", + "frame": "bubble/walk/14_instance22_1" } }, { @@ -156,8 +156,8 @@ "label": "frontArm", "scope": "CLASS", "texture": { - "key": "sensei", - "frame": "instructions/bubble/walk/15_frontarm_1" + "key": "senseiinstructions", + "frame": "bubble/walk/15_frontarm_1" } } ] diff --git a/src/scenes/games/sensei/instructions/cards/SenseiCards.js b/src/scenes/games/sensei/instructions/cards/SenseiCards.js index 4fab9b91..66df06ba 100644 --- a/src/scenes/games/sensei/instructions/cards/SenseiCards.js +++ b/src/scenes/games/sensei/instructions/cards/SenseiCards.js @@ -14,11 +14,11 @@ export default class SenseiCards extends BaseContainer { // glow - const glow = scene.add.sprite(-62, -70, "sensei", "instructions/cards/glow/glow0001"); + const glow = scene.add.sprite(-62, -70, "senseiinstructions", "cards/glow/glow0001"); this.add(glow); // cards - const cards = scene.add.image(-317, -158, "sensei", "instructions/cards/cards"); + const cards = scene.add.image(-317, -158, "senseiinstructions", "cards/cards"); cards.setOrigin(0.5007874015748032, 0.5); this.add(cards); diff --git a/src/scenes/games/sensei/instructions/cards/SenseiCards.scene b/src/scenes/games/sensei/instructions/cards/SenseiCards.scene index 63685819..274ae82a 100644 --- a/src/scenes/games/sensei/instructions/cards/SenseiCards.scene +++ b/src/scenes/games/sensei/instructions/cards/SenseiCards.scene @@ -25,8 +25,8 @@ "label": "glow", "scope": "CLASS", "texture": { - "key": "sensei", - "frame": "instructions/cards/glow/glow0001" + "key": "senseiinstructions", + "frame": "cards/glow/glow0001" }, "x": -62, "y": -70 @@ -36,8 +36,8 @@ "id": "741b5789-3f18-450c-9821-fcdb70ec480e", "label": "cards", "texture": { - "key": "sensei", - "frame": "instructions/cards/cards" + "key": "senseiinstructions", + "frame": "cards/cards" }, "x": -317, "y": -158, From 1c85a5c61cc208b4d1d06c9dce66be15bb006ce8 Mon Sep 17 00:00:00 2001 From: wizguin <16276645+wizguin@users.noreply.github.com> Date: Tue, 12 Sep 2023 16:47:02 +0100 Subject: [PATCH 194/200] Use unpkg for ruffle by default --- index.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/index.html b/index.html index 23c7df77..e656f99c 100644 --- a/index.html +++ b/index.html @@ -18,7 +18,7 @@ - + From 7ab76ca1b6f297d03cb504ffb051aef2d529feee Mon Sep 17 00:00:00 2001 From: wizguin <16276645+wizguin@users.noreply.github.com> Date: Wed, 13 Sep 2023 16:31:22 +0100 Subject: [PATCH 195/200] mancala: Fixed issue with lastHole not checking 0 --- src/scenes/games/mancala/Mancala.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/scenes/games/mancala/Mancala.js b/src/scenes/games/mancala/Mancala.js index 3686f649..5c82c10f 100644 --- a/src/scenes/games/mancala/Mancala.js +++ b/src/scenes/games/mancala/Mancala.js @@ -468,7 +468,7 @@ export default class Mancala extends BaseContainer { } updateTurn(lastHole = null, move = '') { - if (lastHole) { + if (lastHole !== null) { this.checkLastHole(lastHole, move) } From 80dc8371d8111fd28ba3dbcbea4c47c911c8ba7c Mon Sep 17 00:00:00 2001 From: wizguin <16276645+wizguin@users.noreply.github.com> Date: Wed, 20 Sep 2023 17:51:07 +0100 Subject: [PATCH 196/200] cardjitsu: Removed old preload method --- src/scenes/games/card/CardJitsu.js | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/src/scenes/games/card/CardJitsu.js b/src/scenes/games/card/CardJitsu.js index 951bd8aa..16b5dd48 100644 --- a/src/scenes/games/card/CardJitsu.js +++ b/src/scenes/games/card/CardJitsu.js @@ -137,16 +137,6 @@ export default class CardJitsu extends GameScene { /* START-USER-CODE */ - preload() { - super.preload() - - let url = 'assets/media/games/card/battles/' - - this.load.pack('walk-pack', `${url}/walk/walk-pack.json`) - this.load.pack('ambient-pack', `${url}/ambient/ambient-pack.json`) - this.load.pack('tie-pack', `${url}/tie/tie-pack.json`) - } - async create() { this.container = this.add.dom(760, 480) this.container.visible = false From 8031b8de803bda95d35dcdd2b98c364bb0ad9ac7 Mon Sep 17 00:00:00 2001 From: wizguin <16276645+wizguin@users.noreply.github.com> Date: Wed, 20 Sep 2023 17:53:17 +0100 Subject: [PATCH 197/200] cardjitsu: Updated swf paths --- src/scenes/games/card/CardJitsu.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/scenes/games/card/CardJitsu.js b/src/scenes/games/card/CardJitsu.js index 16b5dd48..76343ad3 100644 --- a/src/scenes/games/card/CardJitsu.js +++ b/src/scenes/games/card/CardJitsu.js @@ -141,7 +141,7 @@ export default class CardJitsu extends GameScene { this.container = this.add.dom(760, 480) this.container.visible = false - this.battlesPath = 'assets/media/flash/battles/' + this.battlesPath = 'assets/media/games/card/battles/' this.events.once('emulator_ready', this.onEmulatorReady, this) @@ -226,7 +226,7 @@ export default class CardJitsu extends GameScene { this.game.domContainer.style.zIndex = -10 await player.load({ - url: 'assets/media/flash/battle.swf', + url: 'assets/media/games/card/battle.swf', allowScriptAccess: true, menu: false, contextMenu: false, From 8601c862c360b27bb0c3a644c7b2ca4405a47bf7 Mon Sep 17 00:00:00 2001 From: wizguin <16276645+wizguin@users.noreply.github.com> Date: Thu, 21 Sep 2023 22:18:51 +0100 Subject: [PATCH 198/200] cardjitsu: Remove console log powersQueue --- src/scenes/games/card/CardJitsu.js | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/scenes/games/card/CardJitsu.js b/src/scenes/games/card/CardJitsu.js index 76343ad3..bc67c873 100644 --- a/src/scenes/games/card/CardJitsu.js +++ b/src/scenes/games/card/CardJitsu.js @@ -432,8 +432,6 @@ export default class CardJitsu extends GameScene { processPowers() { this.powersQueue = this.activePowers.slice() - console.log(this.powersQueue) - this.nextPower() } From 3e88b8b18ca61fcf69c932ca928a1e768422f800 Mon Sep 17 00:00:00 2001 From: wizguin <16276645+wizguin@users.noreply.github.com> Date: Wed, 18 Oct 2023 23:14:05 +0100 Subject: [PATCH 199/200] Updated packages --- .babelrc | 3 - package-lock.json | 4964 +++++++++++++++++++++++---------------------- package.json | 24 +- 3 files changed, 2540 insertions(+), 2451 deletions(-) diff --git a/.babelrc b/.babelrc index 71ffb40c..10b220fe 100644 --- a/.babelrc +++ b/.babelrc @@ -7,8 +7,5 @@ "corejs": 3 } ] - ], - "plugins": [ - "@babel/plugin-proposal-class-properties" ] } diff --git a/package-lock.json b/package-lock.json index 182da504..bfabb87b 100644 --- a/package-lock.json +++ b/package-lock.json @@ -9,21 +9,21 @@ "version": "1.5.0-beta", "license": "MIT", "devDependencies": { - "@babel/core": "^7.20.2", - "@babel/preset-env": "^7.20.2", - "babel-loader": "^8.3.0", + "@babel/core": "^7.23.2", + "@babel/preset-env": "^7.23.2", + "babel-loader": "^9.1.3", "compression-webpack-plugin": "^10.0.0", - "core-js": "^3.26.0", - "howler": "^2.2.3", - "html-webpack-plugin": "^5.5.0", - "javascript-obfuscator": "^4.0.0", - "phasereditor2d-launcher": "^3.35.1", + "core-js": "^3.33.0", + "howler": "^2.2.4", + "html-webpack-plugin": "^5.5.3", + "javascript-obfuscator": "^4.1.0", + "phasereditor2d-launcher": "^3.63.0", "phasereditor2d-ninepatch-plugin": "^1.2.0", - "socket.io-client": "^4.5.3", + "socket.io-client": "^4.7.2", "source-map": "^0.7.4", - "webpack": "^5.74.0", - "webpack-cli": "^4.10.0", - "webpack-dev-server": "^4.11.1", + "webpack": "^5.89.0", + "webpack-cli": "^5.1.4", + "webpack-dev-server": "^4.15.1", "webpack-obfuscator": "^3.5.1" } }, @@ -41,47 +41,48 @@ } }, "node_modules/@babel/code-frame": { - "version": "7.18.6", - "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.18.6.tgz", - "integrity": "sha512-TDCmlK5eOvH+eH7cdAFlNXeVJqWIQ7gW9tY1GJIpUtFb6CmjVyq2VM3u71bOyR8CRihcCgMUYoDNyLXao3+70Q==", + "version": "7.22.13", + "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.22.13.tgz", + "integrity": "sha512-XktuhWlJ5g+3TJXc5upd9Ks1HutSArik6jf2eAjYFyIOf4ej3RN+184cZbzDvbPnuTJIUhPKKJE3cIsYTiAT3w==", "dev": true, "dependencies": { - "@babel/highlight": "^7.18.6" + "@babel/highlight": "^7.22.13", + "chalk": "^2.4.2" }, "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/compat-data": { - "version": "7.20.1", - "resolved": "https://registry.npmjs.org/@babel/compat-data/-/compat-data-7.20.1.tgz", - "integrity": "sha512-EWZ4mE2diW3QALKvDMiXnbZpRvlj+nayZ112nK93SnhqOtpdsbVD4W+2tEoT3YNBAG9RBR0ISY758ZkOgsn6pQ==", + "version": "7.23.2", + "resolved": "https://registry.npmjs.org/@babel/compat-data/-/compat-data-7.23.2.tgz", + "integrity": "sha512-0S9TQMmDHlqAZ2ITT95irXKfxN9bncq8ZCoJhun3nHL/lLUxd2NKBJYoNGWH7S0hz6fRQwWlAWn/ILM0C70KZQ==", "dev": true, "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/core": { - "version": "7.20.2", - "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.20.2.tgz", - "integrity": "sha512-w7DbG8DtMrJcFOi4VrLm+8QM4az8Mo+PuLBKLp2zrYRCow8W/f9xiXm5sN53C8HksCyDQwCKha9JiDoIyPjT2g==", - "dev": true, - "dependencies": { - "@ampproject/remapping": "^2.1.0", - "@babel/code-frame": "^7.18.6", - "@babel/generator": "^7.20.2", - "@babel/helper-compilation-targets": "^7.20.0", - "@babel/helper-module-transforms": "^7.20.2", - "@babel/helpers": "^7.20.1", - "@babel/parser": "^7.20.2", - "@babel/template": "^7.18.10", - "@babel/traverse": "^7.20.1", - "@babel/types": "^7.20.2", - "convert-source-map": "^1.7.0", + "version": "7.23.2", + "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.23.2.tgz", + "integrity": "sha512-n7s51eWdaWZ3vGT2tD4T7J6eJs3QoBXydv7vkUM06Bf1cbVD2Kc2UrkzhiQwobfV7NwOnQXYL7UBJ5VPU+RGoQ==", + "dev": true, + "dependencies": { + "@ampproject/remapping": "^2.2.0", + "@babel/code-frame": "^7.22.13", + "@babel/generator": "^7.23.0", + "@babel/helper-compilation-targets": "^7.22.15", + "@babel/helper-module-transforms": "^7.23.0", + "@babel/helpers": "^7.23.2", + "@babel/parser": "^7.23.0", + "@babel/template": "^7.22.15", + "@babel/traverse": "^7.23.2", + "@babel/types": "^7.23.0", + "convert-source-map": "^2.0.0", "debug": "^4.1.0", "gensync": "^1.0.0-beta.2", - "json5": "^2.2.1", - "semver": "^6.3.0" + "json5": "^2.2.3", + "semver": "^6.3.1" }, "engines": { "node": ">=6.9.0" @@ -92,13 +93,14 @@ } }, "node_modules/@babel/generator": { - "version": "7.20.2", - "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.20.2.tgz", - "integrity": "sha512-SD75PMIK6i9H8G/tfGvB4KKl4Nw6Ssos9nGgYwxbgyTP0iX/Z55DveoH86rmUB/YHTQQ+ZC0F7xxaY8l2OF44Q==", + "version": "7.23.0", + "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.23.0.tgz", + "integrity": "sha512-lN85QRR+5IbYrMWM6Y4pE/noaQtg4pNiqeNGX60eqOfo6gtEj6uw/JagelB8vVztSd7R6M5n1+PQkDbHbBRU4g==", "dev": true, "dependencies": { - "@babel/types": "^7.20.2", + "@babel/types": "^7.23.0", "@jridgewell/gen-mapping": "^0.3.2", + "@jridgewell/trace-mapping": "^0.3.17", "jsesc": "^2.5.1" }, "engines": { @@ -106,9 +108,9 @@ } }, "node_modules/@babel/generator/node_modules/@jridgewell/gen-mapping": { - "version": "0.3.2", - "resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.3.2.tgz", - "integrity": "sha512-mh65xKQAzI6iBcFzwv28KVWSmCkdRBWoOh+bYQGW3+6OZvbbN3TqMGo5hqYxQniRcH9F2VZIoJCm4pa3BPDK/A==", + "version": "0.3.3", + "resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.3.3.tgz", + "integrity": "sha512-HLhSWOLRi875zjjMG/r+Nv0oCW8umGb0BgEhyX3dDX3egwZtB8PqLnjz3yedt8R5StBrzcg4aBpnh8UA9D1BoQ==", "dev": true, "dependencies": { "@jridgewell/set-array": "^1.0.1", @@ -120,61 +122,60 @@ } }, "node_modules/@babel/helper-annotate-as-pure": { - "version": "7.18.6", - "resolved": "https://registry.npmjs.org/@babel/helper-annotate-as-pure/-/helper-annotate-as-pure-7.18.6.tgz", - "integrity": "sha512-duORpUiYrEpzKIop6iNbjnwKLAKnJ47csTyRACyEmWj0QdUrm5aqNJGHSSEQSUAvNW0ojX0dOmK9dZduvkfeXA==", + "version": "7.22.5", + "resolved": "https://registry.npmjs.org/@babel/helper-annotate-as-pure/-/helper-annotate-as-pure-7.22.5.tgz", + "integrity": "sha512-LvBTxu8bQSQkcyKOU+a1btnNFQ1dMAd0R6PyW3arXes06F6QLWLIrd681bxRPIXlrMGR3XYnW9JyML7dP3qgxg==", "dev": true, "dependencies": { - "@babel/types": "^7.18.6" + "@babel/types": "^7.22.5" }, "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/helper-builder-binary-assignment-operator-visitor": { - "version": "7.18.9", - "resolved": "https://registry.npmjs.org/@babel/helper-builder-binary-assignment-operator-visitor/-/helper-builder-binary-assignment-operator-visitor-7.18.9.tgz", - "integrity": "sha512-yFQ0YCHoIqarl8BCRwBL8ulYUaZpz3bNsA7oFepAzee+8/+ImtADXNOmO5vJvsPff3qi+hvpkY/NYBTrBQgdNw==", + "version": "7.22.15", + "resolved": "https://registry.npmjs.org/@babel/helper-builder-binary-assignment-operator-visitor/-/helper-builder-binary-assignment-operator-visitor-7.22.15.tgz", + "integrity": "sha512-QkBXwGgaoC2GtGZRoma6kv7Szfv06khvhFav67ZExau2RaXzy8MpHSMO2PNoP2XtmQphJQRHFfg77Bq731Yizw==", "dev": true, "dependencies": { - "@babel/helper-explode-assignable-expression": "^7.18.6", - "@babel/types": "^7.18.9" + "@babel/types": "^7.22.15" }, "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/helper-compilation-targets": { - "version": "7.20.0", - "resolved": "https://registry.npmjs.org/@babel/helper-compilation-targets/-/helper-compilation-targets-7.20.0.tgz", - "integrity": "sha512-0jp//vDGp9e8hZzBc6N/KwA5ZK3Wsm/pfm4CrY7vzegkVxc65SgSn6wYOnwHe9Js9HRQ1YTCKLGPzDtaS3RoLQ==", + "version": "7.22.15", + "resolved": "https://registry.npmjs.org/@babel/helper-compilation-targets/-/helper-compilation-targets-7.22.15.tgz", + "integrity": "sha512-y6EEzULok0Qvz8yyLkCvVX+02ic+By2UdOhylwUOvOn9dvYc9mKICJuuU1n1XBI02YWsNsnrY1kc6DVbjcXbtw==", "dev": true, "dependencies": { - "@babel/compat-data": "^7.20.0", - "@babel/helper-validator-option": "^7.18.6", - "browserslist": "^4.21.3", - "semver": "^6.3.0" + "@babel/compat-data": "^7.22.9", + "@babel/helper-validator-option": "^7.22.15", + "browserslist": "^4.21.9", + "lru-cache": "^5.1.1", + "semver": "^6.3.1" }, "engines": { "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0" } }, "node_modules/@babel/helper-create-class-features-plugin": { - "version": "7.18.13", - "resolved": "https://registry.npmjs.org/@babel/helper-create-class-features-plugin/-/helper-create-class-features-plugin-7.18.13.tgz", - "integrity": "sha512-hDvXp+QYxSRL+23mpAlSGxHMDyIGChm0/AwTfTAAK5Ufe40nCsyNdaYCGuK91phn/fVu9kqayImRDkvNAgdrsA==", + "version": "7.22.15", + "resolved": "https://registry.npmjs.org/@babel/helper-create-class-features-plugin/-/helper-create-class-features-plugin-7.22.15.tgz", + "integrity": "sha512-jKkwA59IXcvSaiK2UN45kKwSC9o+KuoXsBDvHvU/7BecYIp8GQ2UwrVvFgJASUT+hBnwJx6MhvMCuMzwZZ7jlg==", "dev": true, "dependencies": { - "@babel/helper-annotate-as-pure": "^7.18.6", - "@babel/helper-environment-visitor": "^7.18.9", - "@babel/helper-function-name": "^7.18.9", - "@babel/helper-member-expression-to-functions": "^7.18.9", - "@babel/helper-optimise-call-expression": "^7.18.6", - "@babel/helper-replace-supers": "^7.18.9", - "@babel/helper-split-export-declaration": "^7.18.6" + "@babel/helper-annotate-as-pure": "^7.22.5", + "@babel/helper-environment-visitor": "^7.22.5", + "@babel/helper-function-name": "^7.22.5", + "@babel/helper-member-expression-to-functions": "^7.22.15", + "@babel/helper-optimise-call-expression": "^7.22.5", + "@babel/helper-replace-supers": "^7.22.9", + "@babel/helper-skip-transparent-expression-wrappers": "^7.22.5", + "@babel/helper-split-export-declaration": "^7.22.6", + "semver": "^6.3.1" }, "engines": { "node": ">=6.9.0" @@ -184,13 +185,14 @@ } }, "node_modules/@babel/helper-create-regexp-features-plugin": { - "version": "7.19.0", - "resolved": "https://registry.npmjs.org/@babel/helper-create-regexp-features-plugin/-/helper-create-regexp-features-plugin-7.19.0.tgz", - "integrity": "sha512-htnV+mHX32DF81amCDrwIDr8nrp1PTm+3wfBN9/v8QJOLEioOCOG7qNyq0nHeFiWbT3Eb7gsPwEmV64UCQ1jzw==", + "version": "7.22.15", + "resolved": "https://registry.npmjs.org/@babel/helper-create-regexp-features-plugin/-/helper-create-regexp-features-plugin-7.22.15.tgz", + "integrity": "sha512-29FkPLFjn4TPEa3RE7GpW+qbE8tlsu3jntNYNfcGsc49LphF1PQIiD+vMZ1z1xVOKt+93khA9tc2JBs3kBjA7w==", "dev": true, "dependencies": { - "@babel/helper-annotate-as-pure": "^7.18.6", - "regexpu-core": "^5.1.0" + "@babel/helper-annotate-as-pure": "^7.22.5", + "regexpu-core": "^5.3.1", + "semver": "^6.3.1" }, "engines": { "node": ">=6.9.0" @@ -200,142 +202,128 @@ } }, "node_modules/@babel/helper-define-polyfill-provider": { - "version": "0.3.3", - "resolved": "https://registry.npmjs.org/@babel/helper-define-polyfill-provider/-/helper-define-polyfill-provider-0.3.3.tgz", - "integrity": "sha512-z5aQKU4IzbqCC1XH0nAqfsFLMVSo22SBKUc0BxGrLkolTdPTructy0ToNnlO2zA4j9Q/7pjMZf0DSY+DSTYzww==", + "version": "0.4.3", + "resolved": "https://registry.npmjs.org/@babel/helper-define-polyfill-provider/-/helper-define-polyfill-provider-0.4.3.tgz", + "integrity": "sha512-WBrLmuPP47n7PNwsZ57pqam6G/RGo1vw/87b0Blc53tZNGZ4x7YvZ6HgQe2vo1W/FR20OgjeZuGXzudPiXHFug==", "dev": true, "dependencies": { - "@babel/helper-compilation-targets": "^7.17.7", - "@babel/helper-plugin-utils": "^7.16.7", + "@babel/helper-compilation-targets": "^7.22.6", + "@babel/helper-plugin-utils": "^7.22.5", "debug": "^4.1.1", "lodash.debounce": "^4.0.8", - "resolve": "^1.14.2", - "semver": "^6.1.2" + "resolve": "^1.14.2" }, "peerDependencies": { - "@babel/core": "^7.4.0-0" + "@babel/core": "^7.4.0 || ^8.0.0-0 <8.0.0" } }, "node_modules/@babel/helper-environment-visitor": { - "version": "7.18.9", - "resolved": "https://registry.npmjs.org/@babel/helper-environment-visitor/-/helper-environment-visitor-7.18.9.tgz", - "integrity": "sha512-3r/aACDJ3fhQ/EVgFy0hpj8oHyHpQc+LPtJoY9SzTThAsStm4Ptegq92vqKoE3vD706ZVFWITnMnxucw+S9Ipg==", + "version": "7.22.20", + "resolved": "https://registry.npmjs.org/@babel/helper-environment-visitor/-/helper-environment-visitor-7.22.20.tgz", + "integrity": "sha512-zfedSIzFhat/gFhWfHtgWvlec0nqB9YEIVrpuwjruLlXfUSnA8cJB0miHKwqDnQ7d32aKo2xt88/xZptwxbfhA==", "dev": true, "engines": { "node": ">=6.9.0" } }, - "node_modules/@babel/helper-explode-assignable-expression": { - "version": "7.18.6", - "resolved": "https://registry.npmjs.org/@babel/helper-explode-assignable-expression/-/helper-explode-assignable-expression-7.18.6.tgz", - "integrity": "sha512-eyAYAsQmB80jNfg4baAtLeWAQHfHFiR483rzFK+BhETlGZaQC9bsfrugfXDCbRHLQbIA7U5NxhhOxN7p/dWIcg==", - "dev": true, - "dependencies": { - "@babel/types": "^7.18.6" - }, - "engines": { - "node": ">=6.9.0" - } - }, "node_modules/@babel/helper-function-name": { - "version": "7.19.0", - "resolved": "https://registry.npmjs.org/@babel/helper-function-name/-/helper-function-name-7.19.0.tgz", - "integrity": "sha512-WAwHBINyrpqywkUH0nTnNgI5ina5TFn85HKS0pbPDfxFfhyR/aNQEn4hGi1P1JyT//I0t4OgXUlofzWILRvS5w==", + "version": "7.23.0", + "resolved": "https://registry.npmjs.org/@babel/helper-function-name/-/helper-function-name-7.23.0.tgz", + "integrity": "sha512-OErEqsrxjZTJciZ4Oo+eoZqeW9UIiOcuYKRJA4ZAgV9myA+pOXhhmpfNCKjEH/auVfEYVFJ6y1Tc4r0eIApqiw==", "dev": true, "dependencies": { - "@babel/template": "^7.18.10", - "@babel/types": "^7.19.0" + "@babel/template": "^7.22.15", + "@babel/types": "^7.23.0" }, "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/helper-hoist-variables": { - "version": "7.18.6", - "resolved": "https://registry.npmjs.org/@babel/helper-hoist-variables/-/helper-hoist-variables-7.18.6.tgz", - "integrity": "sha512-UlJQPkFqFULIcyW5sbzgbkxn2FKRgwWiRexcuaR8RNJRy8+LLveqPjwZV/bwrLZCN0eUHD/x8D0heK1ozuoo6Q==", + "version": "7.22.5", + "resolved": "https://registry.npmjs.org/@babel/helper-hoist-variables/-/helper-hoist-variables-7.22.5.tgz", + "integrity": "sha512-wGjk9QZVzvknA6yKIUURb8zY3grXCcOZt+/7Wcy8O2uctxhplmUPkOdlgoNhmdVee2c92JXbf1xpMtVNbfoxRw==", "dev": true, "dependencies": { - "@babel/types": "^7.18.6" + "@babel/types": "^7.22.5" }, "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/helper-member-expression-to-functions": { - "version": "7.18.9", - "resolved": "https://registry.npmjs.org/@babel/helper-member-expression-to-functions/-/helper-member-expression-to-functions-7.18.9.tgz", - "integrity": "sha512-RxifAh2ZoVU67PyKIO4AMi1wTenGfMR/O/ae0CCRqwgBAt5v7xjdtRw7UoSbsreKrQn5t7r89eruK/9JjYHuDg==", + "version": "7.23.0", + "resolved": "https://registry.npmjs.org/@babel/helper-member-expression-to-functions/-/helper-member-expression-to-functions-7.23.0.tgz", + "integrity": "sha512-6gfrPwh7OuT6gZyJZvd6WbTfrqAo7vm4xCzAXOusKqq/vWdKXphTpj5klHKNmRUU6/QRGlBsyU9mAIPaWHlqJA==", "dev": true, "dependencies": { - "@babel/types": "^7.18.9" + "@babel/types": "^7.23.0" }, "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/helper-module-imports": { - "version": "7.18.6", - "resolved": "https://registry.npmjs.org/@babel/helper-module-imports/-/helper-module-imports-7.18.6.tgz", - "integrity": "sha512-0NFvs3VkuSYbFi1x2Vd6tKrywq+z/cLeYC/RJNFrIX/30Bf5aiGYbtvGXolEktzJH8o5E5KJ3tT+nkxuuZFVlA==", + "version": "7.22.15", + "resolved": "https://registry.npmjs.org/@babel/helper-module-imports/-/helper-module-imports-7.22.15.tgz", + "integrity": "sha512-0pYVBnDKZO2fnSPCrgM/6WMc7eS20Fbok+0r88fp+YtWVLZrp4CkafFGIp+W0VKw4a22sgebPT99y+FDNMdP4w==", "dev": true, "dependencies": { - "@babel/types": "^7.18.6" + "@babel/types": "^7.22.15" }, "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/helper-module-transforms": { - "version": "7.20.2", - "resolved": "https://registry.npmjs.org/@babel/helper-module-transforms/-/helper-module-transforms-7.20.2.tgz", - "integrity": "sha512-zvBKyJXRbmK07XhMuujYoJ48B5yvvmM6+wcpv6Ivj4Yg6qO7NOZOSnvZN9CRl1zz1Z4cKf8YejmCMh8clOoOeA==", + "version": "7.23.0", + "resolved": "https://registry.npmjs.org/@babel/helper-module-transforms/-/helper-module-transforms-7.23.0.tgz", + "integrity": "sha512-WhDWw1tdrlT0gMgUJSlX0IQvoO1eN279zrAUbVB+KpV2c3Tylz8+GnKOLllCS6Z/iZQEyVYxhZVUdPTqs2YYPw==", "dev": true, "dependencies": { - "@babel/helper-environment-visitor": "^7.18.9", - "@babel/helper-module-imports": "^7.18.6", - "@babel/helper-simple-access": "^7.20.2", - "@babel/helper-split-export-declaration": "^7.18.6", - "@babel/helper-validator-identifier": "^7.19.1", - "@babel/template": "^7.18.10", - "@babel/traverse": "^7.20.1", - "@babel/types": "^7.20.2" + "@babel/helper-environment-visitor": "^7.22.20", + "@babel/helper-module-imports": "^7.22.15", + "@babel/helper-simple-access": "^7.22.5", + "@babel/helper-split-export-declaration": "^7.22.6", + "@babel/helper-validator-identifier": "^7.22.20" }, "engines": { "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0" } }, "node_modules/@babel/helper-optimise-call-expression": { - "version": "7.18.6", - "resolved": "https://registry.npmjs.org/@babel/helper-optimise-call-expression/-/helper-optimise-call-expression-7.18.6.tgz", - "integrity": "sha512-HP59oD9/fEHQkdcbgFCnbmgH5vIQTJbxh2yf+CdM89/glUNnuzr87Q8GIjGEnOktTROemO0Pe0iPAYbqZuOUiA==", + "version": "7.22.5", + "resolved": "https://registry.npmjs.org/@babel/helper-optimise-call-expression/-/helper-optimise-call-expression-7.22.5.tgz", + "integrity": "sha512-HBwaojN0xFRx4yIvpwGqxiV2tUfl7401jlok564NgB9EHS1y6QT17FmKWm4ztqjeVdXLuC4fSvHc5ePpQjoTbw==", "dev": true, "dependencies": { - "@babel/types": "^7.18.6" + "@babel/types": "^7.22.5" }, "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/helper-plugin-utils": { - "version": "7.20.2", - "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.20.2.tgz", - "integrity": "sha512-8RvlJG2mj4huQ4pZ+rU9lqKi9ZKiRmuvGuM2HlWmkmgOhbs6zEAw6IEiJ5cQqGbDzGZOhwuOQNtZMi/ENLjZoQ==", + "version": "7.22.5", + "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.22.5.tgz", + "integrity": "sha512-uLls06UVKgFG9QD4OeFYLEGteMIAa5kpTPcFL28yuCIIzsf6ZyKZMllKVOCZFhiZ5ptnwX4mtKdWCBE/uT4amg==", "dev": true, "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/helper-remap-async-to-generator": { - "version": "7.18.9", - "resolved": "https://registry.npmjs.org/@babel/helper-remap-async-to-generator/-/helper-remap-async-to-generator-7.18.9.tgz", - "integrity": "sha512-dI7q50YKd8BAv3VEfgg7PS7yD3Rtbi2J1XMXaalXO0W0164hYLnh8zpjRS0mte9MfVp/tltvr/cfdXPvJr1opA==", + "version": "7.22.20", + "resolved": "https://registry.npmjs.org/@babel/helper-remap-async-to-generator/-/helper-remap-async-to-generator-7.22.20.tgz", + "integrity": "sha512-pBGyV4uBqOns+0UvhsTO8qgl8hO89PmiDYv+/COyp1aeMcmfrfruz+/nCMFiYyFF/Knn0yfrC85ZzNFjembFTw==", "dev": true, "dependencies": { - "@babel/helper-annotate-as-pure": "^7.18.6", - "@babel/helper-environment-visitor": "^7.18.9", - "@babel/helper-wrap-function": "^7.18.9", - "@babel/types": "^7.18.9" + "@babel/helper-annotate-as-pure": "^7.22.5", + "@babel/helper-environment-visitor": "^7.22.20", + "@babel/helper-wrap-function": "^7.22.20" }, "engines": { "node": ">=6.9.0" @@ -345,121 +333,121 @@ } }, "node_modules/@babel/helper-replace-supers": { - "version": "7.19.1", - "resolved": "https://registry.npmjs.org/@babel/helper-replace-supers/-/helper-replace-supers-7.19.1.tgz", - "integrity": "sha512-T7ahH7wV0Hfs46SFh5Jz3s0B6+o8g3c+7TMxu7xKfmHikg7EAZ3I2Qk9LFhjxXq8sL7UkP5JflezNwoZa8WvWw==", + "version": "7.22.20", + "resolved": "https://registry.npmjs.org/@babel/helper-replace-supers/-/helper-replace-supers-7.22.20.tgz", + "integrity": "sha512-qsW0In3dbwQUbK8kejJ4R7IHVGwHJlV6lpG6UA7a9hSa2YEiAib+N1T2kr6PEeUT+Fl7najmSOS6SmAwCHK6Tw==", "dev": true, "dependencies": { - "@babel/helper-environment-visitor": "^7.18.9", - "@babel/helper-member-expression-to-functions": "^7.18.9", - "@babel/helper-optimise-call-expression": "^7.18.6", - "@babel/traverse": "^7.19.1", - "@babel/types": "^7.19.0" + "@babel/helper-environment-visitor": "^7.22.20", + "@babel/helper-member-expression-to-functions": "^7.22.15", + "@babel/helper-optimise-call-expression": "^7.22.5" }, "engines": { "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0" } }, "node_modules/@babel/helper-simple-access": { - "version": "7.20.2", - "resolved": "https://registry.npmjs.org/@babel/helper-simple-access/-/helper-simple-access-7.20.2.tgz", - "integrity": "sha512-+0woI/WPq59IrqDYbVGfshjT5Dmk/nnbdpcF8SnMhhXObpTq2KNBdLFRFrkVdbDOyUmHBCxzm5FHV1rACIkIbA==", + "version": "7.22.5", + "resolved": "https://registry.npmjs.org/@babel/helper-simple-access/-/helper-simple-access-7.22.5.tgz", + "integrity": "sha512-n0H99E/K+Bika3++WNL17POvo4rKWZ7lZEp1Q+fStVbUi8nxPQEBOlTmCOxW/0JsS56SKKQ+ojAe2pHKJHN35w==", "dev": true, "dependencies": { - "@babel/types": "^7.20.2" + "@babel/types": "^7.22.5" }, "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/helper-skip-transparent-expression-wrappers": { - "version": "7.18.9", - "resolved": "https://registry.npmjs.org/@babel/helper-skip-transparent-expression-wrappers/-/helper-skip-transparent-expression-wrappers-7.18.9.tgz", - "integrity": "sha512-imytd2gHi3cJPsybLRbmFrF7u5BIEuI2cNheyKi3/iOBC63kNn3q8Crn2xVuESli0aM4KYsyEqKyS7lFL8YVtw==", + "version": "7.22.5", + "resolved": "https://registry.npmjs.org/@babel/helper-skip-transparent-expression-wrappers/-/helper-skip-transparent-expression-wrappers-7.22.5.tgz", + "integrity": "sha512-tK14r66JZKiC43p8Ki33yLBVJKlQDFoA8GYN67lWCDCqoL6EMMSuM9b+Iff2jHaM/RRFYl7K+iiru7hbRqNx8Q==", "dev": true, "dependencies": { - "@babel/types": "^7.18.9" + "@babel/types": "^7.22.5" }, "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/helper-split-export-declaration": { - "version": "7.18.6", - "resolved": "https://registry.npmjs.org/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.18.6.tgz", - "integrity": "sha512-bde1etTx6ZyTmobl9LLMMQsaizFVZrquTEHOqKeQESMKo4PlObf+8+JA25ZsIpZhT/WEd39+vOdLXAFG/nELpA==", + "version": "7.22.6", + "resolved": "https://registry.npmjs.org/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.22.6.tgz", + "integrity": "sha512-AsUnxuLhRYsisFiaJwvp1QF+I3KjD5FOxut14q/GzovUe6orHLesW2C7d754kRm53h5gqrz6sFl6sxc4BVtE/g==", "dev": true, "dependencies": { - "@babel/types": "^7.18.6" + "@babel/types": "^7.22.5" }, "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/helper-string-parser": { - "version": "7.19.4", - "resolved": "https://registry.npmjs.org/@babel/helper-string-parser/-/helper-string-parser-7.19.4.tgz", - "integrity": "sha512-nHtDoQcuqFmwYNYPz3Rah5ph2p8PFeFCsZk9A/48dPc/rGocJ5J3hAAZ7pb76VWX3fZKu+uEr/FhH5jLx7umrw==", + "version": "7.22.5", + "resolved": "https://registry.npmjs.org/@babel/helper-string-parser/-/helper-string-parser-7.22.5.tgz", + "integrity": "sha512-mM4COjgZox8U+JcXQwPijIZLElkgEpO5rsERVDJTc2qfCDfERyob6k5WegS14SX18IIjv+XD+GrqNumY5JRCDw==", "dev": true, "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/helper-validator-identifier": { - "version": "7.19.1", - "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.19.1.tgz", - "integrity": "sha512-awrNfaMtnHUr653GgGEs++LlAvW6w+DcPrOliSMXWCKo597CwL5Acf/wWdNkf/tfEQE3mjkeD1YOVZOUV/od1w==", + "version": "7.22.20", + "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.22.20.tgz", + "integrity": "sha512-Y4OZ+ytlatR8AI+8KZfKuL5urKp7qey08ha31L8b3BwewJAoJamTzyvxPR/5D+KkdJCGPq/+8TukHBlY10FX9A==", "dev": true, "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/helper-validator-option": { - "version": "7.18.6", - "resolved": "https://registry.npmjs.org/@babel/helper-validator-option/-/helper-validator-option-7.18.6.tgz", - "integrity": "sha512-XO7gESt5ouv/LRJdrVjkShckw6STTaB7l9BrpBaAHDeF5YZT+01PCwmR0SJHnkW6i8OwW/EVWRShfi4j2x+KQw==", + "version": "7.22.15", + "resolved": "https://registry.npmjs.org/@babel/helper-validator-option/-/helper-validator-option-7.22.15.tgz", + "integrity": "sha512-bMn7RmyFjY/mdECUbgn9eoSY4vqvacUnS9i9vGAGttgFWesO6B4CYWA7XlpbWgBt71iv/hfbPlynohStqnu5hA==", "dev": true, "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/helper-wrap-function": { - "version": "7.18.11", - "resolved": "https://registry.npmjs.org/@babel/helper-wrap-function/-/helper-wrap-function-7.18.11.tgz", - "integrity": "sha512-oBUlbv+rjZLh2Ks9SKi4aL7eKaAXBWleHzU89mP0G6BMUlRxSckk9tSIkgDGydhgFxHuGSlBQZfnaD47oBEB7w==", + "version": "7.22.20", + "resolved": "https://registry.npmjs.org/@babel/helper-wrap-function/-/helper-wrap-function-7.22.20.tgz", + "integrity": "sha512-pms/UwkOpnQe/PDAEdV/d7dVCoBbB+R4FvYoHGZz+4VPcg7RtYy2KP7S2lbuWM6FCSgob5wshfGESbC/hzNXZw==", "dev": true, "dependencies": { - "@babel/helper-function-name": "^7.18.9", - "@babel/template": "^7.18.10", - "@babel/traverse": "^7.18.11", - "@babel/types": "^7.18.10" + "@babel/helper-function-name": "^7.22.5", + "@babel/template": "^7.22.15", + "@babel/types": "^7.22.19" }, "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/helpers": { - "version": "7.20.1", - "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.20.1.tgz", - "integrity": "sha512-J77mUVaDTUJFZ5BpP6mMn6OIl3rEWymk2ZxDBQJUG3P+PbmyMcF3bYWvz0ma69Af1oobDqT/iAsvzhB58xhQUg==", + "version": "7.23.2", + "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.23.2.tgz", + "integrity": "sha512-lzchcp8SjTSVe/fPmLwtWVBFC7+Tbn8LGHDVfDp9JGxpAY5opSaEFgt8UQvrnECWOTdji2mOWMz1rOhkHscmGQ==", "dev": true, "dependencies": { - "@babel/template": "^7.18.10", - "@babel/traverse": "^7.20.1", - "@babel/types": "^7.20.0" + "@babel/template": "^7.22.15", + "@babel/traverse": "^7.23.2", + "@babel/types": "^7.23.0" }, "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/highlight": { - "version": "7.18.6", - "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.18.6.tgz", - "integrity": "sha512-u7stbOuYjaPezCuLj29hNW1v64M2Md2qupEKP1fHc7WdOA3DgLh37suiSrZYY7haUB7iBeQZ9P1uiRF359do3g==", + "version": "7.22.20", + "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.22.20.tgz", + "integrity": "sha512-dkdMCN3py0+ksCgYmGG8jKeGA/8Tk+gJwSYYlFGxG5lmhfKNoAy004YpLxpS1W2J8m/EK2Ew+yOs9pVRwO89mg==", "dev": true, "dependencies": { - "@babel/helper-validator-identifier": "^7.18.6", - "chalk": "^2.0.0", + "@babel/helper-validator-identifier": "^7.22.20", + "chalk": "^2.4.2", "js-tokens": "^4.0.0" }, "engines": { @@ -467,9 +455,9 @@ } }, "node_modules/@babel/parser": { - "version": "7.20.2", - "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.20.2.tgz", - "integrity": "sha512-afk318kh2uKbo7BEj2QtEi8HVCGrwHUffrYDy7dgVcSa2j9lY3LDjPzcyGdpX7xgm35aWqvciZJ4WKmdF/SxYg==", + "version": "7.23.0", + "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.23.0.tgz", + "integrity": "sha512-vvPKKdMemU85V9WE/l5wZEmImpCtLqbnTvqDS2U1fJ96KrxoW7KrXhNsNCblQlg8Ck4b85yxdTyelsMUgFUXiw==", "dev": true, "bin": { "parser": "bin/babel-parser.js" @@ -479,12 +467,12 @@ } }, "node_modules/@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression": { - "version": "7.18.6", - "resolved": "https://registry.npmjs.org/@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression/-/plugin-bugfix-safari-id-destructuring-collision-in-function-expression-7.18.6.tgz", - "integrity": "sha512-Dgxsyg54Fx1d4Nge8UnvTrED63vrwOdPmyvPzlNN/boaliRP54pm3pGzZD1SJUwrBA+Cs/xdG8kXX6Mn/RfISQ==", + "version": "7.22.15", + "resolved": "https://registry.npmjs.org/@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression/-/plugin-bugfix-safari-id-destructuring-collision-in-function-expression-7.22.15.tgz", + "integrity": "sha512-FB9iYlz7rURmRJyXRKEnalYPPdn87H5no108cyuQQyMwlpJ2SJtpIUBI27kdTin956pz+LPypkPVPUTlxOmrsg==", "dev": true, "dependencies": { - "@babel/helper-plugin-utils": "^7.18.6" + "@babel/helper-plugin-utils": "^7.22.5" }, "engines": { "node": ">=6.9.0" @@ -494,14 +482,14 @@ } }, "node_modules/@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining": { - "version": "7.18.9", - "resolved": "https://registry.npmjs.org/@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining/-/plugin-bugfix-v8-spread-parameters-in-optional-chaining-7.18.9.tgz", - "integrity": "sha512-AHrP9jadvH7qlOj6PINbgSuphjQUAK7AOT7DPjBo9EHoLhQTnnK5u45e1Hd4DbSQEO9nqPWtQ89r+XEOWFScKg==", + "version": "7.22.15", + "resolved": "https://registry.npmjs.org/@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining/-/plugin-bugfix-v8-spread-parameters-in-optional-chaining-7.22.15.tgz", + "integrity": "sha512-Hyph9LseGvAeeXzikV88bczhsrLrIZqDPxO+sSmAunMPaGrBGhfMWzCPYTtiW9t+HzSE2wtV8e5cc5P6r1xMDQ==", "dev": true, "dependencies": { - "@babel/helper-plugin-utils": "^7.18.9", - "@babel/helper-skip-transparent-expression-wrappers": "^7.18.9", - "@babel/plugin-proposal-optional-chaining": "^7.18.9" + "@babel/helper-plugin-utils": "^7.22.5", + "@babel/helper-skip-transparent-expression-wrappers": "^7.22.5", + "@babel/plugin-transform-optional-chaining": "^7.22.15" }, "engines": { "node": ">=6.9.0" @@ -510,17 +498,11 @@ "@babel/core": "^7.13.0" } }, - "node_modules/@babel/plugin-proposal-async-generator-functions": { - "version": "7.20.1", - "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-async-generator-functions/-/plugin-proposal-async-generator-functions-7.20.1.tgz", - "integrity": "sha512-Gh5rchzSwE4kC+o/6T8waD0WHEQIsDmjltY8WnWRXHUdH8axZhuH86Ov9M72YhJfDrZseQwuuWaaIT/TmePp3g==", + "node_modules/@babel/plugin-proposal-private-property-in-object": { + "version": "7.21.0-placeholder-for-preset-env.2", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-private-property-in-object/-/plugin-proposal-private-property-in-object-7.21.0-placeholder-for-preset-env.2.tgz", + "integrity": "sha512-SOSkfJDddaM7mak6cPEpswyTRnuRltl429hMraQEglW+OkovnCzsiszTmsrlY//qLFjCpQDFRvjdm2wA5pPm9w==", "dev": true, - "dependencies": { - "@babel/helper-environment-visitor": "^7.18.9", - "@babel/helper-plugin-utils": "^7.19.0", - "@babel/helper-remap-async-to-generator": "^7.18.9", - "@babel/plugin-syntax-async-generators": "^7.8.4" - }, "engines": { "node": ">=6.9.0" }, @@ -528,47 +510,37 @@ "@babel/core": "^7.0.0-0" } }, - "node_modules/@babel/plugin-proposal-class-properties": { - "version": "7.18.6", - "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-class-properties/-/plugin-proposal-class-properties-7.18.6.tgz", - "integrity": "sha512-cumfXOF0+nzZrrN8Rf0t7M+tF6sZc7vhQwYQck9q1/5w2OExlD+b4v4RpMJFaV1Z7WcDRgO6FqvxqxGlwo+RHQ==", + "node_modules/@babel/plugin-syntax-async-generators": { + "version": "7.8.4", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-async-generators/-/plugin-syntax-async-generators-7.8.4.tgz", + "integrity": "sha512-tycmZxkGfZaxhMRbXlPXuVFpdWlXpir2W4AMhSJgRKzk/eDlIXOhb2LHWoLpDF7TEHylV5zNhykX6KAgHJmTNw==", "dev": true, "dependencies": { - "@babel/helper-create-class-features-plugin": "^7.18.6", - "@babel/helper-plugin-utils": "^7.18.6" - }, - "engines": { - "node": ">=6.9.0" + "@babel/helper-plugin-utils": "^7.8.0" }, "peerDependencies": { "@babel/core": "^7.0.0-0" } }, - "node_modules/@babel/plugin-proposal-class-static-block": { - "version": "7.18.6", - "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-class-static-block/-/plugin-proposal-class-static-block-7.18.6.tgz", - "integrity": "sha512-+I3oIiNxrCpup3Gi8n5IGMwj0gOCAjcJUSQEcotNnCCPMEnixawOQ+KeJPlgfjzx+FKQ1QSyZOWe7wmoJp7vhw==", + "node_modules/@babel/plugin-syntax-class-properties": { + "version": "7.12.13", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-class-properties/-/plugin-syntax-class-properties-7.12.13.tgz", + "integrity": "sha512-fm4idjKla0YahUNgFNLCB0qySdsoPiZP3iQE3rky0mBUtMZ23yDJ9SJdg6dXTSDnulOVqiF3Hgr9nbXvXTQZYA==", "dev": true, "dependencies": { - "@babel/helper-create-class-features-plugin": "^7.18.6", - "@babel/helper-plugin-utils": "^7.18.6", - "@babel/plugin-syntax-class-static-block": "^7.14.5" - }, - "engines": { - "node": ">=6.9.0" + "@babel/helper-plugin-utils": "^7.12.13" }, "peerDependencies": { - "@babel/core": "^7.12.0" + "@babel/core": "^7.0.0-0" } }, - "node_modules/@babel/plugin-proposal-dynamic-import": { - "version": "7.18.6", - "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-dynamic-import/-/plugin-proposal-dynamic-import-7.18.6.tgz", - "integrity": "sha512-1auuwmK+Rz13SJj36R+jqFPMJWyKEDd7lLSdOj4oJK0UTgGueSAtkrCvz9ewmgyU/P941Rv2fQwZJN8s6QruXw==", + "node_modules/@babel/plugin-syntax-class-static-block": { + "version": "7.14.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-class-static-block/-/plugin-syntax-class-static-block-7.14.5.tgz", + "integrity": "sha512-b+YyPmr6ldyNnM6sqYeMWE+bgJcJpO6yS4QD7ymxgH34GBPNDM/THBh8iunyvKIZztiwLH4CJZ0RxTk9emgpjw==", "dev": true, "dependencies": { - "@babel/helper-plugin-utils": "^7.18.6", - "@babel/plugin-syntax-dynamic-import": "^7.8.3" + "@babel/helper-plugin-utils": "^7.14.5" }, "engines": { "node": ">=6.9.0" @@ -577,46 +549,37 @@ "@babel/core": "^7.0.0-0" } }, - "node_modules/@babel/plugin-proposal-export-namespace-from": { - "version": "7.18.9", - "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-export-namespace-from/-/plugin-proposal-export-namespace-from-7.18.9.tgz", - "integrity": "sha512-k1NtHyOMvlDDFeb9G5PhUXuGj8m/wiwojgQVEhJ/fsVsMCpLyOP4h0uGEjYJKrRI+EVPlb5Jk+Gt9P97lOGwtA==", + "node_modules/@babel/plugin-syntax-dynamic-import": { + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-dynamic-import/-/plugin-syntax-dynamic-import-7.8.3.tgz", + "integrity": "sha512-5gdGbFon+PszYzqs83S3E5mpi7/y/8M9eC90MRTZfduQOYW76ig6SOSPNe41IG5LoP3FGBn2N0RjVDSQiS94kQ==", "dev": true, "dependencies": { - "@babel/helper-plugin-utils": "^7.18.9", - "@babel/plugin-syntax-export-namespace-from": "^7.8.3" - }, - "engines": { - "node": ">=6.9.0" + "@babel/helper-plugin-utils": "^7.8.0" }, "peerDependencies": { "@babel/core": "^7.0.0-0" } }, - "node_modules/@babel/plugin-proposal-json-strings": { - "version": "7.18.6", - "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-json-strings/-/plugin-proposal-json-strings-7.18.6.tgz", - "integrity": "sha512-lr1peyn9kOdbYc0xr0OdHTZ5FMqS6Di+H0Fz2I/JwMzGmzJETNeOFq2pBySw6X/KFL5EWDjlJuMsUGRFb8fQgQ==", + "node_modules/@babel/plugin-syntax-export-namespace-from": { + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-export-namespace-from/-/plugin-syntax-export-namespace-from-7.8.3.tgz", + "integrity": "sha512-MXf5laXo6c1IbEbegDmzGPwGNTsHZmEy6QGznu5Sh2UCWvueywb2ee+CCE4zQiZstxU9BMoQO9i6zUFSY0Kj0Q==", "dev": true, "dependencies": { - "@babel/helper-plugin-utils": "^7.18.6", - "@babel/plugin-syntax-json-strings": "^7.8.3" - }, - "engines": { - "node": ">=6.9.0" + "@babel/helper-plugin-utils": "^7.8.3" }, "peerDependencies": { "@babel/core": "^7.0.0-0" } }, - "node_modules/@babel/plugin-proposal-logical-assignment-operators": { - "version": "7.18.9", - "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-logical-assignment-operators/-/plugin-proposal-logical-assignment-operators-7.18.9.tgz", - "integrity": "sha512-128YbMpjCrP35IOExw2Fq+x55LMP42DzhOhX2aNNIdI9avSWl2PI0yuBWarr3RYpZBSPtabfadkH2yeRiMD61Q==", + "node_modules/@babel/plugin-syntax-import-assertions": { + "version": "7.22.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-import-assertions/-/plugin-syntax-import-assertions-7.22.5.tgz", + "integrity": "sha512-rdV97N7KqsRzeNGoWUOK6yUsWarLjE5Su/Snk9IYPU9CwkWHs4t+rTGOvffTR8XGkJMTAdLfO0xVnXm8wugIJg==", "dev": true, "dependencies": { - "@babel/helper-plugin-utils": "^7.18.9", - "@babel/plugin-syntax-logical-assignment-operators": "^7.10.4" + "@babel/helper-plugin-utils": "^7.22.5" }, "engines": { "node": ">=6.9.0" @@ -625,14 +588,13 @@ "@babel/core": "^7.0.0-0" } }, - "node_modules/@babel/plugin-proposal-nullish-coalescing-operator": { - "version": "7.18.6", - "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-nullish-coalescing-operator/-/plugin-proposal-nullish-coalescing-operator-7.18.6.tgz", - "integrity": "sha512-wQxQzxYeJqHcfppzBDnm1yAY0jSRkUXR2z8RePZYrKwMKgMlE8+Z6LUno+bd6LvbGh8Gltvy74+9pIYkr+XkKA==", + "node_modules/@babel/plugin-syntax-import-attributes": { + "version": "7.22.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-import-attributes/-/plugin-syntax-import-attributes-7.22.5.tgz", + "integrity": "sha512-KwvoWDeNKPETmozyFE0P2rOLqh39EoQHNjqizrI5B8Vt0ZNS7M56s7dAiAqbYfiAYOuIzIh96z3iR2ktgu3tEg==", "dev": true, "dependencies": { - "@babel/helper-plugin-utils": "^7.18.6", - "@babel/plugin-syntax-nullish-coalescing-operator": "^7.8.3" + "@babel/helper-plugin-utils": "^7.22.5" }, "engines": { "node": ">=6.9.0" @@ -641,82 +603,109 @@ "@babel/core": "^7.0.0-0" } }, - "node_modules/@babel/plugin-proposal-numeric-separator": { - "version": "7.18.6", - "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-numeric-separator/-/plugin-proposal-numeric-separator-7.18.6.tgz", - "integrity": "sha512-ozlZFogPqoLm8WBr5Z8UckIoE4YQ5KESVcNudyXOR8uqIkliTEgJ3RoketfG6pmzLdeZF0H/wjE9/cCEitBl7Q==", + "node_modules/@babel/plugin-syntax-import-meta": { + "version": "7.10.4", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-import-meta/-/plugin-syntax-import-meta-7.10.4.tgz", + "integrity": "sha512-Yqfm+XDx0+Prh3VSeEQCPU81yC+JWZ2pDPFSS4ZdpfZhp4MkFMaDC1UqseovEKwSUpnIL7+vK+Clp7bfh0iD7g==", "dev": true, "dependencies": { - "@babel/helper-plugin-utils": "^7.18.6", - "@babel/plugin-syntax-numeric-separator": "^7.10.4" + "@babel/helper-plugin-utils": "^7.10.4" }, - "engines": { - "node": ">=6.9.0" + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-syntax-json-strings": { + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-json-strings/-/plugin-syntax-json-strings-7.8.3.tgz", + "integrity": "sha512-lY6kdGpWHvjoe2vk4WrAapEuBR69EMxZl+RoGRhrFGNYVK8mOPAW8VfbT/ZgrFbXlDNiiaxQnAtgVCZ6jv30EA==", + "dev": true, + "dependencies": { + "@babel/helper-plugin-utils": "^7.8.0" }, "peerDependencies": { "@babel/core": "^7.0.0-0" } }, - "node_modules/@babel/plugin-proposal-object-rest-spread": { - "version": "7.20.2", - "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-object-rest-spread/-/plugin-proposal-object-rest-spread-7.20.2.tgz", - "integrity": "sha512-Ks6uej9WFK+fvIMesSqbAto5dD8Dz4VuuFvGJFKgIGSkJuRGcrwGECPA1fDgQK3/DbExBJpEkTeYeB8geIFCSQ==", + "node_modules/@babel/plugin-syntax-logical-assignment-operators": { + "version": "7.10.4", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-logical-assignment-operators/-/plugin-syntax-logical-assignment-operators-7.10.4.tgz", + "integrity": "sha512-d8waShlpFDinQ5MtvGU9xDAOzKH47+FFoney2baFIoMr952hKOLp1HR7VszoZvOsV/4+RRszNY7D17ba0te0ig==", "dev": true, "dependencies": { - "@babel/compat-data": "^7.20.1", - "@babel/helper-compilation-targets": "^7.20.0", - "@babel/helper-plugin-utils": "^7.20.2", - "@babel/plugin-syntax-object-rest-spread": "^7.8.3", - "@babel/plugin-transform-parameters": "^7.20.1" + "@babel/helper-plugin-utils": "^7.10.4" }, - "engines": { - "node": ">=6.9.0" + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-syntax-nullish-coalescing-operator": { + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-nullish-coalescing-operator/-/plugin-syntax-nullish-coalescing-operator-7.8.3.tgz", + "integrity": "sha512-aSff4zPII1u2QD7y+F8oDsz19ew4IGEJg9SVW+bqwpwtfFleiQDMdzA/R+UlWDzfnHFCxxleFT0PMIrR36XLNQ==", + "dev": true, + "dependencies": { + "@babel/helper-plugin-utils": "^7.8.0" }, "peerDependencies": { "@babel/core": "^7.0.0-0" } }, - "node_modules/@babel/plugin-proposal-optional-catch-binding": { - "version": "7.18.6", - "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-optional-catch-binding/-/plugin-proposal-optional-catch-binding-7.18.6.tgz", - "integrity": "sha512-Q40HEhs9DJQyaZfUjjn6vE8Cv4GmMHCYuMGIWUnlxH6400VGxOuwWsPt4FxXxJkC/5eOzgn0z21M9gMT4MOhbw==", + "node_modules/@babel/plugin-syntax-numeric-separator": { + "version": "7.10.4", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-numeric-separator/-/plugin-syntax-numeric-separator-7.10.4.tgz", + "integrity": "sha512-9H6YdfkcK/uOnY/K7/aA2xpzaAgkQn37yzWUMRK7OaPOqOpGS1+n0H5hxT9AUw9EsSjPW8SVyMJwYRtWs3X3ug==", "dev": true, "dependencies": { - "@babel/helper-plugin-utils": "^7.18.6", - "@babel/plugin-syntax-optional-catch-binding": "^7.8.3" + "@babel/helper-plugin-utils": "^7.10.4" }, - "engines": { - "node": ">=6.9.0" + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-syntax-object-rest-spread": { + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-object-rest-spread/-/plugin-syntax-object-rest-spread-7.8.3.tgz", + "integrity": "sha512-XoqMijGZb9y3y2XskN+P1wUGiVwWZ5JmoDRwx5+3GmEplNyVM2s2Dg8ILFQm8rWM48orGy5YpI5Bl8U1y7ydlA==", + "dev": true, + "dependencies": { + "@babel/helper-plugin-utils": "^7.8.0" }, "peerDependencies": { "@babel/core": "^7.0.0-0" } }, - "node_modules/@babel/plugin-proposal-optional-chaining": { - "version": "7.18.9", - "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-optional-chaining/-/plugin-proposal-optional-chaining-7.18.9.tgz", - "integrity": "sha512-v5nwt4IqBXihxGsW2QmCWMDS3B3bzGIk/EQVZz2ei7f3NJl8NzAJVvUmpDW5q1CRNY+Beb/k58UAH1Km1N411w==", + "node_modules/@babel/plugin-syntax-optional-catch-binding": { + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-optional-catch-binding/-/plugin-syntax-optional-catch-binding-7.8.3.tgz", + "integrity": "sha512-6VPD0Pc1lpTqw0aKoeRTMiB+kWhAoT24PA+ksWSBrFtl5SIRVpZlwN3NNPQjehA2E/91FV3RjLWoVTglWcSV3Q==", "dev": true, "dependencies": { - "@babel/helper-plugin-utils": "^7.18.9", - "@babel/helper-skip-transparent-expression-wrappers": "^7.18.9", - "@babel/plugin-syntax-optional-chaining": "^7.8.3" + "@babel/helper-plugin-utils": "^7.8.0" }, - "engines": { - "node": ">=6.9.0" + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-syntax-optional-chaining": { + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-optional-chaining/-/plugin-syntax-optional-chaining-7.8.3.tgz", + "integrity": "sha512-KoK9ErH1MBlCPxV0VANkXW2/dw4vlbGDrFgz8bmUsBGYkFRcbRwMh6cIJubdPrkxRwuGdtCk0v/wPTKbQgBjkg==", + "dev": true, + "dependencies": { + "@babel/helper-plugin-utils": "^7.8.0" }, "peerDependencies": { "@babel/core": "^7.0.0-0" } }, - "node_modules/@babel/plugin-proposal-private-methods": { - "version": "7.18.6", - "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-private-methods/-/plugin-proposal-private-methods-7.18.6.tgz", - "integrity": "sha512-nutsvktDItsNn4rpGItSNV2sz1XwS+nfU0Rg8aCx3W3NOKVzdMjJRu0O5OkgDp3ZGICSTbgRpxZoWsxoKRvbeA==", + "node_modules/@babel/plugin-syntax-private-property-in-object": { + "version": "7.14.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-private-property-in-object/-/plugin-syntax-private-property-in-object-7.14.5.tgz", + "integrity": "sha512-0wVnp9dxJ72ZUJDV27ZfbSj6iHLoytYZmh3rFcxNnvsJF3ktkzLDZPy/mA17HGsaQT3/DQsWYX1f1QGWkCoVUg==", "dev": true, "dependencies": { - "@babel/helper-create-class-features-plugin": "^7.18.6", - "@babel/helper-plugin-utils": "^7.18.6" + "@babel/helper-plugin-utils": "^7.14.5" }, "engines": { "node": ">=6.9.0" @@ -725,16 +714,13 @@ "@babel/core": "^7.0.0-0" } }, - "node_modules/@babel/plugin-proposal-private-property-in-object": { - "version": "7.18.6", - "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-private-property-in-object/-/plugin-proposal-private-property-in-object-7.18.6.tgz", - "integrity": "sha512-9Rysx7FOctvT5ouj5JODjAFAkgGoudQuLPamZb0v1TGLpapdNaftzifU8NTWQm0IRjqoYypdrSmyWgkocDQ8Dw==", + "node_modules/@babel/plugin-syntax-top-level-await": { + "version": "7.14.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-top-level-await/-/plugin-syntax-top-level-await-7.14.5.tgz", + "integrity": "sha512-hx++upLv5U1rgYfwe1xBQUhRmU41NEvpUvrp8jkrSCdvGSnM5/qdRMtylJ6PG5OFkBaHkbTAKTnd3/YyESRHFw==", "dev": true, "dependencies": { - "@babel/helper-annotate-as-pure": "^7.18.6", - "@babel/helper-create-class-features-plugin": "^7.18.6", - "@babel/helper-plugin-utils": "^7.18.6", - "@babel/plugin-syntax-private-property-in-object": "^7.14.5" + "@babel/helper-plugin-utils": "^7.14.5" }, "engines": { "node": ">=6.9.0" @@ -743,53 +729,47 @@ "@babel/core": "^7.0.0-0" } }, - "node_modules/@babel/plugin-proposal-unicode-property-regex": { + "node_modules/@babel/plugin-syntax-unicode-sets-regex": { "version": "7.18.6", - "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-unicode-property-regex/-/plugin-proposal-unicode-property-regex-7.18.6.tgz", - "integrity": "sha512-2BShG/d5yoZyXZfVePH91urL5wTG6ASZU9M4o03lKK8u8UW1y08OMttBSOADTcJrnPMpvDXRG3G8fyLh4ovs8w==", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-unicode-sets-regex/-/plugin-syntax-unicode-sets-regex-7.18.6.tgz", + "integrity": "sha512-727YkEAPwSIQTv5im8QHz3upqp92JTWhidIC81Tdx4VJYIte/VndKf1qKrfnnhPLiPghStWfvC/iFaMCQu7Nqg==", "dev": true, "dependencies": { "@babel/helper-create-regexp-features-plugin": "^7.18.6", "@babel/helper-plugin-utils": "^7.18.6" }, "engines": { - "node": ">=4" + "node": ">=6.9.0" }, "peerDependencies": { - "@babel/core": "^7.0.0-0" + "@babel/core": "^7.0.0" } }, - "node_modules/@babel/plugin-syntax-async-generators": { - "version": "7.8.4", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-async-generators/-/plugin-syntax-async-generators-7.8.4.tgz", - "integrity": "sha512-tycmZxkGfZaxhMRbXlPXuVFpdWlXpir2W4AMhSJgRKzk/eDlIXOhb2LHWoLpDF7TEHylV5zNhykX6KAgHJmTNw==", + "node_modules/@babel/plugin-transform-arrow-functions": { + "version": "7.22.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-arrow-functions/-/plugin-transform-arrow-functions-7.22.5.tgz", + "integrity": "sha512-26lTNXoVRdAnsaDXPpvCNUq+OVWEVC6bx7Vvz9rC53F2bagUWW4u4ii2+h8Fejfh7RYqPxn+libeFBBck9muEw==", "dev": true, "dependencies": { - "@babel/helper-plugin-utils": "^7.8.0" + "@babel/helper-plugin-utils": "^7.22.5" }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-syntax-class-properties": { - "version": "7.12.13", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-class-properties/-/plugin-syntax-class-properties-7.12.13.tgz", - "integrity": "sha512-fm4idjKla0YahUNgFNLCB0qySdsoPiZP3iQE3rky0mBUtMZ23yDJ9SJdg6dXTSDnulOVqiF3Hgr9nbXvXTQZYA==", - "dev": true, - "dependencies": { - "@babel/helper-plugin-utils": "^7.12.13" + "engines": { + "node": ">=6.9.0" }, "peerDependencies": { "@babel/core": "^7.0.0-0" } }, - "node_modules/@babel/plugin-syntax-class-static-block": { - "version": "7.14.5", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-class-static-block/-/plugin-syntax-class-static-block-7.14.5.tgz", - "integrity": "sha512-b+YyPmr6ldyNnM6sqYeMWE+bgJcJpO6yS4QD7ymxgH34GBPNDM/THBh8iunyvKIZztiwLH4CJZ0RxTk9emgpjw==", + "node_modules/@babel/plugin-transform-async-generator-functions": { + "version": "7.23.2", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-async-generator-functions/-/plugin-transform-async-generator-functions-7.23.2.tgz", + "integrity": "sha512-BBYVGxbDVHfoeXbOwcagAkOQAm9NxoTdMGfTqghu1GrvadSaw6iW3Je6IcL5PNOw8VwjxqBECXy50/iCQSY/lQ==", "dev": true, "dependencies": { - "@babel/helper-plugin-utils": "^7.14.5" + "@babel/helper-environment-visitor": "^7.22.20", + "@babel/helper-plugin-utils": "^7.22.5", + "@babel/helper-remap-async-to-generator": "^7.22.20", + "@babel/plugin-syntax-async-generators": "^7.8.4" }, "engines": { "node": ">=6.9.0" @@ -798,37 +778,45 @@ "@babel/core": "^7.0.0-0" } }, - "node_modules/@babel/plugin-syntax-dynamic-import": { - "version": "7.8.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-dynamic-import/-/plugin-syntax-dynamic-import-7.8.3.tgz", - "integrity": "sha512-5gdGbFon+PszYzqs83S3E5mpi7/y/8M9eC90MRTZfduQOYW76ig6SOSPNe41IG5LoP3FGBn2N0RjVDSQiS94kQ==", + "node_modules/@babel/plugin-transform-async-to-generator": { + "version": "7.22.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-async-to-generator/-/plugin-transform-async-to-generator-7.22.5.tgz", + "integrity": "sha512-b1A8D8ZzE/VhNDoV1MSJTnpKkCG5bJo+19R4o4oy03zM7ws8yEMK755j61Dc3EyvdysbqH5BOOTquJ7ZX9C6vQ==", "dev": true, "dependencies": { - "@babel/helper-plugin-utils": "^7.8.0" + "@babel/helper-module-imports": "^7.22.5", + "@babel/helper-plugin-utils": "^7.22.5", + "@babel/helper-remap-async-to-generator": "^7.22.5" + }, + "engines": { + "node": ">=6.9.0" }, "peerDependencies": { "@babel/core": "^7.0.0-0" } }, - "node_modules/@babel/plugin-syntax-export-namespace-from": { - "version": "7.8.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-export-namespace-from/-/plugin-syntax-export-namespace-from-7.8.3.tgz", - "integrity": "sha512-MXf5laXo6c1IbEbegDmzGPwGNTsHZmEy6QGznu5Sh2UCWvueywb2ee+CCE4zQiZstxU9BMoQO9i6zUFSY0Kj0Q==", + "node_modules/@babel/plugin-transform-block-scoped-functions": { + "version": "7.22.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-block-scoped-functions/-/plugin-transform-block-scoped-functions-7.22.5.tgz", + "integrity": "sha512-tdXZ2UdknEKQWKJP1KMNmuF5Lx3MymtMN/pvA+p/VEkhK8jVcQ1fzSy8KM9qRYhAf2/lV33hoMPKI/xaI9sADA==", "dev": true, "dependencies": { - "@babel/helper-plugin-utils": "^7.8.3" + "@babel/helper-plugin-utils": "^7.22.5" + }, + "engines": { + "node": ">=6.9.0" }, "peerDependencies": { "@babel/core": "^7.0.0-0" } }, - "node_modules/@babel/plugin-syntax-import-assertions": { - "version": "7.20.0", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-import-assertions/-/plugin-syntax-import-assertions-7.20.0.tgz", - "integrity": "sha512-IUh1vakzNoWalR8ch/areW7qFopR2AEw03JlG7BbrDqmQ4X3q9uuipQwSGrUn7oGiemKjtSLDhNtQHzMHr1JdQ==", + "node_modules/@babel/plugin-transform-block-scoping": { + "version": "7.23.0", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-block-scoping/-/plugin-transform-block-scoping-7.23.0.tgz", + "integrity": "sha512-cOsrbmIOXmf+5YbL99/S49Y3j46k/T16b9ml8bm9lP6N9US5iQ2yBK7gpui1pg0V/WMcXdkfKbTb7HXq9u+v4g==", "dev": true, "dependencies": { - "@babel/helper-plugin-utils": "^7.19.0" + "@babel/helper-plugin-utils": "^7.22.5" }, "engines": { "node": ">=6.9.0" @@ -837,97 +825,132 @@ "@babel/core": "^7.0.0-0" } }, - "node_modules/@babel/plugin-syntax-json-strings": { - "version": "7.8.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-json-strings/-/plugin-syntax-json-strings-7.8.3.tgz", - "integrity": "sha512-lY6kdGpWHvjoe2vk4WrAapEuBR69EMxZl+RoGRhrFGNYVK8mOPAW8VfbT/ZgrFbXlDNiiaxQnAtgVCZ6jv30EA==", + "node_modules/@babel/plugin-transform-class-properties": { + "version": "7.22.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-class-properties/-/plugin-transform-class-properties-7.22.5.tgz", + "integrity": "sha512-nDkQ0NfkOhPTq8YCLiWNxp1+f9fCobEjCb0n8WdbNUBc4IB5V7P1QnX9IjpSoquKrXF5SKojHleVNs2vGeHCHQ==", "dev": true, "dependencies": { - "@babel/helper-plugin-utils": "^7.8.0" + "@babel/helper-create-class-features-plugin": "^7.22.5", + "@babel/helper-plugin-utils": "^7.22.5" + }, + "engines": { + "node": ">=6.9.0" }, "peerDependencies": { "@babel/core": "^7.0.0-0" } }, - "node_modules/@babel/plugin-syntax-logical-assignment-operators": { - "version": "7.10.4", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-logical-assignment-operators/-/plugin-syntax-logical-assignment-operators-7.10.4.tgz", - "integrity": "sha512-d8waShlpFDinQ5MtvGU9xDAOzKH47+FFoney2baFIoMr952hKOLp1HR7VszoZvOsV/4+RRszNY7D17ba0te0ig==", + "node_modules/@babel/plugin-transform-class-static-block": { + "version": "7.22.11", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-class-static-block/-/plugin-transform-class-static-block-7.22.11.tgz", + "integrity": "sha512-GMM8gGmqI7guS/llMFk1bJDkKfn3v3C4KHK9Yg1ey5qcHcOlKb0QvcMrgzvxo+T03/4szNh5lghY+fEC98Kq9g==", "dev": true, "dependencies": { - "@babel/helper-plugin-utils": "^7.10.4" + "@babel/helper-create-class-features-plugin": "^7.22.11", + "@babel/helper-plugin-utils": "^7.22.5", + "@babel/plugin-syntax-class-static-block": "^7.14.5" + }, + "engines": { + "node": ">=6.9.0" }, "peerDependencies": { - "@babel/core": "^7.0.0-0" + "@babel/core": "^7.12.0" } }, - "node_modules/@babel/plugin-syntax-nullish-coalescing-operator": { - "version": "7.8.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-nullish-coalescing-operator/-/plugin-syntax-nullish-coalescing-operator-7.8.3.tgz", - "integrity": "sha512-aSff4zPII1u2QD7y+F8oDsz19ew4IGEJg9SVW+bqwpwtfFleiQDMdzA/R+UlWDzfnHFCxxleFT0PMIrR36XLNQ==", - "dev": true, - "dependencies": { - "@babel/helper-plugin-utils": "^7.8.0" + "node_modules/@babel/plugin-transform-classes": { + "version": "7.22.15", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-classes/-/plugin-transform-classes-7.22.15.tgz", + "integrity": "sha512-VbbC3PGjBdE0wAWDdHM9G8Gm977pnYI0XpqMd6LrKISj8/DJXEsWqgRuTYaNE9Bv0JGhTZUzHDlMk18IpOuoqw==", + "dev": true, + "dependencies": { + "@babel/helper-annotate-as-pure": "^7.22.5", + "@babel/helper-compilation-targets": "^7.22.15", + "@babel/helper-environment-visitor": "^7.22.5", + "@babel/helper-function-name": "^7.22.5", + "@babel/helper-optimise-call-expression": "^7.22.5", + "@babel/helper-plugin-utils": "^7.22.5", + "@babel/helper-replace-supers": "^7.22.9", + "@babel/helper-split-export-declaration": "^7.22.6", + "globals": "^11.1.0" + }, + "engines": { + "node": ">=6.9.0" }, "peerDependencies": { "@babel/core": "^7.0.0-0" } }, - "node_modules/@babel/plugin-syntax-numeric-separator": { - "version": "7.10.4", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-numeric-separator/-/plugin-syntax-numeric-separator-7.10.4.tgz", - "integrity": "sha512-9H6YdfkcK/uOnY/K7/aA2xpzaAgkQn37yzWUMRK7OaPOqOpGS1+n0H5hxT9AUw9EsSjPW8SVyMJwYRtWs3X3ug==", + "node_modules/@babel/plugin-transform-computed-properties": { + "version": "7.22.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-computed-properties/-/plugin-transform-computed-properties-7.22.5.tgz", + "integrity": "sha512-4GHWBgRf0krxPX+AaPtgBAlTgTeZmqDynokHOX7aqqAB4tHs3U2Y02zH6ETFdLZGcg9UQSD1WCmkVrE9ErHeOg==", "dev": true, "dependencies": { - "@babel/helper-plugin-utils": "^7.10.4" + "@babel/helper-plugin-utils": "^7.22.5", + "@babel/template": "^7.22.5" + }, + "engines": { + "node": ">=6.9.0" }, "peerDependencies": { "@babel/core": "^7.0.0-0" } }, - "node_modules/@babel/plugin-syntax-object-rest-spread": { - "version": "7.8.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-object-rest-spread/-/plugin-syntax-object-rest-spread-7.8.3.tgz", - "integrity": "sha512-XoqMijGZb9y3y2XskN+P1wUGiVwWZ5JmoDRwx5+3GmEplNyVM2s2Dg8ILFQm8rWM48orGy5YpI5Bl8U1y7ydlA==", + "node_modules/@babel/plugin-transform-destructuring": { + "version": "7.23.0", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-destructuring/-/plugin-transform-destructuring-7.23.0.tgz", + "integrity": "sha512-vaMdgNXFkYrB+8lbgniSYWHsgqK5gjaMNcc84bMIOMRLH0L9AqYq3hwMdvnyqj1OPqea8UtjPEuS/DCenah1wg==", "dev": true, "dependencies": { - "@babel/helper-plugin-utils": "^7.8.0" + "@babel/helper-plugin-utils": "^7.22.5" + }, + "engines": { + "node": ">=6.9.0" }, "peerDependencies": { "@babel/core": "^7.0.0-0" } }, - "node_modules/@babel/plugin-syntax-optional-catch-binding": { - "version": "7.8.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-optional-catch-binding/-/plugin-syntax-optional-catch-binding-7.8.3.tgz", - "integrity": "sha512-6VPD0Pc1lpTqw0aKoeRTMiB+kWhAoT24PA+ksWSBrFtl5SIRVpZlwN3NNPQjehA2E/91FV3RjLWoVTglWcSV3Q==", + "node_modules/@babel/plugin-transform-dotall-regex": { + "version": "7.22.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-dotall-regex/-/plugin-transform-dotall-regex-7.22.5.tgz", + "integrity": "sha512-5/Yk9QxCQCl+sOIB1WelKnVRxTJDSAIxtJLL2/pqL14ZVlbH0fUQUZa/T5/UnQtBNgghR7mfB8ERBKyKPCi7Vw==", "dev": true, "dependencies": { - "@babel/helper-plugin-utils": "^7.8.0" + "@babel/helper-create-regexp-features-plugin": "^7.22.5", + "@babel/helper-plugin-utils": "^7.22.5" + }, + "engines": { + "node": ">=6.9.0" }, "peerDependencies": { "@babel/core": "^7.0.0-0" } }, - "node_modules/@babel/plugin-syntax-optional-chaining": { - "version": "7.8.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-optional-chaining/-/plugin-syntax-optional-chaining-7.8.3.tgz", - "integrity": "sha512-KoK9ErH1MBlCPxV0VANkXW2/dw4vlbGDrFgz8bmUsBGYkFRcbRwMh6cIJubdPrkxRwuGdtCk0v/wPTKbQgBjkg==", + "node_modules/@babel/plugin-transform-duplicate-keys": { + "version": "7.22.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-duplicate-keys/-/plugin-transform-duplicate-keys-7.22.5.tgz", + "integrity": "sha512-dEnYD+9BBgld5VBXHnF/DbYGp3fqGMsyxKbtD1mDyIA7AkTSpKXFhCVuj/oQVOoALfBs77DudA0BE4d5mcpmqw==", "dev": true, "dependencies": { - "@babel/helper-plugin-utils": "^7.8.0" + "@babel/helper-plugin-utils": "^7.22.5" + }, + "engines": { + "node": ">=6.9.0" }, "peerDependencies": { "@babel/core": "^7.0.0-0" } }, - "node_modules/@babel/plugin-syntax-private-property-in-object": { - "version": "7.14.5", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-private-property-in-object/-/plugin-syntax-private-property-in-object-7.14.5.tgz", - "integrity": "sha512-0wVnp9dxJ72ZUJDV27ZfbSj6iHLoytYZmh3rFcxNnvsJF3ktkzLDZPy/mA17HGsaQT3/DQsWYX1f1QGWkCoVUg==", + "node_modules/@babel/plugin-transform-dynamic-import": { + "version": "7.22.11", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-dynamic-import/-/plugin-transform-dynamic-import-7.22.11.tgz", + "integrity": "sha512-g/21plo58sfteWjaO0ZNVb+uEOkJNjAaHhbejrnBmu011l/eNDScmkbjCC3l4FKb10ViaGU4aOkFznSu2zRHgA==", "dev": true, "dependencies": { - "@babel/helper-plugin-utils": "^7.14.5" + "@babel/helper-plugin-utils": "^7.22.5", + "@babel/plugin-syntax-dynamic-import": "^7.8.3" }, "engines": { "node": ">=6.9.0" @@ -936,13 +959,14 @@ "@babel/core": "^7.0.0-0" } }, - "node_modules/@babel/plugin-syntax-top-level-await": { - "version": "7.14.5", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-top-level-await/-/plugin-syntax-top-level-await-7.14.5.tgz", - "integrity": "sha512-hx++upLv5U1rgYfwe1xBQUhRmU41NEvpUvrp8jkrSCdvGSnM5/qdRMtylJ6PG5OFkBaHkbTAKTnd3/YyESRHFw==", + "node_modules/@babel/plugin-transform-exponentiation-operator": { + "version": "7.22.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-exponentiation-operator/-/plugin-transform-exponentiation-operator-7.22.5.tgz", + "integrity": "sha512-vIpJFNM/FjZ4rh1myqIya9jXwrwwgFRHPjT3DkUA9ZLHuzox8jiXkOLvwm1H+PQIP3CqfC++WPKeuDi0Sjdj1g==", "dev": true, "dependencies": { - "@babel/helper-plugin-utils": "^7.14.5" + "@babel/helper-builder-binary-assignment-operator-visitor": "^7.22.5", + "@babel/helper-plugin-utils": "^7.22.5" }, "engines": { "node": ">=6.9.0" @@ -951,13 +975,14 @@ "@babel/core": "^7.0.0-0" } }, - "node_modules/@babel/plugin-transform-arrow-functions": { - "version": "7.18.6", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-arrow-functions/-/plugin-transform-arrow-functions-7.18.6.tgz", - "integrity": "sha512-9S9X9RUefzrsHZmKMbDXxweEH+YlE8JJEuat9FdvW9Qh1cw7W64jELCtWNkPBPX5En45uy28KGvA/AySqUh8CQ==", + "node_modules/@babel/plugin-transform-export-namespace-from": { + "version": "7.22.11", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-export-namespace-from/-/plugin-transform-export-namespace-from-7.22.11.tgz", + "integrity": "sha512-xa7aad7q7OiT8oNZ1mU7NrISjlSkVdMbNxn9IuLZyL9AJEhs1Apba3I+u5riX1dIkdptP5EKDG5XDPByWxtehw==", "dev": true, "dependencies": { - "@babel/helper-plugin-utils": "^7.18.6" + "@babel/helper-plugin-utils": "^7.22.5", + "@babel/plugin-syntax-export-namespace-from": "^7.8.3" }, "engines": { "node": ">=6.9.0" @@ -966,15 +991,13 @@ "@babel/core": "^7.0.0-0" } }, - "node_modules/@babel/plugin-transform-async-to-generator": { - "version": "7.18.6", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-async-to-generator/-/plugin-transform-async-to-generator-7.18.6.tgz", - "integrity": "sha512-ARE5wZLKnTgPW7/1ftQmSi1CmkqqHo2DNmtztFhvgtOWSDfq0Cq9/9L+KnZNYSNrydBekhW3rwShduf59RoXag==", + "node_modules/@babel/plugin-transform-for-of": { + "version": "7.22.15", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-for-of/-/plugin-transform-for-of-7.22.15.tgz", + "integrity": "sha512-me6VGeHsx30+xh9fbDLLPi0J1HzmeIIyenoOQHuw2D4m2SAU3NrspX5XxJLBpqn5yrLzrlw2Iy3RA//Bx27iOA==", "dev": true, "dependencies": { - "@babel/helper-module-imports": "^7.18.6", - "@babel/helper-plugin-utils": "^7.18.6", - "@babel/helper-remap-async-to-generator": "^7.18.6" + "@babel/helper-plugin-utils": "^7.22.5" }, "engines": { "node": ">=6.9.0" @@ -983,13 +1006,15 @@ "@babel/core": "^7.0.0-0" } }, - "node_modules/@babel/plugin-transform-block-scoped-functions": { - "version": "7.18.6", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-block-scoped-functions/-/plugin-transform-block-scoped-functions-7.18.6.tgz", - "integrity": "sha512-ExUcOqpPWnliRcPqves5HJcJOvHvIIWfuS4sroBUenPuMdmW+SMHDakmtS7qOo13sVppmUijqeTv7qqGsvURpQ==", + "node_modules/@babel/plugin-transform-function-name": { + "version": "7.22.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-function-name/-/plugin-transform-function-name-7.22.5.tgz", + "integrity": "sha512-UIzQNMS0p0HHiQm3oelztj+ECwFnj+ZRV4KnguvlsD2of1whUeM6o7wGNj6oLwcDoAXQ8gEqfgC24D+VdIcevg==", "dev": true, "dependencies": { - "@babel/helper-plugin-utils": "^7.18.6" + "@babel/helper-compilation-targets": "^7.22.5", + "@babel/helper-function-name": "^7.22.5", + "@babel/helper-plugin-utils": "^7.22.5" }, "engines": { "node": ">=6.9.0" @@ -998,13 +1023,14 @@ "@babel/core": "^7.0.0-0" } }, - "node_modules/@babel/plugin-transform-block-scoping": { - "version": "7.20.2", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-block-scoping/-/plugin-transform-block-scoping-7.20.2.tgz", - "integrity": "sha512-y5V15+04ry69OV2wULmwhEA6jwSWXO1TwAtIwiPXcvHcoOQUqpyMVd2bDsQJMW8AurjulIyUV8kDqtjSwHy1uQ==", + "node_modules/@babel/plugin-transform-json-strings": { + "version": "7.22.11", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-json-strings/-/plugin-transform-json-strings-7.22.11.tgz", + "integrity": "sha512-CxT5tCqpA9/jXFlme9xIBCc5RPtdDq3JpkkhgHQqtDdiTnTI0jtZ0QzXhr5DILeYifDPp2wvY2ad+7+hLMW5Pw==", "dev": true, "dependencies": { - "@babel/helper-plugin-utils": "^7.20.2" + "@babel/helper-plugin-utils": "^7.22.5", + "@babel/plugin-syntax-json-strings": "^7.8.3" }, "engines": { "node": ">=6.9.0" @@ -1013,21 +1039,13 @@ "@babel/core": "^7.0.0-0" } }, - "node_modules/@babel/plugin-transform-classes": { - "version": "7.20.2", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-classes/-/plugin-transform-classes-7.20.2.tgz", - "integrity": "sha512-9rbPp0lCVVoagvtEyQKSo5L8oo0nQS/iif+lwlAz29MccX2642vWDlSZK+2T2buxbopotId2ld7zZAzRfz9j1g==", - "dev": true, - "dependencies": { - "@babel/helper-annotate-as-pure": "^7.18.6", - "@babel/helper-compilation-targets": "^7.20.0", - "@babel/helper-environment-visitor": "^7.18.9", - "@babel/helper-function-name": "^7.19.0", - "@babel/helper-optimise-call-expression": "^7.18.6", - "@babel/helper-plugin-utils": "^7.20.2", - "@babel/helper-replace-supers": "^7.19.1", - "@babel/helper-split-export-declaration": "^7.18.6", - "globals": "^11.1.0" + "node_modules/@babel/plugin-transform-literals": { + "version": "7.22.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-literals/-/plugin-transform-literals-7.22.5.tgz", + "integrity": "sha512-fTLj4D79M+mepcw3dgFBTIDYpbcB9Sm0bpm4ppXPaO+U+PKFFyV9MGRvS0gvGw62sd10kT5lRMKXAADb9pWy8g==", + "dev": true, + "dependencies": { + "@babel/helper-plugin-utils": "^7.22.5" }, "engines": { "node": ">=6.9.0" @@ -1036,13 +1054,14 @@ "@babel/core": "^7.0.0-0" } }, - "node_modules/@babel/plugin-transform-computed-properties": { - "version": "7.18.9", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-computed-properties/-/plugin-transform-computed-properties-7.18.9.tgz", - "integrity": "sha512-+i0ZU1bCDymKakLxn5srGHrsAPRELC2WIbzwjLhHW9SIE1cPYkLCL0NlnXMZaM1vhfgA2+M7hySk42VBvrkBRw==", + "node_modules/@babel/plugin-transform-logical-assignment-operators": { + "version": "7.22.11", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-logical-assignment-operators/-/plugin-transform-logical-assignment-operators-7.22.11.tgz", + "integrity": "sha512-qQwRTP4+6xFCDV5k7gZBF3C31K34ut0tbEcTKxlX/0KXxm9GLcO14p570aWxFvVzx6QAfPgq7gaeIHXJC8LswQ==", "dev": true, "dependencies": { - "@babel/helper-plugin-utils": "^7.18.9" + "@babel/helper-plugin-utils": "^7.22.5", + "@babel/plugin-syntax-logical-assignment-operators": "^7.10.4" }, "engines": { "node": ">=6.9.0" @@ -1051,13 +1070,13 @@ "@babel/core": "^7.0.0-0" } }, - "node_modules/@babel/plugin-transform-destructuring": { - "version": "7.20.2", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-destructuring/-/plugin-transform-destructuring-7.20.2.tgz", - "integrity": "sha512-mENM+ZHrvEgxLTBXUiQ621rRXZes3KWUv6NdQlrnr1TkWVw+hUjQBZuP2X32qKlrlG2BzgR95gkuCRSkJl8vIw==", + "node_modules/@babel/plugin-transform-member-expression-literals": { + "version": "7.22.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-member-expression-literals/-/plugin-transform-member-expression-literals-7.22.5.tgz", + "integrity": "sha512-RZEdkNtzzYCFl9SE9ATaUMTj2hqMb4StarOJLrZRbqqU4HSBE7UlBw9WBWQiDzrJZJdUWiMTVDI6Gv/8DPvfew==", "dev": true, "dependencies": { - "@babel/helper-plugin-utils": "^7.20.2" + "@babel/helper-plugin-utils": "^7.22.5" }, "engines": { "node": ">=6.9.0" @@ -1066,14 +1085,14 @@ "@babel/core": "^7.0.0-0" } }, - "node_modules/@babel/plugin-transform-dotall-regex": { - "version": "7.18.6", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-dotall-regex/-/plugin-transform-dotall-regex-7.18.6.tgz", - "integrity": "sha512-6S3jpun1eEbAxq7TdjLotAsl4WpQI9DxfkycRcKrjhQYzU87qpXdknpBg/e+TdcMehqGnLFi7tnFUBR02Vq6wg==", + "node_modules/@babel/plugin-transform-modules-amd": { + "version": "7.23.0", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-amd/-/plugin-transform-modules-amd-7.23.0.tgz", + "integrity": "sha512-xWT5gefv2HGSm4QHtgc1sYPbseOyf+FFDo2JbpE25GWl5BqTGO9IMwTYJRoIdjsF85GE+VegHxSCUt5EvoYTAw==", "dev": true, "dependencies": { - "@babel/helper-create-regexp-features-plugin": "^7.18.6", - "@babel/helper-plugin-utils": "^7.18.6" + "@babel/helper-module-transforms": "^7.23.0", + "@babel/helper-plugin-utils": "^7.22.5" }, "engines": { "node": ">=6.9.0" @@ -1082,13 +1101,15 @@ "@babel/core": "^7.0.0-0" } }, - "node_modules/@babel/plugin-transform-duplicate-keys": { - "version": "7.18.9", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-duplicate-keys/-/plugin-transform-duplicate-keys-7.18.9.tgz", - "integrity": "sha512-d2bmXCtZXYc59/0SanQKbiWINadaJXqtvIQIzd4+hNwkWBgyCd5F/2t1kXoUdvPMrxzPvhK6EMQRROxsue+mfw==", + "node_modules/@babel/plugin-transform-modules-commonjs": { + "version": "7.23.0", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-commonjs/-/plugin-transform-modules-commonjs-7.23.0.tgz", + "integrity": "sha512-32Xzss14/UVc7k9g775yMIvkVK8xwKE0DPdP5JTapr3+Z9w4tzeOuLNY6BXDQR6BdnzIlXnCGAzsk/ICHBLVWQ==", "dev": true, "dependencies": { - "@babel/helper-plugin-utils": "^7.18.9" + "@babel/helper-module-transforms": "^7.23.0", + "@babel/helper-plugin-utils": "^7.22.5", + "@babel/helper-simple-access": "^7.22.5" }, "engines": { "node": ">=6.9.0" @@ -1097,14 +1118,16 @@ "@babel/core": "^7.0.0-0" } }, - "node_modules/@babel/plugin-transform-exponentiation-operator": { - "version": "7.18.6", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-exponentiation-operator/-/plugin-transform-exponentiation-operator-7.18.6.tgz", - "integrity": "sha512-wzEtc0+2c88FVR34aQmiz56dxEkxr2g8DQb/KfaFa1JYXOFVsbhvAonFN6PwVWj++fKmku8NP80plJ5Et4wqHw==", + "node_modules/@babel/plugin-transform-modules-systemjs": { + "version": "7.23.0", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-systemjs/-/plugin-transform-modules-systemjs-7.23.0.tgz", + "integrity": "sha512-qBej6ctXZD2f+DhlOC9yO47yEYgUh5CZNz/aBoH4j/3NOlRfJXJbY7xDQCqQVf9KbrqGzIWER1f23doHGrIHFg==", "dev": true, "dependencies": { - "@babel/helper-builder-binary-assignment-operator-visitor": "^7.18.6", - "@babel/helper-plugin-utils": "^7.18.6" + "@babel/helper-hoist-variables": "^7.22.5", + "@babel/helper-module-transforms": "^7.23.0", + "@babel/helper-plugin-utils": "^7.22.5", + "@babel/helper-validator-identifier": "^7.22.20" }, "engines": { "node": ">=6.9.0" @@ -1113,13 +1136,14 @@ "@babel/core": "^7.0.0-0" } }, - "node_modules/@babel/plugin-transform-for-of": { - "version": "7.18.8", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-for-of/-/plugin-transform-for-of-7.18.8.tgz", - "integrity": "sha512-yEfTRnjuskWYo0k1mHUqrVWaZwrdq8AYbfrpqULOJOaucGSp4mNMVps+YtA8byoevxS/urwU75vyhQIxcCgiBQ==", + "node_modules/@babel/plugin-transform-modules-umd": { + "version": "7.22.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-umd/-/plugin-transform-modules-umd-7.22.5.tgz", + "integrity": "sha512-+S6kzefN/E1vkSsKx8kmQuqeQsvCKCd1fraCM7zXm4SFoggI099Tr4G8U81+5gtMdUeMQ4ipdQffbKLX0/7dBQ==", "dev": true, "dependencies": { - "@babel/helper-plugin-utils": "^7.18.6" + "@babel/helper-module-transforms": "^7.22.5", + "@babel/helper-plugin-utils": "^7.22.5" }, "engines": { "node": ">=6.9.0" @@ -1128,30 +1152,29 @@ "@babel/core": "^7.0.0-0" } }, - "node_modules/@babel/plugin-transform-function-name": { - "version": "7.18.9", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-function-name/-/plugin-transform-function-name-7.18.9.tgz", - "integrity": "sha512-WvIBoRPaJQ5yVHzcnJFor7oS5Ls0PYixlTYE63lCj2RtdQEl15M68FXQlxnG6wdraJIXRdR7KI+hQ7q/9QjrCQ==", + "node_modules/@babel/plugin-transform-named-capturing-groups-regex": { + "version": "7.22.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-named-capturing-groups-regex/-/plugin-transform-named-capturing-groups-regex-7.22.5.tgz", + "integrity": "sha512-YgLLKmS3aUBhHaxp5hi1WJTgOUb/NCuDHzGT9z9WTt3YG+CPRhJs6nprbStx6DnWM4dh6gt7SU3sZodbZ08adQ==", "dev": true, "dependencies": { - "@babel/helper-compilation-targets": "^7.18.9", - "@babel/helper-function-name": "^7.18.9", - "@babel/helper-plugin-utils": "^7.18.9" + "@babel/helper-create-regexp-features-plugin": "^7.22.5", + "@babel/helper-plugin-utils": "^7.22.5" }, "engines": { "node": ">=6.9.0" }, "peerDependencies": { - "@babel/core": "^7.0.0-0" + "@babel/core": "^7.0.0" } }, - "node_modules/@babel/plugin-transform-literals": { - "version": "7.18.9", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-literals/-/plugin-transform-literals-7.18.9.tgz", - "integrity": "sha512-IFQDSRoTPnrAIrI5zoZv73IFeZu2dhu6irxQjY9rNjTT53VmKg9fenjvoiOWOkJ6mm4jKVPtdMzBY98Fp4Z4cg==", + "node_modules/@babel/plugin-transform-new-target": { + "version": "7.22.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-new-target/-/plugin-transform-new-target-7.22.5.tgz", + "integrity": "sha512-AsF7K0Fx/cNKVyk3a+DW0JLo+Ua598/NxMRvxDnkpCIGFh43+h/v2xyhRUYf6oD8gE4QtL83C7zZVghMjHd+iw==", "dev": true, "dependencies": { - "@babel/helper-plugin-utils": "^7.18.9" + "@babel/helper-plugin-utils": "^7.22.5" }, "engines": { "node": ">=6.9.0" @@ -1160,13 +1183,14 @@ "@babel/core": "^7.0.0-0" } }, - "node_modules/@babel/plugin-transform-member-expression-literals": { - "version": "7.18.6", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-member-expression-literals/-/plugin-transform-member-expression-literals-7.18.6.tgz", - "integrity": "sha512-qSF1ihLGO3q+/g48k85tUjD033C29TNTVB2paCwZPVmOsjn9pClvYYrM2VeJpBY2bcNkuny0YUyTNRyRxJ54KA==", + "node_modules/@babel/plugin-transform-nullish-coalescing-operator": { + "version": "7.22.11", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-nullish-coalescing-operator/-/plugin-transform-nullish-coalescing-operator-7.22.11.tgz", + "integrity": "sha512-YZWOw4HxXrotb5xsjMJUDlLgcDXSfO9eCmdl1bgW4+/lAGdkjaEvOnQ4p5WKKdUgSzO39dgPl0pTnfxm0OAXcg==", "dev": true, "dependencies": { - "@babel/helper-plugin-utils": "^7.18.6" + "@babel/helper-plugin-utils": "^7.22.5", + "@babel/plugin-syntax-nullish-coalescing-operator": "^7.8.3" }, "engines": { "node": ">=6.9.0" @@ -1175,14 +1199,14 @@ "@babel/core": "^7.0.0-0" } }, - "node_modules/@babel/plugin-transform-modules-amd": { - "version": "7.19.6", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-amd/-/plugin-transform-modules-amd-7.19.6.tgz", - "integrity": "sha512-uG3od2mXvAtIFQIh0xrpLH6r5fpSQN04gIVovl+ODLdUMANokxQLZnPBHcjmv3GxRjnqwLuHvppjjcelqUFZvg==", + "node_modules/@babel/plugin-transform-numeric-separator": { + "version": "7.22.11", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-numeric-separator/-/plugin-transform-numeric-separator-7.22.11.tgz", + "integrity": "sha512-3dzU4QGPsILdJbASKhF/V2TVP+gJya1PsueQCxIPCEcerqF21oEcrob4mzjsp2Py/1nLfF5m+xYNMDpmA8vffg==", "dev": true, "dependencies": { - "@babel/helper-module-transforms": "^7.19.6", - "@babel/helper-plugin-utils": "^7.19.0" + "@babel/helper-plugin-utils": "^7.22.5", + "@babel/plugin-syntax-numeric-separator": "^7.10.4" }, "engines": { "node": ">=6.9.0" @@ -1191,15 +1215,17 @@ "@babel/core": "^7.0.0-0" } }, - "node_modules/@babel/plugin-transform-modules-commonjs": { - "version": "7.19.6", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-commonjs/-/plugin-transform-modules-commonjs-7.19.6.tgz", - "integrity": "sha512-8PIa1ym4XRTKuSsOUXqDG0YaOlEuTVvHMe5JCfgBMOtHvJKw/4NGovEGN33viISshG/rZNVrACiBmPQLvWN8xQ==", + "node_modules/@babel/plugin-transform-object-rest-spread": { + "version": "7.22.15", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-object-rest-spread/-/plugin-transform-object-rest-spread-7.22.15.tgz", + "integrity": "sha512-fEB+I1+gAmfAyxZcX1+ZUwLeAuuf8VIg67CTznZE0MqVFumWkh8xWtn58I4dxdVf080wn7gzWoF8vndOViJe9Q==", "dev": true, "dependencies": { - "@babel/helper-module-transforms": "^7.19.6", - "@babel/helper-plugin-utils": "^7.19.0", - "@babel/helper-simple-access": "^7.19.4" + "@babel/compat-data": "^7.22.9", + "@babel/helper-compilation-targets": "^7.22.15", + "@babel/helper-plugin-utils": "^7.22.5", + "@babel/plugin-syntax-object-rest-spread": "^7.8.3", + "@babel/plugin-transform-parameters": "^7.22.15" }, "engines": { "node": ">=6.9.0" @@ -1208,16 +1234,14 @@ "@babel/core": "^7.0.0-0" } }, - "node_modules/@babel/plugin-transform-modules-systemjs": { - "version": "7.19.6", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-systemjs/-/plugin-transform-modules-systemjs-7.19.6.tgz", - "integrity": "sha512-fqGLBepcc3kErfR9R3DnVpURmckXP7gj7bAlrTQyBxrigFqszZCkFkcoxzCp2v32XmwXLvbw+8Yq9/b+QqksjQ==", + "node_modules/@babel/plugin-transform-object-super": { + "version": "7.22.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-object-super/-/plugin-transform-object-super-7.22.5.tgz", + "integrity": "sha512-klXqyaT9trSjIUrcsYIfETAzmOEZL3cBYqOYLJxBHfMFFggmXOv+NYSX/Jbs9mzMVESw/WycLFPRx8ba/b2Ipw==", "dev": true, "dependencies": { - "@babel/helper-hoist-variables": "^7.18.6", - "@babel/helper-module-transforms": "^7.19.6", - "@babel/helper-plugin-utils": "^7.19.0", - "@babel/helper-validator-identifier": "^7.19.1" + "@babel/helper-plugin-utils": "^7.22.5", + "@babel/helper-replace-supers": "^7.22.5" }, "engines": { "node": ">=6.9.0" @@ -1226,14 +1250,14 @@ "@babel/core": "^7.0.0-0" } }, - "node_modules/@babel/plugin-transform-modules-umd": { - "version": "7.18.6", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-umd/-/plugin-transform-modules-umd-7.18.6.tgz", - "integrity": "sha512-dcegErExVeXcRqNtkRU/z8WlBLnvD4MRnHgNs3MytRO1Mn1sHRyhbcpYbVMGclAqOjdW+9cfkdZno9dFdfKLfQ==", + "node_modules/@babel/plugin-transform-optional-catch-binding": { + "version": "7.22.11", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-optional-catch-binding/-/plugin-transform-optional-catch-binding-7.22.11.tgz", + "integrity": "sha512-rli0WxesXUeCJnMYhzAglEjLWVDF6ahb45HuprcmQuLidBJFWjNnOzssk2kuc6e33FlLaiZhG/kUIzUMWdBKaQ==", "dev": true, "dependencies": { - "@babel/helper-module-transforms": "^7.18.6", - "@babel/helper-plugin-utils": "^7.18.6" + "@babel/helper-plugin-utils": "^7.22.5", + "@babel/plugin-syntax-optional-catch-binding": "^7.8.3" }, "engines": { "node": ">=6.9.0" @@ -1242,29 +1266,30 @@ "@babel/core": "^7.0.0-0" } }, - "node_modules/@babel/plugin-transform-named-capturing-groups-regex": { - "version": "7.19.1", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-named-capturing-groups-regex/-/plugin-transform-named-capturing-groups-regex-7.19.1.tgz", - "integrity": "sha512-oWk9l9WItWBQYS4FgXD4Uyy5kq898lvkXpXQxoJEY1RnvPk4R/Dvu2ebXU9q8lP+rlMwUQTFf2Ok6d78ODa0kw==", + "node_modules/@babel/plugin-transform-optional-chaining": { + "version": "7.23.0", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-optional-chaining/-/plugin-transform-optional-chaining-7.23.0.tgz", + "integrity": "sha512-sBBGXbLJjxTzLBF5rFWaikMnOGOk/BmK6vVByIdEggZ7Vn6CvWXZyRkkLFK6WE0IF8jSliyOkUN6SScFgzCM0g==", "dev": true, "dependencies": { - "@babel/helper-create-regexp-features-plugin": "^7.19.0", - "@babel/helper-plugin-utils": "^7.19.0" + "@babel/helper-plugin-utils": "^7.22.5", + "@babel/helper-skip-transparent-expression-wrappers": "^7.22.5", + "@babel/plugin-syntax-optional-chaining": "^7.8.3" }, "engines": { "node": ">=6.9.0" }, "peerDependencies": { - "@babel/core": "^7.0.0" + "@babel/core": "^7.0.0-0" } }, - "node_modules/@babel/plugin-transform-new-target": { - "version": "7.18.6", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-new-target/-/plugin-transform-new-target-7.18.6.tgz", - "integrity": "sha512-DjwFA/9Iu3Z+vrAn+8pBUGcjhxKguSMlsFqeCKbhb9BAV756v0krzVK04CRDi/4aqmk8BsHb4a/gFcaA5joXRw==", + "node_modules/@babel/plugin-transform-parameters": { + "version": "7.22.15", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-parameters/-/plugin-transform-parameters-7.22.15.tgz", + "integrity": "sha512-hjk7qKIqhyzhhUvRT683TYQOFa/4cQKwQy7ALvTpODswN40MljzNDa0YldevS6tGbxwaEKVn502JmY0dP7qEtQ==", "dev": true, "dependencies": { - "@babel/helper-plugin-utils": "^7.18.6" + "@babel/helper-plugin-utils": "^7.22.5" }, "engines": { "node": ">=6.9.0" @@ -1273,14 +1298,14 @@ "@babel/core": "^7.0.0-0" } }, - "node_modules/@babel/plugin-transform-object-super": { - "version": "7.18.6", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-object-super/-/plugin-transform-object-super-7.18.6.tgz", - "integrity": "sha512-uvGz6zk+pZoS1aTZrOvrbj6Pp/kK2mp45t2B+bTDre2UgsZZ8EZLSJtUg7m/no0zOJUWgFONpB7Zv9W2tSaFlA==", + "node_modules/@babel/plugin-transform-private-methods": { + "version": "7.22.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-private-methods/-/plugin-transform-private-methods-7.22.5.tgz", + "integrity": "sha512-PPjh4gyrQnGe97JTalgRGMuU4icsZFnWkzicB/fUtzlKUqvsWBKEpPPfr5a2JiyirZkHxnAqkQMO5Z5B2kK3fA==", "dev": true, "dependencies": { - "@babel/helper-plugin-utils": "^7.18.6", - "@babel/helper-replace-supers": "^7.18.6" + "@babel/helper-create-class-features-plugin": "^7.22.5", + "@babel/helper-plugin-utils": "^7.22.5" }, "engines": { "node": ">=6.9.0" @@ -1289,13 +1314,16 @@ "@babel/core": "^7.0.0-0" } }, - "node_modules/@babel/plugin-transform-parameters": { - "version": "7.20.1", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-parameters/-/plugin-transform-parameters-7.20.1.tgz", - "integrity": "sha512-nDvKLrAvl+kf6BOy1UJ3MGwzzfTMgppxwiD2Jb4LO3xjYyZq30oQzDNJbCQpMdG9+j2IXHoiMrw5Cm/L6ZoxXQ==", + "node_modules/@babel/plugin-transform-private-property-in-object": { + "version": "7.22.11", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-private-property-in-object/-/plugin-transform-private-property-in-object-7.22.11.tgz", + "integrity": "sha512-sSCbqZDBKHetvjSwpyWzhuHkmW5RummxJBVbYLkGkaiTOWGxml7SXt0iWa03bzxFIx7wOj3g/ILRd0RcJKBeSQ==", "dev": true, "dependencies": { - "@babel/helper-plugin-utils": "^7.19.0" + "@babel/helper-annotate-as-pure": "^7.22.5", + "@babel/helper-create-class-features-plugin": "^7.22.11", + "@babel/helper-plugin-utils": "^7.22.5", + "@babel/plugin-syntax-private-property-in-object": "^7.14.5" }, "engines": { "node": ">=6.9.0" @@ -1305,12 +1333,12 @@ } }, "node_modules/@babel/plugin-transform-property-literals": { - "version": "7.18.6", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-property-literals/-/plugin-transform-property-literals-7.18.6.tgz", - "integrity": "sha512-cYcs6qlgafTud3PAzrrRNbQtfpQ8+y/+M5tKmksS9+M1ckbH6kzY8MrexEM9mcA6JDsukE19iIRvAyYl463sMg==", + "version": "7.22.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-property-literals/-/plugin-transform-property-literals-7.22.5.tgz", + "integrity": "sha512-TiOArgddK3mK/x1Qwf5hay2pxI6wCZnvQqrFSqbtg1GLl2JcNMitVH/YnqjP+M31pLUeTfzY1HAXFDnUBV30rQ==", "dev": true, "dependencies": { - "@babel/helper-plugin-utils": "^7.18.6" + "@babel/helper-plugin-utils": "^7.22.5" }, "engines": { "node": ">=6.9.0" @@ -1320,13 +1348,13 @@ } }, "node_modules/@babel/plugin-transform-regenerator": { - "version": "7.18.6", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-regenerator/-/plugin-transform-regenerator-7.18.6.tgz", - "integrity": "sha512-poqRI2+qiSdeldcz4wTSTXBRryoq3Gc70ye7m7UD5Ww0nE29IXqMl6r7Nd15WBgRd74vloEMlShtH6CKxVzfmQ==", + "version": "7.22.10", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-regenerator/-/plugin-transform-regenerator-7.22.10.tgz", + "integrity": "sha512-F28b1mDt8KcT5bUyJc/U9nwzw6cV+UmTeRlXYIl2TNqMMJif0Jeey9/RQ3C4NOd2zp0/TRsDns9ttj2L523rsw==", "dev": true, "dependencies": { - "@babel/helper-plugin-utils": "^7.18.6", - "regenerator-transform": "^0.15.0" + "@babel/helper-plugin-utils": "^7.22.5", + "regenerator-transform": "^0.15.2" }, "engines": { "node": ">=6.9.0" @@ -1336,12 +1364,12 @@ } }, "node_modules/@babel/plugin-transform-reserved-words": { - "version": "7.18.6", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-reserved-words/-/plugin-transform-reserved-words-7.18.6.tgz", - "integrity": "sha512-oX/4MyMoypzHjFrT1CdivfKZ+XvIPMFXwwxHp/r0Ddy2Vuomt4HDFGmft1TAY2yiTKiNSsh3kjBAzcM8kSdsjA==", + "version": "7.22.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-reserved-words/-/plugin-transform-reserved-words-7.22.5.tgz", + "integrity": "sha512-DTtGKFRQUDm8svigJzZHzb/2xatPc6TzNvAIJ5GqOKDsGFYgAskjRulbR/vGsPKq3OPqtexnz327qYpP57RFyA==", "dev": true, "dependencies": { - "@babel/helper-plugin-utils": "^7.18.6" + "@babel/helper-plugin-utils": "^7.22.5" }, "engines": { "node": ">=6.9.0" @@ -1351,12 +1379,12 @@ } }, "node_modules/@babel/plugin-transform-shorthand-properties": { - "version": "7.18.6", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-shorthand-properties/-/plugin-transform-shorthand-properties-7.18.6.tgz", - "integrity": "sha512-eCLXXJqv8okzg86ywZJbRn19YJHU4XUa55oz2wbHhaQVn/MM+XhukiT7SYqp/7o00dg52Rj51Ny+Ecw4oyoygw==", + "version": "7.22.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-shorthand-properties/-/plugin-transform-shorthand-properties-7.22.5.tgz", + "integrity": "sha512-vM4fq9IXHscXVKzDv5itkO1X52SmdFBFcMIBZ2FRn2nqVYqw6dBexUgMvAjHW+KXpPPViD/Yo3GrDEBaRC0QYA==", "dev": true, "dependencies": { - "@babel/helper-plugin-utils": "^7.18.6" + "@babel/helper-plugin-utils": "^7.22.5" }, "engines": { "node": ">=6.9.0" @@ -1366,13 +1394,13 @@ } }, "node_modules/@babel/plugin-transform-spread": { - "version": "7.19.0", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-spread/-/plugin-transform-spread-7.19.0.tgz", - "integrity": "sha512-RsuMk7j6n+r752EtzyScnWkQyuJdli6LdO5Klv8Yx0OfPVTcQkIUfS8clx5e9yHXzlnhOZF3CbQ8C2uP5j074w==", + "version": "7.22.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-spread/-/plugin-transform-spread-7.22.5.tgz", + "integrity": "sha512-5ZzDQIGyvN4w8+dMmpohL6MBo+l2G7tfC/O2Dg7/hjpgeWvUx8FzfeOKxGog9IimPa4YekaQ9PlDqTLOljkcxg==", "dev": true, "dependencies": { - "@babel/helper-plugin-utils": "^7.19.0", - "@babel/helper-skip-transparent-expression-wrappers": "^7.18.9" + "@babel/helper-plugin-utils": "^7.22.5", + "@babel/helper-skip-transparent-expression-wrappers": "^7.22.5" }, "engines": { "node": ">=6.9.0" @@ -1382,12 +1410,12 @@ } }, "node_modules/@babel/plugin-transform-sticky-regex": { - "version": "7.18.6", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-sticky-regex/-/plugin-transform-sticky-regex-7.18.6.tgz", - "integrity": "sha512-kfiDrDQ+PBsQDO85yj1icueWMfGfJFKN1KCkndygtu/C9+XUfydLC8Iv5UYJqRwy4zk8EcplRxEOeLyjq1gm6Q==", + "version": "7.22.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-sticky-regex/-/plugin-transform-sticky-regex-7.22.5.tgz", + "integrity": "sha512-zf7LuNpHG0iEeiyCNwX4j3gDg1jgt1k3ZdXBKbZSoA3BbGQGvMiSvfbZRR3Dr3aeJe3ooWFZxOOG3IRStYp2Bw==", "dev": true, "dependencies": { - "@babel/helper-plugin-utils": "^7.18.6" + "@babel/helper-plugin-utils": "^7.22.5" }, "engines": { "node": ">=6.9.0" @@ -1397,12 +1425,12 @@ } }, "node_modules/@babel/plugin-transform-template-literals": { - "version": "7.18.9", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-template-literals/-/plugin-transform-template-literals-7.18.9.tgz", - "integrity": "sha512-S8cOWfT82gTezpYOiVaGHrCbhlHgKhQt8XH5ES46P2XWmX92yisoZywf5km75wv5sYcXDUCLMmMxOLCtthDgMA==", + "version": "7.22.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-template-literals/-/plugin-transform-template-literals-7.22.5.tgz", + "integrity": "sha512-5ciOehRNf+EyUeewo8NkbQiUs4d6ZxiHo6BcBcnFlgiJfu16q0bQUw9Jvo0b0gBKFG1SMhDSjeKXSYuJLeFSMA==", "dev": true, "dependencies": { - "@babel/helper-plugin-utils": "^7.18.9" + "@babel/helper-plugin-utils": "^7.22.5" }, "engines": { "node": ">=6.9.0" @@ -1412,12 +1440,12 @@ } }, "node_modules/@babel/plugin-transform-typeof-symbol": { - "version": "7.18.9", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-typeof-symbol/-/plugin-transform-typeof-symbol-7.18.9.tgz", - "integrity": "sha512-SRfwTtF11G2aemAZWivL7PD+C9z52v9EvMqH9BuYbabyPuKUvSWks3oCg6041pT925L4zVFqaVBeECwsmlguEw==", + "version": "7.22.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-typeof-symbol/-/plugin-transform-typeof-symbol-7.22.5.tgz", + "integrity": "sha512-bYkI5lMzL4kPii4HHEEChkD0rkc+nvnlR6+o/qdqR6zrm0Sv/nodmyLhlq2DO0YKLUNd2VePmPRjJXSBh9OIdA==", "dev": true, "dependencies": { - "@babel/helper-plugin-utils": "^7.18.9" + "@babel/helper-plugin-utils": "^7.22.5" }, "engines": { "node": ">=6.9.0" @@ -1427,12 +1455,28 @@ } }, "node_modules/@babel/plugin-transform-unicode-escapes": { - "version": "7.18.10", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-unicode-escapes/-/plugin-transform-unicode-escapes-7.18.10.tgz", - "integrity": "sha512-kKAdAI+YzPgGY/ftStBFXTI1LZFju38rYThnfMykS+IXy8BVx+res7s2fxf1l8I35DV2T97ezo6+SGrXz6B3iQ==", + "version": "7.22.10", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-unicode-escapes/-/plugin-transform-unicode-escapes-7.22.10.tgz", + "integrity": "sha512-lRfaRKGZCBqDlRU3UIFovdp9c9mEvlylmpod0/OatICsSfuQ9YFthRo1tpTkGsklEefZdqlEFdY4A2dwTb6ohg==", + "dev": true, + "dependencies": { + "@babel/helper-plugin-utils": "^7.22.5" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-transform-unicode-property-regex": { + "version": "7.22.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-unicode-property-regex/-/plugin-transform-unicode-property-regex-7.22.5.tgz", + "integrity": "sha512-HCCIb+CbJIAE6sXn5CjFQXMwkCClcOfPCzTlilJ8cUatfzwHlWQkbtV0zD338u9dZskwvuOYTuuaMaA8J5EI5A==", "dev": true, "dependencies": { - "@babel/helper-plugin-utils": "^7.18.9" + "@babel/helper-create-regexp-features-plugin": "^7.22.5", + "@babel/helper-plugin-utils": "^7.22.5" }, "engines": { "node": ">=6.9.0" @@ -1442,13 +1486,13 @@ } }, "node_modules/@babel/plugin-transform-unicode-regex": { - "version": "7.18.6", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-unicode-regex/-/plugin-transform-unicode-regex-7.18.6.tgz", - "integrity": "sha512-gE7A6Lt7YLnNOL3Pb9BNeZvi+d8l7tcRrG4+pwJjK9hD2xX4mEvjlQW60G9EEmfXVYRPv9VRQcyegIVHCql/AA==", + "version": "7.22.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-unicode-regex/-/plugin-transform-unicode-regex-7.22.5.tgz", + "integrity": "sha512-028laaOKptN5vHJf9/Arr/HiJekMd41hOEZYvNsrsXqJ7YPYuX2bQxh31fkZzGmq3YqHRJzYFFAVYvKfMPKqyg==", "dev": true, "dependencies": { - "@babel/helper-create-regexp-features-plugin": "^7.18.6", - "@babel/helper-plugin-utils": "^7.18.6" + "@babel/helper-create-regexp-features-plugin": "^7.22.5", + "@babel/helper-plugin-utils": "^7.22.5" }, "engines": { "node": ">=6.9.0" @@ -1457,39 +1501,43 @@ "@babel/core": "^7.0.0-0" } }, + "node_modules/@babel/plugin-transform-unicode-sets-regex": { + "version": "7.22.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-unicode-sets-regex/-/plugin-transform-unicode-sets-regex-7.22.5.tgz", + "integrity": "sha512-lhMfi4FC15j13eKrh3DnYHjpGj6UKQHtNKTbtc1igvAhRy4+kLhV07OpLcsN0VgDEw/MjAvJO4BdMJsHwMhzCg==", + "dev": true, + "dependencies": { + "@babel/helper-create-regexp-features-plugin": "^7.22.5", + "@babel/helper-plugin-utils": "^7.22.5" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0" + } + }, "node_modules/@babel/preset-env": { - "version": "7.20.2", - "resolved": "https://registry.npmjs.org/@babel/preset-env/-/preset-env-7.20.2.tgz", - "integrity": "sha512-1G0efQEWR1EHkKvKHqbG+IN/QdgwfByUpM5V5QroDzGV2t3S/WXNQd693cHiHTlCFMpr9B6FkPFXDA2lQcKoDg==", - "dev": true, - "dependencies": { - "@babel/compat-data": "^7.20.1", - "@babel/helper-compilation-targets": "^7.20.0", - "@babel/helper-plugin-utils": "^7.20.2", - "@babel/helper-validator-option": "^7.18.6", - "@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression": "^7.18.6", - "@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining": "^7.18.9", - "@babel/plugin-proposal-async-generator-functions": "^7.20.1", - "@babel/plugin-proposal-class-properties": "^7.18.6", - "@babel/plugin-proposal-class-static-block": "^7.18.6", - "@babel/plugin-proposal-dynamic-import": "^7.18.6", - "@babel/plugin-proposal-export-namespace-from": "^7.18.9", - "@babel/plugin-proposal-json-strings": "^7.18.6", - "@babel/plugin-proposal-logical-assignment-operators": "^7.18.9", - "@babel/plugin-proposal-nullish-coalescing-operator": "^7.18.6", - "@babel/plugin-proposal-numeric-separator": "^7.18.6", - "@babel/plugin-proposal-object-rest-spread": "^7.20.2", - "@babel/plugin-proposal-optional-catch-binding": "^7.18.6", - "@babel/plugin-proposal-optional-chaining": "^7.18.9", - "@babel/plugin-proposal-private-methods": "^7.18.6", - "@babel/plugin-proposal-private-property-in-object": "^7.18.6", - "@babel/plugin-proposal-unicode-property-regex": "^7.18.6", + "version": "7.23.2", + "resolved": "https://registry.npmjs.org/@babel/preset-env/-/preset-env-7.23.2.tgz", + "integrity": "sha512-BW3gsuDD+rvHL2VO2SjAUNTBe5YrjsTiDyqamPDWY723na3/yPQ65X5oQkFVJZ0o50/2d+svm1rkPoJeR1KxVQ==", + "dev": true, + "dependencies": { + "@babel/compat-data": "^7.23.2", + "@babel/helper-compilation-targets": "^7.22.15", + "@babel/helper-plugin-utils": "^7.22.5", + "@babel/helper-validator-option": "^7.22.15", + "@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression": "^7.22.15", + "@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining": "^7.22.15", + "@babel/plugin-proposal-private-property-in-object": "7.21.0-placeholder-for-preset-env.2", "@babel/plugin-syntax-async-generators": "^7.8.4", "@babel/plugin-syntax-class-properties": "^7.12.13", "@babel/plugin-syntax-class-static-block": "^7.14.5", "@babel/plugin-syntax-dynamic-import": "^7.8.3", "@babel/plugin-syntax-export-namespace-from": "^7.8.3", - "@babel/plugin-syntax-import-assertions": "^7.20.0", + "@babel/plugin-syntax-import-assertions": "^7.22.5", + "@babel/plugin-syntax-import-attributes": "^7.22.5", + "@babel/plugin-syntax-import-meta": "^7.10.4", "@babel/plugin-syntax-json-strings": "^7.8.3", "@babel/plugin-syntax-logical-assignment-operators": "^7.10.4", "@babel/plugin-syntax-nullish-coalescing-operator": "^7.8.3", @@ -1499,45 +1547,62 @@ "@babel/plugin-syntax-optional-chaining": "^7.8.3", "@babel/plugin-syntax-private-property-in-object": "^7.14.5", "@babel/plugin-syntax-top-level-await": "^7.14.5", - "@babel/plugin-transform-arrow-functions": "^7.18.6", - "@babel/plugin-transform-async-to-generator": "^7.18.6", - "@babel/plugin-transform-block-scoped-functions": "^7.18.6", - "@babel/plugin-transform-block-scoping": "^7.20.2", - "@babel/plugin-transform-classes": "^7.20.2", - "@babel/plugin-transform-computed-properties": "^7.18.9", - "@babel/plugin-transform-destructuring": "^7.20.2", - "@babel/plugin-transform-dotall-regex": "^7.18.6", - "@babel/plugin-transform-duplicate-keys": "^7.18.9", - "@babel/plugin-transform-exponentiation-operator": "^7.18.6", - "@babel/plugin-transform-for-of": "^7.18.8", - "@babel/plugin-transform-function-name": "^7.18.9", - "@babel/plugin-transform-literals": "^7.18.9", - "@babel/plugin-transform-member-expression-literals": "^7.18.6", - "@babel/plugin-transform-modules-amd": "^7.19.6", - "@babel/plugin-transform-modules-commonjs": "^7.19.6", - "@babel/plugin-transform-modules-systemjs": "^7.19.6", - "@babel/plugin-transform-modules-umd": "^7.18.6", - "@babel/plugin-transform-named-capturing-groups-regex": "^7.19.1", - "@babel/plugin-transform-new-target": "^7.18.6", - "@babel/plugin-transform-object-super": "^7.18.6", - "@babel/plugin-transform-parameters": "^7.20.1", - "@babel/plugin-transform-property-literals": "^7.18.6", - "@babel/plugin-transform-regenerator": "^7.18.6", - "@babel/plugin-transform-reserved-words": "^7.18.6", - "@babel/plugin-transform-shorthand-properties": "^7.18.6", - "@babel/plugin-transform-spread": "^7.19.0", - "@babel/plugin-transform-sticky-regex": "^7.18.6", - "@babel/plugin-transform-template-literals": "^7.18.9", - "@babel/plugin-transform-typeof-symbol": "^7.18.9", - "@babel/plugin-transform-unicode-escapes": "^7.18.10", - "@babel/plugin-transform-unicode-regex": "^7.18.6", - "@babel/preset-modules": "^0.1.5", - "@babel/types": "^7.20.2", - "babel-plugin-polyfill-corejs2": "^0.3.3", - "babel-plugin-polyfill-corejs3": "^0.6.0", - "babel-plugin-polyfill-regenerator": "^0.4.1", - "core-js-compat": "^3.25.1", - "semver": "^6.3.0" + "@babel/plugin-syntax-unicode-sets-regex": "^7.18.6", + "@babel/plugin-transform-arrow-functions": "^7.22.5", + "@babel/plugin-transform-async-generator-functions": "^7.23.2", + "@babel/plugin-transform-async-to-generator": "^7.22.5", + "@babel/plugin-transform-block-scoped-functions": "^7.22.5", + "@babel/plugin-transform-block-scoping": "^7.23.0", + "@babel/plugin-transform-class-properties": "^7.22.5", + "@babel/plugin-transform-class-static-block": "^7.22.11", + "@babel/plugin-transform-classes": "^7.22.15", + "@babel/plugin-transform-computed-properties": "^7.22.5", + "@babel/plugin-transform-destructuring": "^7.23.0", + "@babel/plugin-transform-dotall-regex": "^7.22.5", + "@babel/plugin-transform-duplicate-keys": "^7.22.5", + "@babel/plugin-transform-dynamic-import": "^7.22.11", + "@babel/plugin-transform-exponentiation-operator": "^7.22.5", + "@babel/plugin-transform-export-namespace-from": "^7.22.11", + "@babel/plugin-transform-for-of": "^7.22.15", + "@babel/plugin-transform-function-name": "^7.22.5", + "@babel/plugin-transform-json-strings": "^7.22.11", + "@babel/plugin-transform-literals": "^7.22.5", + "@babel/plugin-transform-logical-assignment-operators": "^7.22.11", + "@babel/plugin-transform-member-expression-literals": "^7.22.5", + "@babel/plugin-transform-modules-amd": "^7.23.0", + "@babel/plugin-transform-modules-commonjs": "^7.23.0", + "@babel/plugin-transform-modules-systemjs": "^7.23.0", + "@babel/plugin-transform-modules-umd": "^7.22.5", + "@babel/plugin-transform-named-capturing-groups-regex": "^7.22.5", + "@babel/plugin-transform-new-target": "^7.22.5", + "@babel/plugin-transform-nullish-coalescing-operator": "^7.22.11", + "@babel/plugin-transform-numeric-separator": "^7.22.11", + "@babel/plugin-transform-object-rest-spread": "^7.22.15", + "@babel/plugin-transform-object-super": "^7.22.5", + "@babel/plugin-transform-optional-catch-binding": "^7.22.11", + "@babel/plugin-transform-optional-chaining": "^7.23.0", + "@babel/plugin-transform-parameters": "^7.22.15", + "@babel/plugin-transform-private-methods": "^7.22.5", + "@babel/plugin-transform-private-property-in-object": "^7.22.11", + "@babel/plugin-transform-property-literals": "^7.22.5", + "@babel/plugin-transform-regenerator": "^7.22.10", + "@babel/plugin-transform-reserved-words": "^7.22.5", + "@babel/plugin-transform-shorthand-properties": "^7.22.5", + "@babel/plugin-transform-spread": "^7.22.5", + "@babel/plugin-transform-sticky-regex": "^7.22.5", + "@babel/plugin-transform-template-literals": "^7.22.5", + "@babel/plugin-transform-typeof-symbol": "^7.22.5", + "@babel/plugin-transform-unicode-escapes": "^7.22.10", + "@babel/plugin-transform-unicode-property-regex": "^7.22.5", + "@babel/plugin-transform-unicode-regex": "^7.22.5", + "@babel/plugin-transform-unicode-sets-regex": "^7.22.5", + "@babel/preset-modules": "0.1.6-no-external-plugins", + "@babel/types": "^7.23.0", + "babel-plugin-polyfill-corejs2": "^0.4.6", + "babel-plugin-polyfill-corejs3": "^0.8.5", + "babel-plugin-polyfill-regenerator": "^0.5.3", + "core-js-compat": "^3.31.0", + "semver": "^6.3.1" }, "engines": { "node": ">=6.9.0" @@ -1547,61 +1612,65 @@ } }, "node_modules/@babel/preset-modules": { - "version": "0.1.5", - "resolved": "https://registry.npmjs.org/@babel/preset-modules/-/preset-modules-0.1.5.tgz", - "integrity": "sha512-A57th6YRG7oR3cq/yt/Y84MvGgE0eJG2F1JLhKuyG+jFxEgrd/HAMJatiFtmOiZurz+0DkrvbheCLaV5f2JfjA==", + "version": "0.1.6-no-external-plugins", + "resolved": "https://registry.npmjs.org/@babel/preset-modules/-/preset-modules-0.1.6-no-external-plugins.tgz", + "integrity": "sha512-HrcgcIESLm9aIR842yhJ5RWan/gebQUJ6E/E5+rf0y9o6oj7w0Br+sWuL6kEQ/o/AdfvR1Je9jG18/gnpwjEyA==", "dev": true, "dependencies": { "@babel/helper-plugin-utils": "^7.0.0", - "@babel/plugin-proposal-unicode-property-regex": "^7.4.4", - "@babel/plugin-transform-dotall-regex": "^7.4.4", "@babel/types": "^7.4.4", "esutils": "^2.0.2" }, "peerDependencies": { - "@babel/core": "^7.0.0-0" + "@babel/core": "^7.0.0-0 || ^8.0.0-0 <8.0.0" } }, + "node_modules/@babel/regjsgen": { + "version": "0.8.0", + "resolved": "https://registry.npmjs.org/@babel/regjsgen/-/regjsgen-0.8.0.tgz", + "integrity": "sha512-x/rqGMdzj+fWZvCOYForTghzbtqPDZ5gPwaoNGHdgDfF2QA/XZbCBp4Moo5scrkAMPhB7z26XM/AaHuIJdgauA==", + "dev": true + }, "node_modules/@babel/runtime": { - "version": "7.18.9", - "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.18.9.tgz", - "integrity": "sha512-lkqXDcvlFT5rvEjiu6+QYO+1GXrEHRo2LOtS7E4GtX5ESIZOgepqsZBVIj6Pv+a6zqsya9VCgiK1KAK4BvJDAw==", + "version": "7.23.2", + "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.23.2.tgz", + "integrity": "sha512-mM8eg4yl5D6i3lu2QKPuPH4FArvJ8KhTofbE7jwMUv9KX5mBvwPAqnV3MlyBNqdp9RyRKP6Yck8TrfYrPvX3bg==", "dev": true, "dependencies": { - "regenerator-runtime": "^0.13.4" + "regenerator-runtime": "^0.14.0" }, "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/template": { - "version": "7.18.10", - "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.18.10.tgz", - "integrity": "sha512-TI+rCtooWHr3QJ27kJxfjutghu44DLnasDMwpDqCXVTal9RLp3RSYNh4NdBrRP2cQAoG9A8juOQl6P6oZG4JxA==", + "version": "7.22.15", + "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.22.15.tgz", + "integrity": "sha512-QPErUVm4uyJa60rkI73qneDacvdvzxshT3kksGqlGWYdOTIUOwJ7RDUL8sGqslY1uXWSL6xMFKEXDS3ox2uF0w==", "dev": true, "dependencies": { - "@babel/code-frame": "^7.18.6", - "@babel/parser": "^7.18.10", - "@babel/types": "^7.18.10" + "@babel/code-frame": "^7.22.13", + "@babel/parser": "^7.22.15", + "@babel/types": "^7.22.15" }, "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/traverse": { - "version": "7.20.1", - "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.20.1.tgz", - "integrity": "sha512-d3tN8fkVJwFLkHkBN479SOsw4DMZnz8cdbL/gvuDuzy3TS6Nfw80HuQqhw1pITbIruHyh7d1fMA47kWzmcUEGA==", - "dev": true, - "dependencies": { - "@babel/code-frame": "^7.18.6", - "@babel/generator": "^7.20.1", - "@babel/helper-environment-visitor": "^7.18.9", - "@babel/helper-function-name": "^7.19.0", - "@babel/helper-hoist-variables": "^7.18.6", - "@babel/helper-split-export-declaration": "^7.18.6", - "@babel/parser": "^7.20.1", - "@babel/types": "^7.20.0", + "version": "7.23.2", + "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.23.2.tgz", + "integrity": "sha512-azpe59SQ48qG6nu2CzcMLbxUudtN+dOM9kDbUqGq3HXUJRlo7i8fvPoxQUzYgLZ4cMVmuZgm8vvBpNeRhd6XSw==", + "dev": true, + "dependencies": { + "@babel/code-frame": "^7.22.13", + "@babel/generator": "^7.23.0", + "@babel/helper-environment-visitor": "^7.22.20", + "@babel/helper-function-name": "^7.23.0", + "@babel/helper-hoist-variables": "^7.22.5", + "@babel/helper-split-export-declaration": "^7.22.6", + "@babel/parser": "^7.23.0", + "@babel/types": "^7.23.0", "debug": "^4.1.0", "globals": "^11.1.0" }, @@ -1610,13 +1679,13 @@ } }, "node_modules/@babel/types": { - "version": "7.20.2", - "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.20.2.tgz", - "integrity": "sha512-FnnvsNWgZCr232sqtXggapvlkk/tuwR/qhGzcmxI0GXLCjmPYQPzio2FbdlWuY6y1sHFfQKk+rRbUZ9VStQMog==", + "version": "7.23.0", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.23.0.tgz", + "integrity": "sha512-0oIyUfKoI3mSqMvsxBdclDwxXKXAUA8v/apZbc+iSyARYou1o8ZGDxbUYyLFoW2arqS2jDGqJuZvv1d/io1axg==", "dev": true, "dependencies": { - "@babel/helper-string-parser": "^7.19.4", - "@babel/helper-validator-identifier": "^7.19.1", + "@babel/helper-string-parser": "^7.22.5", + "@babel/helper-validator-identifier": "^7.22.20", "to-fast-properties": "^2.0.0" }, "engines": { @@ -1701,9 +1770,9 @@ } }, "node_modules/@jridgewell/source-map": { - "version": "0.3.2", - "resolved": "https://registry.npmjs.org/@jridgewell/source-map/-/source-map-0.3.2.tgz", - "integrity": "sha512-m7O9o2uR8k2ObDysZYzdfhb08VuEml5oWGiosa1VdaPZ/A6QyPkAJuwN0Q1lhULOf6B7MtQmHENS743hWtCrgw==", + "version": "0.3.5", + "resolved": "https://registry.npmjs.org/@jridgewell/source-map/-/source-map-0.3.5.tgz", + "integrity": "sha512-UTYAUj/wviwdsMfzoSJspJxbkH5o1snzwX0//0ENX1u/55kkZZkcTZP6u9bwKGkv+dkk9at4m1Cpt0uY80kcpQ==", "dev": true, "dependencies": { "@jridgewell/gen-mapping": "^0.3.0", @@ -1711,9 +1780,9 @@ } }, "node_modules/@jridgewell/source-map/node_modules/@jridgewell/gen-mapping": { - "version": "0.3.2", - "resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.3.2.tgz", - "integrity": "sha512-mh65xKQAzI6iBcFzwv28KVWSmCkdRBWoOh+bYQGW3+6OZvbbN3TqMGo5hqYxQniRcH9F2VZIoJCm4pa3BPDK/A==", + "version": "0.3.3", + "resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.3.3.tgz", + "integrity": "sha512-HLhSWOLRi875zjjMG/r+Nv0oCW8umGb0BgEhyX3dDX3egwZtB8PqLnjz3yedt8R5StBrzcg4aBpnh8UA9D1BoQ==", "dev": true, "dependencies": { "@jridgewell/set-array": "^1.0.1", @@ -1731,13 +1800,13 @@ "dev": true }, "node_modules/@jridgewell/trace-mapping": { - "version": "0.3.15", - "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.15.tgz", - "integrity": "sha512-oWZNOULl+UbhsgB51uuZzglikfIKSUBO/M9W2OfEjn7cmqoAiCgmv9lyACTUacZwBz0ITnJ2NqjU8Tx0DHL88g==", + "version": "0.3.20", + "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.20.tgz", + "integrity": "sha512-R8LcPeWZol2zR8mmH3JeKQ6QRCFb7XgUhV9ZlGhHLGyg4wpPiPZNQOOWhFZhxKw8u//yTbNGI42Bx/3paXEQ+Q==", "dev": true, "dependencies": { - "@jridgewell/resolve-uri": "^3.0.3", - "@jridgewell/sourcemap-codec": "^1.4.10" + "@jridgewell/resolve-uri": "^3.1.0", + "@jridgewell/sourcemap-codec": "^1.4.14" } }, "node_modules/@leichtgewicht/ip-codec": { @@ -1811,9 +1880,9 @@ } }, "node_modules/@types/estree": { - "version": "0.0.51", - "resolved": "https://registry.npmjs.org/@types/estree/-/estree-0.0.51.tgz", - "integrity": "sha512-CuPgU6f3eT/XgKKPqKd/gLZV1Xmvf1a2R5POBOGQa6uv82xpls89HU5zKeVoyR8XzHd1RGNOlQlvUe3CFkjWNQ==", + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/@types/estree/-/estree-1.0.3.tgz", + "integrity": "sha512-CS2rOaoQ/eAgAfcTfq6amKG7bsN+EMcgGY4FAFQdvSj2y1ixvOZTUA9mOtCai7E1SYu283XNw7urKK30nP3wkQ==", "dev": true }, "node_modules/@types/express": { @@ -1924,190 +1993,204 @@ "@types/node": "*" } }, + "node_modules/@types/validator": { + "version": "13.11.5", + "resolved": "https://registry.npmjs.org/@types/validator/-/validator-13.11.5.tgz", + "integrity": "sha512-xW4qsT4UIYILu+7ZrBnfQdBYniZrMLYYK3wN9M/NdeIHgBN5pZI2/8Q7UfdWIcr5RLJv/OGENsx91JIpUUoC7Q==", + "dev": true + }, "node_modules/@types/ws": { - "version": "8.5.3", - "resolved": "https://registry.npmjs.org/@types/ws/-/ws-8.5.3.tgz", - "integrity": "sha512-6YOoWjruKj1uLf3INHH7D3qTXwFfEsg1kf3c0uDdSBJwfa/llkwIjrAGV7j7mVgGNbzTQ3HiHKKDXl6bJPD97w==", + "version": "8.5.8", + "resolved": "https://registry.npmjs.org/@types/ws/-/ws-8.5.8.tgz", + "integrity": "sha512-flUksGIQCnJd6sZ1l5dqCEG/ksaoAg/eUwiLAGTJQcfgvZJKF++Ta4bJA6A5aPSJmsr+xlseHn4KLgVlNnvPTg==", "dev": true, "dependencies": { "@types/node": "*" } }, "node_modules/@webassemblyjs/ast": { - "version": "1.11.1", - "resolved": "https://registry.npmjs.org/@webassemblyjs/ast/-/ast-1.11.1.tgz", - "integrity": "sha512-ukBh14qFLjxTQNTXocdyksN5QdM28S1CxHt2rdskFyL+xFV7VremuBLVbmCePj+URalXBENx/9Lm7lnhihtCSw==", + "version": "1.11.6", + "resolved": "https://registry.npmjs.org/@webassemblyjs/ast/-/ast-1.11.6.tgz", + "integrity": "sha512-IN1xI7PwOvLPgjcf180gC1bqn3q/QaOCwYUahIOhbYUu8KA/3tw2RT/T0Gidi1l7Hhj5D/INhJxiICObqpMu4Q==", "dev": true, "dependencies": { - "@webassemblyjs/helper-numbers": "1.11.1", - "@webassemblyjs/helper-wasm-bytecode": "1.11.1" + "@webassemblyjs/helper-numbers": "1.11.6", + "@webassemblyjs/helper-wasm-bytecode": "1.11.6" } }, "node_modules/@webassemblyjs/floating-point-hex-parser": { - "version": "1.11.1", - "resolved": "https://registry.npmjs.org/@webassemblyjs/floating-point-hex-parser/-/floating-point-hex-parser-1.11.1.tgz", - "integrity": "sha512-iGRfyc5Bq+NnNuX8b5hwBrRjzf0ocrJPI6GWFodBFzmFnyvrQ83SHKhmilCU/8Jv67i4GJZBMhEzltxzcNagtQ==", + "version": "1.11.6", + "resolved": "https://registry.npmjs.org/@webassemblyjs/floating-point-hex-parser/-/floating-point-hex-parser-1.11.6.tgz", + "integrity": "sha512-ejAj9hfRJ2XMsNHk/v6Fu2dGS+i4UaXBXGemOfQ/JfQ6mdQg/WXtwleQRLLS4OvfDhv8rYnVwH27YJLMyYsxhw==", "dev": true }, "node_modules/@webassemblyjs/helper-api-error": { - "version": "1.11.1", - "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-api-error/-/helper-api-error-1.11.1.tgz", - "integrity": "sha512-RlhS8CBCXfRUR/cwo2ho9bkheSXG0+NwooXcc3PAILALf2QLdFyj7KGsKRbVc95hZnhnERon4kW/D3SZpp6Tcg==", + "version": "1.11.6", + "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-api-error/-/helper-api-error-1.11.6.tgz", + "integrity": "sha512-o0YkoP4pVu4rN8aTJgAyj9hC2Sv5UlkzCHhxqWj8butaLvnpdc2jOwh4ewE6CX0txSfLn/UYaV/pheS2Txg//Q==", "dev": true }, "node_modules/@webassemblyjs/helper-buffer": { - "version": "1.11.1", - "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-buffer/-/helper-buffer-1.11.1.tgz", - "integrity": "sha512-gwikF65aDNeeXa8JxXa2BAk+REjSyhrNC9ZwdT0f8jc4dQQeDQ7G4m0f2QCLPJiMTTO6wfDmRmj/pW0PsUvIcA==", + "version": "1.11.6", + "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-buffer/-/helper-buffer-1.11.6.tgz", + "integrity": "sha512-z3nFzdcp1mb8nEOFFk8DrYLpHvhKC3grJD2ardfKOzmbmJvEf/tPIqCY+sNcwZIY8ZD7IkB2l7/pqhUhqm7hLA==", "dev": true }, "node_modules/@webassemblyjs/helper-numbers": { - "version": "1.11.1", - "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-numbers/-/helper-numbers-1.11.1.tgz", - "integrity": "sha512-vDkbxiB8zfnPdNK9Rajcey5C0w+QJugEglN0of+kmO8l7lDb77AnlKYQF7aarZuCrv+l0UvqL+68gSDr3k9LPQ==", + "version": "1.11.6", + "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-numbers/-/helper-numbers-1.11.6.tgz", + "integrity": "sha512-vUIhZ8LZoIWHBohiEObxVm6hwP034jwmc9kuq5GdHZH0wiLVLIPcMCdpJzG4C11cHoQ25TFIQj9kaVADVX7N3g==", "dev": true, "dependencies": { - "@webassemblyjs/floating-point-hex-parser": "1.11.1", - "@webassemblyjs/helper-api-error": "1.11.1", + "@webassemblyjs/floating-point-hex-parser": "1.11.6", + "@webassemblyjs/helper-api-error": "1.11.6", "@xtuc/long": "4.2.2" } }, "node_modules/@webassemblyjs/helper-wasm-bytecode": { - "version": "1.11.1", - "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-wasm-bytecode/-/helper-wasm-bytecode-1.11.1.tgz", - "integrity": "sha512-PvpoOGiJwXeTrSf/qfudJhwlvDQxFgelbMqtq52WWiXC6Xgg1IREdngmPN3bs4RoO83PnL/nFrxucXj1+BX62Q==", + "version": "1.11.6", + "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-wasm-bytecode/-/helper-wasm-bytecode-1.11.6.tgz", + "integrity": "sha512-sFFHKwcmBprO9e7Icf0+gddyWYDViL8bpPjJJl0WHxCdETktXdmtWLGVzoHbqUcY4Be1LkNfwTmXOJUFZYSJdA==", "dev": true }, "node_modules/@webassemblyjs/helper-wasm-section": { - "version": "1.11.1", - "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-wasm-section/-/helper-wasm-section-1.11.1.tgz", - "integrity": "sha512-10P9No29rYX1j7F3EVPX3JvGPQPae+AomuSTPiF9eBQeChHI6iqjMIwR9JmOJXwpnn/oVGDk7I5IlskuMwU/pg==", + "version": "1.11.6", + "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-wasm-section/-/helper-wasm-section-1.11.6.tgz", + "integrity": "sha512-LPpZbSOwTpEC2cgn4hTydySy1Ke+XEu+ETXuoyvuyezHO3Kjdu90KK95Sh9xTbmjrCsUwvWwCOQQNta37VrS9g==", "dev": true, "dependencies": { - "@webassemblyjs/ast": "1.11.1", - "@webassemblyjs/helper-buffer": "1.11.1", - "@webassemblyjs/helper-wasm-bytecode": "1.11.1", - "@webassemblyjs/wasm-gen": "1.11.1" + "@webassemblyjs/ast": "1.11.6", + "@webassemblyjs/helper-buffer": "1.11.6", + "@webassemblyjs/helper-wasm-bytecode": "1.11.6", + "@webassemblyjs/wasm-gen": "1.11.6" } }, "node_modules/@webassemblyjs/ieee754": { - "version": "1.11.1", - "resolved": "https://registry.npmjs.org/@webassemblyjs/ieee754/-/ieee754-1.11.1.tgz", - "integrity": "sha512-hJ87QIPtAMKbFq6CGTkZYJivEwZDbQUgYd3qKSadTNOhVY7p+gfP6Sr0lLRVTaG1JjFj+r3YchoqRYxNH3M0GQ==", + "version": "1.11.6", + "resolved": "https://registry.npmjs.org/@webassemblyjs/ieee754/-/ieee754-1.11.6.tgz", + "integrity": "sha512-LM4p2csPNvbij6U1f19v6WR56QZ8JcHg3QIJTlSwzFcmx6WSORicYj6I63f9yU1kEUtrpG+kjkiIAkevHpDXrg==", "dev": true, "dependencies": { "@xtuc/ieee754": "^1.2.0" } }, "node_modules/@webassemblyjs/leb128": { - "version": "1.11.1", - "resolved": "https://registry.npmjs.org/@webassemblyjs/leb128/-/leb128-1.11.1.tgz", - "integrity": "sha512-BJ2P0hNZ0u+Th1YZXJpzW6miwqQUGcIHT1G/sf72gLVD9DZ5AdYTqPNbHZh6K1M5VmKvFXwGSWZADz+qBWxeRw==", + "version": "1.11.6", + "resolved": "https://registry.npmjs.org/@webassemblyjs/leb128/-/leb128-1.11.6.tgz", + "integrity": "sha512-m7a0FhE67DQXgouf1tbN5XQcdWoNgaAuoULHIfGFIEVKA6tu/edls6XnIlkmS6FrXAquJRPni3ZZKjw6FSPjPQ==", "dev": true, "dependencies": { "@xtuc/long": "4.2.2" } }, "node_modules/@webassemblyjs/utf8": { - "version": "1.11.1", - "resolved": "https://registry.npmjs.org/@webassemblyjs/utf8/-/utf8-1.11.1.tgz", - "integrity": "sha512-9kqcxAEdMhiwQkHpkNiorZzqpGrodQQ2IGrHHxCy+Ozng0ofyMA0lTqiLkVs1uzTRejX+/O0EOT7KxqVPuXosQ==", + "version": "1.11.6", + "resolved": "https://registry.npmjs.org/@webassemblyjs/utf8/-/utf8-1.11.6.tgz", + "integrity": "sha512-vtXf2wTQ3+up9Zsg8sa2yWiQpzSsMyXj0qViVP6xKGCUT8p8YJ6HqI7l5eCnWx1T/FYdsv07HQs2wTFbbof/RA==", "dev": true }, "node_modules/@webassemblyjs/wasm-edit": { - "version": "1.11.1", - "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-edit/-/wasm-edit-1.11.1.tgz", - "integrity": "sha512-g+RsupUC1aTHfR8CDgnsVRVZFJqdkFHpsHMfJuWQzWU3tvnLC07UqHICfP+4XyL2tnr1amvl1Sdp06TnYCmVkA==", + "version": "1.11.6", + "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-edit/-/wasm-edit-1.11.6.tgz", + "integrity": "sha512-Ybn2I6fnfIGuCR+Faaz7YcvtBKxvoLV3Lebn1tM4o/IAJzmi9AWYIPWpyBfU8cC+JxAO57bk4+zdsTjJR+VTOw==", "dev": true, "dependencies": { - "@webassemblyjs/ast": "1.11.1", - "@webassemblyjs/helper-buffer": "1.11.1", - "@webassemblyjs/helper-wasm-bytecode": "1.11.1", - "@webassemblyjs/helper-wasm-section": "1.11.1", - "@webassemblyjs/wasm-gen": "1.11.1", - "@webassemblyjs/wasm-opt": "1.11.1", - "@webassemblyjs/wasm-parser": "1.11.1", - "@webassemblyjs/wast-printer": "1.11.1" + "@webassemblyjs/ast": "1.11.6", + "@webassemblyjs/helper-buffer": "1.11.6", + "@webassemblyjs/helper-wasm-bytecode": "1.11.6", + "@webassemblyjs/helper-wasm-section": "1.11.6", + "@webassemblyjs/wasm-gen": "1.11.6", + "@webassemblyjs/wasm-opt": "1.11.6", + "@webassemblyjs/wasm-parser": "1.11.6", + "@webassemblyjs/wast-printer": "1.11.6" } }, "node_modules/@webassemblyjs/wasm-gen": { - "version": "1.11.1", - "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-gen/-/wasm-gen-1.11.1.tgz", - "integrity": "sha512-F7QqKXwwNlMmsulj6+O7r4mmtAlCWfO/0HdgOxSklZfQcDu0TpLiD1mRt/zF25Bk59FIjEuGAIyn5ei4yMfLhA==", + "version": "1.11.6", + "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-gen/-/wasm-gen-1.11.6.tgz", + "integrity": "sha512-3XOqkZP/y6B4F0PBAXvI1/bky7GryoogUtfwExeP/v7Nzwo1QLcq5oQmpKlftZLbT+ERUOAZVQjuNVak6UXjPA==", "dev": true, "dependencies": { - "@webassemblyjs/ast": "1.11.1", - "@webassemblyjs/helper-wasm-bytecode": "1.11.1", - "@webassemblyjs/ieee754": "1.11.1", - "@webassemblyjs/leb128": "1.11.1", - "@webassemblyjs/utf8": "1.11.1" + "@webassemblyjs/ast": "1.11.6", + "@webassemblyjs/helper-wasm-bytecode": "1.11.6", + "@webassemblyjs/ieee754": "1.11.6", + "@webassemblyjs/leb128": "1.11.6", + "@webassemblyjs/utf8": "1.11.6" } }, "node_modules/@webassemblyjs/wasm-opt": { - "version": "1.11.1", - "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-opt/-/wasm-opt-1.11.1.tgz", - "integrity": "sha512-VqnkNqnZlU5EB64pp1l7hdm3hmQw7Vgqa0KF/KCNO9sIpI6Fk6brDEiX+iCOYrvMuBWDws0NkTOxYEb85XQHHw==", + "version": "1.11.6", + "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-opt/-/wasm-opt-1.11.6.tgz", + "integrity": "sha512-cOrKuLRE7PCe6AsOVl7WasYf3wbSo4CeOk6PkrjS7g57MFfVUF9u6ysQBBODX0LdgSvQqRiGz3CXvIDKcPNy4g==", "dev": true, "dependencies": { - "@webassemblyjs/ast": "1.11.1", - "@webassemblyjs/helper-buffer": "1.11.1", - "@webassemblyjs/wasm-gen": "1.11.1", - "@webassemblyjs/wasm-parser": "1.11.1" + "@webassemblyjs/ast": "1.11.6", + "@webassemblyjs/helper-buffer": "1.11.6", + "@webassemblyjs/wasm-gen": "1.11.6", + "@webassemblyjs/wasm-parser": "1.11.6" } }, "node_modules/@webassemblyjs/wasm-parser": { - "version": "1.11.1", - "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-parser/-/wasm-parser-1.11.1.tgz", - "integrity": "sha512-rrBujw+dJu32gYB7/Lup6UhdkPx9S9SnobZzRVL7VcBH9Bt9bCBLEuX/YXOOtBsOZ4NQrRykKhffRWHvigQvOA==", + "version": "1.11.6", + "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-parser/-/wasm-parser-1.11.6.tgz", + "integrity": "sha512-6ZwPeGzMJM3Dqp3hCsLgESxBGtT/OeCvCZ4TA1JUPYgmhAx38tTPR9JaKy0S5H3evQpO/h2uWs2j6Yc/fjkpTQ==", "dev": true, "dependencies": { - "@webassemblyjs/ast": "1.11.1", - "@webassemblyjs/helper-api-error": "1.11.1", - "@webassemblyjs/helper-wasm-bytecode": "1.11.1", - "@webassemblyjs/ieee754": "1.11.1", - "@webassemblyjs/leb128": "1.11.1", - "@webassemblyjs/utf8": "1.11.1" + "@webassemblyjs/ast": "1.11.6", + "@webassemblyjs/helper-api-error": "1.11.6", + "@webassemblyjs/helper-wasm-bytecode": "1.11.6", + "@webassemblyjs/ieee754": "1.11.6", + "@webassemblyjs/leb128": "1.11.6", + "@webassemblyjs/utf8": "1.11.6" } }, "node_modules/@webassemblyjs/wast-printer": { - "version": "1.11.1", - "resolved": "https://registry.npmjs.org/@webassemblyjs/wast-printer/-/wast-printer-1.11.1.tgz", - "integrity": "sha512-IQboUWM4eKzWW+N/jij2sRatKMh99QEelo3Eb2q0qXkvPRISAj8Qxtmw5itwqK+TTkBuUIE45AxYPToqPtL5gg==", + "version": "1.11.6", + "resolved": "https://registry.npmjs.org/@webassemblyjs/wast-printer/-/wast-printer-1.11.6.tgz", + "integrity": "sha512-JM7AhRcE+yW2GWYaKeHL5vt4xqee5N2WcezptmgyhNS+ScggqcT1OtXykhAb13Sn5Yas0j2uv9tHgrjwvzAP4A==", "dev": true, "dependencies": { - "@webassemblyjs/ast": "1.11.1", + "@webassemblyjs/ast": "1.11.6", "@xtuc/long": "4.2.2" } }, "node_modules/@webpack-cli/configtest": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/@webpack-cli/configtest/-/configtest-1.2.0.tgz", - "integrity": "sha512-4FB8Tj6xyVkyqjj1OaTqCjXYULB9FMkqQ8yGrZjRDrYh0nOE+7Lhs45WioWQQMV+ceFlE368Ukhe6xdvJM9Egg==", + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/@webpack-cli/configtest/-/configtest-2.1.1.tgz", + "integrity": "sha512-wy0mglZpDSiSS0XHrVR+BAdId2+yxPSoJW8fsna3ZpYSlufjvxnP4YbKTCBZnNIcGN4r6ZPXV55X4mYExOfLmw==", "dev": true, + "engines": { + "node": ">=14.15.0" + }, "peerDependencies": { - "webpack": "4.x.x || 5.x.x", - "webpack-cli": "4.x.x" + "webpack": "5.x.x", + "webpack-cli": "5.x.x" } }, "node_modules/@webpack-cli/info": { - "version": "1.5.0", - "resolved": "https://registry.npmjs.org/@webpack-cli/info/-/info-1.5.0.tgz", - "integrity": "sha512-e8tSXZpw2hPl2uMJY6fsMswaok5FdlGNRTktvFk2sD8RjH0hE2+XistawJx1vmKteh4NmGmNUrp+Tb2w+udPcQ==", + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/@webpack-cli/info/-/info-2.0.2.tgz", + "integrity": "sha512-zLHQdI/Qs1UyT5UBdWNqsARasIA+AaF8t+4u2aS2nEpBQh2mWIVb8qAklq0eUENnC5mOItrIB4LiS9xMtph18A==", "dev": true, - "dependencies": { - "envinfo": "^7.7.3" + "engines": { + "node": ">=14.15.0" }, "peerDependencies": { - "webpack-cli": "4.x.x" + "webpack": "5.x.x", + "webpack-cli": "5.x.x" } }, "node_modules/@webpack-cli/serve": { - "version": "1.7.0", - "resolved": "https://registry.npmjs.org/@webpack-cli/serve/-/serve-1.7.0.tgz", - "integrity": "sha512-oxnCNGj88fL+xzV+dacXs44HcDwf1ovs3AuEzvP7mqXw7fQntqIhQ1BRmynh4qEKQSSSRSWVyXRjmTbZIX9V2Q==", + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/@webpack-cli/serve/-/serve-2.0.5.tgz", + "integrity": "sha512-lqaoKnRYBdo1UgDX8uF24AfGMifWK19TxPmM5FHc2vAGxrJ/qtyUyFBWoY1tISZdelsQ5fBcOusifo5o5wSJxQ==", "dev": true, + "engines": { + "node": ">=14.15.0" + }, "peerDependencies": { - "webpack-cli": "4.x.x" + "webpack": "5.x.x", + "webpack-cli": "5.x.x" }, "peerDependenciesMeta": { "webpack-dev-server": { @@ -2141,9 +2224,9 @@ } }, "node_modules/acorn": { - "version": "8.7.0", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.7.0.tgz", - "integrity": "sha512-V/LGr1APy+PXIwKebEWrkZPwoeoF+w1jiOBUmuxuiUIaOHtob8Qc9BTrYo7VuI5fR8tqsy+buA2WFooR5olqvQ==", + "version": "8.8.2", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.8.2.tgz", + "integrity": "sha512-xjIYgE8HBrkpd/sJqOGNspf8uHG+NOHGOw6a/Urj8taM2EXfdNAH2oFcPeIFfsv3+kz/mJrS5VuMqbNLjCa2vw==", "dev": true, "bin": { "acorn": "bin/acorn" @@ -2153,9 +2236,9 @@ } }, "node_modules/acorn-import-assertions": { - "version": "1.8.0", - "resolved": "https://registry.npmjs.org/acorn-import-assertions/-/acorn-import-assertions-1.8.0.tgz", - "integrity": "sha512-m7VZ3jwz4eK6A4Vtt8Ew1/mNbP24u0FhdyfA7fSvnJR6LMdfOYnmuIrrJAgrYfYJ10F/otaHTtrtrtmHdMNzEw==", + "version": "1.9.0", + "resolved": "https://registry.npmjs.org/acorn-import-assertions/-/acorn-import-assertions-1.9.0.tgz", + "integrity": "sha512-cmMwop9x+8KFhxvKrKfPYmN6/pKTYYHBqLa0DfvVZcKMJWNyWLnaqND7dx/qn66R7ewM1UX5XMaDVP5wlVTaVA==", "dev": true, "peerDependencies": { "acorn": "^8" @@ -2171,14 +2254,14 @@ } }, "node_modules/ajv": { - "version": "6.12.6", - "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz", - "integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==", + "version": "8.12.0", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-8.12.0.tgz", + "integrity": "sha512-sRu1kpcO9yLtYxBKvqfTeh9KzZEwO3STyX1HT+4CaDzC6HpTGYhIhPIzj9XuKU7KYDwnaeh5hcOwjy1QuJzBPA==", "dev": true, "dependencies": { "fast-deep-equal": "^3.1.1", - "fast-json-stable-stringify": "^2.0.0", - "json-schema-traverse": "^0.4.1", + "json-schema-traverse": "^1.0.0", + "require-from-string": "^2.0.2", "uri-js": "^4.2.2" }, "funding": { @@ -2203,35 +2286,16 @@ } } }, - "node_modules/ajv-formats/node_modules/ajv": { - "version": "8.11.0", - "resolved": "https://registry.npmjs.org/ajv/-/ajv-8.11.0.tgz", - "integrity": "sha512-wGgprdCvMalC0BztXvitD2hC04YffAvtsUn93JbGXYLAtCUO4xd17mCCZQxUOItiBwZvJScWo8NIvQMQ71rdpg==", + "node_modules/ajv-keywords": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/ajv-keywords/-/ajv-keywords-5.1.0.tgz", + "integrity": "sha512-YCS/JNFAUyr5vAuhk1DWm1CBxRHW9LbJ2ozWeemrIqpbsqKjHVxYPyi5GC0rjZIT5JxJ3virVTS8wk4i/Z+krw==", "dev": true, "dependencies": { - "fast-deep-equal": "^3.1.1", - "json-schema-traverse": "^1.0.0", - "require-from-string": "^2.0.2", - "uri-js": "^4.2.2" + "fast-deep-equal": "^3.1.3" }, - "funding": { - "type": "github", - "url": "https://github.com/sponsors/epoberezkin" - } - }, - "node_modules/ajv-formats/node_modules/json-schema-traverse": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-1.0.0.tgz", - "integrity": "sha512-NM8/P9n3XjXhIZn1lLhkFaACTOURQXjWhV4BA/RnOv8xvgqtqpAX9IO4mRQxSx1Rlo4tqzeqb0sOlruaOy3dug==", - "dev": true - }, - "node_modules/ajv-keywords": { - "version": "3.5.2", - "resolved": "https://registry.npmjs.org/ajv-keywords/-/ajv-keywords-3.5.2.tgz", - "integrity": "sha512-5p6WTN0DdTGVQk6VjcEju19IgaHudalcfabD7yhDGeA6bcQnmL+CpveLJq/3hvfwd1aof6L386Ougkx6RfyMIQ==", - "dev": true, "peerDependencies": { - "ajv": "^6.9.1" + "ajv": "^8.8.2" } }, "node_modules/amdefine": { @@ -2347,61 +2411,59 @@ } }, "node_modules/babel-loader": { - "version": "8.3.0", - "resolved": "https://registry.npmjs.org/babel-loader/-/babel-loader-8.3.0.tgz", - "integrity": "sha512-H8SvsMF+m9t15HNLMipppzkC+Y2Yq+v3SonZyU70RBL/h1gxPkH08Ot8pEE9Z4Kd+czyWJClmFS8qzIP9OZ04Q==", + "version": "9.1.3", + "resolved": "https://registry.npmjs.org/babel-loader/-/babel-loader-9.1.3.tgz", + "integrity": "sha512-xG3ST4DglodGf8qSwv0MdeWLhrDsw/32QMdTO5T1ZIp9gQur0HkCyFs7Awskr10JKXFXwpAhiCuYX5oGXnRGbw==", "dev": true, "dependencies": { - "find-cache-dir": "^3.3.1", - "loader-utils": "^2.0.0", - "make-dir": "^3.1.0", - "schema-utils": "^2.6.5" + "find-cache-dir": "^4.0.0", + "schema-utils": "^4.0.0" }, "engines": { - "node": ">= 8.9" + "node": ">= 14.15.0" }, "peerDependencies": { - "@babel/core": "^7.0.0", - "webpack": ">=2" + "@babel/core": "^7.12.0", + "webpack": ">=5" } }, "node_modules/babel-plugin-polyfill-corejs2": { - "version": "0.3.3", - "resolved": "https://registry.npmjs.org/babel-plugin-polyfill-corejs2/-/babel-plugin-polyfill-corejs2-0.3.3.tgz", - "integrity": "sha512-8hOdmFYFSZhqg2C/JgLUQ+t52o5nirNwaWM2B9LWteozwIvM14VSwdsCAUET10qT+kmySAlseadmfeeSWFCy+Q==", + "version": "0.4.6", + "resolved": "https://registry.npmjs.org/babel-plugin-polyfill-corejs2/-/babel-plugin-polyfill-corejs2-0.4.6.tgz", + "integrity": "sha512-jhHiWVZIlnPbEUKSSNb9YoWcQGdlTLq7z1GHL4AjFxaoOUMuuEVJ+Y4pAaQUGOGk93YsVCKPbqbfw3m0SM6H8Q==", "dev": true, "dependencies": { - "@babel/compat-data": "^7.17.7", - "@babel/helper-define-polyfill-provider": "^0.3.3", - "semver": "^6.1.1" + "@babel/compat-data": "^7.22.6", + "@babel/helper-define-polyfill-provider": "^0.4.3", + "semver": "^6.3.1" }, "peerDependencies": { - "@babel/core": "^7.0.0-0" + "@babel/core": "^7.4.0 || ^8.0.0-0 <8.0.0" } }, "node_modules/babel-plugin-polyfill-corejs3": { - "version": "0.6.0", - "resolved": "https://registry.npmjs.org/babel-plugin-polyfill-corejs3/-/babel-plugin-polyfill-corejs3-0.6.0.tgz", - "integrity": "sha512-+eHqR6OPcBhJOGgsIar7xoAB1GcSwVUA3XjAd7HJNzOXT4wv6/H7KIdA/Nc60cvUlDbKApmqNvD1B1bzOt4nyA==", + "version": "0.8.5", + "resolved": "https://registry.npmjs.org/babel-plugin-polyfill-corejs3/-/babel-plugin-polyfill-corejs3-0.8.5.tgz", + "integrity": "sha512-Q6CdATeAvbScWPNLB8lzSO7fgUVBkQt6zLgNlfyeCr/EQaEQR+bWiBYYPYAFyE528BMjRhL+1QBMOI4jc/c5TA==", "dev": true, "dependencies": { - "@babel/helper-define-polyfill-provider": "^0.3.3", - "core-js-compat": "^3.25.1" + "@babel/helper-define-polyfill-provider": "^0.4.3", + "core-js-compat": "^3.32.2" }, "peerDependencies": { - "@babel/core": "^7.0.0-0" + "@babel/core": "^7.4.0 || ^8.0.0-0 <8.0.0" } }, "node_modules/babel-plugin-polyfill-regenerator": { - "version": "0.4.1", - "resolved": "https://registry.npmjs.org/babel-plugin-polyfill-regenerator/-/babel-plugin-polyfill-regenerator-0.4.1.tgz", - "integrity": "sha512-NtQGmyQDXjQqQ+IzRkBVwEOz9lQ4zxAQZgoAYEtU9dJjnl1Oc98qnN7jcp+bE7O7aYzVpavXE3/VKXNzUbh7aw==", + "version": "0.5.3", + "resolved": "https://registry.npmjs.org/babel-plugin-polyfill-regenerator/-/babel-plugin-polyfill-regenerator-0.5.3.tgz", + "integrity": "sha512-8sHeDOmXC8csczMrYEOf0UTNa4yE2SxV5JGeT/LP1n0OYVDUUFPxG9vdk2AlDlIit4t+Kf0xCtpgXPBwnn/9pw==", "dev": true, "dependencies": { - "@babel/helper-define-polyfill-provider": "^0.3.3" + "@babel/helper-define-polyfill-provider": "^0.4.3" }, "peerDependencies": { - "@babel/core": "^7.0.0-0" + "@babel/core": "^7.4.0 || ^8.0.0-0 <8.0.0" } }, "node_modules/balanced-match": { @@ -2523,9 +2585,9 @@ } }, "node_modules/browserslist": { - "version": "4.21.4", - "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.21.4.tgz", - "integrity": "sha512-CBHJJdDmgjl3daYjN5Cp5kbTf1mUhZoS+beLklHIvkOWscs83YAhLlF3Wsh/lciQYAcbBJgTOD44VtG31ZM4Hw==", + "version": "4.22.1", + "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.22.1.tgz", + "integrity": "sha512-FEVc202+2iuClEhZhrWy6ZiAcRLvNMyYcxZ8raemul1DYVOVdFsbqckWLdsixQZCpJlwe77Z3UTalE7jsjnKfQ==", "dev": true, "funding": [ { @@ -2535,13 +2597,17 @@ { "type": "tidelift", "url": "https://tidelift.com/funding/github/npm/browserslist" + }, + { + "type": "github", + "url": "https://github.com/sponsors/ai" } ], "dependencies": { - "caniuse-lite": "^1.0.30001400", - "electron-to-chromium": "^1.4.251", - "node-releases": "^2.0.6", - "update-browserslist-db": "^1.0.9" + "caniuse-lite": "^1.0.30001541", + "electron-to-chromium": "^1.4.535", + "node-releases": "^2.0.13", + "update-browserslist-db": "^1.0.13" }, "bin": { "browserslist": "cli.js" @@ -2589,9 +2655,9 @@ } }, "node_modules/caniuse-lite": { - "version": "1.0.30001430", - "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001430.tgz", - "integrity": "sha512-IB1BXTZKPDVPM7cnV4iaKaHxckvdr/3xtctB3f7Hmenx3qYBhGtTZ//7EllK66aKXW98Lx0+7Yr0kxBtIt3tzg==", + "version": "1.0.30001550", + "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001550.tgz", + "integrity": "sha512-p82WjBYIypO0ukTsd/FG3Xxs+4tFeaY9pfT4amQL8KWtYH7H9nYwReGAbMTJ0hsmRO8IfDtsS6p3ZWj8+1c2RQ==", "dev": true, "funding": [ { @@ -2601,6 +2667,10 @@ { "type": "tidelift", "url": "https://tidelift.com/funding/github/npm/caniuse-lite" + }, + { + "type": "github", + "url": "https://github.com/sponsors/ai" } ] }, @@ -2619,9 +2689,9 @@ } }, "node_modules/chance": { - "version": "1.1.8", - "resolved": "https://registry.npmjs.org/chance/-/chance-1.1.8.tgz", - "integrity": "sha512-v7fi5Hj2VbR6dJEGRWLmJBA83LJMS47pkAbmROFxHWd9qmE1esHRZW8Clf1Fhzr3rjxnNZVCjOEv/ivFxeIMtg==", + "version": "1.1.9", + "resolved": "https://registry.npmjs.org/chance/-/chance-1.1.9.tgz", + "integrity": "sha512-TfxnA/DcZXRTA4OekA2zL9GH8qscbbl6X0ZqU4tXhGveVY/mXWvEQLt5GwZcYXTEyEFflVtj+pG8nc8EwSm1RQ==", "dev": true }, "node_modules/char-regex": { @@ -2679,12 +2749,13 @@ } }, "node_modules/class-validator": { - "version": "0.13.2", - "resolved": "https://registry.npmjs.org/class-validator/-/class-validator-0.13.2.tgz", - "integrity": "sha512-yBUcQy07FPlGzUjoLuUfIOXzgynnQPPruyK1Ge2B74k9ROwnle1E+NxLWnUv5OLU8hA/qL5leAE9XnXq3byaBw==", + "version": "0.14.0", + "resolved": "https://registry.npmjs.org/class-validator/-/class-validator-0.14.0.tgz", + "integrity": "sha512-ct3ltplN8I9fOwUd8GrP8UQixwff129BkEtuWDKL5W45cQuLd19xqmTLu5ge78YDm/fdje6FMt0hGOhl0lii3A==", "dev": true, "dependencies": { - "libphonenumber-js": "^1.9.43", + "@types/validator": "^13.7.10", + "libphonenumber-js": "^1.10.14", "validator": "^13.7.0" } }, @@ -2753,10 +2824,10 @@ "node": ">= 12" } }, - "node_modules/commondir": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/commondir/-/commondir-1.0.1.tgz", - "integrity": "sha512-W9pAhw0ja1Edb5GVdIF1mjZw/ASI0AlShXM83UUGe2DVr5TdAPEA1OA8m/g8zWp9x6On7gqufY+FatDbC3MDQg==", + "node_modules/common-path-prefix": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/common-path-prefix/-/common-path-prefix-3.0.0.tgz", + "integrity": "sha512-QE33hToZseCH3jS0qN96O/bSh3kaw/h+Tq7ngyY9eWDUnTlTNUyqfqvCXioLe5Na5jFsL78ra/wuBU4iuEgd4w==", "dev": true }, "node_modules/compressible": { @@ -2809,59 +2880,6 @@ "webpack": "^5.1.0" } }, - "node_modules/compression-webpack-plugin/node_modules/ajv": { - "version": "8.11.0", - "resolved": "https://registry.npmjs.org/ajv/-/ajv-8.11.0.tgz", - "integrity": "sha512-wGgprdCvMalC0BztXvitD2hC04YffAvtsUn93JbGXYLAtCUO4xd17mCCZQxUOItiBwZvJScWo8NIvQMQ71rdpg==", - "dev": true, - "dependencies": { - "fast-deep-equal": "^3.1.1", - "json-schema-traverse": "^1.0.0", - "require-from-string": "^2.0.2", - "uri-js": "^4.2.2" - }, - "funding": { - "type": "github", - "url": "https://github.com/sponsors/epoberezkin" - } - }, - "node_modules/compression-webpack-plugin/node_modules/ajv-keywords": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/ajv-keywords/-/ajv-keywords-5.1.0.tgz", - "integrity": "sha512-YCS/JNFAUyr5vAuhk1DWm1CBxRHW9LbJ2ozWeemrIqpbsqKjHVxYPyi5GC0rjZIT5JxJ3virVTS8wk4i/Z+krw==", - "dev": true, - "dependencies": { - "fast-deep-equal": "^3.1.3" - }, - "peerDependencies": { - "ajv": "^8.8.2" - } - }, - "node_modules/compression-webpack-plugin/node_modules/json-schema-traverse": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-1.0.0.tgz", - "integrity": "sha512-NM8/P9n3XjXhIZn1lLhkFaACTOURQXjWhV4BA/RnOv8xvgqtqpAX9IO4mRQxSx1Rlo4tqzeqb0sOlruaOy3dug==", - "dev": true - }, - "node_modules/compression-webpack-plugin/node_modules/schema-utils": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-4.0.0.tgz", - "integrity": "sha512-1edyXKgh6XnJsJSQ8mKWXnN/BVaIbFMLpouRUrXgVq7WYne5kw3MW7UPhO44uRXQSIpTSXoJbmrR2X0w9kUTyg==", - "dev": true, - "dependencies": { - "@types/json-schema": "^7.0.9", - "ajv": "^8.8.0", - "ajv-formats": "^2.1.1", - "ajv-keywords": "^5.0.0" - }, - "engines": { - "node": ">= 12.13.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/webpack" - } - }, "node_modules/compression/node_modules/debug": { "version": "2.6.9", "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", @@ -2934,13 +2952,10 @@ } }, "node_modules/convert-source-map": { - "version": "1.8.0", - "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-1.8.0.tgz", - "integrity": "sha512-+OQdjP49zViI/6i7nIJpA8rAl4sV/JdPfU9nZs3VqOwGIgizICvuN2ru6fMd+4llL0tar18UYJXfZ/TWtmhUjA==", - "dev": true, - "dependencies": { - "safe-buffer": "~5.1.1" - } + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-2.0.0.tgz", + "integrity": "sha512-Kvp459HrV2FEJ1CAsi1Ku+MY3kasH19TFykTz2xWmMeq6bk2NU3XXvfJ+Q61m0xktWwt+1HSYf3JZsTms3aRJg==", + "dev": true }, "node_modules/cookie": { "version": "0.5.0", @@ -2958,9 +2973,9 @@ "dev": true }, "node_modules/core-js": { - "version": "3.26.0", - "resolved": "https://registry.npmjs.org/core-js/-/core-js-3.26.0.tgz", - "integrity": "sha512-+DkDrhoR4Y0PxDz6rurahuB+I45OsEUv8E1maPTB6OuHRohMMcznBq9TMpdpDMm/hUPob/mJJS3PqgbHpMTQgw==", + "version": "3.33.0", + "resolved": "https://registry.npmjs.org/core-js/-/core-js-3.33.0.tgz", + "integrity": "sha512-HoZr92+ZjFEKar5HS6MC776gYslNOKHt75mEBKWKnPeFDpZ6nH5OeF3S6HFT1mUAUZKrzkez05VboaX8myjSuw==", "dev": true, "hasInstallScript": true, "funding": { @@ -2969,12 +2984,12 @@ } }, "node_modules/core-js-compat": { - "version": "3.26.0", - "resolved": "https://registry.npmjs.org/core-js-compat/-/core-js-compat-3.26.0.tgz", - "integrity": "sha512-piOX9Go+Z4f9ZiBFLnZ5VrOpBl0h7IGCkiFUN11QTe6LjAvOT3ifL/5TdoizMh99hcGy5SoLyWbapIY/PIb/3A==", + "version": "3.33.0", + "resolved": "https://registry.npmjs.org/core-js-compat/-/core-js-compat-3.33.0.tgz", + "integrity": "sha512-0w4LcLXsVEuNkIqwjjf9rjCoPhK8uqA4tMRh4Ge26vfLtUutshn+aRJU21I9LCJlh2QQHfisNToLjw1XEJLTWw==", "dev": true, "dependencies": { - "browserslist": "^4.21.4" + "browserslist": "^4.22.1" }, "funding": { "type": "opencollective", @@ -3222,9 +3237,9 @@ "dev": true }, "node_modules/electron-to-chromium": { - "version": "1.4.284", - "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.284.tgz", - "integrity": "sha512-M8WEXFuKXMYMVr45fo8mq0wUrrJHheiKZf6BArTKk9ZBYCKJEOU5H8cdWgDT+qCVZf7Na4lVUaZsA+h6uA9+PA==", + "version": "1.4.558", + "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.558.tgz", + "integrity": "sha512-j9IcGmfkyN5MBH/0Xzg45GDHasXsnwEJDM6Xnr9H7GlGUni+JH4q6xp6Nk7NV5LjTmoEFBqhILIqg1McJrv6uA==", "dev": true }, "node_modules/emojis-list": { @@ -3246,31 +3261,31 @@ } }, "node_modules/engine.io-client": { - "version": "6.2.3", - "resolved": "https://registry.npmjs.org/engine.io-client/-/engine.io-client-6.2.3.tgz", - "integrity": "sha512-aXPtgF1JS3RuuKcpSrBtimSjYvrbhKW9froICH4s0F3XQWLxsKNxqzG39nnvQZQnva4CMvUK63T7shevxRyYHw==", + "version": "6.5.2", + "resolved": "https://registry.npmjs.org/engine.io-client/-/engine.io-client-6.5.2.tgz", + "integrity": "sha512-CQZqbrpEYnrpGqC07a9dJDz4gePZUgTPMU3NKJPSeQOyw27Tst4Pl3FemKoFGAlHzgZmKjoRmiJvbWfhCXUlIg==", "dev": true, "dependencies": { "@socket.io/component-emitter": "~3.1.0", "debug": "~4.3.1", - "engine.io-parser": "~5.0.3", - "ws": "~8.2.3", + "engine.io-parser": "~5.2.1", + "ws": "~8.11.0", "xmlhttprequest-ssl": "~2.0.0" } }, "node_modules/engine.io-parser": { - "version": "5.0.4", - "resolved": "https://registry.npmjs.org/engine.io-parser/-/engine.io-parser-5.0.4.tgz", - "integrity": "sha512-+nVFp+5z1E3HcToEnO7ZIj3g+3k9389DvWtvJZz0T6/eOCPIyyxehFcedoYrZQrp0LgQbD9pPXhpMBKMd5QURg==", + "version": "5.2.1", + "resolved": "https://registry.npmjs.org/engine.io-parser/-/engine.io-parser-5.2.1.tgz", + "integrity": "sha512-9JktcM3u18nU9N2Lz3bWeBgxVgOKpw7yhRaoxQA3FUDZzzw+9WlA6p4G4u0RixNkg14fH7EfEc/RhpurtiROTQ==", "dev": true, "engines": { "node": ">=10.0.0" } }, "node_modules/enhanced-resolve": { - "version": "5.10.0", - "resolved": "https://registry.npmjs.org/enhanced-resolve/-/enhanced-resolve-5.10.0.tgz", - "integrity": "sha512-T0yTFjdpldGY8PmuXXR0PyQ1ufZpEGiHVrp7zHKB7jdR4qlmZHhONVM5AQOAWXuF/w3dnHbEQVrNptJgt7F+cQ==", + "version": "5.15.0", + "resolved": "https://registry.npmjs.org/enhanced-resolve/-/enhanced-resolve-5.15.0.tgz", + "integrity": "sha512-LXYT42KJ7lpIKECr2mAXIaMldcNCh/7E0KBKOu4KSfkHmP+mZmSs+8V5gBAqisWBy0OO4W5Oyys0GO1Y8KtdKg==", "dev": true, "dependencies": { "graceful-fs": "^4.2.4", @@ -3290,9 +3305,9 @@ } }, "node_modules/envinfo": { - "version": "7.8.1", - "resolved": "https://registry.npmjs.org/envinfo/-/envinfo-7.8.1.tgz", - "integrity": "sha512-/o+BXHmB7ocbHEAs6F2EnG0ogybVVUdkRunTT2glZU9XAaGmhqskrvKwqXuDfNjEO0LZKWdejEEpnq8aM0tOaw==", + "version": "7.10.0", + "resolved": "https://registry.npmjs.org/envinfo/-/envinfo-7.10.0.tgz", + "integrity": "sha512-ZtUjZO6l5mwTHvc1L9+1q5p/R3wTopcfqMW8r5t8SJSKqeVI/LtajORwRFEKpEFuekjD0VBjwu1HMxL4UalIRw==", "dev": true, "bin": { "envinfo": "dist/cli.js" @@ -3339,9 +3354,9 @@ } }, "node_modules/es-module-lexer": { - "version": "0.9.3", - "resolved": "https://registry.npmjs.org/es-module-lexer/-/es-module-lexer-0.9.3.tgz", - "integrity": "sha512-1HQ2M2sPtxwnvOvT1ZClHyQDiggdNjURWpY2we6aMKCQiUVxTmVs2UYPLIrD84sS+kMdUwfBSylbJPwNnBrnHQ==", + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/es-module-lexer/-/es-module-lexer-1.3.1.tgz", + "integrity": "sha512-JUFAyicQV9mXc3YRxPnDlrfBKpqt6hUYzz9/boprUJHs4e4KVr3XwOF70doO6gwXUor6EWZJAyWAfKki84t20Q==", "dev": true }, "node_modules/es-to-primitive": { @@ -3392,9 +3407,9 @@ } }, "node_modules/eslint-scope": { - "version": "7.1.0", - "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-7.1.0.tgz", - "integrity": "sha512-aWwkhnS0qAXqNOgKOK0dJ2nvzEbhEvpy8OlJ9kZ0FeZnA6zpjv1/Vei+puGFFX7zkPCkHHXb7IDX3A+7yPrRWg==", + "version": "7.1.1", + "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-7.1.1.tgz", + "integrity": "sha512-QKQM/UXpIiHcLqJ5AOyIW7XZmzjkzQXYE54n1++wb0u9V/abW3l9uQnxX8Z5Xd18xyKIMTUAyQ0k1e8pz6LUrw==", "dev": true, "dependencies": { "esrecurse": "^4.3.0", @@ -3405,9 +3420,9 @@ } }, "node_modules/eslint-visitor-keys": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-3.2.0.tgz", - "integrity": "sha512-IOzT0X126zn7ALX0dwFiUQEdsfzrm4+ISsQS8nukaJXwEyYKRSnEIIDULYg1mCtGp7UUXgfGl7BIolXREQK+XQ==", + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-3.3.0.tgz", + "integrity": "sha512-mQ+suqKJVyeuwGYHAdjMFqjCyfl8+Ldnxuyp3ldiMBFKkvytrXUZWaiPCEav8qDHKty44bD+qV1IP4T+w+xXRA==", "dev": true, "engines": { "node": "^12.22.0 || ^14.17.0 || >=16.0.0" @@ -3671,20 +3686,104 @@ "dev": true }, "node_modules/find-cache-dir": { - "version": "3.3.2", - "resolved": "https://registry.npmjs.org/find-cache-dir/-/find-cache-dir-3.3.2.tgz", - "integrity": "sha512-wXZV5emFEjrridIgED11OoUKLxiYjAcqot/NJdAkOhlJ+vGzwhOAfcG5OX1jP+S0PcjEn8bdMJv+g2jwQ3Onig==", + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/find-cache-dir/-/find-cache-dir-4.0.0.tgz", + "integrity": "sha512-9ZonPT4ZAK4a+1pUPVPZJapbi7O5qbbJPdYw/NOQWZZbVLdDTYM3A4R9z/DpAM08IDaFGsvPgiGZ82WEwUDWjg==", "dev": true, "dependencies": { - "commondir": "^1.0.1", - "make-dir": "^3.0.2", - "pkg-dir": "^4.1.0" + "common-path-prefix": "^3.0.0", + "pkg-dir": "^7.0.0" }, "engines": { - "node": ">=8" + "node": ">=14.16" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/find-cache-dir/node_modules/find-up": { + "version": "6.3.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-6.3.0.tgz", + "integrity": "sha512-v2ZsoEuVHYy8ZIlYqwPe/39Cy+cFDzp4dXPaxNvkEuouymu+2Jbz0PxpKarJHYJTmv2HWT3O382qY8l4jMWthw==", + "dev": true, + "dependencies": { + "locate-path": "^7.1.0", + "path-exists": "^5.0.0" + }, + "engines": { + "node": "^12.20.0 || ^14.13.1 || >=16.0.0" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/find-cache-dir/node_modules/locate-path": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-7.2.0.tgz", + "integrity": "sha512-gvVijfZvn7R+2qyPX8mAuKcFGDf6Nc61GdvGafQsHL0sBIxfKzA+usWn4GFC/bk+QdwPUD4kWFJLhElipq+0VA==", + "dev": true, + "dependencies": { + "p-locate": "^6.0.0" + }, + "engines": { + "node": "^12.20.0 || ^14.13.1 || >=16.0.0" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/find-cache-dir/node_modules/p-limit": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-4.0.0.tgz", + "integrity": "sha512-5b0R4txpzjPWVw/cXXUResoD4hb6U/x9BH08L7nw+GN1sezDzPdxeRvpc9c433fZhBan/wusjbCsqwqm4EIBIQ==", + "dev": true, + "dependencies": { + "yocto-queue": "^1.0.0" + }, + "engines": { + "node": "^12.20.0 || ^14.13.1 || >=16.0.0" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/find-cache-dir/node_modules/p-locate": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-6.0.0.tgz", + "integrity": "sha512-wPrq66Llhl7/4AGC6I+cqxT07LhXvWL08LNXz1fENOw0Ap4sRZZ/gZpTTJ5jpurzzzfS2W/Ge9BY3LgLjCShcw==", + "dev": true, + "dependencies": { + "p-limit": "^4.0.0" + }, + "engines": { + "node": "^12.20.0 || ^14.13.1 || >=16.0.0" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/find-cache-dir/node_modules/path-exists": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-5.0.0.tgz", + "integrity": "sha512-RjhtfwJOxzcFmNOi6ltcbcu4Iu+FL3zEj83dk4kAS+fVpTxXLO1b38RvJgT/0QwvV/L3aY9TAnyv0EOqW4GoMQ==", + "dev": true, + "engines": { + "node": "^12.20.0 || ^14.13.1 || >=16.0.0" + } + }, + "node_modules/find-cache-dir/node_modules/pkg-dir": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/pkg-dir/-/pkg-dir-7.0.0.tgz", + "integrity": "sha512-Ie9z/WINcxxLp27BKOCHGde4ITq9UklYKDzVo1nhk5sqGEXU3FpkwP5GM2voTGJkGd9B3Otl+Q4uwSOeSUtOBA==", + "dev": true, + "dependencies": { + "find-up": "^6.3.0" + }, + "engines": { + "node": ">=14.16" }, "funding": { - "url": "https://github.com/avajs/find-cache-dir?sponsor=1" + "url": "https://github.com/sponsors/sindresorhus" } }, "node_modules/find-up": { @@ -3995,9 +4094,9 @@ } }, "node_modules/howler": { - "version": "2.2.3", - "resolved": "https://registry.npmjs.org/howler/-/howler-2.2.3.tgz", - "integrity": "sha512-QM0FFkw0LRX1PR8pNzJVAY25JhIWvbKMBFM4gqk+QdV+kPXOhleWGCB6AiAF/goGjIHK2e/nIElplvjQwhr0jg==", + "version": "2.2.4", + "resolved": "https://registry.npmjs.org/howler/-/howler-2.2.4.tgz", + "integrity": "sha512-iARIBPgcQrwtEr+tALF+rapJ8qSc+Set2GJQl7xT1MQzWaVkFebdJhR3alVlSiUf5U7nAANKuj3aWpwerocD5w==", "dev": true }, "node_modules/hpack.js": { @@ -4064,9 +4163,9 @@ } }, "node_modules/html-webpack-plugin": { - "version": "5.5.0", - "resolved": "https://registry.npmjs.org/html-webpack-plugin/-/html-webpack-plugin-5.5.0.tgz", - "integrity": "sha512-sy88PC2cRTVxvETRgUHFrL4No3UxvcH8G1NepGhqaTT+GXN2kTamqasot0inS5hXeg1cMbFDt27zzo9p35lZVw==", + "version": "5.5.3", + "resolved": "https://registry.npmjs.org/html-webpack-plugin/-/html-webpack-plugin-5.5.3.tgz", + "integrity": "sha512-6YrDKTuqaP/TquFH7h4srYWsZx+x6k6+FbsTm0ziCwGHDP78Unr1r9F/H4+sGmMbX08GQcJ+K64x55b+7VM/jg==", "dev": true, "dependencies": { "@types/html-minifier-terser": "^6.0.0", @@ -4242,12 +4341,12 @@ } }, "node_modules/interpret": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/interpret/-/interpret-2.2.0.tgz", - "integrity": "sha512-Ju0Bz/cEia55xDwUWEa8+olFpCiQoypjnQySseKtmjNrnps3P+xfpUmGr90T7yjlVJmOtybRvPXhKMbHr+fWnw==", + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/interpret/-/interpret-3.1.1.tgz", + "integrity": "sha512-6xwYfHbajpoF0xLW+iwLkhwgvLoZDfjYfoFNu8ftMoXINzwuymNLd9u/KmwtdT2GbR+/Cz66otEGEVVUHX9QLQ==", "dev": true, "engines": { - "node": ">= 0.10" + "node": ">=10.13.0" } }, "node_modules/inversify": { @@ -4340,9 +4439,9 @@ } }, "node_modules/is-core-module": { - "version": "2.10.0", - "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.10.0.tgz", - "integrity": "sha512-Erxj2n/LDAZ7H8WNJXd9tw38GYM3dv8rk8Zcs+jJuxYTW7sozH+SS8NtrSjVL1/vpLvWi1hxy96IzjJ3EHTJJg==", + "version": "2.13.0", + "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.13.0.tgz", + "integrity": "sha512-Z7dk6Qo8pOCp3l4tsX2C5ZVas4V+UxwQodwZhLopL91TX8UyyHEXafPcyoeeWuLrwzHcr3igO78wNLwHJHsMCQ==", "dev": true, "dependencies": { "has": "^1.0.3" @@ -4628,27 +4727,27 @@ } }, "node_modules/javascript-obfuscator": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/javascript-obfuscator/-/javascript-obfuscator-4.0.0.tgz", - "integrity": "sha512-vS/8w/9eKISzwXNLd+OLMCCwjD+dFMdOlCDOo919iR/MWdBs+7u1ybpwRoWOmODToPQKVYw5GasvZoIiPs5nPw==", + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/javascript-obfuscator/-/javascript-obfuscator-4.1.0.tgz", + "integrity": "sha512-ckC0VFKQ0/sFtLH9apW/ZLfsP8LuZqZhVEM4VTJ5KLzyLaodW6C1lTU8808eboDmddKyvd2uyRx5bzc0Me0GYg==", "dev": true, "hasInstallScript": true, "dependencies": { "@javascript-obfuscator/escodegen": "2.3.0", "@javascript-obfuscator/estraverse": "5.4.0", - "acorn": "8.7.0", + "acorn": "8.8.2", "assert": "2.0.0", "chalk": "4.1.2", - "chance": "1.1.8", - "class-validator": "0.13.2", - "commander": "9.0.0", - "eslint-scope": "7.1.0", - "eslint-visitor-keys": "3.2.0", + "chance": "1.1.9", + "class-validator": "0.14.0", + "commander": "10.0.0", + "eslint-scope": "7.1.1", + "eslint-visitor-keys": "3.3.0", "fast-deep-equal": "3.1.3", "inversify": "6.0.1", "js-string-escape": "1.0.1", "md5": "2.3.0", - "mkdirp": "1.0.4", + "mkdirp": "2.1.3", "multimatch": "5.0.0", "opencollective-postinstall": "2.0.3", "process": "0.11.10", @@ -4656,13 +4755,13 @@ "source-map-support": "0.5.21", "string-template": "1.0.0", "stringz": "2.1.0", - "tslib": "2.3.1" + "tslib": "2.5.0" }, "bin": { "javascript-obfuscator": "bin/javascript-obfuscator" }, "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + "node": "^12.22.0 || ^14.0.0 || ^16.0.0 || ^17.0.0 || >=18.0.0" }, "funding": { "type": "opencollective", @@ -4719,12 +4818,12 @@ "dev": true }, "node_modules/javascript-obfuscator/node_modules/commander": { - "version": "9.0.0", - "resolved": "https://registry.npmjs.org/commander/-/commander-9.0.0.tgz", - "integrity": "sha512-JJfP2saEKbQqvW+FI93OYUB4ByV5cizMpFMiiJI8xDbBvQvSkIk0VvQdn1CZ8mqAO8Loq2h0gYTYtDFUZUeERw==", + "version": "10.0.0", + "resolved": "https://registry.npmjs.org/commander/-/commander-10.0.0.tgz", + "integrity": "sha512-zS5PnTI22FIRM6ylNW8G4Ap0IEOyk62fhLSD0+uHRT9McRCLGpkVNvao4bjimpK/GShynyQkFFxHhwMcETmduA==", "dev": true, "engines": { - "node": "^12.20.0 || >=14" + "node": ">=14" } }, "node_modules/javascript-obfuscator/node_modules/has-flag": { @@ -4748,12 +4847,6 @@ "node": ">=8" } }, - "node_modules/javascript-obfuscator/node_modules/tslib": { - "version": "2.3.1", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.3.1.tgz", - "integrity": "sha512-77EbyPPpMz+FRFRuAFlWMtmgUWGe9UOG2Z25NqCwiIjRhOf5iKGuzSe5P2w1laq+FkRy4p+PCuVkJSGkzTEKVw==", - "dev": true - }, "node_modules/jest-worker": { "version": "27.5.1", "resolved": "https://registry.npmjs.org/jest-worker/-/jest-worker-27.5.1.tgz", @@ -4826,15 +4919,15 @@ "dev": true }, "node_modules/json-schema-traverse": { - "version": "0.4.1", - "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", - "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==", + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-1.0.0.tgz", + "integrity": "sha512-NM8/P9n3XjXhIZn1lLhkFaACTOURQXjWhV4BA/RnOv8xvgqtqpAX9IO4mRQxSx1Rlo4tqzeqb0sOlruaOy3dug==", "dev": true }, "node_modules/json5": { - "version": "2.2.1", - "resolved": "https://registry.npmjs.org/json5/-/json5-2.2.1.tgz", - "integrity": "sha512-1hqLFMSrGHRHxav9q9gNjJ5EXznIxGVO09xQRrwplcS8qs28pZ8s8hupZAmqDwZUmVZ2Qb2jnyPOWcDH8m8dlA==", + "version": "2.2.3", + "resolved": "https://registry.npmjs.org/json5/-/json5-2.2.3.tgz", + "integrity": "sha512-XmOWe7eyHYH14cLdVPoyg+GOH3rYX++KpzrylJwSW98t3Nk+U8XOl8FWKOgwtzdb8lXGf6zYwDUzeHMWfxasyg==", "dev": true, "bin": { "json5": "lib/cli.js" @@ -4852,6 +4945,16 @@ "node": ">=0.10.0" } }, + "node_modules/launch-editor": { + "version": "2.6.1", + "resolved": "https://registry.npmjs.org/launch-editor/-/launch-editor-2.6.1.tgz", + "integrity": "sha512-eB/uXmFVpY4zezmGp5XtU21kwo7GBbKB+EQ+UZeWtGb9yAM5xt/Evk+lYH3eRNAtId+ej4u7TYPFZ07w4s7rRw==", + "dev": true, + "dependencies": { + "picocolors": "^1.0.0", + "shell-quote": "^1.8.1" + } + }, "node_modules/levn": { "version": "0.3.0", "resolved": "https://registry.npmjs.org/levn/-/levn-0.3.0.tgz", @@ -4866,9 +4969,9 @@ } }, "node_modules/libphonenumber-js": { - "version": "1.10.13", - "resolved": "https://registry.npmjs.org/libphonenumber-js/-/libphonenumber-js-1.10.13.tgz", - "integrity": "sha512-b74iyWmwb4GprAUPjPkJ11GTC7KX4Pd3onpJfKxYyY8y9Rbb4ERY47LvCMEDM09WD3thiLDMXtkfDK/AX+zT7Q==", + "version": "1.10.48", + "resolved": "https://registry.npmjs.org/libphonenumber-js/-/libphonenumber-js-1.10.48.tgz", + "integrity": "sha512-Vvcgt4+o8+puIBJZLdMshPYx9nRN3/kTT7HPtOyfYrSQuN9PGBF1KUv0g07fjNzt4E4GuA7FnsLb+WeAMzyRQg==", "dev": true }, "node_modules/loader-runner": { @@ -4881,9 +4984,9 @@ } }, "node_modules/loader-utils": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/loader-utils/-/loader-utils-2.0.3.tgz", - "integrity": "sha512-THWqIsn8QRnvLl0shHYVBN9syumU8pYWEHPTmkiVGd+7K5eFNVSY6AJhRvgGF70gg1Dz+l/k8WicvFCxdEs60A==", + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/loader-utils/-/loader-utils-2.0.4.tgz", + "integrity": "sha512-xXqpXoINfFhgua9xiqD8fPFHgkoq1mmmpE92WlDbm9rNRd/EbRb+Gqf908T2DMfuHjjJlksiK2RbHVOdD/MqSw==", "dev": true, "dependencies": { "big.js": "^5.2.2", @@ -4927,19 +5030,13 @@ "tslib": "^2.0.3" } }, - "node_modules/make-dir": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-3.1.0.tgz", - "integrity": "sha512-g3FeP20LNwhALb/6Cz6Dd4F2ngze0jz7tbzrD2wAV+o9FeNHe4rL+yK2md0J/fiSf1sa1ADhXqi5+oVwOM/eGw==", + "node_modules/lru-cache": { + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-5.1.1.tgz", + "integrity": "sha512-KpNARQA3Iwv+jTA0utUVVbrh+Jlrr1Fv0e56GGzAFOXN7dk/FviaDW8LHmK52DlcH4WP2n6gI8vN1aesBFgo9w==", "dev": true, "dependencies": { - "semver": "^6.0.0" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" + "yallist": "^3.0.2" } }, "node_modules/md5": { @@ -5069,15 +5166,18 @@ } }, "node_modules/mkdirp": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-1.0.4.tgz", - "integrity": "sha512-vVqVZQyf3WLx2Shd0qJ9xuvqgAyKPLAiqITEtqW0oIUjzo3PePDd6fW9iFz30ef7Ysp/oiWqbhszeGWW2T6Gzw==", + "version": "2.1.3", + "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-2.1.3.tgz", + "integrity": "sha512-sjAkg21peAG9HS+Dkx7hlG9Ztx7HLeKnvB3NQRcu/mltCVmvkF0pisbiTSfDVYTT86XEfZrTUosLdZLStquZUw==", "dev": true, "bin": { - "mkdirp": "bin/cmd.js" + "mkdirp": "dist/cjs/src/bin.js" }, "engines": { "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" } }, "node_modules/ms": { @@ -5174,9 +5274,9 @@ } }, "node_modules/node-releases": { - "version": "2.0.6", - "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-2.0.6.tgz", - "integrity": "sha512-PiVXnNuFm5+iYkLBNeq5211hvO38y63T0i2KKh2KnUs3RpzJ+JtODFjkD8yjLwnDkTYF1eKXheUwdssR+NRZdg==", + "version": "2.0.13", + "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-2.0.13.tgz", + "integrity": "sha512-uYr7J37ae/ORWdZeQ1xxMJe3NtdmqMC/JZK+geofDrkLUApKRHPd18/TxtBOJ4A0/+uUIliorNrfYV6s1b02eQ==", "dev": true }, "node_modules/normalize-path": { @@ -5476,9 +5576,9 @@ "dev": true }, "node_modules/phasereditor2d-launcher": { - "version": "3.35.1", - "resolved": "https://registry.npmjs.org/phasereditor2d-launcher/-/phasereditor2d-launcher-3.35.1.tgz", - "integrity": "sha512-EvI06Qh3vjs7YWWiC/kYAOsIps/xe+OFgmi/KRd+RlAno18zlYS0/WUDsMUasW+jb4FbiV/aJR4N4gtzsEmQNA==", + "version": "3.63.0", + "resolved": "https://registry.npmjs.org/phasereditor2d-launcher/-/phasereditor2d-launcher-3.63.0.tgz", + "integrity": "sha512-O02ZGOaTrOikH+ZTc4WyBTjXvnBQuBg0rifaXHTI2zVeD5Y1zv+nxaq8pgMZe6FWhwgVmF+0D9I47qN1UN0FkA==", "dev": true, "dependencies": { "adm-zip": "^0.5.5" @@ -5672,15 +5772,15 @@ } }, "node_modules/rechoir": { - "version": "0.7.1", - "resolved": "https://registry.npmjs.org/rechoir/-/rechoir-0.7.1.tgz", - "integrity": "sha512-/njmZ8s1wVeR6pjTZ+0nCnv8SpZNRMT2D1RLOJQESlYFDBvwpTA4KWJpZ+sBJ4+vhjILRcK7JIFdGCdxEAAitg==", + "version": "0.8.0", + "resolved": "https://registry.npmjs.org/rechoir/-/rechoir-0.8.0.tgz", + "integrity": "sha512-/vxpCXddiX8NGfGO/mTafwjq4aFa/71pvamip0++IQk3zG8cbCj0fifNPrjjF1XMXUne91jL9OoxmdykoEtifQ==", "dev": true, "dependencies": { - "resolve": "^1.9.0" + "resolve": "^1.20.0" }, "engines": { - "node": ">= 0.10" + "node": ">= 10.13.0" } }, "node_modules/reflect-metadata": { @@ -5696,9 +5796,9 @@ "dev": true }, "node_modules/regenerate-unicode-properties": { - "version": "10.0.1", - "resolved": "https://registry.npmjs.org/regenerate-unicode-properties/-/regenerate-unicode-properties-10.0.1.tgz", - "integrity": "sha512-vn5DU6yg6h8hP/2OkQo3K7uVILvY4iu0oI4t3HFa81UPkhGJwkRwM10JEc3upjdhHjs/k8GJY1sRBhk5sr69Bw==", + "version": "10.1.1", + "resolved": "https://registry.npmjs.org/regenerate-unicode-properties/-/regenerate-unicode-properties-10.1.1.tgz", + "integrity": "sha512-X007RyZLsCJVVrjgEFVpLUTZwyOZk3oiL75ZcuYjlIWd6rNJtOjkBwQc5AsRrpbKVkxN6sklw/k/9m2jJYOf8Q==", "dev": true, "dependencies": { "regenerate": "^1.4.2" @@ -5708,15 +5808,15 @@ } }, "node_modules/regenerator-runtime": { - "version": "0.13.9", - "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.13.9.tgz", - "integrity": "sha512-p3VT+cOEgxFsRRA9X4lkI1E+k2/CtnKtU4gcxyaCUreilL/vqI6CdZ3wxVUx3UOUg+gnUOQQcRI7BmSI656MYA==", + "version": "0.14.0", + "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.14.0.tgz", + "integrity": "sha512-srw17NI0TUWHuGa5CFGGmhfNIeja30WMBfbslPNhf6JrqQlLN5gcrvig1oqPxiVaXb0oW0XRKtH6Nngs5lKCIA==", "dev": true }, "node_modules/regenerator-transform": { - "version": "0.15.0", - "resolved": "https://registry.npmjs.org/regenerator-transform/-/regenerator-transform-0.15.0.tgz", - "integrity": "sha512-LsrGtPmbYg19bcPHwdtmXwbW+TqNvtY4riE3P83foeHRroMbH6/2ddFBfab3t7kbzc7v7p4wbkIecHImqt0QNg==", + "version": "0.15.2", + "resolved": "https://registry.npmjs.org/regenerator-transform/-/regenerator-transform-0.15.2.tgz", + "integrity": "sha512-hfMp2BoF0qOk3uc5V20ALGDS2ddjQaLrdl7xrGXvAIow7qeWRM2VA2HuCHkUKk9slq3VwEwLNK3DFBqDfPGYtg==", "dev": true, "dependencies": { "@babel/runtime": "^7.8.4" @@ -5740,32 +5840,26 @@ } }, "node_modules/regexpu-core": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/regexpu-core/-/regexpu-core-5.1.0.tgz", - "integrity": "sha512-bb6hk+xWd2PEOkj5It46A16zFMs2mv86Iwpdu94la4S3sJ7C973h2dHpYKwIBGaWSO7cIRJ+UX0IeMaWcO4qwA==", + "version": "5.3.2", + "resolved": "https://registry.npmjs.org/regexpu-core/-/regexpu-core-5.3.2.tgz", + "integrity": "sha512-RAM5FlZz+Lhmo7db9L298p2vHP5ZywrVXmVXpmAD9GuL5MPH6t9ROw1iA/wfHkQ76Qe7AaPF0nGuim96/IrQMQ==", "dev": true, "dependencies": { + "@babel/regjsgen": "^0.8.0", "regenerate": "^1.4.2", - "regenerate-unicode-properties": "^10.0.1", - "regjsgen": "^0.6.0", - "regjsparser": "^0.8.2", + "regenerate-unicode-properties": "^10.1.0", + "regjsparser": "^0.9.1", "unicode-match-property-ecmascript": "^2.0.0", - "unicode-match-property-value-ecmascript": "^2.0.0" + "unicode-match-property-value-ecmascript": "^2.1.0" }, "engines": { "node": ">=4" } }, - "node_modules/regjsgen": { - "version": "0.6.0", - "resolved": "https://registry.npmjs.org/regjsgen/-/regjsgen-0.6.0.tgz", - "integrity": "sha512-ozE883Uigtqj3bx7OhL1KNbCzGyW2NQZPl6Hs09WTvCuZD5sTI4JY58bkbQWa/Y9hxIsvJ3M8Nbf7j54IqeZbA==", - "dev": true - }, "node_modules/regjsparser": { - "version": "0.8.4", - "resolved": "https://registry.npmjs.org/regjsparser/-/regjsparser-0.8.4.tgz", - "integrity": "sha512-J3LABycON/VNEu3abOviqGHuB/LOtOQj8SKmfP9anY5GfAVw/SPjwzSjxGjbZXIxbGfqTHtJw58C2Li/WkStmA==", + "version": "0.9.1", + "resolved": "https://registry.npmjs.org/regjsparser/-/regjsparser-0.9.1.tgz", + "integrity": "sha512-dQUtn90WanSNl+7mQKcXAgZxvUe7Z0SqXlgzv0za4LwiUhyzBC58yQO3liFoUgu8GiJVInAhJjkj1N0EtQ5nkQ==", "dev": true, "dependencies": { "jsesc": "~0.5.0" @@ -5821,12 +5915,12 @@ "dev": true }, "node_modules/resolve": { - "version": "1.22.1", - "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.22.1.tgz", - "integrity": "sha512-nBpuuYuY5jFsli/JIs1oldw6fOQCBioohqWZg/2hiaOybXOft4lonv85uDOKXdf8rhyK159cxU5cDcK/NKk8zw==", + "version": "1.22.8", + "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.22.8.tgz", + "integrity": "sha512-oKWePCxqpd6FlLvGV1VU0x7bkPmmCNolxzjMf4NczoDnQcIWrAF+cPtZn5i6n+RfD2d9i0tzpKnG6Yk168yIyw==", "dev": true, "dependencies": { - "is-core-module": "^2.9.0", + "is-core-module": "^2.13.0", "path-parse": "^1.0.7", "supports-preserve-symlinks-flag": "^1.0.0" }, @@ -5895,17 +5989,18 @@ "dev": true }, "node_modules/schema-utils": { - "version": "2.7.1", - "resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-2.7.1.tgz", - "integrity": "sha512-SHiNtMOUGWBQJwzISiVYKu82GiV4QYGePp3odlY1tuKO7gPtphAT5R/py0fA6xtbgLL/RvtJZnU9b8s0F1q0Xg==", + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-4.2.0.tgz", + "integrity": "sha512-L0jRsrPpjdckP3oPug3/VxNKt2trR8TcabrM6FOAAlvC/9Phcmm+cuAgTlxBqdBR1WJx7Naj9WHw+aOmheSVbw==", "dev": true, "dependencies": { - "@types/json-schema": "^7.0.5", - "ajv": "^6.12.4", - "ajv-keywords": "^3.5.2" + "@types/json-schema": "^7.0.9", + "ajv": "^8.9.0", + "ajv-formats": "^2.1.1", + "ajv-keywords": "^5.1.0" }, "engines": { - "node": ">= 8.9.0" + "node": ">= 12.13.0" }, "funding": { "type": "opencollective", @@ -5931,9 +6026,9 @@ } }, "node_modules/semver": { - "version": "6.3.0", - "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", - "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", + "version": "6.3.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz", + "integrity": "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==", "dev": true, "bin": { "semver": "bin/semver.js" @@ -5985,9 +6080,9 @@ "dev": true }, "node_modules/serialize-javascript": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/serialize-javascript/-/serialize-javascript-6.0.0.tgz", - "integrity": "sha512-Qr3TosvguFt8ePWqsvRfrKyQXIiW+nGbYpy8XK24NQHE83caxWt+mIymTT19DGFbNWNLfEwsrkSmN64lVWB9ag==", + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/serialize-javascript/-/serialize-javascript-6.0.1.tgz", + "integrity": "sha512-owoXEFjWRllis8/M1Q+Cw5k8ZH40e3zhp/ovX+Xr/vi1qj6QesbyXXViFbpNvWvPNAD62SutwEXavefrLJWj7w==", "dev": true, "dependencies": { "randombytes": "^2.1.0" @@ -6125,6 +6220,15 @@ "node": ">=8" } }, + "node_modules/shell-quote": { + "version": "1.8.1", + "resolved": "https://registry.npmjs.org/shell-quote/-/shell-quote-1.8.1.tgz", + "integrity": "sha512-6j1W9l1iAs/4xYBI1SYOVZyFcCis9b4KCLQ8fgAGG07QvzaRLVVRQvAy85yNmmZSjYjg4MWh4gNvlPujU/5LpA==", + "dev": true, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/side-channel": { "version": "1.0.4", "resolved": "https://registry.npmjs.org/side-channel/-/side-channel-1.0.4.tgz", @@ -6146,24 +6250,24 @@ "dev": true }, "node_modules/socket.io-client": { - "version": "4.5.3", - "resolved": "https://registry.npmjs.org/socket.io-client/-/socket.io-client-4.5.3.tgz", - "integrity": "sha512-I/hqDYpQ6JKwtJOf5ikM+Qz+YujZPMEl6qBLhxiP0nX+TfXKhW4KZZG8lamrD6Y5ngjmYHreESVasVCgi5Kl3A==", + "version": "4.7.2", + "resolved": "https://registry.npmjs.org/socket.io-client/-/socket.io-client-4.7.2.tgz", + "integrity": "sha512-vtA0uD4ibrYD793SOIAwlo8cj6haOeMHrGvwPxJsxH7CeIksqJ+3Zc06RvWTIFgiSqx4A3sOnTXpfAEE2Zyz6w==", "dev": true, "dependencies": { "@socket.io/component-emitter": "~3.1.0", "debug": "~4.3.2", - "engine.io-client": "~6.2.3", - "socket.io-parser": "~4.2.0" + "engine.io-client": "~6.5.2", + "socket.io-parser": "~4.2.4" }, "engines": { "node": ">=10.0.0" } }, "node_modules/socket.io-parser": { - "version": "4.2.1", - "resolved": "https://registry.npmjs.org/socket.io-parser/-/socket.io-parser-4.2.1.tgz", - "integrity": "sha512-V4GrkLy+HeF1F/en3SpUaM+7XxYXpuMUWLGde1kSSh5nQMN4hLrbPIkD+otwh6q9R6NOQBN4AMaOZ2zVjui82g==", + "version": "4.2.4", + "resolved": "https://registry.npmjs.org/socket.io-parser/-/socket.io-parser-4.2.4.tgz", + "integrity": "sha512-/GbIKmo8ioc+NIWIhwdecY0ge+qVBSMdgxGygevmdHj24bsfgtCmcUUcQ5ZzcylGFHsN3k4HB4Cgkl96KVnuew==", "dev": true, "dependencies": { "@socket.io/component-emitter": "~3.1.0", @@ -6384,13 +6488,13 @@ } }, "node_modules/terser": { - "version": "5.14.2", - "resolved": "https://registry.npmjs.org/terser/-/terser-5.14.2.tgz", - "integrity": "sha512-oL0rGeM/WFQCUd0y2QrWxYnq7tfSuKBiqTjRPWrRgB46WD/kiwHwF8T23z78H6Q6kGCuuHcPB+KULHRdxvVGQA==", + "version": "5.22.0", + "resolved": "https://registry.npmjs.org/terser/-/terser-5.22.0.tgz", + "integrity": "sha512-hHZVLgRA2z4NWcN6aS5rQDc+7Dcy58HOf2zbYwmFcQ+ua3h6eEFf5lIDKTzbWwlazPyOZsFQO8V80/IjVNExEw==", "dev": true, "dependencies": { - "@jridgewell/source-map": "^0.3.2", - "acorn": "^8.5.0", + "@jridgewell/source-map": "^0.3.3", + "acorn": "^8.8.2", "commander": "^2.20.0", "source-map-support": "~0.5.20" }, @@ -6402,16 +6506,16 @@ } }, "node_modules/terser-webpack-plugin": { - "version": "5.3.5", - "resolved": "https://registry.npmjs.org/terser-webpack-plugin/-/terser-webpack-plugin-5.3.5.tgz", - "integrity": "sha512-AOEDLDxD2zylUGf/wxHxklEkOe2/r+seuyOWujejFrIxHf11brA1/dWQNIgXa1c6/Wkxgu7zvv0JhOWfc2ELEA==", + "version": "5.3.9", + "resolved": "https://registry.npmjs.org/terser-webpack-plugin/-/terser-webpack-plugin-5.3.9.tgz", + "integrity": "sha512-ZuXsqE07EcggTWQjXUj+Aot/OMcD0bMKGgF63f7UxYcu5/AJF53aIpK1YoP5xR9l6s/Hy2b+t1AM0bLNPRuhwA==", "dev": true, "dependencies": { - "@jridgewell/trace-mapping": "^0.3.14", + "@jridgewell/trace-mapping": "^0.3.17", "jest-worker": "^27.4.5", "schema-utils": "^3.1.1", - "serialize-javascript": "^6.0.0", - "terser": "^5.14.1" + "serialize-javascript": "^6.0.1", + "terser": "^5.16.8" }, "engines": { "node": ">= 10.13.0" @@ -6435,10 +6539,41 @@ } } }, + "node_modules/terser-webpack-plugin/node_modules/ajv": { + "version": "6.12.6", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz", + "integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==", + "dev": true, + "dependencies": { + "fast-deep-equal": "^3.1.1", + "fast-json-stable-stringify": "^2.0.0", + "json-schema-traverse": "^0.4.1", + "uri-js": "^4.2.2" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/epoberezkin" + } + }, + "node_modules/terser-webpack-plugin/node_modules/ajv-keywords": { + "version": "3.5.2", + "resolved": "https://registry.npmjs.org/ajv-keywords/-/ajv-keywords-3.5.2.tgz", + "integrity": "sha512-5p6WTN0DdTGVQk6VjcEju19IgaHudalcfabD7yhDGeA6bcQnmL+CpveLJq/3hvfwd1aof6L386Ougkx6RfyMIQ==", + "dev": true, + "peerDependencies": { + "ajv": "^6.9.1" + } + }, + "node_modules/terser-webpack-plugin/node_modules/json-schema-traverse": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", + "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==", + "dev": true + }, "node_modules/terser-webpack-plugin/node_modules/schema-utils": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-3.1.1.tgz", - "integrity": "sha512-Y5PQxS4ITlC+EahLuXaY86TXfR7Dc5lw294alXOq86JAHCihAIZfqv8nNCWvaEJvaC51uN9hbLGeV0cFBdH+Fw==", + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-3.3.0.tgz", + "integrity": "sha512-pN/yOAvcC+5rQ5nERGuwrjLlYvLTbCibnZ1I7B1LaiAz9BRBlE9GMgE/eqV30P7aJQUf7Ddimy/RsbYO/GrVGg==", "dev": true, "dependencies": { "@types/json-schema": "^7.0.8", @@ -6496,9 +6631,9 @@ } }, "node_modules/tslib": { - "version": "2.4.0", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.4.0.tgz", - "integrity": "sha512-d6xOpEDfsi2CZVlPQzGeux8XMwLT9hssAsaPYExaQMuYskwb+x1x7J371tWlbBdWHroy99KnVB6qIkUbs5X3UQ==", + "version": "2.5.0", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.5.0.tgz", + "integrity": "sha512-336iVw3rtn2BUK7ORdIAHTyxHGRIHVReokCR3XjbckJMK7ms8FysBfhLR8IXnAgy7T0PTPNBWKiH514FOW/WSg==", "dev": true }, "node_modules/type-check": { @@ -6564,18 +6699,18 @@ } }, "node_modules/unicode-match-property-value-ecmascript": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/unicode-match-property-value-ecmascript/-/unicode-match-property-value-ecmascript-2.0.0.tgz", - "integrity": "sha512-7Yhkc0Ye+t4PNYzOGKedDhXbYIBe1XEQYQxOPyhcXNMJ0WCABqqj6ckydd6pWRZTHV4GuCPKdBAUiMc60tsKVw==", + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/unicode-match-property-value-ecmascript/-/unicode-match-property-value-ecmascript-2.1.0.tgz", + "integrity": "sha512-qxkjQt6qjg/mYscYMC0XKRn3Rh0wFPlfxB0xkt9CfyTvpX1Ra0+rAmdX2QyAobptSEvuy4RtpPRui6XkV+8wjA==", "dev": true, "engines": { "node": ">=4" } }, "node_modules/unicode-property-aliases-ecmascript": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/unicode-property-aliases-ecmascript/-/unicode-property-aliases-ecmascript-2.0.0.tgz", - "integrity": "sha512-5Zfuy9q/DFr4tfO7ZPeVXb1aPoeQSdeFMLpYuFebehDAhbuevLs5yxSZmIFN1tP5F9Wl4IpJrYojg85/zgyZHQ==", + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/unicode-property-aliases-ecmascript/-/unicode-property-aliases-ecmascript-2.1.0.tgz", + "integrity": "sha512-6t3foTQI9qne+OZoVQB/8x8rk2k1eVy1gRXhV3oFQ5T6R1dqQ1xtin3XqSlx3+ATBkliTaR/hHyJBm+LVPNM8w==", "dev": true, "engines": { "node": ">=4" @@ -6591,9 +6726,9 @@ } }, "node_modules/update-browserslist-db": { - "version": "1.0.10", - "resolved": "https://registry.npmjs.org/update-browserslist-db/-/update-browserslist-db-1.0.10.tgz", - "integrity": "sha512-OztqDenkfFkbSG+tRxBeAnCVPckDBcvibKd35yDONx6OU8N7sqgwc7rCbkJ/WcYtVRZ4ba68d6byhC21GFh7sQ==", + "version": "1.0.13", + "resolved": "https://registry.npmjs.org/update-browserslist-db/-/update-browserslist-db-1.0.13.tgz", + "integrity": "sha512-xebP81SNcPuNpPP3uzeW1NYXxI3rxyJzF3pD6sH4jE7o/IX+WtSpwnVU+qIsDPyk0d3hmFQ7mjqc6AtV604hbg==", "dev": true, "funding": [ { @@ -6603,6 +6738,10 @@ { "type": "tidelift", "url": "https://tidelift.com/funding/github/npm/browserslist" + }, + { + "type": "github", + "url": "https://github.com/sponsors/ai" } ], "dependencies": { @@ -6610,7 +6749,7 @@ "picocolors": "^1.0.0" }, "bin": { - "browserslist-lint": "cli.js" + "update-browserslist-db": "cli.js" }, "peerDependencies": { "browserslist": ">= 4.21.0" @@ -6670,9 +6809,9 @@ } }, "node_modules/validator": { - "version": "13.7.0", - "resolved": "https://registry.npmjs.org/validator/-/validator-13.7.0.tgz", - "integrity": "sha512-nYXQLCBkpJ8X6ltALua9dRrZDHVYxjJ1wgskNt1lH9fzGjs3tgojGSCBjmEPwkWS1y29+DrizMTW19Pr9uB2nw==", + "version": "13.11.0", + "resolved": "https://registry.npmjs.org/validator/-/validator-13.11.0.tgz", + "integrity": "sha512-Ii+sehpSfZy+At5nPdnyMhx78fEoPDkR2XW/zimHEL3MyGJQOCQ7WeP20jPYRz7ZCpcKLB21NxuXHF3bxjStBQ==", "dev": true, "engines": { "node": ">= 0.10" @@ -6710,22 +6849,22 @@ } }, "node_modules/webpack": { - "version": "5.74.0", - "resolved": "https://registry.npmjs.org/webpack/-/webpack-5.74.0.tgz", - "integrity": "sha512-A2InDwnhhGN4LYctJj6M1JEaGL7Luj6LOmyBHjcI8529cm5p6VXiTIW2sn6ffvEAKmveLzvu4jrihwXtPojlAA==", + "version": "5.89.0", + "resolved": "https://registry.npmjs.org/webpack/-/webpack-5.89.0.tgz", + "integrity": "sha512-qyfIC10pOr70V+jkmud8tMfajraGCZMBWJtrmuBymQKCrLTRejBI8STDp1MCyZu/QTdZSeacCQYpYNQVOzX5kw==", "dev": true, "dependencies": { "@types/eslint-scope": "^3.7.3", - "@types/estree": "^0.0.51", - "@webassemblyjs/ast": "1.11.1", - "@webassemblyjs/wasm-edit": "1.11.1", - "@webassemblyjs/wasm-parser": "1.11.1", + "@types/estree": "^1.0.0", + "@webassemblyjs/ast": "^1.11.5", + "@webassemblyjs/wasm-edit": "^1.11.5", + "@webassemblyjs/wasm-parser": "^1.11.5", "acorn": "^8.7.1", - "acorn-import-assertions": "^1.7.6", + "acorn-import-assertions": "^1.9.0", "browserslist": "^4.14.5", "chrome-trace-event": "^1.0.2", - "enhanced-resolve": "^5.10.0", - "es-module-lexer": "^0.9.0", + "enhanced-resolve": "^5.15.0", + "es-module-lexer": "^1.2.1", "eslint-scope": "5.1.1", "events": "^3.2.0", "glob-to-regexp": "^0.4.1", @@ -6734,9 +6873,9 @@ "loader-runner": "^4.2.0", "mime-types": "^2.1.27", "neo-async": "^2.6.2", - "schema-utils": "^3.1.0", + "schema-utils": "^3.2.0", "tapable": "^2.1.1", - "terser-webpack-plugin": "^5.1.3", + "terser-webpack-plugin": "^5.3.7", "watchpack": "^2.4.0", "webpack-sources": "^3.2.3" }, @@ -6757,44 +6896,42 @@ } }, "node_modules/webpack-cli": { - "version": "4.10.0", - "resolved": "https://registry.npmjs.org/webpack-cli/-/webpack-cli-4.10.0.tgz", - "integrity": "sha512-NLhDfH/h4O6UOy+0LSso42xvYypClINuMNBVVzX4vX98TmTaTUxwRbXdhucbFMd2qLaCTcLq/PdYrvi8onw90w==", + "version": "5.1.4", + "resolved": "https://registry.npmjs.org/webpack-cli/-/webpack-cli-5.1.4.tgz", + "integrity": "sha512-pIDJHIEI9LR0yxHXQ+Qh95k2EvXpWzZ5l+d+jIo+RdSm9MiHfzazIxwwni/p7+x4eJZuvG1AJwgC4TNQ7NRgsg==", "dev": true, "dependencies": { "@discoveryjs/json-ext": "^0.5.0", - "@webpack-cli/configtest": "^1.2.0", - "@webpack-cli/info": "^1.5.0", - "@webpack-cli/serve": "^1.7.0", + "@webpack-cli/configtest": "^2.1.1", + "@webpack-cli/info": "^2.0.2", + "@webpack-cli/serve": "^2.0.5", "colorette": "^2.0.14", - "commander": "^7.0.0", + "commander": "^10.0.1", "cross-spawn": "^7.0.3", + "envinfo": "^7.7.3", "fastest-levenshtein": "^1.0.12", "import-local": "^3.0.2", - "interpret": "^2.2.0", - "rechoir": "^0.7.0", + "interpret": "^3.1.1", + "rechoir": "^0.8.0", "webpack-merge": "^5.7.3" }, "bin": { "webpack-cli": "bin/cli.js" }, "engines": { - "node": ">=10.13.0" + "node": ">=14.15.0" }, "funding": { "type": "opencollective", "url": "https://opencollective.com/webpack" }, "peerDependencies": { - "webpack": "4.x.x || 5.x.x" + "webpack": "5.x.x" }, "peerDependenciesMeta": { "@webpack-cli/generators": { "optional": true }, - "@webpack-cli/migrate": { - "optional": true - }, "webpack-bundle-analyzer": { "optional": true }, @@ -6804,12 +6941,12 @@ } }, "node_modules/webpack-cli/node_modules/commander": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/commander/-/commander-7.2.0.tgz", - "integrity": "sha512-QrWXB+ZQSVPmIWIhtEO9H+gwHaMGYiF5ChvoJ+K9ZGHG/sVsa6yiesAD1GC/x46sET00Xlwo1u49RVVVzvcSkw==", + "version": "10.0.1", + "resolved": "https://registry.npmjs.org/commander/-/commander-10.0.1.tgz", + "integrity": "sha512-y4Mg2tXshplEbSGzx7amzPwKKOCGuoSRP/CjEdwwk0FOGlUbq6lKuoyDZTNZkmxHdJtp54hdfY/JUrdL7Xfdug==", "dev": true, "engines": { - "node": ">= 10" + "node": ">=14" } }, "node_modules/webpack-dev-middleware": { @@ -6835,63 +6972,10 @@ "webpack": "^4.0.0 || ^5.0.0" } }, - "node_modules/webpack-dev-middleware/node_modules/ajv": { - "version": "8.11.0", - "resolved": "https://registry.npmjs.org/ajv/-/ajv-8.11.0.tgz", - "integrity": "sha512-wGgprdCvMalC0BztXvitD2hC04YffAvtsUn93JbGXYLAtCUO4xd17mCCZQxUOItiBwZvJScWo8NIvQMQ71rdpg==", - "dev": true, - "dependencies": { - "fast-deep-equal": "^3.1.1", - "json-schema-traverse": "^1.0.0", - "require-from-string": "^2.0.2", - "uri-js": "^4.2.2" - }, - "funding": { - "type": "github", - "url": "https://github.com/sponsors/epoberezkin" - } - }, - "node_modules/webpack-dev-middleware/node_modules/ajv-keywords": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/ajv-keywords/-/ajv-keywords-5.1.0.tgz", - "integrity": "sha512-YCS/JNFAUyr5vAuhk1DWm1CBxRHW9LbJ2ozWeemrIqpbsqKjHVxYPyi5GC0rjZIT5JxJ3virVTS8wk4i/Z+krw==", - "dev": true, - "dependencies": { - "fast-deep-equal": "^3.1.3" - }, - "peerDependencies": { - "ajv": "^8.8.2" - } - }, - "node_modules/webpack-dev-middleware/node_modules/json-schema-traverse": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-1.0.0.tgz", - "integrity": "sha512-NM8/P9n3XjXhIZn1lLhkFaACTOURQXjWhV4BA/RnOv8xvgqtqpAX9IO4mRQxSx1Rlo4tqzeqb0sOlruaOy3dug==", - "dev": true - }, - "node_modules/webpack-dev-middleware/node_modules/schema-utils": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-4.0.0.tgz", - "integrity": "sha512-1edyXKgh6XnJsJSQ8mKWXnN/BVaIbFMLpouRUrXgVq7WYne5kw3MW7UPhO44uRXQSIpTSXoJbmrR2X0w9kUTyg==", - "dev": true, - "dependencies": { - "@types/json-schema": "^7.0.9", - "ajv": "^8.8.0", - "ajv-formats": "^2.1.1", - "ajv-keywords": "^5.0.0" - }, - "engines": { - "node": ">= 12.13.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/webpack" - } - }, "node_modules/webpack-dev-server": { - "version": "4.11.1", - "resolved": "https://registry.npmjs.org/webpack-dev-server/-/webpack-dev-server-4.11.1.tgz", - "integrity": "sha512-lILVz9tAUy1zGFwieuaQtYiadImb5M3d+H+L1zDYalYoDl0cksAB1UNyuE5MMWJrG6zR1tXkCP2fitl7yoUJiw==", + "version": "4.15.1", + "resolved": "https://registry.npmjs.org/webpack-dev-server/-/webpack-dev-server-4.15.1.tgz", + "integrity": "sha512-5hbAst3h3C3L8w6W4P96L5vaV0PxSmJhxZvWKYIdgxOQm8pNZ5dEOmmSLBVpP85ReeyRt6AS1QJNyo/oFFPeVA==", "dev": true, "dependencies": { "@types/bonjour": "^3.5.9", @@ -6900,7 +6984,7 @@ "@types/serve-index": "^1.9.1", "@types/serve-static": "^1.13.10", "@types/sockjs": "^0.3.33", - "@types/ws": "^8.5.1", + "@types/ws": "^8.5.5", "ansi-html-community": "^0.0.8", "bonjour-service": "^1.0.11", "chokidar": "^3.5.3", @@ -6913,6 +6997,7 @@ "html-entities": "^2.3.2", "http-proxy-middleware": "^2.0.3", "ipaddr.js": "^2.0.1", + "launch-editor": "^2.6.0", "open": "^8.0.9", "p-retry": "^4.5.0", "rimraf": "^3.0.2", @@ -6922,7 +7007,7 @@ "sockjs": "^0.3.24", "spdy": "^4.0.2", "webpack-dev-middleware": "^5.3.1", - "ws": "^8.4.2" + "ws": "^8.13.0" }, "bin": { "webpack-dev-server": "bin/webpack-dev-server.js" @@ -6937,76 +7022,26 @@ "peerDependencies": { "webpack": "^4.37.0 || ^5.0.0" }, - "peerDependenciesMeta": { - "webpack-cli": { - "optional": true - } - } - }, - "node_modules/webpack-dev-server/node_modules/ajv": { - "version": "8.11.0", - "resolved": "https://registry.npmjs.org/ajv/-/ajv-8.11.0.tgz", - "integrity": "sha512-wGgprdCvMalC0BztXvitD2hC04YffAvtsUn93JbGXYLAtCUO4xd17mCCZQxUOItiBwZvJScWo8NIvQMQ71rdpg==", - "dev": true, - "dependencies": { - "fast-deep-equal": "^3.1.1", - "json-schema-traverse": "^1.0.0", - "require-from-string": "^2.0.2", - "uri-js": "^4.2.2" - }, - "funding": { - "type": "github", - "url": "https://github.com/sponsors/epoberezkin" - } - }, - "node_modules/webpack-dev-server/node_modules/ajv-keywords": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/ajv-keywords/-/ajv-keywords-5.1.0.tgz", - "integrity": "sha512-YCS/JNFAUyr5vAuhk1DWm1CBxRHW9LbJ2ozWeemrIqpbsqKjHVxYPyi5GC0rjZIT5JxJ3virVTS8wk4i/Z+krw==", - "dev": true, - "dependencies": { - "fast-deep-equal": "^3.1.3" - }, - "peerDependencies": { - "ajv": "^8.8.2" - } - }, - "node_modules/webpack-dev-server/node_modules/json-schema-traverse": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-1.0.0.tgz", - "integrity": "sha512-NM8/P9n3XjXhIZn1lLhkFaACTOURQXjWhV4BA/RnOv8xvgqtqpAX9IO4mRQxSx1Rlo4tqzeqb0sOlruaOy3dug==", - "dev": true - }, - "node_modules/webpack-dev-server/node_modules/schema-utils": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-4.0.0.tgz", - "integrity": "sha512-1edyXKgh6XnJsJSQ8mKWXnN/BVaIbFMLpouRUrXgVq7WYne5kw3MW7UPhO44uRXQSIpTSXoJbmrR2X0w9kUTyg==", - "dev": true, - "dependencies": { - "@types/json-schema": "^7.0.9", - "ajv": "^8.8.0", - "ajv-formats": "^2.1.1", - "ajv-keywords": "^5.0.0" - }, - "engines": { - "node": ">= 12.13.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/webpack" + "peerDependenciesMeta": { + "webpack": { + "optional": true + }, + "webpack-cli": { + "optional": true + } } }, "node_modules/webpack-dev-server/node_modules/ws": { - "version": "8.8.1", - "resolved": "https://registry.npmjs.org/ws/-/ws-8.8.1.tgz", - "integrity": "sha512-bGy2JzvzkPowEJV++hF07hAD6niYSr0JzBNo/J29WsB57A2r7Wlc1UFcTR9IzrPvuNVO4B8LGqF8qcpsVOhJCA==", + "version": "8.14.2", + "resolved": "https://registry.npmjs.org/ws/-/ws-8.14.2.tgz", + "integrity": "sha512-wEBG1ftX4jcglPxgFCMJmZ2PLtSbJ2Peg6TmpJFTbe9GZYOQCDPdMYu/Tm0/bGZkw8paZnJY45J4K2PZrLYq8g==", "dev": true, "engines": { "node": ">=10.0.0" }, "peerDependencies": { "bufferutil": "^4.0.1", - "utf-8-validate": "^5.0.2" + "utf-8-validate": ">=5.0.2" }, "peerDependenciesMeta": { "bufferutil": { @@ -7081,16 +7116,29 @@ "node": ">=10.13.0" } }, - "node_modules/webpack/node_modules/acorn": { - "version": "8.8.0", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.8.0.tgz", - "integrity": "sha512-QOxyigPVrpZ2GXT+PFyZTl6TtOFc5egxHIP9IlQ+RbupQuX4RkT/Bee4/kQuC02Xkzg84JcT7oLYtDIQxp+v7w==", + "node_modules/webpack/node_modules/ajv": { + "version": "6.12.6", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz", + "integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==", "dev": true, - "bin": { - "acorn": "bin/acorn" + "dependencies": { + "fast-deep-equal": "^3.1.1", + "fast-json-stable-stringify": "^2.0.0", + "json-schema-traverse": "^0.4.1", + "uri-js": "^4.2.2" }, - "engines": { - "node": ">=0.4.0" + "funding": { + "type": "github", + "url": "https://github.com/sponsors/epoberezkin" + } + }, + "node_modules/webpack/node_modules/ajv-keywords": { + "version": "3.5.2", + "resolved": "https://registry.npmjs.org/ajv-keywords/-/ajv-keywords-3.5.2.tgz", + "integrity": "sha512-5p6WTN0DdTGVQk6VjcEju19IgaHudalcfabD7yhDGeA6bcQnmL+CpveLJq/3hvfwd1aof6L386Ougkx6RfyMIQ==", + "dev": true, + "peerDependencies": { + "ajv": "^6.9.1" } }, "node_modules/webpack/node_modules/eslint-scope": { @@ -7115,10 +7163,16 @@ "node": ">=4.0" } }, + "node_modules/webpack/node_modules/json-schema-traverse": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", + "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==", + "dev": true + }, "node_modules/webpack/node_modules/schema-utils": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-3.1.1.tgz", - "integrity": "sha512-Y5PQxS4ITlC+EahLuXaY86TXfR7Dc5lw294alXOq86JAHCihAIZfqv8nNCWvaEJvaC51uN9hbLGeV0cFBdH+Fw==", + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-3.3.0.tgz", + "integrity": "sha512-pN/yOAvcC+5rQ5nERGuwrjLlYvLTbCibnZ1I7B1LaiAz9BRBlE9GMgE/eqV30P7aJQUf7Ddimy/RsbYO/GrVGg==", "dev": true, "dependencies": { "@types/json-schema": "^7.0.8", @@ -7214,9 +7268,9 @@ "dev": true }, "node_modules/word-wrap": { - "version": "1.2.3", - "resolved": "https://registry.npmjs.org/word-wrap/-/word-wrap-1.2.3.tgz", - "integrity": "sha512-Hz/mrNwitNRh/HUAtM/VT/5VH+ygD6DV7mYKZAtHOrbs8U7lvPS6xf7EJKMF0uW1KJCl0H701g3ZGus+muE5vQ==", + "version": "1.2.5", + "resolved": "https://registry.npmjs.org/word-wrap/-/word-wrap-1.2.5.tgz", + "integrity": "sha512-BN22B5eaMMI9UMtjrGd5g5eCYPpCPDUy0FJXbYsaT5zYxjFOckS53SQDE3pWkVoWpHXVb3BrYcEN4Twa55B5cA==", "dev": true, "engines": { "node": ">=0.10.0" @@ -7229,9 +7283,9 @@ "dev": true }, "node_modules/ws": { - "version": "8.2.3", - "resolved": "https://registry.npmjs.org/ws/-/ws-8.2.3.tgz", - "integrity": "sha512-wBuoj1BDpC6ZQ1B7DWQBYVLphPWkm8i9Y0/3YdHjHKHiohOJ1ws+3OccDWtH+PoC9DZD5WOTrJvNbWvjS6JWaA==", + "version": "8.11.0", + "resolved": "https://registry.npmjs.org/ws/-/ws-8.11.0.tgz", + "integrity": "sha512-HPG3wQd9sNQoT9xHyNCXoDUa+Xw/VevmY9FoHyQ+g+rrMn4j6FB4np7Z0OhdTgjx6MgQLK7jwSy1YecU1+4Asg==", "dev": true, "engines": { "node": ">=10.0.0" @@ -7257,6 +7311,24 @@ "engines": { "node": ">=0.4.0" } + }, + "node_modules/yallist": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-3.1.1.tgz", + "integrity": "sha512-a4UGQaWPH59mOXUYnAG2ewncQS4i4F43Tv3JoAM+s2VDAmS9NsK8GpDMLrCHPksFT7h3K6TOoUNn2pb7RoXx4g==", + "dev": true + }, + "node_modules/yocto-queue": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/yocto-queue/-/yocto-queue-1.0.0.tgz", + "integrity": "sha512-9bnSc/HEW2uRy67wc+T8UwauLuPJVn28jb+GtJY16iiKWyvmYJRXVT4UamsAEGQfPohgr2q4Tq0sQbQlxTfi1g==", + "dev": true, + "engines": { + "node": ">=12.20" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } } }, "dependencies": { @@ -7271,58 +7343,60 @@ } }, "@babel/code-frame": { - "version": "7.18.6", - "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.18.6.tgz", - "integrity": "sha512-TDCmlK5eOvH+eH7cdAFlNXeVJqWIQ7gW9tY1GJIpUtFb6CmjVyq2VM3u71bOyR8CRihcCgMUYoDNyLXao3+70Q==", + "version": "7.22.13", + "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.22.13.tgz", + "integrity": "sha512-XktuhWlJ5g+3TJXc5upd9Ks1HutSArik6jf2eAjYFyIOf4ej3RN+184cZbzDvbPnuTJIUhPKKJE3cIsYTiAT3w==", "dev": true, "requires": { - "@babel/highlight": "^7.18.6" + "@babel/highlight": "^7.22.13", + "chalk": "^2.4.2" } }, "@babel/compat-data": { - "version": "7.20.1", - "resolved": "https://registry.npmjs.org/@babel/compat-data/-/compat-data-7.20.1.tgz", - "integrity": "sha512-EWZ4mE2diW3QALKvDMiXnbZpRvlj+nayZ112nK93SnhqOtpdsbVD4W+2tEoT3YNBAG9RBR0ISY758ZkOgsn6pQ==", + "version": "7.23.2", + "resolved": "https://registry.npmjs.org/@babel/compat-data/-/compat-data-7.23.2.tgz", + "integrity": "sha512-0S9TQMmDHlqAZ2ITT95irXKfxN9bncq8ZCoJhun3nHL/lLUxd2NKBJYoNGWH7S0hz6fRQwWlAWn/ILM0C70KZQ==", "dev": true }, "@babel/core": { - "version": "7.20.2", - "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.20.2.tgz", - "integrity": "sha512-w7DbG8DtMrJcFOi4VrLm+8QM4az8Mo+PuLBKLp2zrYRCow8W/f9xiXm5sN53C8HksCyDQwCKha9JiDoIyPjT2g==", - "dev": true, - "requires": { - "@ampproject/remapping": "^2.1.0", - "@babel/code-frame": "^7.18.6", - "@babel/generator": "^7.20.2", - "@babel/helper-compilation-targets": "^7.20.0", - "@babel/helper-module-transforms": "^7.20.2", - "@babel/helpers": "^7.20.1", - "@babel/parser": "^7.20.2", - "@babel/template": "^7.18.10", - "@babel/traverse": "^7.20.1", - "@babel/types": "^7.20.2", - "convert-source-map": "^1.7.0", + "version": "7.23.2", + "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.23.2.tgz", + "integrity": "sha512-n7s51eWdaWZ3vGT2tD4T7J6eJs3QoBXydv7vkUM06Bf1cbVD2Kc2UrkzhiQwobfV7NwOnQXYL7UBJ5VPU+RGoQ==", + "dev": true, + "requires": { + "@ampproject/remapping": "^2.2.0", + "@babel/code-frame": "^7.22.13", + "@babel/generator": "^7.23.0", + "@babel/helper-compilation-targets": "^7.22.15", + "@babel/helper-module-transforms": "^7.23.0", + "@babel/helpers": "^7.23.2", + "@babel/parser": "^7.23.0", + "@babel/template": "^7.22.15", + "@babel/traverse": "^7.23.2", + "@babel/types": "^7.23.0", + "convert-source-map": "^2.0.0", "debug": "^4.1.0", "gensync": "^1.0.0-beta.2", - "json5": "^2.2.1", - "semver": "^6.3.0" + "json5": "^2.2.3", + "semver": "^6.3.1" } }, "@babel/generator": { - "version": "7.20.2", - "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.20.2.tgz", - "integrity": "sha512-SD75PMIK6i9H8G/tfGvB4KKl4Nw6Ssos9nGgYwxbgyTP0iX/Z55DveoH86rmUB/YHTQQ+ZC0F7xxaY8l2OF44Q==", + "version": "7.23.0", + "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.23.0.tgz", + "integrity": "sha512-lN85QRR+5IbYrMWM6Y4pE/noaQtg4pNiqeNGX60eqOfo6gtEj6uw/JagelB8vVztSd7R6M5n1+PQkDbHbBRU4g==", "dev": true, "requires": { - "@babel/types": "^7.20.2", + "@babel/types": "^7.23.0", "@jridgewell/gen-mapping": "^0.3.2", + "@jridgewell/trace-mapping": "^0.3.17", "jsesc": "^2.5.1" }, "dependencies": { "@jridgewell/gen-mapping": { - "version": "0.3.2", - "resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.3.2.tgz", - "integrity": "sha512-mh65xKQAzI6iBcFzwv28KVWSmCkdRBWoOh+bYQGW3+6OZvbbN3TqMGo5hqYxQniRcH9F2VZIoJCm4pa3BPDK/A==", + "version": "0.3.3", + "resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.3.3.tgz", + "integrity": "sha512-HLhSWOLRi875zjjMG/r+Nv0oCW8umGb0BgEhyX3dDX3egwZtB8PqLnjz3yedt8R5StBrzcg4aBpnh8UA9D1BoQ==", "dev": true, "requires": { "@jridgewell/set-array": "^1.0.1", @@ -7333,446 +7407,280 @@ } }, "@babel/helper-annotate-as-pure": { - "version": "7.18.6", - "resolved": "https://registry.npmjs.org/@babel/helper-annotate-as-pure/-/helper-annotate-as-pure-7.18.6.tgz", - "integrity": "sha512-duORpUiYrEpzKIop6iNbjnwKLAKnJ47csTyRACyEmWj0QdUrm5aqNJGHSSEQSUAvNW0ojX0dOmK9dZduvkfeXA==", + "version": "7.22.5", + "resolved": "https://registry.npmjs.org/@babel/helper-annotate-as-pure/-/helper-annotate-as-pure-7.22.5.tgz", + "integrity": "sha512-LvBTxu8bQSQkcyKOU+a1btnNFQ1dMAd0R6PyW3arXes06F6QLWLIrd681bxRPIXlrMGR3XYnW9JyML7dP3qgxg==", "dev": true, "requires": { - "@babel/types": "^7.18.6" + "@babel/types": "^7.22.5" } }, "@babel/helper-builder-binary-assignment-operator-visitor": { - "version": "7.18.9", - "resolved": "https://registry.npmjs.org/@babel/helper-builder-binary-assignment-operator-visitor/-/helper-builder-binary-assignment-operator-visitor-7.18.9.tgz", - "integrity": "sha512-yFQ0YCHoIqarl8BCRwBL8ulYUaZpz3bNsA7oFepAzee+8/+ImtADXNOmO5vJvsPff3qi+hvpkY/NYBTrBQgdNw==", + "version": "7.22.15", + "resolved": "https://registry.npmjs.org/@babel/helper-builder-binary-assignment-operator-visitor/-/helper-builder-binary-assignment-operator-visitor-7.22.15.tgz", + "integrity": "sha512-QkBXwGgaoC2GtGZRoma6kv7Szfv06khvhFav67ZExau2RaXzy8MpHSMO2PNoP2XtmQphJQRHFfg77Bq731Yizw==", "dev": true, "requires": { - "@babel/helper-explode-assignable-expression": "^7.18.6", - "@babel/types": "^7.18.9" + "@babel/types": "^7.22.15" } }, "@babel/helper-compilation-targets": { - "version": "7.20.0", - "resolved": "https://registry.npmjs.org/@babel/helper-compilation-targets/-/helper-compilation-targets-7.20.0.tgz", - "integrity": "sha512-0jp//vDGp9e8hZzBc6N/KwA5ZK3Wsm/pfm4CrY7vzegkVxc65SgSn6wYOnwHe9Js9HRQ1YTCKLGPzDtaS3RoLQ==", + "version": "7.22.15", + "resolved": "https://registry.npmjs.org/@babel/helper-compilation-targets/-/helper-compilation-targets-7.22.15.tgz", + "integrity": "sha512-y6EEzULok0Qvz8yyLkCvVX+02ic+By2UdOhylwUOvOn9dvYc9mKICJuuU1n1XBI02YWsNsnrY1kc6DVbjcXbtw==", "dev": true, "requires": { - "@babel/compat-data": "^7.20.0", - "@babel/helper-validator-option": "^7.18.6", - "browserslist": "^4.21.3", - "semver": "^6.3.0" + "@babel/compat-data": "^7.22.9", + "@babel/helper-validator-option": "^7.22.15", + "browserslist": "^4.21.9", + "lru-cache": "^5.1.1", + "semver": "^6.3.1" } }, "@babel/helper-create-class-features-plugin": { - "version": "7.18.13", - "resolved": "https://registry.npmjs.org/@babel/helper-create-class-features-plugin/-/helper-create-class-features-plugin-7.18.13.tgz", - "integrity": "sha512-hDvXp+QYxSRL+23mpAlSGxHMDyIGChm0/AwTfTAAK5Ufe40nCsyNdaYCGuK91phn/fVu9kqayImRDkvNAgdrsA==", + "version": "7.22.15", + "resolved": "https://registry.npmjs.org/@babel/helper-create-class-features-plugin/-/helper-create-class-features-plugin-7.22.15.tgz", + "integrity": "sha512-jKkwA59IXcvSaiK2UN45kKwSC9o+KuoXsBDvHvU/7BecYIp8GQ2UwrVvFgJASUT+hBnwJx6MhvMCuMzwZZ7jlg==", "dev": true, "requires": { - "@babel/helper-annotate-as-pure": "^7.18.6", - "@babel/helper-environment-visitor": "^7.18.9", - "@babel/helper-function-name": "^7.18.9", - "@babel/helper-member-expression-to-functions": "^7.18.9", - "@babel/helper-optimise-call-expression": "^7.18.6", - "@babel/helper-replace-supers": "^7.18.9", - "@babel/helper-split-export-declaration": "^7.18.6" + "@babel/helper-annotate-as-pure": "^7.22.5", + "@babel/helper-environment-visitor": "^7.22.5", + "@babel/helper-function-name": "^7.22.5", + "@babel/helper-member-expression-to-functions": "^7.22.15", + "@babel/helper-optimise-call-expression": "^7.22.5", + "@babel/helper-replace-supers": "^7.22.9", + "@babel/helper-skip-transparent-expression-wrappers": "^7.22.5", + "@babel/helper-split-export-declaration": "^7.22.6", + "semver": "^6.3.1" } }, "@babel/helper-create-regexp-features-plugin": { - "version": "7.19.0", - "resolved": "https://registry.npmjs.org/@babel/helper-create-regexp-features-plugin/-/helper-create-regexp-features-plugin-7.19.0.tgz", - "integrity": "sha512-htnV+mHX32DF81amCDrwIDr8nrp1PTm+3wfBN9/v8QJOLEioOCOG7qNyq0nHeFiWbT3Eb7gsPwEmV64UCQ1jzw==", + "version": "7.22.15", + "resolved": "https://registry.npmjs.org/@babel/helper-create-regexp-features-plugin/-/helper-create-regexp-features-plugin-7.22.15.tgz", + "integrity": "sha512-29FkPLFjn4TPEa3RE7GpW+qbE8tlsu3jntNYNfcGsc49LphF1PQIiD+vMZ1z1xVOKt+93khA9tc2JBs3kBjA7w==", "dev": true, "requires": { - "@babel/helper-annotate-as-pure": "^7.18.6", - "regexpu-core": "^5.1.0" + "@babel/helper-annotate-as-pure": "^7.22.5", + "regexpu-core": "^5.3.1", + "semver": "^6.3.1" } }, "@babel/helper-define-polyfill-provider": { - "version": "0.3.3", - "resolved": "https://registry.npmjs.org/@babel/helper-define-polyfill-provider/-/helper-define-polyfill-provider-0.3.3.tgz", - "integrity": "sha512-z5aQKU4IzbqCC1XH0nAqfsFLMVSo22SBKUc0BxGrLkolTdPTructy0ToNnlO2zA4j9Q/7pjMZf0DSY+DSTYzww==", + "version": "0.4.3", + "resolved": "https://registry.npmjs.org/@babel/helper-define-polyfill-provider/-/helper-define-polyfill-provider-0.4.3.tgz", + "integrity": "sha512-WBrLmuPP47n7PNwsZ57pqam6G/RGo1vw/87b0Blc53tZNGZ4x7YvZ6HgQe2vo1W/FR20OgjeZuGXzudPiXHFug==", "dev": true, "requires": { - "@babel/helper-compilation-targets": "^7.17.7", - "@babel/helper-plugin-utils": "^7.16.7", + "@babel/helper-compilation-targets": "^7.22.6", + "@babel/helper-plugin-utils": "^7.22.5", "debug": "^4.1.1", "lodash.debounce": "^4.0.8", - "resolve": "^1.14.2", - "semver": "^6.1.2" + "resolve": "^1.14.2" } }, "@babel/helper-environment-visitor": { - "version": "7.18.9", - "resolved": "https://registry.npmjs.org/@babel/helper-environment-visitor/-/helper-environment-visitor-7.18.9.tgz", - "integrity": "sha512-3r/aACDJ3fhQ/EVgFy0hpj8oHyHpQc+LPtJoY9SzTThAsStm4Ptegq92vqKoE3vD706ZVFWITnMnxucw+S9Ipg==", + "version": "7.22.20", + "resolved": "https://registry.npmjs.org/@babel/helper-environment-visitor/-/helper-environment-visitor-7.22.20.tgz", + "integrity": "sha512-zfedSIzFhat/gFhWfHtgWvlec0nqB9YEIVrpuwjruLlXfUSnA8cJB0miHKwqDnQ7d32aKo2xt88/xZptwxbfhA==", "dev": true }, - "@babel/helper-explode-assignable-expression": { - "version": "7.18.6", - "resolved": "https://registry.npmjs.org/@babel/helper-explode-assignable-expression/-/helper-explode-assignable-expression-7.18.6.tgz", - "integrity": "sha512-eyAYAsQmB80jNfg4baAtLeWAQHfHFiR483rzFK+BhETlGZaQC9bsfrugfXDCbRHLQbIA7U5NxhhOxN7p/dWIcg==", - "dev": true, - "requires": { - "@babel/types": "^7.18.6" - } - }, "@babel/helper-function-name": { - "version": "7.19.0", - "resolved": "https://registry.npmjs.org/@babel/helper-function-name/-/helper-function-name-7.19.0.tgz", - "integrity": "sha512-WAwHBINyrpqywkUH0nTnNgI5ina5TFn85HKS0pbPDfxFfhyR/aNQEn4hGi1P1JyT//I0t4OgXUlofzWILRvS5w==", + "version": "7.23.0", + "resolved": "https://registry.npmjs.org/@babel/helper-function-name/-/helper-function-name-7.23.0.tgz", + "integrity": "sha512-OErEqsrxjZTJciZ4Oo+eoZqeW9UIiOcuYKRJA4ZAgV9myA+pOXhhmpfNCKjEH/auVfEYVFJ6y1Tc4r0eIApqiw==", "dev": true, "requires": { - "@babel/template": "^7.18.10", - "@babel/types": "^7.19.0" + "@babel/template": "^7.22.15", + "@babel/types": "^7.23.0" } }, "@babel/helper-hoist-variables": { - "version": "7.18.6", - "resolved": "https://registry.npmjs.org/@babel/helper-hoist-variables/-/helper-hoist-variables-7.18.6.tgz", - "integrity": "sha512-UlJQPkFqFULIcyW5sbzgbkxn2FKRgwWiRexcuaR8RNJRy8+LLveqPjwZV/bwrLZCN0eUHD/x8D0heK1ozuoo6Q==", + "version": "7.22.5", + "resolved": "https://registry.npmjs.org/@babel/helper-hoist-variables/-/helper-hoist-variables-7.22.5.tgz", + "integrity": "sha512-wGjk9QZVzvknA6yKIUURb8zY3grXCcOZt+/7Wcy8O2uctxhplmUPkOdlgoNhmdVee2c92JXbf1xpMtVNbfoxRw==", "dev": true, "requires": { - "@babel/types": "^7.18.6" + "@babel/types": "^7.22.5" } }, "@babel/helper-member-expression-to-functions": { - "version": "7.18.9", - "resolved": "https://registry.npmjs.org/@babel/helper-member-expression-to-functions/-/helper-member-expression-to-functions-7.18.9.tgz", - "integrity": "sha512-RxifAh2ZoVU67PyKIO4AMi1wTenGfMR/O/ae0CCRqwgBAt5v7xjdtRw7UoSbsreKrQn5t7r89eruK/9JjYHuDg==", + "version": "7.23.0", + "resolved": "https://registry.npmjs.org/@babel/helper-member-expression-to-functions/-/helper-member-expression-to-functions-7.23.0.tgz", + "integrity": "sha512-6gfrPwh7OuT6gZyJZvd6WbTfrqAo7vm4xCzAXOusKqq/vWdKXphTpj5klHKNmRUU6/QRGlBsyU9mAIPaWHlqJA==", "dev": true, "requires": { - "@babel/types": "^7.18.9" + "@babel/types": "^7.23.0" } }, "@babel/helper-module-imports": { - "version": "7.18.6", - "resolved": "https://registry.npmjs.org/@babel/helper-module-imports/-/helper-module-imports-7.18.6.tgz", - "integrity": "sha512-0NFvs3VkuSYbFi1x2Vd6tKrywq+z/cLeYC/RJNFrIX/30Bf5aiGYbtvGXolEktzJH8o5E5KJ3tT+nkxuuZFVlA==", + "version": "7.22.15", + "resolved": "https://registry.npmjs.org/@babel/helper-module-imports/-/helper-module-imports-7.22.15.tgz", + "integrity": "sha512-0pYVBnDKZO2fnSPCrgM/6WMc7eS20Fbok+0r88fp+YtWVLZrp4CkafFGIp+W0VKw4a22sgebPT99y+FDNMdP4w==", "dev": true, "requires": { - "@babel/types": "^7.18.6" + "@babel/types": "^7.22.15" } }, "@babel/helper-module-transforms": { - "version": "7.20.2", - "resolved": "https://registry.npmjs.org/@babel/helper-module-transforms/-/helper-module-transforms-7.20.2.tgz", - "integrity": "sha512-zvBKyJXRbmK07XhMuujYoJ48B5yvvmM6+wcpv6Ivj4Yg6qO7NOZOSnvZN9CRl1zz1Z4cKf8YejmCMh8clOoOeA==", + "version": "7.23.0", + "resolved": "https://registry.npmjs.org/@babel/helper-module-transforms/-/helper-module-transforms-7.23.0.tgz", + "integrity": "sha512-WhDWw1tdrlT0gMgUJSlX0IQvoO1eN279zrAUbVB+KpV2c3Tylz8+GnKOLllCS6Z/iZQEyVYxhZVUdPTqs2YYPw==", "dev": true, "requires": { - "@babel/helper-environment-visitor": "^7.18.9", - "@babel/helper-module-imports": "^7.18.6", - "@babel/helper-simple-access": "^7.20.2", - "@babel/helper-split-export-declaration": "^7.18.6", - "@babel/helper-validator-identifier": "^7.19.1", - "@babel/template": "^7.18.10", - "@babel/traverse": "^7.20.1", - "@babel/types": "^7.20.2" + "@babel/helper-environment-visitor": "^7.22.20", + "@babel/helper-module-imports": "^7.22.15", + "@babel/helper-simple-access": "^7.22.5", + "@babel/helper-split-export-declaration": "^7.22.6", + "@babel/helper-validator-identifier": "^7.22.20" } }, "@babel/helper-optimise-call-expression": { - "version": "7.18.6", - "resolved": "https://registry.npmjs.org/@babel/helper-optimise-call-expression/-/helper-optimise-call-expression-7.18.6.tgz", - "integrity": "sha512-HP59oD9/fEHQkdcbgFCnbmgH5vIQTJbxh2yf+CdM89/glUNnuzr87Q8GIjGEnOktTROemO0Pe0iPAYbqZuOUiA==", + "version": "7.22.5", + "resolved": "https://registry.npmjs.org/@babel/helper-optimise-call-expression/-/helper-optimise-call-expression-7.22.5.tgz", + "integrity": "sha512-HBwaojN0xFRx4yIvpwGqxiV2tUfl7401jlok564NgB9EHS1y6QT17FmKWm4ztqjeVdXLuC4fSvHc5ePpQjoTbw==", "dev": true, "requires": { - "@babel/types": "^7.18.6" + "@babel/types": "^7.22.5" } }, "@babel/helper-plugin-utils": { - "version": "7.20.2", - "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.20.2.tgz", - "integrity": "sha512-8RvlJG2mj4huQ4pZ+rU9lqKi9ZKiRmuvGuM2HlWmkmgOhbs6zEAw6IEiJ5cQqGbDzGZOhwuOQNtZMi/ENLjZoQ==", + "version": "7.22.5", + "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.22.5.tgz", + "integrity": "sha512-uLls06UVKgFG9QD4OeFYLEGteMIAa5kpTPcFL28yuCIIzsf6ZyKZMllKVOCZFhiZ5ptnwX4mtKdWCBE/uT4amg==", "dev": true }, "@babel/helper-remap-async-to-generator": { - "version": "7.18.9", - "resolved": "https://registry.npmjs.org/@babel/helper-remap-async-to-generator/-/helper-remap-async-to-generator-7.18.9.tgz", - "integrity": "sha512-dI7q50YKd8BAv3VEfgg7PS7yD3Rtbi2J1XMXaalXO0W0164hYLnh8zpjRS0mte9MfVp/tltvr/cfdXPvJr1opA==", + "version": "7.22.20", + "resolved": "https://registry.npmjs.org/@babel/helper-remap-async-to-generator/-/helper-remap-async-to-generator-7.22.20.tgz", + "integrity": "sha512-pBGyV4uBqOns+0UvhsTO8qgl8hO89PmiDYv+/COyp1aeMcmfrfruz+/nCMFiYyFF/Knn0yfrC85ZzNFjembFTw==", "dev": true, "requires": { - "@babel/helper-annotate-as-pure": "^7.18.6", - "@babel/helper-environment-visitor": "^7.18.9", - "@babel/helper-wrap-function": "^7.18.9", - "@babel/types": "^7.18.9" + "@babel/helper-annotate-as-pure": "^7.22.5", + "@babel/helper-environment-visitor": "^7.22.20", + "@babel/helper-wrap-function": "^7.22.20" } }, "@babel/helper-replace-supers": { - "version": "7.19.1", - "resolved": "https://registry.npmjs.org/@babel/helper-replace-supers/-/helper-replace-supers-7.19.1.tgz", - "integrity": "sha512-T7ahH7wV0Hfs46SFh5Jz3s0B6+o8g3c+7TMxu7xKfmHikg7EAZ3I2Qk9LFhjxXq8sL7UkP5JflezNwoZa8WvWw==", + "version": "7.22.20", + "resolved": "https://registry.npmjs.org/@babel/helper-replace-supers/-/helper-replace-supers-7.22.20.tgz", + "integrity": "sha512-qsW0In3dbwQUbK8kejJ4R7IHVGwHJlV6lpG6UA7a9hSa2YEiAib+N1T2kr6PEeUT+Fl7najmSOS6SmAwCHK6Tw==", "dev": true, "requires": { - "@babel/helper-environment-visitor": "^7.18.9", - "@babel/helper-member-expression-to-functions": "^7.18.9", - "@babel/helper-optimise-call-expression": "^7.18.6", - "@babel/traverse": "^7.19.1", - "@babel/types": "^7.19.0" + "@babel/helper-environment-visitor": "^7.22.20", + "@babel/helper-member-expression-to-functions": "^7.22.15", + "@babel/helper-optimise-call-expression": "^7.22.5" } }, "@babel/helper-simple-access": { - "version": "7.20.2", - "resolved": "https://registry.npmjs.org/@babel/helper-simple-access/-/helper-simple-access-7.20.2.tgz", - "integrity": "sha512-+0woI/WPq59IrqDYbVGfshjT5Dmk/nnbdpcF8SnMhhXObpTq2KNBdLFRFrkVdbDOyUmHBCxzm5FHV1rACIkIbA==", + "version": "7.22.5", + "resolved": "https://registry.npmjs.org/@babel/helper-simple-access/-/helper-simple-access-7.22.5.tgz", + "integrity": "sha512-n0H99E/K+Bika3++WNL17POvo4rKWZ7lZEp1Q+fStVbUi8nxPQEBOlTmCOxW/0JsS56SKKQ+ojAe2pHKJHN35w==", "dev": true, "requires": { - "@babel/types": "^7.20.2" + "@babel/types": "^7.22.5" } }, "@babel/helper-skip-transparent-expression-wrappers": { - "version": "7.18.9", - "resolved": "https://registry.npmjs.org/@babel/helper-skip-transparent-expression-wrappers/-/helper-skip-transparent-expression-wrappers-7.18.9.tgz", - "integrity": "sha512-imytd2gHi3cJPsybLRbmFrF7u5BIEuI2cNheyKi3/iOBC63kNn3q8Crn2xVuESli0aM4KYsyEqKyS7lFL8YVtw==", + "version": "7.22.5", + "resolved": "https://registry.npmjs.org/@babel/helper-skip-transparent-expression-wrappers/-/helper-skip-transparent-expression-wrappers-7.22.5.tgz", + "integrity": "sha512-tK14r66JZKiC43p8Ki33yLBVJKlQDFoA8GYN67lWCDCqoL6EMMSuM9b+Iff2jHaM/RRFYl7K+iiru7hbRqNx8Q==", "dev": true, "requires": { - "@babel/types": "^7.18.9" + "@babel/types": "^7.22.5" } }, "@babel/helper-split-export-declaration": { - "version": "7.18.6", - "resolved": "https://registry.npmjs.org/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.18.6.tgz", - "integrity": "sha512-bde1etTx6ZyTmobl9LLMMQsaizFVZrquTEHOqKeQESMKo4PlObf+8+JA25ZsIpZhT/WEd39+vOdLXAFG/nELpA==", + "version": "7.22.6", + "resolved": "https://registry.npmjs.org/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.22.6.tgz", + "integrity": "sha512-AsUnxuLhRYsisFiaJwvp1QF+I3KjD5FOxut14q/GzovUe6orHLesW2C7d754kRm53h5gqrz6sFl6sxc4BVtE/g==", "dev": true, "requires": { - "@babel/types": "^7.18.6" + "@babel/types": "^7.22.5" } }, "@babel/helper-string-parser": { - "version": "7.19.4", - "resolved": "https://registry.npmjs.org/@babel/helper-string-parser/-/helper-string-parser-7.19.4.tgz", - "integrity": "sha512-nHtDoQcuqFmwYNYPz3Rah5ph2p8PFeFCsZk9A/48dPc/rGocJ5J3hAAZ7pb76VWX3fZKu+uEr/FhH5jLx7umrw==", + "version": "7.22.5", + "resolved": "https://registry.npmjs.org/@babel/helper-string-parser/-/helper-string-parser-7.22.5.tgz", + "integrity": "sha512-mM4COjgZox8U+JcXQwPijIZLElkgEpO5rsERVDJTc2qfCDfERyob6k5WegS14SX18IIjv+XD+GrqNumY5JRCDw==", "dev": true }, "@babel/helper-validator-identifier": { - "version": "7.19.1", - "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.19.1.tgz", - "integrity": "sha512-awrNfaMtnHUr653GgGEs++LlAvW6w+DcPrOliSMXWCKo597CwL5Acf/wWdNkf/tfEQE3mjkeD1YOVZOUV/od1w==", + "version": "7.22.20", + "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.22.20.tgz", + "integrity": "sha512-Y4OZ+ytlatR8AI+8KZfKuL5urKp7qey08ha31L8b3BwewJAoJamTzyvxPR/5D+KkdJCGPq/+8TukHBlY10FX9A==", "dev": true }, "@babel/helper-validator-option": { - "version": "7.18.6", - "resolved": "https://registry.npmjs.org/@babel/helper-validator-option/-/helper-validator-option-7.18.6.tgz", - "integrity": "sha512-XO7gESt5ouv/LRJdrVjkShckw6STTaB7l9BrpBaAHDeF5YZT+01PCwmR0SJHnkW6i8OwW/EVWRShfi4j2x+KQw==", + "version": "7.22.15", + "resolved": "https://registry.npmjs.org/@babel/helper-validator-option/-/helper-validator-option-7.22.15.tgz", + "integrity": "sha512-bMn7RmyFjY/mdECUbgn9eoSY4vqvacUnS9i9vGAGttgFWesO6B4CYWA7XlpbWgBt71iv/hfbPlynohStqnu5hA==", "dev": true }, "@babel/helper-wrap-function": { - "version": "7.18.11", - "resolved": "https://registry.npmjs.org/@babel/helper-wrap-function/-/helper-wrap-function-7.18.11.tgz", - "integrity": "sha512-oBUlbv+rjZLh2Ks9SKi4aL7eKaAXBWleHzU89mP0G6BMUlRxSckk9tSIkgDGydhgFxHuGSlBQZfnaD47oBEB7w==", + "version": "7.22.20", + "resolved": "https://registry.npmjs.org/@babel/helper-wrap-function/-/helper-wrap-function-7.22.20.tgz", + "integrity": "sha512-pms/UwkOpnQe/PDAEdV/d7dVCoBbB+R4FvYoHGZz+4VPcg7RtYy2KP7S2lbuWM6FCSgob5wshfGESbC/hzNXZw==", "dev": true, "requires": { - "@babel/helper-function-name": "^7.18.9", - "@babel/template": "^7.18.10", - "@babel/traverse": "^7.18.11", - "@babel/types": "^7.18.10" + "@babel/helper-function-name": "^7.22.5", + "@babel/template": "^7.22.15", + "@babel/types": "^7.22.19" } }, "@babel/helpers": { - "version": "7.20.1", - "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.20.1.tgz", - "integrity": "sha512-J77mUVaDTUJFZ5BpP6mMn6OIl3rEWymk2ZxDBQJUG3P+PbmyMcF3bYWvz0ma69Af1oobDqT/iAsvzhB58xhQUg==", + "version": "7.23.2", + "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.23.2.tgz", + "integrity": "sha512-lzchcp8SjTSVe/fPmLwtWVBFC7+Tbn8LGHDVfDp9JGxpAY5opSaEFgt8UQvrnECWOTdji2mOWMz1rOhkHscmGQ==", "dev": true, "requires": { - "@babel/template": "^7.18.10", - "@babel/traverse": "^7.20.1", - "@babel/types": "^7.20.0" + "@babel/template": "^7.22.15", + "@babel/traverse": "^7.23.2", + "@babel/types": "^7.23.0" } }, "@babel/highlight": { - "version": "7.18.6", - "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.18.6.tgz", - "integrity": "sha512-u7stbOuYjaPezCuLj29hNW1v64M2Md2qupEKP1fHc7WdOA3DgLh37suiSrZYY7haUB7iBeQZ9P1uiRF359do3g==", + "version": "7.22.20", + "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.22.20.tgz", + "integrity": "sha512-dkdMCN3py0+ksCgYmGG8jKeGA/8Tk+gJwSYYlFGxG5lmhfKNoAy004YpLxpS1W2J8m/EK2Ew+yOs9pVRwO89mg==", "dev": true, "requires": { - "@babel/helper-validator-identifier": "^7.18.6", - "chalk": "^2.0.0", + "@babel/helper-validator-identifier": "^7.22.20", + "chalk": "^2.4.2", "js-tokens": "^4.0.0" } }, "@babel/parser": { - "version": "7.20.2", - "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.20.2.tgz", - "integrity": "sha512-afk318kh2uKbo7BEj2QtEi8HVCGrwHUffrYDy7dgVcSa2j9lY3LDjPzcyGdpX7xgm35aWqvciZJ4WKmdF/SxYg==", + "version": "7.23.0", + "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.23.0.tgz", + "integrity": "sha512-vvPKKdMemU85V9WE/l5wZEmImpCtLqbnTvqDS2U1fJ96KrxoW7KrXhNsNCblQlg8Ck4b85yxdTyelsMUgFUXiw==", "dev": true }, "@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression": { - "version": "7.18.6", - "resolved": "https://registry.npmjs.org/@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression/-/plugin-bugfix-safari-id-destructuring-collision-in-function-expression-7.18.6.tgz", - "integrity": "sha512-Dgxsyg54Fx1d4Nge8UnvTrED63vrwOdPmyvPzlNN/boaliRP54pm3pGzZD1SJUwrBA+Cs/xdG8kXX6Mn/RfISQ==", + "version": "7.22.15", + "resolved": "https://registry.npmjs.org/@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression/-/plugin-bugfix-safari-id-destructuring-collision-in-function-expression-7.22.15.tgz", + "integrity": "sha512-FB9iYlz7rURmRJyXRKEnalYPPdn87H5no108cyuQQyMwlpJ2SJtpIUBI27kdTin956pz+LPypkPVPUTlxOmrsg==", "dev": true, "requires": { - "@babel/helper-plugin-utils": "^7.18.6" + "@babel/helper-plugin-utils": "^7.22.5" } }, "@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining": { - "version": "7.18.9", - "resolved": "https://registry.npmjs.org/@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining/-/plugin-bugfix-v8-spread-parameters-in-optional-chaining-7.18.9.tgz", - "integrity": "sha512-AHrP9jadvH7qlOj6PINbgSuphjQUAK7AOT7DPjBo9EHoLhQTnnK5u45e1Hd4DbSQEO9nqPWtQ89r+XEOWFScKg==", - "dev": true, - "requires": { - "@babel/helper-plugin-utils": "^7.18.9", - "@babel/helper-skip-transparent-expression-wrappers": "^7.18.9", - "@babel/plugin-proposal-optional-chaining": "^7.18.9" - } - }, - "@babel/plugin-proposal-async-generator-functions": { - "version": "7.20.1", - "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-async-generator-functions/-/plugin-proposal-async-generator-functions-7.20.1.tgz", - "integrity": "sha512-Gh5rchzSwE4kC+o/6T8waD0WHEQIsDmjltY8WnWRXHUdH8axZhuH86Ov9M72YhJfDrZseQwuuWaaIT/TmePp3g==", - "dev": true, - "requires": { - "@babel/helper-environment-visitor": "^7.18.9", - "@babel/helper-plugin-utils": "^7.19.0", - "@babel/helper-remap-async-to-generator": "^7.18.9", - "@babel/plugin-syntax-async-generators": "^7.8.4" - } - }, - "@babel/plugin-proposal-class-properties": { - "version": "7.18.6", - "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-class-properties/-/plugin-proposal-class-properties-7.18.6.tgz", - "integrity": "sha512-cumfXOF0+nzZrrN8Rf0t7M+tF6sZc7vhQwYQck9q1/5w2OExlD+b4v4RpMJFaV1Z7WcDRgO6FqvxqxGlwo+RHQ==", - "dev": true, - "requires": { - "@babel/helper-create-class-features-plugin": "^7.18.6", - "@babel/helper-plugin-utils": "^7.18.6" - } - }, - "@babel/plugin-proposal-class-static-block": { - "version": "7.18.6", - "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-class-static-block/-/plugin-proposal-class-static-block-7.18.6.tgz", - "integrity": "sha512-+I3oIiNxrCpup3Gi8n5IGMwj0gOCAjcJUSQEcotNnCCPMEnixawOQ+KeJPlgfjzx+FKQ1QSyZOWe7wmoJp7vhw==", - "dev": true, - "requires": { - "@babel/helper-create-class-features-plugin": "^7.18.6", - "@babel/helper-plugin-utils": "^7.18.6", - "@babel/plugin-syntax-class-static-block": "^7.14.5" - } - }, - "@babel/plugin-proposal-dynamic-import": { - "version": "7.18.6", - "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-dynamic-import/-/plugin-proposal-dynamic-import-7.18.6.tgz", - "integrity": "sha512-1auuwmK+Rz13SJj36R+jqFPMJWyKEDd7lLSdOj4oJK0UTgGueSAtkrCvz9ewmgyU/P941Rv2fQwZJN8s6QruXw==", - "dev": true, - "requires": { - "@babel/helper-plugin-utils": "^7.18.6", - "@babel/plugin-syntax-dynamic-import": "^7.8.3" - } - }, - "@babel/plugin-proposal-export-namespace-from": { - "version": "7.18.9", - "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-export-namespace-from/-/plugin-proposal-export-namespace-from-7.18.9.tgz", - "integrity": "sha512-k1NtHyOMvlDDFeb9G5PhUXuGj8m/wiwojgQVEhJ/fsVsMCpLyOP4h0uGEjYJKrRI+EVPlb5Jk+Gt9P97lOGwtA==", - "dev": true, - "requires": { - "@babel/helper-plugin-utils": "^7.18.9", - "@babel/plugin-syntax-export-namespace-from": "^7.8.3" - } - }, - "@babel/plugin-proposal-json-strings": { - "version": "7.18.6", - "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-json-strings/-/plugin-proposal-json-strings-7.18.6.tgz", - "integrity": "sha512-lr1peyn9kOdbYc0xr0OdHTZ5FMqS6Di+H0Fz2I/JwMzGmzJETNeOFq2pBySw6X/KFL5EWDjlJuMsUGRFb8fQgQ==", - "dev": true, - "requires": { - "@babel/helper-plugin-utils": "^7.18.6", - "@babel/plugin-syntax-json-strings": "^7.8.3" - } - }, - "@babel/plugin-proposal-logical-assignment-operators": { - "version": "7.18.9", - "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-logical-assignment-operators/-/plugin-proposal-logical-assignment-operators-7.18.9.tgz", - "integrity": "sha512-128YbMpjCrP35IOExw2Fq+x55LMP42DzhOhX2aNNIdI9avSWl2PI0yuBWarr3RYpZBSPtabfadkH2yeRiMD61Q==", - "dev": true, - "requires": { - "@babel/helper-plugin-utils": "^7.18.9", - "@babel/plugin-syntax-logical-assignment-operators": "^7.10.4" - } - }, - "@babel/plugin-proposal-nullish-coalescing-operator": { - "version": "7.18.6", - "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-nullish-coalescing-operator/-/plugin-proposal-nullish-coalescing-operator-7.18.6.tgz", - "integrity": "sha512-wQxQzxYeJqHcfppzBDnm1yAY0jSRkUXR2z8RePZYrKwMKgMlE8+Z6LUno+bd6LvbGh8Gltvy74+9pIYkr+XkKA==", - "dev": true, - "requires": { - "@babel/helper-plugin-utils": "^7.18.6", - "@babel/plugin-syntax-nullish-coalescing-operator": "^7.8.3" - } - }, - "@babel/plugin-proposal-numeric-separator": { - "version": "7.18.6", - "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-numeric-separator/-/plugin-proposal-numeric-separator-7.18.6.tgz", - "integrity": "sha512-ozlZFogPqoLm8WBr5Z8UckIoE4YQ5KESVcNudyXOR8uqIkliTEgJ3RoketfG6pmzLdeZF0H/wjE9/cCEitBl7Q==", - "dev": true, - "requires": { - "@babel/helper-plugin-utils": "^7.18.6", - "@babel/plugin-syntax-numeric-separator": "^7.10.4" - } - }, - "@babel/plugin-proposal-object-rest-spread": { - "version": "7.20.2", - "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-object-rest-spread/-/plugin-proposal-object-rest-spread-7.20.2.tgz", - "integrity": "sha512-Ks6uej9WFK+fvIMesSqbAto5dD8Dz4VuuFvGJFKgIGSkJuRGcrwGECPA1fDgQK3/DbExBJpEkTeYeB8geIFCSQ==", - "dev": true, - "requires": { - "@babel/compat-data": "^7.20.1", - "@babel/helper-compilation-targets": "^7.20.0", - "@babel/helper-plugin-utils": "^7.20.2", - "@babel/plugin-syntax-object-rest-spread": "^7.8.3", - "@babel/plugin-transform-parameters": "^7.20.1" - } - }, - "@babel/plugin-proposal-optional-catch-binding": { - "version": "7.18.6", - "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-optional-catch-binding/-/plugin-proposal-optional-catch-binding-7.18.6.tgz", - "integrity": "sha512-Q40HEhs9DJQyaZfUjjn6vE8Cv4GmMHCYuMGIWUnlxH6400VGxOuwWsPt4FxXxJkC/5eOzgn0z21M9gMT4MOhbw==", - "dev": true, - "requires": { - "@babel/helper-plugin-utils": "^7.18.6", - "@babel/plugin-syntax-optional-catch-binding": "^7.8.3" - } - }, - "@babel/plugin-proposal-optional-chaining": { - "version": "7.18.9", - "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-optional-chaining/-/plugin-proposal-optional-chaining-7.18.9.tgz", - "integrity": "sha512-v5nwt4IqBXihxGsW2QmCWMDS3B3bzGIk/EQVZz2ei7f3NJl8NzAJVvUmpDW5q1CRNY+Beb/k58UAH1Km1N411w==", - "dev": true, - "requires": { - "@babel/helper-plugin-utils": "^7.18.9", - "@babel/helper-skip-transparent-expression-wrappers": "^7.18.9", - "@babel/plugin-syntax-optional-chaining": "^7.8.3" - } - }, - "@babel/plugin-proposal-private-methods": { - "version": "7.18.6", - "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-private-methods/-/plugin-proposal-private-methods-7.18.6.tgz", - "integrity": "sha512-nutsvktDItsNn4rpGItSNV2sz1XwS+nfU0Rg8aCx3W3NOKVzdMjJRu0O5OkgDp3ZGICSTbgRpxZoWsxoKRvbeA==", + "version": "7.22.15", + "resolved": "https://registry.npmjs.org/@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining/-/plugin-bugfix-v8-spread-parameters-in-optional-chaining-7.22.15.tgz", + "integrity": "sha512-Hyph9LseGvAeeXzikV88bczhsrLrIZqDPxO+sSmAunMPaGrBGhfMWzCPYTtiW9t+HzSE2wtV8e5cc5P6r1xMDQ==", "dev": true, "requires": { - "@babel/helper-create-class-features-plugin": "^7.18.6", - "@babel/helper-plugin-utils": "^7.18.6" + "@babel/helper-plugin-utils": "^7.22.5", + "@babel/helper-skip-transparent-expression-wrappers": "^7.22.5", + "@babel/plugin-transform-optional-chaining": "^7.22.15" } }, "@babel/plugin-proposal-private-property-in-object": { - "version": "7.18.6", - "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-private-property-in-object/-/plugin-proposal-private-property-in-object-7.18.6.tgz", - "integrity": "sha512-9Rysx7FOctvT5ouj5JODjAFAkgGoudQuLPamZb0v1TGLpapdNaftzifU8NTWQm0IRjqoYypdrSmyWgkocDQ8Dw==", - "dev": true, - "requires": { - "@babel/helper-annotate-as-pure": "^7.18.6", - "@babel/helper-create-class-features-plugin": "^7.18.6", - "@babel/helper-plugin-utils": "^7.18.6", - "@babel/plugin-syntax-private-property-in-object": "^7.14.5" - } - }, - "@babel/plugin-proposal-unicode-property-regex": { - "version": "7.18.6", - "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-unicode-property-regex/-/plugin-proposal-unicode-property-regex-7.18.6.tgz", - "integrity": "sha512-2BShG/d5yoZyXZfVePH91urL5wTG6ASZU9M4o03lKK8u8UW1y08OMttBSOADTcJrnPMpvDXRG3G8fyLh4ovs8w==", + "version": "7.21.0-placeholder-for-preset-env.2", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-private-property-in-object/-/plugin-proposal-private-property-in-object-7.21.0-placeholder-for-preset-env.2.tgz", + "integrity": "sha512-SOSkfJDddaM7mak6cPEpswyTRnuRltl429hMraQEglW+OkovnCzsiszTmsrlY//qLFjCpQDFRvjdm2wA5pPm9w==", "dev": true, - "requires": { - "@babel/helper-create-regexp-features-plugin": "^7.18.6", - "@babel/helper-plugin-utils": "^7.18.6" - } + "requires": {} }, "@babel/plugin-syntax-async-generators": { "version": "7.8.4", @@ -7820,12 +7728,30 @@ } }, "@babel/plugin-syntax-import-assertions": { - "version": "7.20.0", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-import-assertions/-/plugin-syntax-import-assertions-7.20.0.tgz", - "integrity": "sha512-IUh1vakzNoWalR8ch/areW7qFopR2AEw03JlG7BbrDqmQ4X3q9uuipQwSGrUn7oGiemKjtSLDhNtQHzMHr1JdQ==", + "version": "7.22.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-import-assertions/-/plugin-syntax-import-assertions-7.22.5.tgz", + "integrity": "sha512-rdV97N7KqsRzeNGoWUOK6yUsWarLjE5Su/Snk9IYPU9CwkWHs4t+rTGOvffTR8XGkJMTAdLfO0xVnXm8wugIJg==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.22.5" + } + }, + "@babel/plugin-syntax-import-attributes": { + "version": "7.22.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-import-attributes/-/plugin-syntax-import-attributes-7.22.5.tgz", + "integrity": "sha512-KwvoWDeNKPETmozyFE0P2rOLqh39EoQHNjqizrI5B8Vt0ZNS7M56s7dAiAqbYfiAYOuIzIh96z3iR2ktgu3tEg==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.22.5" + } + }, + "@babel/plugin-syntax-import-meta": { + "version": "7.10.4", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-import-meta/-/plugin-syntax-import-meta-7.10.4.tgz", + "integrity": "sha512-Yqfm+XDx0+Prh3VSeEQCPU81yC+JWZ2pDPFSS4ZdpfZhp4MkFMaDC1UqseovEKwSUpnIL7+vK+Clp7bfh0iD7g==", "dev": true, "requires": { - "@babel/helper-plugin-utils": "^7.19.0" + "@babel/helper-plugin-utils": "^7.10.4" } }, "@babel/plugin-syntax-json-strings": { @@ -7909,353 +7835,521 @@ "@babel/helper-plugin-utils": "^7.14.5" } }, - "@babel/plugin-transform-arrow-functions": { + "@babel/plugin-syntax-unicode-sets-regex": { "version": "7.18.6", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-arrow-functions/-/plugin-transform-arrow-functions-7.18.6.tgz", - "integrity": "sha512-9S9X9RUefzrsHZmKMbDXxweEH+YlE8JJEuat9FdvW9Qh1cw7W64jELCtWNkPBPX5En45uy28KGvA/AySqUh8CQ==", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-unicode-sets-regex/-/plugin-syntax-unicode-sets-regex-7.18.6.tgz", + "integrity": "sha512-727YkEAPwSIQTv5im8QHz3upqp92JTWhidIC81Tdx4VJYIte/VndKf1qKrfnnhPLiPghStWfvC/iFaMCQu7Nqg==", "dev": true, "requires": { + "@babel/helper-create-regexp-features-plugin": "^7.18.6", "@babel/helper-plugin-utils": "^7.18.6" } }, + "@babel/plugin-transform-arrow-functions": { + "version": "7.22.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-arrow-functions/-/plugin-transform-arrow-functions-7.22.5.tgz", + "integrity": "sha512-26lTNXoVRdAnsaDXPpvCNUq+OVWEVC6bx7Vvz9rC53F2bagUWW4u4ii2+h8Fejfh7RYqPxn+libeFBBck9muEw==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.22.5" + } + }, + "@babel/plugin-transform-async-generator-functions": { + "version": "7.23.2", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-async-generator-functions/-/plugin-transform-async-generator-functions-7.23.2.tgz", + "integrity": "sha512-BBYVGxbDVHfoeXbOwcagAkOQAm9NxoTdMGfTqghu1GrvadSaw6iW3Je6IcL5PNOw8VwjxqBECXy50/iCQSY/lQ==", + "dev": true, + "requires": { + "@babel/helper-environment-visitor": "^7.22.20", + "@babel/helper-plugin-utils": "^7.22.5", + "@babel/helper-remap-async-to-generator": "^7.22.20", + "@babel/plugin-syntax-async-generators": "^7.8.4" + } + }, "@babel/plugin-transform-async-to-generator": { - "version": "7.18.6", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-async-to-generator/-/plugin-transform-async-to-generator-7.18.6.tgz", - "integrity": "sha512-ARE5wZLKnTgPW7/1ftQmSi1CmkqqHo2DNmtztFhvgtOWSDfq0Cq9/9L+KnZNYSNrydBekhW3rwShduf59RoXag==", + "version": "7.22.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-async-to-generator/-/plugin-transform-async-to-generator-7.22.5.tgz", + "integrity": "sha512-b1A8D8ZzE/VhNDoV1MSJTnpKkCG5bJo+19R4o4oy03zM7ws8yEMK755j61Dc3EyvdysbqH5BOOTquJ7ZX9C6vQ==", "dev": true, "requires": { - "@babel/helper-module-imports": "^7.18.6", - "@babel/helper-plugin-utils": "^7.18.6", - "@babel/helper-remap-async-to-generator": "^7.18.6" + "@babel/helper-module-imports": "^7.22.5", + "@babel/helper-plugin-utils": "^7.22.5", + "@babel/helper-remap-async-to-generator": "^7.22.5" } }, "@babel/plugin-transform-block-scoped-functions": { - "version": "7.18.6", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-block-scoped-functions/-/plugin-transform-block-scoped-functions-7.18.6.tgz", - "integrity": "sha512-ExUcOqpPWnliRcPqves5HJcJOvHvIIWfuS4sroBUenPuMdmW+SMHDakmtS7qOo13sVppmUijqeTv7qqGsvURpQ==", + "version": "7.22.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-block-scoped-functions/-/plugin-transform-block-scoped-functions-7.22.5.tgz", + "integrity": "sha512-tdXZ2UdknEKQWKJP1KMNmuF5Lx3MymtMN/pvA+p/VEkhK8jVcQ1fzSy8KM9qRYhAf2/lV33hoMPKI/xaI9sADA==", "dev": true, "requires": { - "@babel/helper-plugin-utils": "^7.18.6" + "@babel/helper-plugin-utils": "^7.22.5" } }, "@babel/plugin-transform-block-scoping": { - "version": "7.20.2", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-block-scoping/-/plugin-transform-block-scoping-7.20.2.tgz", - "integrity": "sha512-y5V15+04ry69OV2wULmwhEA6jwSWXO1TwAtIwiPXcvHcoOQUqpyMVd2bDsQJMW8AurjulIyUV8kDqtjSwHy1uQ==", + "version": "7.23.0", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-block-scoping/-/plugin-transform-block-scoping-7.23.0.tgz", + "integrity": "sha512-cOsrbmIOXmf+5YbL99/S49Y3j46k/T16b9ml8bm9lP6N9US5iQ2yBK7gpui1pg0V/WMcXdkfKbTb7HXq9u+v4g==", "dev": true, "requires": { - "@babel/helper-plugin-utils": "^7.20.2" + "@babel/helper-plugin-utils": "^7.22.5" + } + }, + "@babel/plugin-transform-class-properties": { + "version": "7.22.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-class-properties/-/plugin-transform-class-properties-7.22.5.tgz", + "integrity": "sha512-nDkQ0NfkOhPTq8YCLiWNxp1+f9fCobEjCb0n8WdbNUBc4IB5V7P1QnX9IjpSoquKrXF5SKojHleVNs2vGeHCHQ==", + "dev": true, + "requires": { + "@babel/helper-create-class-features-plugin": "^7.22.5", + "@babel/helper-plugin-utils": "^7.22.5" + } + }, + "@babel/plugin-transform-class-static-block": { + "version": "7.22.11", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-class-static-block/-/plugin-transform-class-static-block-7.22.11.tgz", + "integrity": "sha512-GMM8gGmqI7guS/llMFk1bJDkKfn3v3C4KHK9Yg1ey5qcHcOlKb0QvcMrgzvxo+T03/4szNh5lghY+fEC98Kq9g==", + "dev": true, + "requires": { + "@babel/helper-create-class-features-plugin": "^7.22.11", + "@babel/helper-plugin-utils": "^7.22.5", + "@babel/plugin-syntax-class-static-block": "^7.14.5" } }, "@babel/plugin-transform-classes": { - "version": "7.20.2", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-classes/-/plugin-transform-classes-7.20.2.tgz", - "integrity": "sha512-9rbPp0lCVVoagvtEyQKSo5L8oo0nQS/iif+lwlAz29MccX2642vWDlSZK+2T2buxbopotId2ld7zZAzRfz9j1g==", - "dev": true, - "requires": { - "@babel/helper-annotate-as-pure": "^7.18.6", - "@babel/helper-compilation-targets": "^7.20.0", - "@babel/helper-environment-visitor": "^7.18.9", - "@babel/helper-function-name": "^7.19.0", - "@babel/helper-optimise-call-expression": "^7.18.6", - "@babel/helper-plugin-utils": "^7.20.2", - "@babel/helper-replace-supers": "^7.19.1", - "@babel/helper-split-export-declaration": "^7.18.6", + "version": "7.22.15", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-classes/-/plugin-transform-classes-7.22.15.tgz", + "integrity": "sha512-VbbC3PGjBdE0wAWDdHM9G8Gm977pnYI0XpqMd6LrKISj8/DJXEsWqgRuTYaNE9Bv0JGhTZUzHDlMk18IpOuoqw==", + "dev": true, + "requires": { + "@babel/helper-annotate-as-pure": "^7.22.5", + "@babel/helper-compilation-targets": "^7.22.15", + "@babel/helper-environment-visitor": "^7.22.5", + "@babel/helper-function-name": "^7.22.5", + "@babel/helper-optimise-call-expression": "^7.22.5", + "@babel/helper-plugin-utils": "^7.22.5", + "@babel/helper-replace-supers": "^7.22.9", + "@babel/helper-split-export-declaration": "^7.22.6", "globals": "^11.1.0" } }, "@babel/plugin-transform-computed-properties": { - "version": "7.18.9", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-computed-properties/-/plugin-transform-computed-properties-7.18.9.tgz", - "integrity": "sha512-+i0ZU1bCDymKakLxn5srGHrsAPRELC2WIbzwjLhHW9SIE1cPYkLCL0NlnXMZaM1vhfgA2+M7hySk42VBvrkBRw==", + "version": "7.22.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-computed-properties/-/plugin-transform-computed-properties-7.22.5.tgz", + "integrity": "sha512-4GHWBgRf0krxPX+AaPtgBAlTgTeZmqDynokHOX7aqqAB4tHs3U2Y02zH6ETFdLZGcg9UQSD1WCmkVrE9ErHeOg==", "dev": true, "requires": { - "@babel/helper-plugin-utils": "^7.18.9" + "@babel/helper-plugin-utils": "^7.22.5", + "@babel/template": "^7.22.5" } }, "@babel/plugin-transform-destructuring": { - "version": "7.20.2", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-destructuring/-/plugin-transform-destructuring-7.20.2.tgz", - "integrity": "sha512-mENM+ZHrvEgxLTBXUiQ621rRXZes3KWUv6NdQlrnr1TkWVw+hUjQBZuP2X32qKlrlG2BzgR95gkuCRSkJl8vIw==", + "version": "7.23.0", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-destructuring/-/plugin-transform-destructuring-7.23.0.tgz", + "integrity": "sha512-vaMdgNXFkYrB+8lbgniSYWHsgqK5gjaMNcc84bMIOMRLH0L9AqYq3hwMdvnyqj1OPqea8UtjPEuS/DCenah1wg==", "dev": true, "requires": { - "@babel/helper-plugin-utils": "^7.20.2" + "@babel/helper-plugin-utils": "^7.22.5" } }, "@babel/plugin-transform-dotall-regex": { - "version": "7.18.6", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-dotall-regex/-/plugin-transform-dotall-regex-7.18.6.tgz", - "integrity": "sha512-6S3jpun1eEbAxq7TdjLotAsl4WpQI9DxfkycRcKrjhQYzU87qpXdknpBg/e+TdcMehqGnLFi7tnFUBR02Vq6wg==", + "version": "7.22.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-dotall-regex/-/plugin-transform-dotall-regex-7.22.5.tgz", + "integrity": "sha512-5/Yk9QxCQCl+sOIB1WelKnVRxTJDSAIxtJLL2/pqL14ZVlbH0fUQUZa/T5/UnQtBNgghR7mfB8ERBKyKPCi7Vw==", "dev": true, "requires": { - "@babel/helper-create-regexp-features-plugin": "^7.18.6", - "@babel/helper-plugin-utils": "^7.18.6" + "@babel/helper-create-regexp-features-plugin": "^7.22.5", + "@babel/helper-plugin-utils": "^7.22.5" } }, "@babel/plugin-transform-duplicate-keys": { - "version": "7.18.9", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-duplicate-keys/-/plugin-transform-duplicate-keys-7.18.9.tgz", - "integrity": "sha512-d2bmXCtZXYc59/0SanQKbiWINadaJXqtvIQIzd4+hNwkWBgyCd5F/2t1kXoUdvPMrxzPvhK6EMQRROxsue+mfw==", + "version": "7.22.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-duplicate-keys/-/plugin-transform-duplicate-keys-7.22.5.tgz", + "integrity": "sha512-dEnYD+9BBgld5VBXHnF/DbYGp3fqGMsyxKbtD1mDyIA7AkTSpKXFhCVuj/oQVOoALfBs77DudA0BE4d5mcpmqw==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.22.5" + } + }, + "@babel/plugin-transform-dynamic-import": { + "version": "7.22.11", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-dynamic-import/-/plugin-transform-dynamic-import-7.22.11.tgz", + "integrity": "sha512-g/21plo58sfteWjaO0ZNVb+uEOkJNjAaHhbejrnBmu011l/eNDScmkbjCC3l4FKb10ViaGU4aOkFznSu2zRHgA==", "dev": true, "requires": { - "@babel/helper-plugin-utils": "^7.18.9" + "@babel/helper-plugin-utils": "^7.22.5", + "@babel/plugin-syntax-dynamic-import": "^7.8.3" } }, "@babel/plugin-transform-exponentiation-operator": { - "version": "7.18.6", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-exponentiation-operator/-/plugin-transform-exponentiation-operator-7.18.6.tgz", - "integrity": "sha512-wzEtc0+2c88FVR34aQmiz56dxEkxr2g8DQb/KfaFa1JYXOFVsbhvAonFN6PwVWj++fKmku8NP80plJ5Et4wqHw==", + "version": "7.22.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-exponentiation-operator/-/plugin-transform-exponentiation-operator-7.22.5.tgz", + "integrity": "sha512-vIpJFNM/FjZ4rh1myqIya9jXwrwwgFRHPjT3DkUA9ZLHuzox8jiXkOLvwm1H+PQIP3CqfC++WPKeuDi0Sjdj1g==", "dev": true, "requires": { - "@babel/helper-builder-binary-assignment-operator-visitor": "^7.18.6", - "@babel/helper-plugin-utils": "^7.18.6" + "@babel/helper-builder-binary-assignment-operator-visitor": "^7.22.5", + "@babel/helper-plugin-utils": "^7.22.5" + } + }, + "@babel/plugin-transform-export-namespace-from": { + "version": "7.22.11", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-export-namespace-from/-/plugin-transform-export-namespace-from-7.22.11.tgz", + "integrity": "sha512-xa7aad7q7OiT8oNZ1mU7NrISjlSkVdMbNxn9IuLZyL9AJEhs1Apba3I+u5riX1dIkdptP5EKDG5XDPByWxtehw==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.22.5", + "@babel/plugin-syntax-export-namespace-from": "^7.8.3" } }, "@babel/plugin-transform-for-of": { - "version": "7.18.8", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-for-of/-/plugin-transform-for-of-7.18.8.tgz", - "integrity": "sha512-yEfTRnjuskWYo0k1mHUqrVWaZwrdq8AYbfrpqULOJOaucGSp4mNMVps+YtA8byoevxS/urwU75vyhQIxcCgiBQ==", + "version": "7.22.15", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-for-of/-/plugin-transform-for-of-7.22.15.tgz", + "integrity": "sha512-me6VGeHsx30+xh9fbDLLPi0J1HzmeIIyenoOQHuw2D4m2SAU3NrspX5XxJLBpqn5yrLzrlw2Iy3RA//Bx27iOA==", "dev": true, "requires": { - "@babel/helper-plugin-utils": "^7.18.6" + "@babel/helper-plugin-utils": "^7.22.5" } }, "@babel/plugin-transform-function-name": { - "version": "7.18.9", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-function-name/-/plugin-transform-function-name-7.18.9.tgz", - "integrity": "sha512-WvIBoRPaJQ5yVHzcnJFor7oS5Ls0PYixlTYE63lCj2RtdQEl15M68FXQlxnG6wdraJIXRdR7KI+hQ7q/9QjrCQ==", + "version": "7.22.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-function-name/-/plugin-transform-function-name-7.22.5.tgz", + "integrity": "sha512-UIzQNMS0p0HHiQm3oelztj+ECwFnj+ZRV4KnguvlsD2of1whUeM6o7wGNj6oLwcDoAXQ8gEqfgC24D+VdIcevg==", + "dev": true, + "requires": { + "@babel/helper-compilation-targets": "^7.22.5", + "@babel/helper-function-name": "^7.22.5", + "@babel/helper-plugin-utils": "^7.22.5" + } + }, + "@babel/plugin-transform-json-strings": { + "version": "7.22.11", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-json-strings/-/plugin-transform-json-strings-7.22.11.tgz", + "integrity": "sha512-CxT5tCqpA9/jXFlme9xIBCc5RPtdDq3JpkkhgHQqtDdiTnTI0jtZ0QzXhr5DILeYifDPp2wvY2ad+7+hLMW5Pw==", "dev": true, "requires": { - "@babel/helper-compilation-targets": "^7.18.9", - "@babel/helper-function-name": "^7.18.9", - "@babel/helper-plugin-utils": "^7.18.9" + "@babel/helper-plugin-utils": "^7.22.5", + "@babel/plugin-syntax-json-strings": "^7.8.3" } }, "@babel/plugin-transform-literals": { - "version": "7.18.9", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-literals/-/plugin-transform-literals-7.18.9.tgz", - "integrity": "sha512-IFQDSRoTPnrAIrI5zoZv73IFeZu2dhu6irxQjY9rNjTT53VmKg9fenjvoiOWOkJ6mm4jKVPtdMzBY98Fp4Z4cg==", + "version": "7.22.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-literals/-/plugin-transform-literals-7.22.5.tgz", + "integrity": "sha512-fTLj4D79M+mepcw3dgFBTIDYpbcB9Sm0bpm4ppXPaO+U+PKFFyV9MGRvS0gvGw62sd10kT5lRMKXAADb9pWy8g==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.22.5" + } + }, + "@babel/plugin-transform-logical-assignment-operators": { + "version": "7.22.11", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-logical-assignment-operators/-/plugin-transform-logical-assignment-operators-7.22.11.tgz", + "integrity": "sha512-qQwRTP4+6xFCDV5k7gZBF3C31K34ut0tbEcTKxlX/0KXxm9GLcO14p570aWxFvVzx6QAfPgq7gaeIHXJC8LswQ==", "dev": true, "requires": { - "@babel/helper-plugin-utils": "^7.18.9" + "@babel/helper-plugin-utils": "^7.22.5", + "@babel/plugin-syntax-logical-assignment-operators": "^7.10.4" } }, "@babel/plugin-transform-member-expression-literals": { - "version": "7.18.6", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-member-expression-literals/-/plugin-transform-member-expression-literals-7.18.6.tgz", - "integrity": "sha512-qSF1ihLGO3q+/g48k85tUjD033C29TNTVB2paCwZPVmOsjn9pClvYYrM2VeJpBY2bcNkuny0YUyTNRyRxJ54KA==", + "version": "7.22.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-member-expression-literals/-/plugin-transform-member-expression-literals-7.22.5.tgz", + "integrity": "sha512-RZEdkNtzzYCFl9SE9ATaUMTj2hqMb4StarOJLrZRbqqU4HSBE7UlBw9WBWQiDzrJZJdUWiMTVDI6Gv/8DPvfew==", "dev": true, "requires": { - "@babel/helper-plugin-utils": "^7.18.6" + "@babel/helper-plugin-utils": "^7.22.5" } }, "@babel/plugin-transform-modules-amd": { - "version": "7.19.6", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-amd/-/plugin-transform-modules-amd-7.19.6.tgz", - "integrity": "sha512-uG3od2mXvAtIFQIh0xrpLH6r5fpSQN04gIVovl+ODLdUMANokxQLZnPBHcjmv3GxRjnqwLuHvppjjcelqUFZvg==", + "version": "7.23.0", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-amd/-/plugin-transform-modules-amd-7.23.0.tgz", + "integrity": "sha512-xWT5gefv2HGSm4QHtgc1sYPbseOyf+FFDo2JbpE25GWl5BqTGO9IMwTYJRoIdjsF85GE+VegHxSCUt5EvoYTAw==", "dev": true, "requires": { - "@babel/helper-module-transforms": "^7.19.6", - "@babel/helper-plugin-utils": "^7.19.0" + "@babel/helper-module-transforms": "^7.23.0", + "@babel/helper-plugin-utils": "^7.22.5" } }, "@babel/plugin-transform-modules-commonjs": { - "version": "7.19.6", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-commonjs/-/plugin-transform-modules-commonjs-7.19.6.tgz", - "integrity": "sha512-8PIa1ym4XRTKuSsOUXqDG0YaOlEuTVvHMe5JCfgBMOtHvJKw/4NGovEGN33viISshG/rZNVrACiBmPQLvWN8xQ==", + "version": "7.23.0", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-commonjs/-/plugin-transform-modules-commonjs-7.23.0.tgz", + "integrity": "sha512-32Xzss14/UVc7k9g775yMIvkVK8xwKE0DPdP5JTapr3+Z9w4tzeOuLNY6BXDQR6BdnzIlXnCGAzsk/ICHBLVWQ==", "dev": true, "requires": { - "@babel/helper-module-transforms": "^7.19.6", - "@babel/helper-plugin-utils": "^7.19.0", - "@babel/helper-simple-access": "^7.19.4" + "@babel/helper-module-transforms": "^7.23.0", + "@babel/helper-plugin-utils": "^7.22.5", + "@babel/helper-simple-access": "^7.22.5" } }, "@babel/plugin-transform-modules-systemjs": { - "version": "7.19.6", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-systemjs/-/plugin-transform-modules-systemjs-7.19.6.tgz", - "integrity": "sha512-fqGLBepcc3kErfR9R3DnVpURmckXP7gj7bAlrTQyBxrigFqszZCkFkcoxzCp2v32XmwXLvbw+8Yq9/b+QqksjQ==", + "version": "7.23.0", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-systemjs/-/plugin-transform-modules-systemjs-7.23.0.tgz", + "integrity": "sha512-qBej6ctXZD2f+DhlOC9yO47yEYgUh5CZNz/aBoH4j/3NOlRfJXJbY7xDQCqQVf9KbrqGzIWER1f23doHGrIHFg==", "dev": true, "requires": { - "@babel/helper-hoist-variables": "^7.18.6", - "@babel/helper-module-transforms": "^7.19.6", - "@babel/helper-plugin-utils": "^7.19.0", - "@babel/helper-validator-identifier": "^7.19.1" + "@babel/helper-hoist-variables": "^7.22.5", + "@babel/helper-module-transforms": "^7.23.0", + "@babel/helper-plugin-utils": "^7.22.5", + "@babel/helper-validator-identifier": "^7.22.20" } }, "@babel/plugin-transform-modules-umd": { - "version": "7.18.6", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-umd/-/plugin-transform-modules-umd-7.18.6.tgz", - "integrity": "sha512-dcegErExVeXcRqNtkRU/z8WlBLnvD4MRnHgNs3MytRO1Mn1sHRyhbcpYbVMGclAqOjdW+9cfkdZno9dFdfKLfQ==", + "version": "7.22.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-umd/-/plugin-transform-modules-umd-7.22.5.tgz", + "integrity": "sha512-+S6kzefN/E1vkSsKx8kmQuqeQsvCKCd1fraCM7zXm4SFoggI099Tr4G8U81+5gtMdUeMQ4ipdQffbKLX0/7dBQ==", "dev": true, "requires": { - "@babel/helper-module-transforms": "^7.18.6", - "@babel/helper-plugin-utils": "^7.18.6" + "@babel/helper-module-transforms": "^7.22.5", + "@babel/helper-plugin-utils": "^7.22.5" } }, "@babel/plugin-transform-named-capturing-groups-regex": { - "version": "7.19.1", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-named-capturing-groups-regex/-/plugin-transform-named-capturing-groups-regex-7.19.1.tgz", - "integrity": "sha512-oWk9l9WItWBQYS4FgXD4Uyy5kq898lvkXpXQxoJEY1RnvPk4R/Dvu2ebXU9q8lP+rlMwUQTFf2Ok6d78ODa0kw==", + "version": "7.22.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-named-capturing-groups-regex/-/plugin-transform-named-capturing-groups-regex-7.22.5.tgz", + "integrity": "sha512-YgLLKmS3aUBhHaxp5hi1WJTgOUb/NCuDHzGT9z9WTt3YG+CPRhJs6nprbStx6DnWM4dh6gt7SU3sZodbZ08adQ==", "dev": true, "requires": { - "@babel/helper-create-regexp-features-plugin": "^7.19.0", - "@babel/helper-plugin-utils": "^7.19.0" + "@babel/helper-create-regexp-features-plugin": "^7.22.5", + "@babel/helper-plugin-utils": "^7.22.5" } }, "@babel/plugin-transform-new-target": { - "version": "7.18.6", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-new-target/-/plugin-transform-new-target-7.18.6.tgz", - "integrity": "sha512-DjwFA/9Iu3Z+vrAn+8pBUGcjhxKguSMlsFqeCKbhb9BAV756v0krzVK04CRDi/4aqmk8BsHb4a/gFcaA5joXRw==", + "version": "7.22.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-new-target/-/plugin-transform-new-target-7.22.5.tgz", + "integrity": "sha512-AsF7K0Fx/cNKVyk3a+DW0JLo+Ua598/NxMRvxDnkpCIGFh43+h/v2xyhRUYf6oD8gE4QtL83C7zZVghMjHd+iw==", "dev": true, "requires": { - "@babel/helper-plugin-utils": "^7.18.6" + "@babel/helper-plugin-utils": "^7.22.5" + } + }, + "@babel/plugin-transform-nullish-coalescing-operator": { + "version": "7.22.11", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-nullish-coalescing-operator/-/plugin-transform-nullish-coalescing-operator-7.22.11.tgz", + "integrity": "sha512-YZWOw4HxXrotb5xsjMJUDlLgcDXSfO9eCmdl1bgW4+/lAGdkjaEvOnQ4p5WKKdUgSzO39dgPl0pTnfxm0OAXcg==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.22.5", + "@babel/plugin-syntax-nullish-coalescing-operator": "^7.8.3" + } + }, + "@babel/plugin-transform-numeric-separator": { + "version": "7.22.11", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-numeric-separator/-/plugin-transform-numeric-separator-7.22.11.tgz", + "integrity": "sha512-3dzU4QGPsILdJbASKhF/V2TVP+gJya1PsueQCxIPCEcerqF21oEcrob4mzjsp2Py/1nLfF5m+xYNMDpmA8vffg==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.22.5", + "@babel/plugin-syntax-numeric-separator": "^7.10.4" + } + }, + "@babel/plugin-transform-object-rest-spread": { + "version": "7.22.15", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-object-rest-spread/-/plugin-transform-object-rest-spread-7.22.15.tgz", + "integrity": "sha512-fEB+I1+gAmfAyxZcX1+ZUwLeAuuf8VIg67CTznZE0MqVFumWkh8xWtn58I4dxdVf080wn7gzWoF8vndOViJe9Q==", + "dev": true, + "requires": { + "@babel/compat-data": "^7.22.9", + "@babel/helper-compilation-targets": "^7.22.15", + "@babel/helper-plugin-utils": "^7.22.5", + "@babel/plugin-syntax-object-rest-spread": "^7.8.3", + "@babel/plugin-transform-parameters": "^7.22.15" } }, "@babel/plugin-transform-object-super": { - "version": "7.18.6", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-object-super/-/plugin-transform-object-super-7.18.6.tgz", - "integrity": "sha512-uvGz6zk+pZoS1aTZrOvrbj6Pp/kK2mp45t2B+bTDre2UgsZZ8EZLSJtUg7m/no0zOJUWgFONpB7Zv9W2tSaFlA==", + "version": "7.22.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-object-super/-/plugin-transform-object-super-7.22.5.tgz", + "integrity": "sha512-klXqyaT9trSjIUrcsYIfETAzmOEZL3cBYqOYLJxBHfMFFggmXOv+NYSX/Jbs9mzMVESw/WycLFPRx8ba/b2Ipw==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.22.5", + "@babel/helper-replace-supers": "^7.22.5" + } + }, + "@babel/plugin-transform-optional-catch-binding": { + "version": "7.22.11", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-optional-catch-binding/-/plugin-transform-optional-catch-binding-7.22.11.tgz", + "integrity": "sha512-rli0WxesXUeCJnMYhzAglEjLWVDF6ahb45HuprcmQuLidBJFWjNnOzssk2kuc6e33FlLaiZhG/kUIzUMWdBKaQ==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.22.5", + "@babel/plugin-syntax-optional-catch-binding": "^7.8.3" + } + }, + "@babel/plugin-transform-optional-chaining": { + "version": "7.23.0", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-optional-chaining/-/plugin-transform-optional-chaining-7.23.0.tgz", + "integrity": "sha512-sBBGXbLJjxTzLBF5rFWaikMnOGOk/BmK6vVByIdEggZ7Vn6CvWXZyRkkLFK6WE0IF8jSliyOkUN6SScFgzCM0g==", "dev": true, "requires": { - "@babel/helper-plugin-utils": "^7.18.6", - "@babel/helper-replace-supers": "^7.18.6" + "@babel/helper-plugin-utils": "^7.22.5", + "@babel/helper-skip-transparent-expression-wrappers": "^7.22.5", + "@babel/plugin-syntax-optional-chaining": "^7.8.3" } }, "@babel/plugin-transform-parameters": { - "version": "7.20.1", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-parameters/-/plugin-transform-parameters-7.20.1.tgz", - "integrity": "sha512-nDvKLrAvl+kf6BOy1UJ3MGwzzfTMgppxwiD2Jb4LO3xjYyZq30oQzDNJbCQpMdG9+j2IXHoiMrw5Cm/L6ZoxXQ==", + "version": "7.22.15", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-parameters/-/plugin-transform-parameters-7.22.15.tgz", + "integrity": "sha512-hjk7qKIqhyzhhUvRT683TYQOFa/4cQKwQy7ALvTpODswN40MljzNDa0YldevS6tGbxwaEKVn502JmY0dP7qEtQ==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.22.5" + } + }, + "@babel/plugin-transform-private-methods": { + "version": "7.22.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-private-methods/-/plugin-transform-private-methods-7.22.5.tgz", + "integrity": "sha512-PPjh4gyrQnGe97JTalgRGMuU4icsZFnWkzicB/fUtzlKUqvsWBKEpPPfr5a2JiyirZkHxnAqkQMO5Z5B2kK3fA==", + "dev": true, + "requires": { + "@babel/helper-create-class-features-plugin": "^7.22.5", + "@babel/helper-plugin-utils": "^7.22.5" + } + }, + "@babel/plugin-transform-private-property-in-object": { + "version": "7.22.11", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-private-property-in-object/-/plugin-transform-private-property-in-object-7.22.11.tgz", + "integrity": "sha512-sSCbqZDBKHetvjSwpyWzhuHkmW5RummxJBVbYLkGkaiTOWGxml7SXt0iWa03bzxFIx7wOj3g/ILRd0RcJKBeSQ==", "dev": true, "requires": { - "@babel/helper-plugin-utils": "^7.19.0" + "@babel/helper-annotate-as-pure": "^7.22.5", + "@babel/helper-create-class-features-plugin": "^7.22.11", + "@babel/helper-plugin-utils": "^7.22.5", + "@babel/plugin-syntax-private-property-in-object": "^7.14.5" } }, "@babel/plugin-transform-property-literals": { - "version": "7.18.6", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-property-literals/-/plugin-transform-property-literals-7.18.6.tgz", - "integrity": "sha512-cYcs6qlgafTud3PAzrrRNbQtfpQ8+y/+M5tKmksS9+M1ckbH6kzY8MrexEM9mcA6JDsukE19iIRvAyYl463sMg==", + "version": "7.22.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-property-literals/-/plugin-transform-property-literals-7.22.5.tgz", + "integrity": "sha512-TiOArgddK3mK/x1Qwf5hay2pxI6wCZnvQqrFSqbtg1GLl2JcNMitVH/YnqjP+M31pLUeTfzY1HAXFDnUBV30rQ==", "dev": true, "requires": { - "@babel/helper-plugin-utils": "^7.18.6" + "@babel/helper-plugin-utils": "^7.22.5" } }, "@babel/plugin-transform-regenerator": { - "version": "7.18.6", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-regenerator/-/plugin-transform-regenerator-7.18.6.tgz", - "integrity": "sha512-poqRI2+qiSdeldcz4wTSTXBRryoq3Gc70ye7m7UD5Ww0nE29IXqMl6r7Nd15WBgRd74vloEMlShtH6CKxVzfmQ==", + "version": "7.22.10", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-regenerator/-/plugin-transform-regenerator-7.22.10.tgz", + "integrity": "sha512-F28b1mDt8KcT5bUyJc/U9nwzw6cV+UmTeRlXYIl2TNqMMJif0Jeey9/RQ3C4NOd2zp0/TRsDns9ttj2L523rsw==", "dev": true, "requires": { - "@babel/helper-plugin-utils": "^7.18.6", - "regenerator-transform": "^0.15.0" + "@babel/helper-plugin-utils": "^7.22.5", + "regenerator-transform": "^0.15.2" } }, "@babel/plugin-transform-reserved-words": { - "version": "7.18.6", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-reserved-words/-/plugin-transform-reserved-words-7.18.6.tgz", - "integrity": "sha512-oX/4MyMoypzHjFrT1CdivfKZ+XvIPMFXwwxHp/r0Ddy2Vuomt4HDFGmft1TAY2yiTKiNSsh3kjBAzcM8kSdsjA==", + "version": "7.22.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-reserved-words/-/plugin-transform-reserved-words-7.22.5.tgz", + "integrity": "sha512-DTtGKFRQUDm8svigJzZHzb/2xatPc6TzNvAIJ5GqOKDsGFYgAskjRulbR/vGsPKq3OPqtexnz327qYpP57RFyA==", "dev": true, "requires": { - "@babel/helper-plugin-utils": "^7.18.6" + "@babel/helper-plugin-utils": "^7.22.5" } }, "@babel/plugin-transform-shorthand-properties": { - "version": "7.18.6", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-shorthand-properties/-/plugin-transform-shorthand-properties-7.18.6.tgz", - "integrity": "sha512-eCLXXJqv8okzg86ywZJbRn19YJHU4XUa55oz2wbHhaQVn/MM+XhukiT7SYqp/7o00dg52Rj51Ny+Ecw4oyoygw==", + "version": "7.22.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-shorthand-properties/-/plugin-transform-shorthand-properties-7.22.5.tgz", + "integrity": "sha512-vM4fq9IXHscXVKzDv5itkO1X52SmdFBFcMIBZ2FRn2nqVYqw6dBexUgMvAjHW+KXpPPViD/Yo3GrDEBaRC0QYA==", "dev": true, "requires": { - "@babel/helper-plugin-utils": "^7.18.6" + "@babel/helper-plugin-utils": "^7.22.5" } }, "@babel/plugin-transform-spread": { - "version": "7.19.0", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-spread/-/plugin-transform-spread-7.19.0.tgz", - "integrity": "sha512-RsuMk7j6n+r752EtzyScnWkQyuJdli6LdO5Klv8Yx0OfPVTcQkIUfS8clx5e9yHXzlnhOZF3CbQ8C2uP5j074w==", + "version": "7.22.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-spread/-/plugin-transform-spread-7.22.5.tgz", + "integrity": "sha512-5ZzDQIGyvN4w8+dMmpohL6MBo+l2G7tfC/O2Dg7/hjpgeWvUx8FzfeOKxGog9IimPa4YekaQ9PlDqTLOljkcxg==", "dev": true, "requires": { - "@babel/helper-plugin-utils": "^7.19.0", - "@babel/helper-skip-transparent-expression-wrappers": "^7.18.9" + "@babel/helper-plugin-utils": "^7.22.5", + "@babel/helper-skip-transparent-expression-wrappers": "^7.22.5" } }, "@babel/plugin-transform-sticky-regex": { - "version": "7.18.6", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-sticky-regex/-/plugin-transform-sticky-regex-7.18.6.tgz", - "integrity": "sha512-kfiDrDQ+PBsQDO85yj1icueWMfGfJFKN1KCkndygtu/C9+XUfydLC8Iv5UYJqRwy4zk8EcplRxEOeLyjq1gm6Q==", + "version": "7.22.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-sticky-regex/-/plugin-transform-sticky-regex-7.22.5.tgz", + "integrity": "sha512-zf7LuNpHG0iEeiyCNwX4j3gDg1jgt1k3ZdXBKbZSoA3BbGQGvMiSvfbZRR3Dr3aeJe3ooWFZxOOG3IRStYp2Bw==", "dev": true, "requires": { - "@babel/helper-plugin-utils": "^7.18.6" + "@babel/helper-plugin-utils": "^7.22.5" } }, "@babel/plugin-transform-template-literals": { - "version": "7.18.9", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-template-literals/-/plugin-transform-template-literals-7.18.9.tgz", - "integrity": "sha512-S8cOWfT82gTezpYOiVaGHrCbhlHgKhQt8XH5ES46P2XWmX92yisoZywf5km75wv5sYcXDUCLMmMxOLCtthDgMA==", + "version": "7.22.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-template-literals/-/plugin-transform-template-literals-7.22.5.tgz", + "integrity": "sha512-5ciOehRNf+EyUeewo8NkbQiUs4d6ZxiHo6BcBcnFlgiJfu16q0bQUw9Jvo0b0gBKFG1SMhDSjeKXSYuJLeFSMA==", "dev": true, "requires": { - "@babel/helper-plugin-utils": "^7.18.9" + "@babel/helper-plugin-utils": "^7.22.5" } }, "@babel/plugin-transform-typeof-symbol": { - "version": "7.18.9", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-typeof-symbol/-/plugin-transform-typeof-symbol-7.18.9.tgz", - "integrity": "sha512-SRfwTtF11G2aemAZWivL7PD+C9z52v9EvMqH9BuYbabyPuKUvSWks3oCg6041pT925L4zVFqaVBeECwsmlguEw==", + "version": "7.22.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-typeof-symbol/-/plugin-transform-typeof-symbol-7.22.5.tgz", + "integrity": "sha512-bYkI5lMzL4kPii4HHEEChkD0rkc+nvnlR6+o/qdqR6zrm0Sv/nodmyLhlq2DO0YKLUNd2VePmPRjJXSBh9OIdA==", "dev": true, "requires": { - "@babel/helper-plugin-utils": "^7.18.9" + "@babel/helper-plugin-utils": "^7.22.5" } }, "@babel/plugin-transform-unicode-escapes": { - "version": "7.18.10", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-unicode-escapes/-/plugin-transform-unicode-escapes-7.18.10.tgz", - "integrity": "sha512-kKAdAI+YzPgGY/ftStBFXTI1LZFju38rYThnfMykS+IXy8BVx+res7s2fxf1l8I35DV2T97ezo6+SGrXz6B3iQ==", + "version": "7.22.10", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-unicode-escapes/-/plugin-transform-unicode-escapes-7.22.10.tgz", + "integrity": "sha512-lRfaRKGZCBqDlRU3UIFovdp9c9mEvlylmpod0/OatICsSfuQ9YFthRo1tpTkGsklEefZdqlEFdY4A2dwTb6ohg==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.22.5" + } + }, + "@babel/plugin-transform-unicode-property-regex": { + "version": "7.22.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-unicode-property-regex/-/plugin-transform-unicode-property-regex-7.22.5.tgz", + "integrity": "sha512-HCCIb+CbJIAE6sXn5CjFQXMwkCClcOfPCzTlilJ8cUatfzwHlWQkbtV0zD338u9dZskwvuOYTuuaMaA8J5EI5A==", "dev": true, "requires": { - "@babel/helper-plugin-utils": "^7.18.9" + "@babel/helper-create-regexp-features-plugin": "^7.22.5", + "@babel/helper-plugin-utils": "^7.22.5" } }, "@babel/plugin-transform-unicode-regex": { - "version": "7.18.6", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-unicode-regex/-/plugin-transform-unicode-regex-7.18.6.tgz", - "integrity": "sha512-gE7A6Lt7YLnNOL3Pb9BNeZvi+d8l7tcRrG4+pwJjK9hD2xX4mEvjlQW60G9EEmfXVYRPv9VRQcyegIVHCql/AA==", + "version": "7.22.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-unicode-regex/-/plugin-transform-unicode-regex-7.22.5.tgz", + "integrity": "sha512-028laaOKptN5vHJf9/Arr/HiJekMd41hOEZYvNsrsXqJ7YPYuX2bQxh31fkZzGmq3YqHRJzYFFAVYvKfMPKqyg==", "dev": true, "requires": { - "@babel/helper-create-regexp-features-plugin": "^7.18.6", - "@babel/helper-plugin-utils": "^7.18.6" + "@babel/helper-create-regexp-features-plugin": "^7.22.5", + "@babel/helper-plugin-utils": "^7.22.5" + } + }, + "@babel/plugin-transform-unicode-sets-regex": { + "version": "7.22.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-unicode-sets-regex/-/plugin-transform-unicode-sets-regex-7.22.5.tgz", + "integrity": "sha512-lhMfi4FC15j13eKrh3DnYHjpGj6UKQHtNKTbtc1igvAhRy4+kLhV07OpLcsN0VgDEw/MjAvJO4BdMJsHwMhzCg==", + "dev": true, + "requires": { + "@babel/helper-create-regexp-features-plugin": "^7.22.5", + "@babel/helper-plugin-utils": "^7.22.5" } }, "@babel/preset-env": { - "version": "7.20.2", - "resolved": "https://registry.npmjs.org/@babel/preset-env/-/preset-env-7.20.2.tgz", - "integrity": "sha512-1G0efQEWR1EHkKvKHqbG+IN/QdgwfByUpM5V5QroDzGV2t3S/WXNQd693cHiHTlCFMpr9B6FkPFXDA2lQcKoDg==", - "dev": true, - "requires": { - "@babel/compat-data": "^7.20.1", - "@babel/helper-compilation-targets": "^7.20.0", - "@babel/helper-plugin-utils": "^7.20.2", - "@babel/helper-validator-option": "^7.18.6", - "@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression": "^7.18.6", - "@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining": "^7.18.9", - "@babel/plugin-proposal-async-generator-functions": "^7.20.1", - "@babel/plugin-proposal-class-properties": "^7.18.6", - "@babel/plugin-proposal-class-static-block": "^7.18.6", - "@babel/plugin-proposal-dynamic-import": "^7.18.6", - "@babel/plugin-proposal-export-namespace-from": "^7.18.9", - "@babel/plugin-proposal-json-strings": "^7.18.6", - "@babel/plugin-proposal-logical-assignment-operators": "^7.18.9", - "@babel/plugin-proposal-nullish-coalescing-operator": "^7.18.6", - "@babel/plugin-proposal-numeric-separator": "^7.18.6", - "@babel/plugin-proposal-object-rest-spread": "^7.20.2", - "@babel/plugin-proposal-optional-catch-binding": "^7.18.6", - "@babel/plugin-proposal-optional-chaining": "^7.18.9", - "@babel/plugin-proposal-private-methods": "^7.18.6", - "@babel/plugin-proposal-private-property-in-object": "^7.18.6", - "@babel/plugin-proposal-unicode-property-regex": "^7.18.6", + "version": "7.23.2", + "resolved": "https://registry.npmjs.org/@babel/preset-env/-/preset-env-7.23.2.tgz", + "integrity": "sha512-BW3gsuDD+rvHL2VO2SjAUNTBe5YrjsTiDyqamPDWY723na3/yPQ65X5oQkFVJZ0o50/2d+svm1rkPoJeR1KxVQ==", + "dev": true, + "requires": { + "@babel/compat-data": "^7.23.2", + "@babel/helper-compilation-targets": "^7.22.15", + "@babel/helper-plugin-utils": "^7.22.5", + "@babel/helper-validator-option": "^7.22.15", + "@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression": "^7.22.15", + "@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining": "^7.22.15", + "@babel/plugin-proposal-private-property-in-object": "7.21.0-placeholder-for-preset-env.2", "@babel/plugin-syntax-async-generators": "^7.8.4", "@babel/plugin-syntax-class-properties": "^7.12.13", "@babel/plugin-syntax-class-static-block": "^7.14.5", "@babel/plugin-syntax-dynamic-import": "^7.8.3", "@babel/plugin-syntax-export-namespace-from": "^7.8.3", - "@babel/plugin-syntax-import-assertions": "^7.20.0", + "@babel/plugin-syntax-import-assertions": "^7.22.5", + "@babel/plugin-syntax-import-attributes": "^7.22.5", + "@babel/plugin-syntax-import-meta": "^7.10.4", "@babel/plugin-syntax-json-strings": "^7.8.3", "@babel/plugin-syntax-logical-assignment-operators": "^7.10.4", "@babel/plugin-syntax-nullish-coalescing-operator": "^7.8.3", @@ -8265,106 +8359,127 @@ "@babel/plugin-syntax-optional-chaining": "^7.8.3", "@babel/plugin-syntax-private-property-in-object": "^7.14.5", "@babel/plugin-syntax-top-level-await": "^7.14.5", - "@babel/plugin-transform-arrow-functions": "^7.18.6", - "@babel/plugin-transform-async-to-generator": "^7.18.6", - "@babel/plugin-transform-block-scoped-functions": "^7.18.6", - "@babel/plugin-transform-block-scoping": "^7.20.2", - "@babel/plugin-transform-classes": "^7.20.2", - "@babel/plugin-transform-computed-properties": "^7.18.9", - "@babel/plugin-transform-destructuring": "^7.20.2", - "@babel/plugin-transform-dotall-regex": "^7.18.6", - "@babel/plugin-transform-duplicate-keys": "^7.18.9", - "@babel/plugin-transform-exponentiation-operator": "^7.18.6", - "@babel/plugin-transform-for-of": "^7.18.8", - "@babel/plugin-transform-function-name": "^7.18.9", - "@babel/plugin-transform-literals": "^7.18.9", - "@babel/plugin-transform-member-expression-literals": "^7.18.6", - "@babel/plugin-transform-modules-amd": "^7.19.6", - "@babel/plugin-transform-modules-commonjs": "^7.19.6", - "@babel/plugin-transform-modules-systemjs": "^7.19.6", - "@babel/plugin-transform-modules-umd": "^7.18.6", - "@babel/plugin-transform-named-capturing-groups-regex": "^7.19.1", - "@babel/plugin-transform-new-target": "^7.18.6", - "@babel/plugin-transform-object-super": "^7.18.6", - "@babel/plugin-transform-parameters": "^7.20.1", - "@babel/plugin-transform-property-literals": "^7.18.6", - "@babel/plugin-transform-regenerator": "^7.18.6", - "@babel/plugin-transform-reserved-words": "^7.18.6", - "@babel/plugin-transform-shorthand-properties": "^7.18.6", - "@babel/plugin-transform-spread": "^7.19.0", - "@babel/plugin-transform-sticky-regex": "^7.18.6", - "@babel/plugin-transform-template-literals": "^7.18.9", - "@babel/plugin-transform-typeof-symbol": "^7.18.9", - "@babel/plugin-transform-unicode-escapes": "^7.18.10", - "@babel/plugin-transform-unicode-regex": "^7.18.6", - "@babel/preset-modules": "^0.1.5", - "@babel/types": "^7.20.2", - "babel-plugin-polyfill-corejs2": "^0.3.3", - "babel-plugin-polyfill-corejs3": "^0.6.0", - "babel-plugin-polyfill-regenerator": "^0.4.1", - "core-js-compat": "^3.25.1", - "semver": "^6.3.0" + "@babel/plugin-syntax-unicode-sets-regex": "^7.18.6", + "@babel/plugin-transform-arrow-functions": "^7.22.5", + "@babel/plugin-transform-async-generator-functions": "^7.23.2", + "@babel/plugin-transform-async-to-generator": "^7.22.5", + "@babel/plugin-transform-block-scoped-functions": "^7.22.5", + "@babel/plugin-transform-block-scoping": "^7.23.0", + "@babel/plugin-transform-class-properties": "^7.22.5", + "@babel/plugin-transform-class-static-block": "^7.22.11", + "@babel/plugin-transform-classes": "^7.22.15", + "@babel/plugin-transform-computed-properties": "^7.22.5", + "@babel/plugin-transform-destructuring": "^7.23.0", + "@babel/plugin-transform-dotall-regex": "^7.22.5", + "@babel/plugin-transform-duplicate-keys": "^7.22.5", + "@babel/plugin-transform-dynamic-import": "^7.22.11", + "@babel/plugin-transform-exponentiation-operator": "^7.22.5", + "@babel/plugin-transform-export-namespace-from": "^7.22.11", + "@babel/plugin-transform-for-of": "^7.22.15", + "@babel/plugin-transform-function-name": "^7.22.5", + "@babel/plugin-transform-json-strings": "^7.22.11", + "@babel/plugin-transform-literals": "^7.22.5", + "@babel/plugin-transform-logical-assignment-operators": "^7.22.11", + "@babel/plugin-transform-member-expression-literals": "^7.22.5", + "@babel/plugin-transform-modules-amd": "^7.23.0", + "@babel/plugin-transform-modules-commonjs": "^7.23.0", + "@babel/plugin-transform-modules-systemjs": "^7.23.0", + "@babel/plugin-transform-modules-umd": "^7.22.5", + "@babel/plugin-transform-named-capturing-groups-regex": "^7.22.5", + "@babel/plugin-transform-new-target": "^7.22.5", + "@babel/plugin-transform-nullish-coalescing-operator": "^7.22.11", + "@babel/plugin-transform-numeric-separator": "^7.22.11", + "@babel/plugin-transform-object-rest-spread": "^7.22.15", + "@babel/plugin-transform-object-super": "^7.22.5", + "@babel/plugin-transform-optional-catch-binding": "^7.22.11", + "@babel/plugin-transform-optional-chaining": "^7.23.0", + "@babel/plugin-transform-parameters": "^7.22.15", + "@babel/plugin-transform-private-methods": "^7.22.5", + "@babel/plugin-transform-private-property-in-object": "^7.22.11", + "@babel/plugin-transform-property-literals": "^7.22.5", + "@babel/plugin-transform-regenerator": "^7.22.10", + "@babel/plugin-transform-reserved-words": "^7.22.5", + "@babel/plugin-transform-shorthand-properties": "^7.22.5", + "@babel/plugin-transform-spread": "^7.22.5", + "@babel/plugin-transform-sticky-regex": "^7.22.5", + "@babel/plugin-transform-template-literals": "^7.22.5", + "@babel/plugin-transform-typeof-symbol": "^7.22.5", + "@babel/plugin-transform-unicode-escapes": "^7.22.10", + "@babel/plugin-transform-unicode-property-regex": "^7.22.5", + "@babel/plugin-transform-unicode-regex": "^7.22.5", + "@babel/plugin-transform-unicode-sets-regex": "^7.22.5", + "@babel/preset-modules": "0.1.6-no-external-plugins", + "@babel/types": "^7.23.0", + "babel-plugin-polyfill-corejs2": "^0.4.6", + "babel-plugin-polyfill-corejs3": "^0.8.5", + "babel-plugin-polyfill-regenerator": "^0.5.3", + "core-js-compat": "^3.31.0", + "semver": "^6.3.1" } }, "@babel/preset-modules": { - "version": "0.1.5", - "resolved": "https://registry.npmjs.org/@babel/preset-modules/-/preset-modules-0.1.5.tgz", - "integrity": "sha512-A57th6YRG7oR3cq/yt/Y84MvGgE0eJG2F1JLhKuyG+jFxEgrd/HAMJatiFtmOiZurz+0DkrvbheCLaV5f2JfjA==", + "version": "0.1.6-no-external-plugins", + "resolved": "https://registry.npmjs.org/@babel/preset-modules/-/preset-modules-0.1.6-no-external-plugins.tgz", + "integrity": "sha512-HrcgcIESLm9aIR842yhJ5RWan/gebQUJ6E/E5+rf0y9o6oj7w0Br+sWuL6kEQ/o/AdfvR1Je9jG18/gnpwjEyA==", "dev": true, "requires": { "@babel/helper-plugin-utils": "^7.0.0", - "@babel/plugin-proposal-unicode-property-regex": "^7.4.4", - "@babel/plugin-transform-dotall-regex": "^7.4.4", "@babel/types": "^7.4.4", "esutils": "^2.0.2" } }, + "@babel/regjsgen": { + "version": "0.8.0", + "resolved": "https://registry.npmjs.org/@babel/regjsgen/-/regjsgen-0.8.0.tgz", + "integrity": "sha512-x/rqGMdzj+fWZvCOYForTghzbtqPDZ5gPwaoNGHdgDfF2QA/XZbCBp4Moo5scrkAMPhB7z26XM/AaHuIJdgauA==", + "dev": true + }, "@babel/runtime": { - "version": "7.18.9", - "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.18.9.tgz", - "integrity": "sha512-lkqXDcvlFT5rvEjiu6+QYO+1GXrEHRo2LOtS7E4GtX5ESIZOgepqsZBVIj6Pv+a6zqsya9VCgiK1KAK4BvJDAw==", + "version": "7.23.2", + "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.23.2.tgz", + "integrity": "sha512-mM8eg4yl5D6i3lu2QKPuPH4FArvJ8KhTofbE7jwMUv9KX5mBvwPAqnV3MlyBNqdp9RyRKP6Yck8TrfYrPvX3bg==", "dev": true, "requires": { - "regenerator-runtime": "^0.13.4" + "regenerator-runtime": "^0.14.0" } }, "@babel/template": { - "version": "7.18.10", - "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.18.10.tgz", - "integrity": "sha512-TI+rCtooWHr3QJ27kJxfjutghu44DLnasDMwpDqCXVTal9RLp3RSYNh4NdBrRP2cQAoG9A8juOQl6P6oZG4JxA==", + "version": "7.22.15", + "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.22.15.tgz", + "integrity": "sha512-QPErUVm4uyJa60rkI73qneDacvdvzxshT3kksGqlGWYdOTIUOwJ7RDUL8sGqslY1uXWSL6xMFKEXDS3ox2uF0w==", "dev": true, "requires": { - "@babel/code-frame": "^7.18.6", - "@babel/parser": "^7.18.10", - "@babel/types": "^7.18.10" + "@babel/code-frame": "^7.22.13", + "@babel/parser": "^7.22.15", + "@babel/types": "^7.22.15" } }, "@babel/traverse": { - "version": "7.20.1", - "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.20.1.tgz", - "integrity": "sha512-d3tN8fkVJwFLkHkBN479SOsw4DMZnz8cdbL/gvuDuzy3TS6Nfw80HuQqhw1pITbIruHyh7d1fMA47kWzmcUEGA==", - "dev": true, - "requires": { - "@babel/code-frame": "^7.18.6", - "@babel/generator": "^7.20.1", - "@babel/helper-environment-visitor": "^7.18.9", - "@babel/helper-function-name": "^7.19.0", - "@babel/helper-hoist-variables": "^7.18.6", - "@babel/helper-split-export-declaration": "^7.18.6", - "@babel/parser": "^7.20.1", - "@babel/types": "^7.20.0", + "version": "7.23.2", + "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.23.2.tgz", + "integrity": "sha512-azpe59SQ48qG6nu2CzcMLbxUudtN+dOM9kDbUqGq3HXUJRlo7i8fvPoxQUzYgLZ4cMVmuZgm8vvBpNeRhd6XSw==", + "dev": true, + "requires": { + "@babel/code-frame": "^7.22.13", + "@babel/generator": "^7.23.0", + "@babel/helper-environment-visitor": "^7.22.20", + "@babel/helper-function-name": "^7.23.0", + "@babel/helper-hoist-variables": "^7.22.5", + "@babel/helper-split-export-declaration": "^7.22.6", + "@babel/parser": "^7.23.0", + "@babel/types": "^7.23.0", "debug": "^4.1.0", "globals": "^11.1.0" } }, "@babel/types": { - "version": "7.20.2", - "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.20.2.tgz", - "integrity": "sha512-FnnvsNWgZCr232sqtXggapvlkk/tuwR/qhGzcmxI0GXLCjmPYQPzio2FbdlWuY6y1sHFfQKk+rRbUZ9VStQMog==", + "version": "7.23.0", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.23.0.tgz", + "integrity": "sha512-0oIyUfKoI3mSqMvsxBdclDwxXKXAUA8v/apZbc+iSyARYou1o8ZGDxbUYyLFoW2arqS2jDGqJuZvv1d/io1axg==", "dev": true, "requires": { - "@babel/helper-string-parser": "^7.19.4", - "@babel/helper-validator-identifier": "^7.19.1", + "@babel/helper-string-parser": "^7.22.5", + "@babel/helper-validator-identifier": "^7.22.20", "to-fast-properties": "^2.0.0" } }, @@ -8425,9 +8540,9 @@ "dev": true }, "@jridgewell/source-map": { - "version": "0.3.2", - "resolved": "https://registry.npmjs.org/@jridgewell/source-map/-/source-map-0.3.2.tgz", - "integrity": "sha512-m7O9o2uR8k2ObDysZYzdfhb08VuEml5oWGiosa1VdaPZ/A6QyPkAJuwN0Q1lhULOf6B7MtQmHENS743hWtCrgw==", + "version": "0.3.5", + "resolved": "https://registry.npmjs.org/@jridgewell/source-map/-/source-map-0.3.5.tgz", + "integrity": "sha512-UTYAUj/wviwdsMfzoSJspJxbkH5o1snzwX0//0ENX1u/55kkZZkcTZP6u9bwKGkv+dkk9at4m1Cpt0uY80kcpQ==", "dev": true, "requires": { "@jridgewell/gen-mapping": "^0.3.0", @@ -8435,9 +8550,9 @@ }, "dependencies": { "@jridgewell/gen-mapping": { - "version": "0.3.2", - "resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.3.2.tgz", - "integrity": "sha512-mh65xKQAzI6iBcFzwv28KVWSmCkdRBWoOh+bYQGW3+6OZvbbN3TqMGo5hqYxQniRcH9F2VZIoJCm4pa3BPDK/A==", + "version": "0.3.3", + "resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.3.3.tgz", + "integrity": "sha512-HLhSWOLRi875zjjMG/r+Nv0oCW8umGb0BgEhyX3dDX3egwZtB8PqLnjz3yedt8R5StBrzcg4aBpnh8UA9D1BoQ==", "dev": true, "requires": { "@jridgewell/set-array": "^1.0.1", @@ -8454,13 +8569,13 @@ "dev": true }, "@jridgewell/trace-mapping": { - "version": "0.3.15", - "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.15.tgz", - "integrity": "sha512-oWZNOULl+UbhsgB51uuZzglikfIKSUBO/M9W2OfEjn7cmqoAiCgmv9lyACTUacZwBz0ITnJ2NqjU8Tx0DHL88g==", + "version": "0.3.20", + "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.20.tgz", + "integrity": "sha512-R8LcPeWZol2zR8mmH3JeKQ6QRCFb7XgUhV9ZlGhHLGyg4wpPiPZNQOOWhFZhxKw8u//yTbNGI42Bx/3paXEQ+Q==", "dev": true, "requires": { - "@jridgewell/resolve-uri": "^3.0.3", - "@jridgewell/sourcemap-codec": "^1.4.10" + "@jridgewell/resolve-uri": "^3.1.0", + "@jridgewell/sourcemap-codec": "^1.4.14" } }, "@leichtgewicht/ip-codec": { @@ -8534,9 +8649,9 @@ } }, "@types/estree": { - "version": "0.0.51", - "resolved": "https://registry.npmjs.org/@types/estree/-/estree-0.0.51.tgz", - "integrity": "sha512-CuPgU6f3eT/XgKKPqKd/gLZV1Xmvf1a2R5POBOGQa6uv82xpls89HU5zKeVoyR8XzHd1RGNOlQlvUe3CFkjWNQ==", + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/@types/estree/-/estree-1.0.3.tgz", + "integrity": "sha512-CS2rOaoQ/eAgAfcTfq6amKG7bsN+EMcgGY4FAFQdvSj2y1ixvOZTUA9mOtCai7E1SYu283XNw7urKK30nP3wkQ==", "dev": true }, "@types/express": { @@ -8647,181 +8762,185 @@ "@types/node": "*" } }, + "@types/validator": { + "version": "13.11.5", + "resolved": "https://registry.npmjs.org/@types/validator/-/validator-13.11.5.tgz", + "integrity": "sha512-xW4qsT4UIYILu+7ZrBnfQdBYniZrMLYYK3wN9M/NdeIHgBN5pZI2/8Q7UfdWIcr5RLJv/OGENsx91JIpUUoC7Q==", + "dev": true + }, "@types/ws": { - "version": "8.5.3", - "resolved": "https://registry.npmjs.org/@types/ws/-/ws-8.5.3.tgz", - "integrity": "sha512-6YOoWjruKj1uLf3INHH7D3qTXwFfEsg1kf3c0uDdSBJwfa/llkwIjrAGV7j7mVgGNbzTQ3HiHKKDXl6bJPD97w==", + "version": "8.5.8", + "resolved": "https://registry.npmjs.org/@types/ws/-/ws-8.5.8.tgz", + "integrity": "sha512-flUksGIQCnJd6sZ1l5dqCEG/ksaoAg/eUwiLAGTJQcfgvZJKF++Ta4bJA6A5aPSJmsr+xlseHn4KLgVlNnvPTg==", "dev": true, "requires": { "@types/node": "*" } }, "@webassemblyjs/ast": { - "version": "1.11.1", - "resolved": "https://registry.npmjs.org/@webassemblyjs/ast/-/ast-1.11.1.tgz", - "integrity": "sha512-ukBh14qFLjxTQNTXocdyksN5QdM28S1CxHt2rdskFyL+xFV7VremuBLVbmCePj+URalXBENx/9Lm7lnhihtCSw==", + "version": "1.11.6", + "resolved": "https://registry.npmjs.org/@webassemblyjs/ast/-/ast-1.11.6.tgz", + "integrity": "sha512-IN1xI7PwOvLPgjcf180gC1bqn3q/QaOCwYUahIOhbYUu8KA/3tw2RT/T0Gidi1l7Hhj5D/INhJxiICObqpMu4Q==", "dev": true, "requires": { - "@webassemblyjs/helper-numbers": "1.11.1", - "@webassemblyjs/helper-wasm-bytecode": "1.11.1" + "@webassemblyjs/helper-numbers": "1.11.6", + "@webassemblyjs/helper-wasm-bytecode": "1.11.6" } }, "@webassemblyjs/floating-point-hex-parser": { - "version": "1.11.1", - "resolved": "https://registry.npmjs.org/@webassemblyjs/floating-point-hex-parser/-/floating-point-hex-parser-1.11.1.tgz", - "integrity": "sha512-iGRfyc5Bq+NnNuX8b5hwBrRjzf0ocrJPI6GWFodBFzmFnyvrQ83SHKhmilCU/8Jv67i4GJZBMhEzltxzcNagtQ==", + "version": "1.11.6", + "resolved": "https://registry.npmjs.org/@webassemblyjs/floating-point-hex-parser/-/floating-point-hex-parser-1.11.6.tgz", + "integrity": "sha512-ejAj9hfRJ2XMsNHk/v6Fu2dGS+i4UaXBXGemOfQ/JfQ6mdQg/WXtwleQRLLS4OvfDhv8rYnVwH27YJLMyYsxhw==", "dev": true }, "@webassemblyjs/helper-api-error": { - "version": "1.11.1", - "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-api-error/-/helper-api-error-1.11.1.tgz", - "integrity": "sha512-RlhS8CBCXfRUR/cwo2ho9bkheSXG0+NwooXcc3PAILALf2QLdFyj7KGsKRbVc95hZnhnERon4kW/D3SZpp6Tcg==", + "version": "1.11.6", + "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-api-error/-/helper-api-error-1.11.6.tgz", + "integrity": "sha512-o0YkoP4pVu4rN8aTJgAyj9hC2Sv5UlkzCHhxqWj8butaLvnpdc2jOwh4ewE6CX0txSfLn/UYaV/pheS2Txg//Q==", "dev": true }, "@webassemblyjs/helper-buffer": { - "version": "1.11.1", - "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-buffer/-/helper-buffer-1.11.1.tgz", - "integrity": "sha512-gwikF65aDNeeXa8JxXa2BAk+REjSyhrNC9ZwdT0f8jc4dQQeDQ7G4m0f2QCLPJiMTTO6wfDmRmj/pW0PsUvIcA==", + "version": "1.11.6", + "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-buffer/-/helper-buffer-1.11.6.tgz", + "integrity": "sha512-z3nFzdcp1mb8nEOFFk8DrYLpHvhKC3grJD2ardfKOzmbmJvEf/tPIqCY+sNcwZIY8ZD7IkB2l7/pqhUhqm7hLA==", "dev": true }, "@webassemblyjs/helper-numbers": { - "version": "1.11.1", - "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-numbers/-/helper-numbers-1.11.1.tgz", - "integrity": "sha512-vDkbxiB8zfnPdNK9Rajcey5C0w+QJugEglN0of+kmO8l7lDb77AnlKYQF7aarZuCrv+l0UvqL+68gSDr3k9LPQ==", + "version": "1.11.6", + "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-numbers/-/helper-numbers-1.11.6.tgz", + "integrity": "sha512-vUIhZ8LZoIWHBohiEObxVm6hwP034jwmc9kuq5GdHZH0wiLVLIPcMCdpJzG4C11cHoQ25TFIQj9kaVADVX7N3g==", "dev": true, "requires": { - "@webassemblyjs/floating-point-hex-parser": "1.11.1", - "@webassemblyjs/helper-api-error": "1.11.1", + "@webassemblyjs/floating-point-hex-parser": "1.11.6", + "@webassemblyjs/helper-api-error": "1.11.6", "@xtuc/long": "4.2.2" } }, "@webassemblyjs/helper-wasm-bytecode": { - "version": "1.11.1", - "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-wasm-bytecode/-/helper-wasm-bytecode-1.11.1.tgz", - "integrity": "sha512-PvpoOGiJwXeTrSf/qfudJhwlvDQxFgelbMqtq52WWiXC6Xgg1IREdngmPN3bs4RoO83PnL/nFrxucXj1+BX62Q==", + "version": "1.11.6", + "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-wasm-bytecode/-/helper-wasm-bytecode-1.11.6.tgz", + "integrity": "sha512-sFFHKwcmBprO9e7Icf0+gddyWYDViL8bpPjJJl0WHxCdETktXdmtWLGVzoHbqUcY4Be1LkNfwTmXOJUFZYSJdA==", "dev": true }, "@webassemblyjs/helper-wasm-section": { - "version": "1.11.1", - "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-wasm-section/-/helper-wasm-section-1.11.1.tgz", - "integrity": "sha512-10P9No29rYX1j7F3EVPX3JvGPQPae+AomuSTPiF9eBQeChHI6iqjMIwR9JmOJXwpnn/oVGDk7I5IlskuMwU/pg==", + "version": "1.11.6", + "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-wasm-section/-/helper-wasm-section-1.11.6.tgz", + "integrity": "sha512-LPpZbSOwTpEC2cgn4hTydySy1Ke+XEu+ETXuoyvuyezHO3Kjdu90KK95Sh9xTbmjrCsUwvWwCOQQNta37VrS9g==", "dev": true, "requires": { - "@webassemblyjs/ast": "1.11.1", - "@webassemblyjs/helper-buffer": "1.11.1", - "@webassemblyjs/helper-wasm-bytecode": "1.11.1", - "@webassemblyjs/wasm-gen": "1.11.1" + "@webassemblyjs/ast": "1.11.6", + "@webassemblyjs/helper-buffer": "1.11.6", + "@webassemblyjs/helper-wasm-bytecode": "1.11.6", + "@webassemblyjs/wasm-gen": "1.11.6" } }, "@webassemblyjs/ieee754": { - "version": "1.11.1", - "resolved": "https://registry.npmjs.org/@webassemblyjs/ieee754/-/ieee754-1.11.1.tgz", - "integrity": "sha512-hJ87QIPtAMKbFq6CGTkZYJivEwZDbQUgYd3qKSadTNOhVY7p+gfP6Sr0lLRVTaG1JjFj+r3YchoqRYxNH3M0GQ==", + "version": "1.11.6", + "resolved": "https://registry.npmjs.org/@webassemblyjs/ieee754/-/ieee754-1.11.6.tgz", + "integrity": "sha512-LM4p2csPNvbij6U1f19v6WR56QZ8JcHg3QIJTlSwzFcmx6WSORicYj6I63f9yU1kEUtrpG+kjkiIAkevHpDXrg==", "dev": true, "requires": { "@xtuc/ieee754": "^1.2.0" } }, "@webassemblyjs/leb128": { - "version": "1.11.1", - "resolved": "https://registry.npmjs.org/@webassemblyjs/leb128/-/leb128-1.11.1.tgz", - "integrity": "sha512-BJ2P0hNZ0u+Th1YZXJpzW6miwqQUGcIHT1G/sf72gLVD9DZ5AdYTqPNbHZh6K1M5VmKvFXwGSWZADz+qBWxeRw==", + "version": "1.11.6", + "resolved": "https://registry.npmjs.org/@webassemblyjs/leb128/-/leb128-1.11.6.tgz", + "integrity": "sha512-m7a0FhE67DQXgouf1tbN5XQcdWoNgaAuoULHIfGFIEVKA6tu/edls6XnIlkmS6FrXAquJRPni3ZZKjw6FSPjPQ==", "dev": true, "requires": { "@xtuc/long": "4.2.2" } }, "@webassemblyjs/utf8": { - "version": "1.11.1", - "resolved": "https://registry.npmjs.org/@webassemblyjs/utf8/-/utf8-1.11.1.tgz", - "integrity": "sha512-9kqcxAEdMhiwQkHpkNiorZzqpGrodQQ2IGrHHxCy+Ozng0ofyMA0lTqiLkVs1uzTRejX+/O0EOT7KxqVPuXosQ==", + "version": "1.11.6", + "resolved": "https://registry.npmjs.org/@webassemblyjs/utf8/-/utf8-1.11.6.tgz", + "integrity": "sha512-vtXf2wTQ3+up9Zsg8sa2yWiQpzSsMyXj0qViVP6xKGCUT8p8YJ6HqI7l5eCnWx1T/FYdsv07HQs2wTFbbof/RA==", "dev": true }, "@webassemblyjs/wasm-edit": { - "version": "1.11.1", - "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-edit/-/wasm-edit-1.11.1.tgz", - "integrity": "sha512-g+RsupUC1aTHfR8CDgnsVRVZFJqdkFHpsHMfJuWQzWU3tvnLC07UqHICfP+4XyL2tnr1amvl1Sdp06TnYCmVkA==", + "version": "1.11.6", + "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-edit/-/wasm-edit-1.11.6.tgz", + "integrity": "sha512-Ybn2I6fnfIGuCR+Faaz7YcvtBKxvoLV3Lebn1tM4o/IAJzmi9AWYIPWpyBfU8cC+JxAO57bk4+zdsTjJR+VTOw==", "dev": true, "requires": { - "@webassemblyjs/ast": "1.11.1", - "@webassemblyjs/helper-buffer": "1.11.1", - "@webassemblyjs/helper-wasm-bytecode": "1.11.1", - "@webassemblyjs/helper-wasm-section": "1.11.1", - "@webassemblyjs/wasm-gen": "1.11.1", - "@webassemblyjs/wasm-opt": "1.11.1", - "@webassemblyjs/wasm-parser": "1.11.1", - "@webassemblyjs/wast-printer": "1.11.1" + "@webassemblyjs/ast": "1.11.6", + "@webassemblyjs/helper-buffer": "1.11.6", + "@webassemblyjs/helper-wasm-bytecode": "1.11.6", + "@webassemblyjs/helper-wasm-section": "1.11.6", + "@webassemblyjs/wasm-gen": "1.11.6", + "@webassemblyjs/wasm-opt": "1.11.6", + "@webassemblyjs/wasm-parser": "1.11.6", + "@webassemblyjs/wast-printer": "1.11.6" } }, "@webassemblyjs/wasm-gen": { - "version": "1.11.1", - "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-gen/-/wasm-gen-1.11.1.tgz", - "integrity": "sha512-F7QqKXwwNlMmsulj6+O7r4mmtAlCWfO/0HdgOxSklZfQcDu0TpLiD1mRt/zF25Bk59FIjEuGAIyn5ei4yMfLhA==", + "version": "1.11.6", + "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-gen/-/wasm-gen-1.11.6.tgz", + "integrity": "sha512-3XOqkZP/y6B4F0PBAXvI1/bky7GryoogUtfwExeP/v7Nzwo1QLcq5oQmpKlftZLbT+ERUOAZVQjuNVak6UXjPA==", "dev": true, "requires": { - "@webassemblyjs/ast": "1.11.1", - "@webassemblyjs/helper-wasm-bytecode": "1.11.1", - "@webassemblyjs/ieee754": "1.11.1", - "@webassemblyjs/leb128": "1.11.1", - "@webassemblyjs/utf8": "1.11.1" + "@webassemblyjs/ast": "1.11.6", + "@webassemblyjs/helper-wasm-bytecode": "1.11.6", + "@webassemblyjs/ieee754": "1.11.6", + "@webassemblyjs/leb128": "1.11.6", + "@webassemblyjs/utf8": "1.11.6" } }, "@webassemblyjs/wasm-opt": { - "version": "1.11.1", - "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-opt/-/wasm-opt-1.11.1.tgz", - "integrity": "sha512-VqnkNqnZlU5EB64pp1l7hdm3hmQw7Vgqa0KF/KCNO9sIpI6Fk6brDEiX+iCOYrvMuBWDws0NkTOxYEb85XQHHw==", + "version": "1.11.6", + "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-opt/-/wasm-opt-1.11.6.tgz", + "integrity": "sha512-cOrKuLRE7PCe6AsOVl7WasYf3wbSo4CeOk6PkrjS7g57MFfVUF9u6ysQBBODX0LdgSvQqRiGz3CXvIDKcPNy4g==", "dev": true, "requires": { - "@webassemblyjs/ast": "1.11.1", - "@webassemblyjs/helper-buffer": "1.11.1", - "@webassemblyjs/wasm-gen": "1.11.1", - "@webassemblyjs/wasm-parser": "1.11.1" + "@webassemblyjs/ast": "1.11.6", + "@webassemblyjs/helper-buffer": "1.11.6", + "@webassemblyjs/wasm-gen": "1.11.6", + "@webassemblyjs/wasm-parser": "1.11.6" } }, "@webassemblyjs/wasm-parser": { - "version": "1.11.1", - "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-parser/-/wasm-parser-1.11.1.tgz", - "integrity": "sha512-rrBujw+dJu32gYB7/Lup6UhdkPx9S9SnobZzRVL7VcBH9Bt9bCBLEuX/YXOOtBsOZ4NQrRykKhffRWHvigQvOA==", + "version": "1.11.6", + "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-parser/-/wasm-parser-1.11.6.tgz", + "integrity": "sha512-6ZwPeGzMJM3Dqp3hCsLgESxBGtT/OeCvCZ4TA1JUPYgmhAx38tTPR9JaKy0S5H3evQpO/h2uWs2j6Yc/fjkpTQ==", "dev": true, "requires": { - "@webassemblyjs/ast": "1.11.1", - "@webassemblyjs/helper-api-error": "1.11.1", - "@webassemblyjs/helper-wasm-bytecode": "1.11.1", - "@webassemblyjs/ieee754": "1.11.1", - "@webassemblyjs/leb128": "1.11.1", - "@webassemblyjs/utf8": "1.11.1" + "@webassemblyjs/ast": "1.11.6", + "@webassemblyjs/helper-api-error": "1.11.6", + "@webassemblyjs/helper-wasm-bytecode": "1.11.6", + "@webassemblyjs/ieee754": "1.11.6", + "@webassemblyjs/leb128": "1.11.6", + "@webassemblyjs/utf8": "1.11.6" } }, "@webassemblyjs/wast-printer": { - "version": "1.11.1", - "resolved": "https://registry.npmjs.org/@webassemblyjs/wast-printer/-/wast-printer-1.11.1.tgz", - "integrity": "sha512-IQboUWM4eKzWW+N/jij2sRatKMh99QEelo3Eb2q0qXkvPRISAj8Qxtmw5itwqK+TTkBuUIE45AxYPToqPtL5gg==", + "version": "1.11.6", + "resolved": "https://registry.npmjs.org/@webassemblyjs/wast-printer/-/wast-printer-1.11.6.tgz", + "integrity": "sha512-JM7AhRcE+yW2GWYaKeHL5vt4xqee5N2WcezptmgyhNS+ScggqcT1OtXykhAb13Sn5Yas0j2uv9tHgrjwvzAP4A==", "dev": true, "requires": { - "@webassemblyjs/ast": "1.11.1", + "@webassemblyjs/ast": "1.11.6", "@xtuc/long": "4.2.2" } }, "@webpack-cli/configtest": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/@webpack-cli/configtest/-/configtest-1.2.0.tgz", - "integrity": "sha512-4FB8Tj6xyVkyqjj1OaTqCjXYULB9FMkqQ8yGrZjRDrYh0nOE+7Lhs45WioWQQMV+ceFlE368Ukhe6xdvJM9Egg==", + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/@webpack-cli/configtest/-/configtest-2.1.1.tgz", + "integrity": "sha512-wy0mglZpDSiSS0XHrVR+BAdId2+yxPSoJW8fsna3ZpYSlufjvxnP4YbKTCBZnNIcGN4r6ZPXV55X4mYExOfLmw==", "dev": true, "requires": {} }, "@webpack-cli/info": { - "version": "1.5.0", - "resolved": "https://registry.npmjs.org/@webpack-cli/info/-/info-1.5.0.tgz", - "integrity": "sha512-e8tSXZpw2hPl2uMJY6fsMswaok5FdlGNRTktvFk2sD8RjH0hE2+XistawJx1vmKteh4NmGmNUrp+Tb2w+udPcQ==", + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/@webpack-cli/info/-/info-2.0.2.tgz", + "integrity": "sha512-zLHQdI/Qs1UyT5UBdWNqsARasIA+AaF8t+4u2aS2nEpBQh2mWIVb8qAklq0eUENnC5mOItrIB4LiS9xMtph18A==", "dev": true, - "requires": { - "envinfo": "^7.7.3" - } + "requires": {} }, "@webpack-cli/serve": { - "version": "1.7.0", - "resolved": "https://registry.npmjs.org/@webpack-cli/serve/-/serve-1.7.0.tgz", - "integrity": "sha512-oxnCNGj88fL+xzV+dacXs44HcDwf1ovs3AuEzvP7mqXw7fQntqIhQ1BRmynh4qEKQSSSRSWVyXRjmTbZIX9V2Q==", + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/@webpack-cli/serve/-/serve-2.0.5.tgz", + "integrity": "sha512-lqaoKnRYBdo1UgDX8uF24AfGMifWK19TxPmM5FHc2vAGxrJ/qtyUyFBWoY1tISZdelsQ5fBcOusifo5o5wSJxQ==", "dev": true, "requires": {} }, @@ -8848,15 +8967,15 @@ } }, "acorn": { - "version": "8.7.0", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.7.0.tgz", - "integrity": "sha512-V/LGr1APy+PXIwKebEWrkZPwoeoF+w1jiOBUmuxuiUIaOHtob8Qc9BTrYo7VuI5fR8tqsy+buA2WFooR5olqvQ==", + "version": "8.8.2", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.8.2.tgz", + "integrity": "sha512-xjIYgE8HBrkpd/sJqOGNspf8uHG+NOHGOw6a/Urj8taM2EXfdNAH2oFcPeIFfsv3+kz/mJrS5VuMqbNLjCa2vw==", "dev": true }, "acorn-import-assertions": { - "version": "1.8.0", - "resolved": "https://registry.npmjs.org/acorn-import-assertions/-/acorn-import-assertions-1.8.0.tgz", - "integrity": "sha512-m7VZ3jwz4eK6A4Vtt8Ew1/mNbP24u0FhdyfA7fSvnJR6LMdfOYnmuIrrJAgrYfYJ10F/otaHTtrtrtmHdMNzEw==", + "version": "1.9.0", + "resolved": "https://registry.npmjs.org/acorn-import-assertions/-/acorn-import-assertions-1.9.0.tgz", + "integrity": "sha512-cmMwop9x+8KFhxvKrKfPYmN6/pKTYYHBqLa0DfvVZcKMJWNyWLnaqND7dx/qn66R7ewM1UX5XMaDVP5wlVTaVA==", "dev": true, "requires": {} }, @@ -8867,14 +8986,14 @@ "dev": true }, "ajv": { - "version": "6.12.6", - "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz", - "integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==", + "version": "8.12.0", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-8.12.0.tgz", + "integrity": "sha512-sRu1kpcO9yLtYxBKvqfTeh9KzZEwO3STyX1HT+4CaDzC6HpTGYhIhPIzj9XuKU7KYDwnaeh5hcOwjy1QuJzBPA==", "dev": true, "requires": { "fast-deep-equal": "^3.1.1", - "fast-json-stable-stringify": "^2.0.0", - "json-schema-traverse": "^0.4.1", + "json-schema-traverse": "^1.0.0", + "require-from-string": "^2.0.2", "uri-js": "^4.2.2" } }, @@ -8885,34 +9004,16 @@ "dev": true, "requires": { "ajv": "^8.0.0" - }, - "dependencies": { - "ajv": { - "version": "8.11.0", - "resolved": "https://registry.npmjs.org/ajv/-/ajv-8.11.0.tgz", - "integrity": "sha512-wGgprdCvMalC0BztXvitD2hC04YffAvtsUn93JbGXYLAtCUO4xd17mCCZQxUOItiBwZvJScWo8NIvQMQ71rdpg==", - "dev": true, - "requires": { - "fast-deep-equal": "^3.1.1", - "json-schema-traverse": "^1.0.0", - "require-from-string": "^2.0.2", - "uri-js": "^4.2.2" - } - }, - "json-schema-traverse": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-1.0.0.tgz", - "integrity": "sha512-NM8/P9n3XjXhIZn1lLhkFaACTOURQXjWhV4BA/RnOv8xvgqtqpAX9IO4mRQxSx1Rlo4tqzeqb0sOlruaOy3dug==", - "dev": true - } } }, "ajv-keywords": { - "version": "3.5.2", - "resolved": "https://registry.npmjs.org/ajv-keywords/-/ajv-keywords-3.5.2.tgz", - "integrity": "sha512-5p6WTN0DdTGVQk6VjcEju19IgaHudalcfabD7yhDGeA6bcQnmL+CpveLJq/3hvfwd1aof6L386Ougkx6RfyMIQ==", + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/ajv-keywords/-/ajv-keywords-5.1.0.tgz", + "integrity": "sha512-YCS/JNFAUyr5vAuhk1DWm1CBxRHW9LbJ2ozWeemrIqpbsqKjHVxYPyi5GC0rjZIT5JxJ3virVTS8wk4i/Z+krw==", "dev": true, - "requires": {} + "requires": { + "fast-deep-equal": "^3.1.3" + } }, "amdefine": { "version": "1.0.1", @@ -8994,45 +9095,43 @@ "dev": true }, "babel-loader": { - "version": "8.3.0", - "resolved": "https://registry.npmjs.org/babel-loader/-/babel-loader-8.3.0.tgz", - "integrity": "sha512-H8SvsMF+m9t15HNLMipppzkC+Y2Yq+v3SonZyU70RBL/h1gxPkH08Ot8pEE9Z4Kd+czyWJClmFS8qzIP9OZ04Q==", + "version": "9.1.3", + "resolved": "https://registry.npmjs.org/babel-loader/-/babel-loader-9.1.3.tgz", + "integrity": "sha512-xG3ST4DglodGf8qSwv0MdeWLhrDsw/32QMdTO5T1ZIp9gQur0HkCyFs7Awskr10JKXFXwpAhiCuYX5oGXnRGbw==", "dev": true, "requires": { - "find-cache-dir": "^3.3.1", - "loader-utils": "^2.0.0", - "make-dir": "^3.1.0", - "schema-utils": "^2.6.5" + "find-cache-dir": "^4.0.0", + "schema-utils": "^4.0.0" } }, "babel-plugin-polyfill-corejs2": { - "version": "0.3.3", - "resolved": "https://registry.npmjs.org/babel-plugin-polyfill-corejs2/-/babel-plugin-polyfill-corejs2-0.3.3.tgz", - "integrity": "sha512-8hOdmFYFSZhqg2C/JgLUQ+t52o5nirNwaWM2B9LWteozwIvM14VSwdsCAUET10qT+kmySAlseadmfeeSWFCy+Q==", + "version": "0.4.6", + "resolved": "https://registry.npmjs.org/babel-plugin-polyfill-corejs2/-/babel-plugin-polyfill-corejs2-0.4.6.tgz", + "integrity": "sha512-jhHiWVZIlnPbEUKSSNb9YoWcQGdlTLq7z1GHL4AjFxaoOUMuuEVJ+Y4pAaQUGOGk93YsVCKPbqbfw3m0SM6H8Q==", "dev": true, "requires": { - "@babel/compat-data": "^7.17.7", - "@babel/helper-define-polyfill-provider": "^0.3.3", - "semver": "^6.1.1" + "@babel/compat-data": "^7.22.6", + "@babel/helper-define-polyfill-provider": "^0.4.3", + "semver": "^6.3.1" } }, "babel-plugin-polyfill-corejs3": { - "version": "0.6.0", - "resolved": "https://registry.npmjs.org/babel-plugin-polyfill-corejs3/-/babel-plugin-polyfill-corejs3-0.6.0.tgz", - "integrity": "sha512-+eHqR6OPcBhJOGgsIar7xoAB1GcSwVUA3XjAd7HJNzOXT4wv6/H7KIdA/Nc60cvUlDbKApmqNvD1B1bzOt4nyA==", + "version": "0.8.5", + "resolved": "https://registry.npmjs.org/babel-plugin-polyfill-corejs3/-/babel-plugin-polyfill-corejs3-0.8.5.tgz", + "integrity": "sha512-Q6CdATeAvbScWPNLB8lzSO7fgUVBkQt6zLgNlfyeCr/EQaEQR+bWiBYYPYAFyE528BMjRhL+1QBMOI4jc/c5TA==", "dev": true, "requires": { - "@babel/helper-define-polyfill-provider": "^0.3.3", - "core-js-compat": "^3.25.1" + "@babel/helper-define-polyfill-provider": "^0.4.3", + "core-js-compat": "^3.32.2" } }, "babel-plugin-polyfill-regenerator": { - "version": "0.4.1", - "resolved": "https://registry.npmjs.org/babel-plugin-polyfill-regenerator/-/babel-plugin-polyfill-regenerator-0.4.1.tgz", - "integrity": "sha512-NtQGmyQDXjQqQ+IzRkBVwEOz9lQ4zxAQZgoAYEtU9dJjnl1Oc98qnN7jcp+bE7O7aYzVpavXE3/VKXNzUbh7aw==", + "version": "0.5.3", + "resolved": "https://registry.npmjs.org/babel-plugin-polyfill-regenerator/-/babel-plugin-polyfill-regenerator-0.5.3.tgz", + "integrity": "sha512-8sHeDOmXC8csczMrYEOf0UTNa4yE2SxV5JGeT/LP1n0OYVDUUFPxG9vdk2AlDlIit4t+Kf0xCtpgXPBwnn/9pw==", "dev": true, "requires": { - "@babel/helper-define-polyfill-provider": "^0.3.3" + "@babel/helper-define-polyfill-provider": "^0.4.3" } }, "balanced-match": { @@ -9140,15 +9239,15 @@ } }, "browserslist": { - "version": "4.21.4", - "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.21.4.tgz", - "integrity": "sha512-CBHJJdDmgjl3daYjN5Cp5kbTf1mUhZoS+beLklHIvkOWscs83YAhLlF3Wsh/lciQYAcbBJgTOD44VtG31ZM4Hw==", + "version": "4.22.1", + "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.22.1.tgz", + "integrity": "sha512-FEVc202+2iuClEhZhrWy6ZiAcRLvNMyYcxZ8raemul1DYVOVdFsbqckWLdsixQZCpJlwe77Z3UTalE7jsjnKfQ==", "dev": true, "requires": { - "caniuse-lite": "^1.0.30001400", - "electron-to-chromium": "^1.4.251", - "node-releases": "^2.0.6", - "update-browserslist-db": "^1.0.9" + "caniuse-lite": "^1.0.30001541", + "electron-to-chromium": "^1.4.535", + "node-releases": "^2.0.13", + "update-browserslist-db": "^1.0.13" } }, "buffer-from": { @@ -9184,9 +9283,9 @@ } }, "caniuse-lite": { - "version": "1.0.30001430", - "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001430.tgz", - "integrity": "sha512-IB1BXTZKPDVPM7cnV4iaKaHxckvdr/3xtctB3f7Hmenx3qYBhGtTZ//7EllK66aKXW98Lx0+7Yr0kxBtIt3tzg==", + "version": "1.0.30001550", + "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001550.tgz", + "integrity": "sha512-p82WjBYIypO0ukTsd/FG3Xxs+4tFeaY9pfT4amQL8KWtYH7H9nYwReGAbMTJ0hsmRO8IfDtsS6p3ZWj8+1c2RQ==", "dev": true }, "chalk": { @@ -9201,9 +9300,9 @@ } }, "chance": { - "version": "1.1.8", - "resolved": "https://registry.npmjs.org/chance/-/chance-1.1.8.tgz", - "integrity": "sha512-v7fi5Hj2VbR6dJEGRWLmJBA83LJMS47pkAbmROFxHWd9qmE1esHRZW8Clf1Fhzr3rjxnNZVCjOEv/ivFxeIMtg==", + "version": "1.1.9", + "resolved": "https://registry.npmjs.org/chance/-/chance-1.1.9.tgz", + "integrity": "sha512-TfxnA/DcZXRTA4OekA2zL9GH8qscbbl6X0ZqU4tXhGveVY/mXWvEQLt5GwZcYXTEyEFflVtj+pG8nc8EwSm1RQ==", "dev": true }, "char-regex": { @@ -9241,12 +9340,13 @@ "dev": true }, "class-validator": { - "version": "0.13.2", - "resolved": "https://registry.npmjs.org/class-validator/-/class-validator-0.13.2.tgz", - "integrity": "sha512-yBUcQy07FPlGzUjoLuUfIOXzgynnQPPruyK1Ge2B74k9ROwnle1E+NxLWnUv5OLU8hA/qL5leAE9XnXq3byaBw==", + "version": "0.14.0", + "resolved": "https://registry.npmjs.org/class-validator/-/class-validator-0.14.0.tgz", + "integrity": "sha512-ct3ltplN8I9fOwUd8GrP8UQixwff129BkEtuWDKL5W45cQuLd19xqmTLu5ge78YDm/fdje6FMt0hGOhl0lii3A==", "dev": true, "requires": { - "libphonenumber-js": "^1.9.43", + "@types/validator": "^13.7.10", + "libphonenumber-js": "^1.10.14", "validator": "^13.7.0" } }, @@ -9305,10 +9405,10 @@ "integrity": "sha512-OkTL9umf+He2DZkUq8f8J9of7yL6RJKI24dVITBmNfZBmri9zYZQrKkuXiKhyfPSu8tUhnVBB1iKXevvnlR4Ww==", "dev": true }, - "commondir": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/commondir/-/commondir-1.0.1.tgz", - "integrity": "sha512-W9pAhw0ja1Edb5GVdIF1mjZw/ASI0AlShXM83UUGe2DVr5TdAPEA1OA8m/g8zWp9x6On7gqufY+FatDbC3MDQg==", + "common-path-prefix": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/common-path-prefix/-/common-path-prefix-3.0.0.tgz", + "integrity": "sha512-QE33hToZseCH3jS0qN96O/bSh3kaw/h+Tq7ngyY9eWDUnTlTNUyqfqvCXioLe5Na5jFsL78ra/wuBU4iuEgd4w==", "dev": true }, "compressible": { @@ -9360,47 +9460,6 @@ "requires": { "schema-utils": "^4.0.0", "serialize-javascript": "^6.0.0" - }, - "dependencies": { - "ajv": { - "version": "8.11.0", - "resolved": "https://registry.npmjs.org/ajv/-/ajv-8.11.0.tgz", - "integrity": "sha512-wGgprdCvMalC0BztXvitD2hC04YffAvtsUn93JbGXYLAtCUO4xd17mCCZQxUOItiBwZvJScWo8NIvQMQ71rdpg==", - "dev": true, - "requires": { - "fast-deep-equal": "^3.1.1", - "json-schema-traverse": "^1.0.0", - "require-from-string": "^2.0.2", - "uri-js": "^4.2.2" - } - }, - "ajv-keywords": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/ajv-keywords/-/ajv-keywords-5.1.0.tgz", - "integrity": "sha512-YCS/JNFAUyr5vAuhk1DWm1CBxRHW9LbJ2ozWeemrIqpbsqKjHVxYPyi5GC0rjZIT5JxJ3virVTS8wk4i/Z+krw==", - "dev": true, - "requires": { - "fast-deep-equal": "^3.1.3" - } - }, - "json-schema-traverse": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-1.0.0.tgz", - "integrity": "sha512-NM8/P9n3XjXhIZn1lLhkFaACTOURQXjWhV4BA/RnOv8xvgqtqpAX9IO4mRQxSx1Rlo4tqzeqb0sOlruaOy3dug==", - "dev": true - }, - "schema-utils": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-4.0.0.tgz", - "integrity": "sha512-1edyXKgh6XnJsJSQ8mKWXnN/BVaIbFMLpouRUrXgVq7WYne5kw3MW7UPhO44uRXQSIpTSXoJbmrR2X0w9kUTyg==", - "dev": true, - "requires": { - "@types/json-schema": "^7.0.9", - "ajv": "^8.8.0", - "ajv-formats": "^2.1.1", - "ajv-keywords": "^5.0.0" - } - } } }, "concat-map": { @@ -9439,13 +9498,10 @@ "dev": true }, "convert-source-map": { - "version": "1.8.0", - "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-1.8.0.tgz", - "integrity": "sha512-+OQdjP49zViI/6i7nIJpA8rAl4sV/JdPfU9nZs3VqOwGIgizICvuN2ru6fMd+4llL0tar18UYJXfZ/TWtmhUjA==", - "dev": true, - "requires": { - "safe-buffer": "~5.1.1" - } + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-2.0.0.tgz", + "integrity": "sha512-Kvp459HrV2FEJ1CAsi1Ku+MY3kasH19TFykTz2xWmMeq6bk2NU3XXvfJ+Q61m0xktWwt+1HSYf3JZsTms3aRJg==", + "dev": true }, "cookie": { "version": "0.5.0", @@ -9460,18 +9516,18 @@ "dev": true }, "core-js": { - "version": "3.26.0", - "resolved": "https://registry.npmjs.org/core-js/-/core-js-3.26.0.tgz", - "integrity": "sha512-+DkDrhoR4Y0PxDz6rurahuB+I45OsEUv8E1maPTB6OuHRohMMcznBq9TMpdpDMm/hUPob/mJJS3PqgbHpMTQgw==", + "version": "3.33.0", + "resolved": "https://registry.npmjs.org/core-js/-/core-js-3.33.0.tgz", + "integrity": "sha512-HoZr92+ZjFEKar5HS6MC776gYslNOKHt75mEBKWKnPeFDpZ6nH5OeF3S6HFT1mUAUZKrzkez05VboaX8myjSuw==", "dev": true }, "core-js-compat": { - "version": "3.26.0", - "resolved": "https://registry.npmjs.org/core-js-compat/-/core-js-compat-3.26.0.tgz", - "integrity": "sha512-piOX9Go+Z4f9ZiBFLnZ5VrOpBl0h7IGCkiFUN11QTe6LjAvOT3ifL/5TdoizMh99hcGy5SoLyWbapIY/PIb/3A==", + "version": "3.33.0", + "resolved": "https://registry.npmjs.org/core-js-compat/-/core-js-compat-3.33.0.tgz", + "integrity": "sha512-0w4LcLXsVEuNkIqwjjf9rjCoPhK8uqA4tMRh4Ge26vfLtUutshn+aRJU21I9LCJlh2QQHfisNToLjw1XEJLTWw==", "dev": true, "requires": { - "browserslist": "^4.21.4" + "browserslist": "^4.22.1" } }, "core-util-is": { @@ -9652,9 +9708,9 @@ "dev": true }, "electron-to-chromium": { - "version": "1.4.284", - "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.284.tgz", - "integrity": "sha512-M8WEXFuKXMYMVr45fo8mq0wUrrJHheiKZf6BArTKk9ZBYCKJEOU5H8cdWgDT+qCVZf7Na4lVUaZsA+h6uA9+PA==", + "version": "1.4.558", + "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.558.tgz", + "integrity": "sha512-j9IcGmfkyN5MBH/0Xzg45GDHasXsnwEJDM6Xnr9H7GlGUni+JH4q6xp6Nk7NV5LjTmoEFBqhILIqg1McJrv6uA==", "dev": true }, "emojis-list": { @@ -9670,28 +9726,28 @@ "dev": true }, "engine.io-client": { - "version": "6.2.3", - "resolved": "https://registry.npmjs.org/engine.io-client/-/engine.io-client-6.2.3.tgz", - "integrity": "sha512-aXPtgF1JS3RuuKcpSrBtimSjYvrbhKW9froICH4s0F3XQWLxsKNxqzG39nnvQZQnva4CMvUK63T7shevxRyYHw==", + "version": "6.5.2", + "resolved": "https://registry.npmjs.org/engine.io-client/-/engine.io-client-6.5.2.tgz", + "integrity": "sha512-CQZqbrpEYnrpGqC07a9dJDz4gePZUgTPMU3NKJPSeQOyw27Tst4Pl3FemKoFGAlHzgZmKjoRmiJvbWfhCXUlIg==", "dev": true, "requires": { "@socket.io/component-emitter": "~3.1.0", "debug": "~4.3.1", - "engine.io-parser": "~5.0.3", - "ws": "~8.2.3", + "engine.io-parser": "~5.2.1", + "ws": "~8.11.0", "xmlhttprequest-ssl": "~2.0.0" } }, "engine.io-parser": { - "version": "5.0.4", - "resolved": "https://registry.npmjs.org/engine.io-parser/-/engine.io-parser-5.0.4.tgz", - "integrity": "sha512-+nVFp+5z1E3HcToEnO7ZIj3g+3k9389DvWtvJZz0T6/eOCPIyyxehFcedoYrZQrp0LgQbD9pPXhpMBKMd5QURg==", + "version": "5.2.1", + "resolved": "https://registry.npmjs.org/engine.io-parser/-/engine.io-parser-5.2.1.tgz", + "integrity": "sha512-9JktcM3u18nU9N2Lz3bWeBgxVgOKpw7yhRaoxQA3FUDZzzw+9WlA6p4G4u0RixNkg14fH7EfEc/RhpurtiROTQ==", "dev": true }, "enhanced-resolve": { - "version": "5.10.0", - "resolved": "https://registry.npmjs.org/enhanced-resolve/-/enhanced-resolve-5.10.0.tgz", - "integrity": "sha512-T0yTFjdpldGY8PmuXXR0PyQ1ufZpEGiHVrp7zHKB7jdR4qlmZHhONVM5AQOAWXuF/w3dnHbEQVrNptJgt7F+cQ==", + "version": "5.15.0", + "resolved": "https://registry.npmjs.org/enhanced-resolve/-/enhanced-resolve-5.15.0.tgz", + "integrity": "sha512-LXYT42KJ7lpIKECr2mAXIaMldcNCh/7E0KBKOu4KSfkHmP+mZmSs+8V5gBAqisWBy0OO4W5Oyys0GO1Y8KtdKg==", "dev": true, "requires": { "graceful-fs": "^4.2.4", @@ -9705,9 +9761,9 @@ "dev": true }, "envinfo": { - "version": "7.8.1", - "resolved": "https://registry.npmjs.org/envinfo/-/envinfo-7.8.1.tgz", - "integrity": "sha512-/o+BXHmB7ocbHEAs6F2EnG0ogybVVUdkRunTT2glZU9XAaGmhqskrvKwqXuDfNjEO0LZKWdejEEpnq8aM0tOaw==", + "version": "7.10.0", + "resolved": "https://registry.npmjs.org/envinfo/-/envinfo-7.10.0.tgz", + "integrity": "sha512-ZtUjZO6l5mwTHvc1L9+1q5p/R3wTopcfqMW8r5t8SJSKqeVI/LtajORwRFEKpEFuekjD0VBjwu1HMxL4UalIRw==", "dev": true }, "es-abstract": { @@ -9742,9 +9798,9 @@ } }, "es-module-lexer": { - "version": "0.9.3", - "resolved": "https://registry.npmjs.org/es-module-lexer/-/es-module-lexer-0.9.3.tgz", - "integrity": "sha512-1HQ2M2sPtxwnvOvT1ZClHyQDiggdNjURWpY2we6aMKCQiUVxTmVs2UYPLIrD84sS+kMdUwfBSylbJPwNnBrnHQ==", + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/es-module-lexer/-/es-module-lexer-1.3.1.tgz", + "integrity": "sha512-JUFAyicQV9mXc3YRxPnDlrfBKpqt6hUYzz9/boprUJHs4e4KVr3XwOF70doO6gwXUor6EWZJAyWAfKki84t20Q==", "dev": true }, "es-to-primitive": { @@ -9783,9 +9839,9 @@ "dev": true }, "eslint-scope": { - "version": "7.1.0", - "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-7.1.0.tgz", - "integrity": "sha512-aWwkhnS0qAXqNOgKOK0dJ2nvzEbhEvpy8OlJ9kZ0FeZnA6zpjv1/Vei+puGFFX7zkPCkHHXb7IDX3A+7yPrRWg==", + "version": "7.1.1", + "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-7.1.1.tgz", + "integrity": "sha512-QKQM/UXpIiHcLqJ5AOyIW7XZmzjkzQXYE54n1++wb0u9V/abW3l9uQnxX8Z5Xd18xyKIMTUAyQ0k1e8pz6LUrw==", "dev": true, "requires": { "esrecurse": "^4.3.0", @@ -9793,9 +9849,9 @@ } }, "eslint-visitor-keys": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-3.2.0.tgz", - "integrity": "sha512-IOzT0X126zn7ALX0dwFiUQEdsfzrm4+ISsQS8nukaJXwEyYKRSnEIIDULYg1mCtGp7UUXgfGl7BIolXREQK+XQ==", + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-3.3.0.tgz", + "integrity": "sha512-mQ+suqKJVyeuwGYHAdjMFqjCyfl8+Ldnxuyp3ldiMBFKkvytrXUZWaiPCEav8qDHKty44bD+qV1IP4T+w+xXRA==", "dev": true }, "esprima": { @@ -10003,14 +10059,67 @@ } }, "find-cache-dir": { - "version": "3.3.2", - "resolved": "https://registry.npmjs.org/find-cache-dir/-/find-cache-dir-3.3.2.tgz", - "integrity": "sha512-wXZV5emFEjrridIgED11OoUKLxiYjAcqot/NJdAkOhlJ+vGzwhOAfcG5OX1jP+S0PcjEn8bdMJv+g2jwQ3Onig==", + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/find-cache-dir/-/find-cache-dir-4.0.0.tgz", + "integrity": "sha512-9ZonPT4ZAK4a+1pUPVPZJapbi7O5qbbJPdYw/NOQWZZbVLdDTYM3A4R9z/DpAM08IDaFGsvPgiGZ82WEwUDWjg==", "dev": true, "requires": { - "commondir": "^1.0.1", - "make-dir": "^3.0.2", - "pkg-dir": "^4.1.0" + "common-path-prefix": "^3.0.0", + "pkg-dir": "^7.0.0" + }, + "dependencies": { + "find-up": { + "version": "6.3.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-6.3.0.tgz", + "integrity": "sha512-v2ZsoEuVHYy8ZIlYqwPe/39Cy+cFDzp4dXPaxNvkEuouymu+2Jbz0PxpKarJHYJTmv2HWT3O382qY8l4jMWthw==", + "dev": true, + "requires": { + "locate-path": "^7.1.0", + "path-exists": "^5.0.0" + } + }, + "locate-path": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-7.2.0.tgz", + "integrity": "sha512-gvVijfZvn7R+2qyPX8mAuKcFGDf6Nc61GdvGafQsHL0sBIxfKzA+usWn4GFC/bk+QdwPUD4kWFJLhElipq+0VA==", + "dev": true, + "requires": { + "p-locate": "^6.0.0" + } + }, + "p-limit": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-4.0.0.tgz", + "integrity": "sha512-5b0R4txpzjPWVw/cXXUResoD4hb6U/x9BH08L7nw+GN1sezDzPdxeRvpc9c433fZhBan/wusjbCsqwqm4EIBIQ==", + "dev": true, + "requires": { + "yocto-queue": "^1.0.0" + } + }, + "p-locate": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-6.0.0.tgz", + "integrity": "sha512-wPrq66Llhl7/4AGC6I+cqxT07LhXvWL08LNXz1fENOw0Ap4sRZZ/gZpTTJ5jpurzzzfS2W/Ge9BY3LgLjCShcw==", + "dev": true, + "requires": { + "p-limit": "^4.0.0" + } + }, + "path-exists": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-5.0.0.tgz", + "integrity": "sha512-RjhtfwJOxzcFmNOi6ltcbcu4Iu+FL3zEj83dk4kAS+fVpTxXLO1b38RvJgT/0QwvV/L3aY9TAnyv0EOqW4GoMQ==", + "dev": true + }, + "pkg-dir": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/pkg-dir/-/pkg-dir-7.0.0.tgz", + "integrity": "sha512-Ie9z/WINcxxLp27BKOCHGde4ITq9UklYKDzVo1nhk5sqGEXU3FpkwP5GM2voTGJkGd9B3Otl+Q4uwSOeSUtOBA==", + "dev": true, + "requires": { + "find-up": "^6.3.0" + } + } } }, "find-up": { @@ -10225,9 +10334,9 @@ "dev": true }, "howler": { - "version": "2.2.3", - "resolved": "https://registry.npmjs.org/howler/-/howler-2.2.3.tgz", - "integrity": "sha512-QM0FFkw0LRX1PR8pNzJVAY25JhIWvbKMBFM4gqk+QdV+kPXOhleWGCB6AiAF/goGjIHK2e/nIElplvjQwhr0jg==", + "version": "2.2.4", + "resolved": "https://registry.npmjs.org/howler/-/howler-2.2.4.tgz", + "integrity": "sha512-iARIBPgcQrwtEr+tALF+rapJ8qSc+Set2GJQl7xT1MQzWaVkFebdJhR3alVlSiUf5U7nAANKuj3aWpwerocD5w==", "dev": true }, "hpack.js": { @@ -10290,9 +10399,9 @@ } }, "html-webpack-plugin": { - "version": "5.5.0", - "resolved": "https://registry.npmjs.org/html-webpack-plugin/-/html-webpack-plugin-5.5.0.tgz", - "integrity": "sha512-sy88PC2cRTVxvETRgUHFrL4No3UxvcH8G1NepGhqaTT+GXN2kTamqasot0inS5hXeg1cMbFDt27zzo9p35lZVw==", + "version": "5.5.3", + "resolved": "https://registry.npmjs.org/html-webpack-plugin/-/html-webpack-plugin-5.5.3.tgz", + "integrity": "sha512-6YrDKTuqaP/TquFH7h4srYWsZx+x6k6+FbsTm0ziCwGHDP78Unr1r9F/H4+sGmMbX08GQcJ+K64x55b+7VM/jg==", "dev": true, "requires": { "@types/html-minifier-terser": "^6.0.0", @@ -10416,9 +10525,9 @@ } }, "interpret": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/interpret/-/interpret-2.2.0.tgz", - "integrity": "sha512-Ju0Bz/cEia55xDwUWEa8+olFpCiQoypjnQySseKtmjNrnps3P+xfpUmGr90T7yjlVJmOtybRvPXhKMbHr+fWnw==", + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/interpret/-/interpret-3.1.1.tgz", + "integrity": "sha512-6xwYfHbajpoF0xLW+iwLkhwgvLoZDfjYfoFNu8ftMoXINzwuymNLd9u/KmwtdT2GbR+/Cz66otEGEVVUHX9QLQ==", "dev": true }, "inversify": { @@ -10484,9 +10593,9 @@ "dev": true }, "is-core-module": { - "version": "2.10.0", - "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.10.0.tgz", - "integrity": "sha512-Erxj2n/LDAZ7H8WNJXd9tw38GYM3dv8rk8Zcs+jJuxYTW7sozH+SS8NtrSjVL1/vpLvWi1hxy96IzjJ3EHTJJg==", + "version": "2.13.0", + "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.13.0.tgz", + "integrity": "sha512-Z7dk6Qo8pOCp3l4tsX2C5ZVas4V+UxwQodwZhLopL91TX8UyyHEXafPcyoeeWuLrwzHcr3igO78wNLwHJHsMCQ==", "dev": true, "requires": { "has": "^1.0.3" @@ -10670,26 +10779,26 @@ "dev": true }, "javascript-obfuscator": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/javascript-obfuscator/-/javascript-obfuscator-4.0.0.tgz", - "integrity": "sha512-vS/8w/9eKISzwXNLd+OLMCCwjD+dFMdOlCDOo919iR/MWdBs+7u1ybpwRoWOmODToPQKVYw5GasvZoIiPs5nPw==", + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/javascript-obfuscator/-/javascript-obfuscator-4.1.0.tgz", + "integrity": "sha512-ckC0VFKQ0/sFtLH9apW/ZLfsP8LuZqZhVEM4VTJ5KLzyLaodW6C1lTU8808eboDmddKyvd2uyRx5bzc0Me0GYg==", "dev": true, "requires": { "@javascript-obfuscator/escodegen": "2.3.0", "@javascript-obfuscator/estraverse": "5.4.0", - "acorn": "8.7.0", + "acorn": "8.8.2", "assert": "2.0.0", "chalk": "4.1.2", - "chance": "1.1.8", - "class-validator": "0.13.2", - "commander": "9.0.0", - "eslint-scope": "7.1.0", - "eslint-visitor-keys": "3.2.0", + "chance": "1.1.9", + "class-validator": "0.14.0", + "commander": "10.0.0", + "eslint-scope": "7.1.1", + "eslint-visitor-keys": "3.3.0", "fast-deep-equal": "3.1.3", "inversify": "6.0.1", "js-string-escape": "1.0.1", "md5": "2.3.0", - "mkdirp": "1.0.4", + "mkdirp": "2.1.3", "multimatch": "5.0.0", "opencollective-postinstall": "2.0.3", "process": "0.11.10", @@ -10697,7 +10806,7 @@ "source-map-support": "0.5.21", "string-template": "1.0.0", "stringz": "2.1.0", - "tslib": "2.3.1" + "tslib": "2.5.0" }, "dependencies": { "ansi-styles": { @@ -10735,9 +10844,9 @@ "dev": true }, "commander": { - "version": "9.0.0", - "resolved": "https://registry.npmjs.org/commander/-/commander-9.0.0.tgz", - "integrity": "sha512-JJfP2saEKbQqvW+FI93OYUB4ByV5cizMpFMiiJI8xDbBvQvSkIk0VvQdn1CZ8mqAO8Loq2h0gYTYtDFUZUeERw==", + "version": "10.0.0", + "resolved": "https://registry.npmjs.org/commander/-/commander-10.0.0.tgz", + "integrity": "sha512-zS5PnTI22FIRM6ylNW8G4Ap0IEOyk62fhLSD0+uHRT9McRCLGpkVNvao4bjimpK/GShynyQkFFxHhwMcETmduA==", "dev": true }, "has-flag": { @@ -10754,12 +10863,6 @@ "requires": { "has-flag": "^4.0.0" } - }, - "tslib": { - "version": "2.3.1", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.3.1.tgz", - "integrity": "sha512-77EbyPPpMz+FRFRuAFlWMtmgUWGe9UOG2Z25NqCwiIjRhOf5iKGuzSe5P2w1laq+FkRy4p+PCuVkJSGkzTEKVw==", - "dev": true } } }, @@ -10816,15 +10919,15 @@ "dev": true }, "json-schema-traverse": { - "version": "0.4.1", - "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", - "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==", + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-1.0.0.tgz", + "integrity": "sha512-NM8/P9n3XjXhIZn1lLhkFaACTOURQXjWhV4BA/RnOv8xvgqtqpAX9IO4mRQxSx1Rlo4tqzeqb0sOlruaOy3dug==", "dev": true }, "json5": { - "version": "2.2.1", - "resolved": "https://registry.npmjs.org/json5/-/json5-2.2.1.tgz", - "integrity": "sha512-1hqLFMSrGHRHxav9q9gNjJ5EXznIxGVO09xQRrwplcS8qs28pZ8s8hupZAmqDwZUmVZ2Qb2jnyPOWcDH8m8dlA==", + "version": "2.2.3", + "resolved": "https://registry.npmjs.org/json5/-/json5-2.2.3.tgz", + "integrity": "sha512-XmOWe7eyHYH14cLdVPoyg+GOH3rYX++KpzrylJwSW98t3Nk+U8XOl8FWKOgwtzdb8lXGf6zYwDUzeHMWfxasyg==", "dev": true }, "kind-of": { @@ -10833,6 +10936,16 @@ "integrity": "sha512-dcS1ul+9tmeD95T+x28/ehLgd9mENa3LsvDTtzm3vyBEO7RPptvAD+t44WVXaUjTBRcrpFeFlC8WCruUR456hw==", "dev": true }, + "launch-editor": { + "version": "2.6.1", + "resolved": "https://registry.npmjs.org/launch-editor/-/launch-editor-2.6.1.tgz", + "integrity": "sha512-eB/uXmFVpY4zezmGp5XtU21kwo7GBbKB+EQ+UZeWtGb9yAM5xt/Evk+lYH3eRNAtId+ej4u7TYPFZ07w4s7rRw==", + "dev": true, + "requires": { + "picocolors": "^1.0.0", + "shell-quote": "^1.8.1" + } + }, "levn": { "version": "0.3.0", "resolved": "https://registry.npmjs.org/levn/-/levn-0.3.0.tgz", @@ -10844,9 +10957,9 @@ } }, "libphonenumber-js": { - "version": "1.10.13", - "resolved": "https://registry.npmjs.org/libphonenumber-js/-/libphonenumber-js-1.10.13.tgz", - "integrity": "sha512-b74iyWmwb4GprAUPjPkJ11GTC7KX4Pd3onpJfKxYyY8y9Rbb4ERY47LvCMEDM09WD3thiLDMXtkfDK/AX+zT7Q==", + "version": "1.10.48", + "resolved": "https://registry.npmjs.org/libphonenumber-js/-/libphonenumber-js-1.10.48.tgz", + "integrity": "sha512-Vvcgt4+o8+puIBJZLdMshPYx9nRN3/kTT7HPtOyfYrSQuN9PGBF1KUv0g07fjNzt4E4GuA7FnsLb+WeAMzyRQg==", "dev": true }, "loader-runner": { @@ -10856,9 +10969,9 @@ "dev": true }, "loader-utils": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/loader-utils/-/loader-utils-2.0.3.tgz", - "integrity": "sha512-THWqIsn8QRnvLl0shHYVBN9syumU8pYWEHPTmkiVGd+7K5eFNVSY6AJhRvgGF70gg1Dz+l/k8WicvFCxdEs60A==", + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/loader-utils/-/loader-utils-2.0.4.tgz", + "integrity": "sha512-xXqpXoINfFhgua9xiqD8fPFHgkoq1mmmpE92WlDbm9rNRd/EbRb+Gqf908T2DMfuHjjJlksiK2RbHVOdD/MqSw==", "dev": true, "requires": { "big.js": "^5.2.2", @@ -10896,13 +11009,13 @@ "tslib": "^2.0.3" } }, - "make-dir": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-3.1.0.tgz", - "integrity": "sha512-g3FeP20LNwhALb/6Cz6Dd4F2ngze0jz7tbzrD2wAV+o9FeNHe4rL+yK2md0J/fiSf1sa1ADhXqi5+oVwOM/eGw==", + "lru-cache": { + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-5.1.1.tgz", + "integrity": "sha512-KpNARQA3Iwv+jTA0utUVVbrh+Jlrr1Fv0e56GGzAFOXN7dk/FviaDW8LHmK52DlcH4WP2n6gI8vN1aesBFgo9w==", "dev": true, "requires": { - "semver": "^6.0.0" + "yallist": "^3.0.2" } }, "md5": { @@ -11002,9 +11115,9 @@ } }, "mkdirp": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-1.0.4.tgz", - "integrity": "sha512-vVqVZQyf3WLx2Shd0qJ9xuvqgAyKPLAiqITEtqW0oIUjzo3PePDd6fW9iFz30ef7Ysp/oiWqbhszeGWW2T6Gzw==", + "version": "2.1.3", + "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-2.1.3.tgz", + "integrity": "sha512-sjAkg21peAG9HS+Dkx7hlG9Ztx7HLeKnvB3NQRcu/mltCVmvkF0pisbiTSfDVYTT86XEfZrTUosLdZLStquZUw==", "dev": true }, "ms": { @@ -11085,9 +11198,9 @@ "dev": true }, "node-releases": { - "version": "2.0.6", - "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-2.0.6.tgz", - "integrity": "sha512-PiVXnNuFm5+iYkLBNeq5211hvO38y63T0i2KKh2KnUs3RpzJ+JtODFjkD8yjLwnDkTYF1eKXheUwdssR+NRZdg==", + "version": "2.0.13", + "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-2.0.13.tgz", + "integrity": "sha512-uYr7J37ae/ORWdZeQ1xxMJe3NtdmqMC/JZK+geofDrkLUApKRHPd18/TxtBOJ4A0/+uUIliorNrfYV6s1b02eQ==", "dev": true }, "normalize-path": { @@ -11309,9 +11422,9 @@ "dev": true }, "phasereditor2d-launcher": { - "version": "3.35.1", - "resolved": "https://registry.npmjs.org/phasereditor2d-launcher/-/phasereditor2d-launcher-3.35.1.tgz", - "integrity": "sha512-EvI06Qh3vjs7YWWiC/kYAOsIps/xe+OFgmi/KRd+RlAno18zlYS0/WUDsMUasW+jb4FbiV/aJR4N4gtzsEmQNA==", + "version": "3.63.0", + "resolved": "https://registry.npmjs.org/phasereditor2d-launcher/-/phasereditor2d-launcher-3.63.0.tgz", + "integrity": "sha512-O02ZGOaTrOikH+ZTc4WyBTjXvnBQuBg0rifaXHTI2zVeD5Y1zv+nxaq8pgMZe6FWhwgVmF+0D9I47qN1UN0FkA==", "dev": true, "requires": { "adm-zip": "^0.5.5" @@ -11461,12 +11574,12 @@ } }, "rechoir": { - "version": "0.7.1", - "resolved": "https://registry.npmjs.org/rechoir/-/rechoir-0.7.1.tgz", - "integrity": "sha512-/njmZ8s1wVeR6pjTZ+0nCnv8SpZNRMT2D1RLOJQESlYFDBvwpTA4KWJpZ+sBJ4+vhjILRcK7JIFdGCdxEAAitg==", + "version": "0.8.0", + "resolved": "https://registry.npmjs.org/rechoir/-/rechoir-0.8.0.tgz", + "integrity": "sha512-/vxpCXddiX8NGfGO/mTafwjq4aFa/71pvamip0++IQk3zG8cbCj0fifNPrjjF1XMXUne91jL9OoxmdykoEtifQ==", "dev": true, "requires": { - "resolve": "^1.9.0" + "resolve": "^1.20.0" } }, "reflect-metadata": { @@ -11482,24 +11595,24 @@ "dev": true }, "regenerate-unicode-properties": { - "version": "10.0.1", - "resolved": "https://registry.npmjs.org/regenerate-unicode-properties/-/regenerate-unicode-properties-10.0.1.tgz", - "integrity": "sha512-vn5DU6yg6h8hP/2OkQo3K7uVILvY4iu0oI4t3HFa81UPkhGJwkRwM10JEc3upjdhHjs/k8GJY1sRBhk5sr69Bw==", + "version": "10.1.1", + "resolved": "https://registry.npmjs.org/regenerate-unicode-properties/-/regenerate-unicode-properties-10.1.1.tgz", + "integrity": "sha512-X007RyZLsCJVVrjgEFVpLUTZwyOZk3oiL75ZcuYjlIWd6rNJtOjkBwQc5AsRrpbKVkxN6sklw/k/9m2jJYOf8Q==", "dev": true, "requires": { "regenerate": "^1.4.2" } }, "regenerator-runtime": { - "version": "0.13.9", - "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.13.9.tgz", - "integrity": "sha512-p3VT+cOEgxFsRRA9X4lkI1E+k2/CtnKtU4gcxyaCUreilL/vqI6CdZ3wxVUx3UOUg+gnUOQQcRI7BmSI656MYA==", + "version": "0.14.0", + "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.14.0.tgz", + "integrity": "sha512-srw17NI0TUWHuGa5CFGGmhfNIeja30WMBfbslPNhf6JrqQlLN5gcrvig1oqPxiVaXb0oW0XRKtH6Nngs5lKCIA==", "dev": true }, "regenerator-transform": { - "version": "0.15.0", - "resolved": "https://registry.npmjs.org/regenerator-transform/-/regenerator-transform-0.15.0.tgz", - "integrity": "sha512-LsrGtPmbYg19bcPHwdtmXwbW+TqNvtY4riE3P83foeHRroMbH6/2ddFBfab3t7kbzc7v7p4wbkIecHImqt0QNg==", + "version": "0.15.2", + "resolved": "https://registry.npmjs.org/regenerator-transform/-/regenerator-transform-0.15.2.tgz", + "integrity": "sha512-hfMp2BoF0qOk3uc5V20ALGDS2ddjQaLrdl7xrGXvAIow7qeWRM2VA2HuCHkUKk9slq3VwEwLNK3DFBqDfPGYtg==", "dev": true, "requires": { "@babel/runtime": "^7.8.4" @@ -11517,29 +11630,23 @@ } }, "regexpu-core": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/regexpu-core/-/regexpu-core-5.1.0.tgz", - "integrity": "sha512-bb6hk+xWd2PEOkj5It46A16zFMs2mv86Iwpdu94la4S3sJ7C973h2dHpYKwIBGaWSO7cIRJ+UX0IeMaWcO4qwA==", + "version": "5.3.2", + "resolved": "https://registry.npmjs.org/regexpu-core/-/regexpu-core-5.3.2.tgz", + "integrity": "sha512-RAM5FlZz+Lhmo7db9L298p2vHP5ZywrVXmVXpmAD9GuL5MPH6t9ROw1iA/wfHkQ76Qe7AaPF0nGuim96/IrQMQ==", "dev": true, "requires": { + "@babel/regjsgen": "^0.8.0", "regenerate": "^1.4.2", - "regenerate-unicode-properties": "^10.0.1", - "regjsgen": "^0.6.0", - "regjsparser": "^0.8.2", + "regenerate-unicode-properties": "^10.1.0", + "regjsparser": "^0.9.1", "unicode-match-property-ecmascript": "^2.0.0", - "unicode-match-property-value-ecmascript": "^2.0.0" + "unicode-match-property-value-ecmascript": "^2.1.0" } }, - "regjsgen": { - "version": "0.6.0", - "resolved": "https://registry.npmjs.org/regjsgen/-/regjsgen-0.6.0.tgz", - "integrity": "sha512-ozE883Uigtqj3bx7OhL1KNbCzGyW2NQZPl6Hs09WTvCuZD5sTI4JY58bkbQWa/Y9hxIsvJ3M8Nbf7j54IqeZbA==", - "dev": true - }, "regjsparser": { - "version": "0.8.4", - "resolved": "https://registry.npmjs.org/regjsparser/-/regjsparser-0.8.4.tgz", - "integrity": "sha512-J3LABycON/VNEu3abOviqGHuB/LOtOQj8SKmfP9anY5GfAVw/SPjwzSjxGjbZXIxbGfqTHtJw58C2Li/WkStmA==", + "version": "0.9.1", + "resolved": "https://registry.npmjs.org/regjsparser/-/regjsparser-0.9.1.tgz", + "integrity": "sha512-dQUtn90WanSNl+7mQKcXAgZxvUe7Z0SqXlgzv0za4LwiUhyzBC58yQO3liFoUgu8GiJVInAhJjkj1N0EtQ5nkQ==", "dev": true, "requires": { "jsesc": "~0.5.0" @@ -11585,12 +11692,12 @@ "dev": true }, "resolve": { - "version": "1.22.1", - "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.22.1.tgz", - "integrity": "sha512-nBpuuYuY5jFsli/JIs1oldw6fOQCBioohqWZg/2hiaOybXOft4lonv85uDOKXdf8rhyK159cxU5cDcK/NKk8zw==", + "version": "1.22.8", + "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.22.8.tgz", + "integrity": "sha512-oKWePCxqpd6FlLvGV1VU0x7bkPmmCNolxzjMf4NczoDnQcIWrAF+cPtZn5i6n+RfD2d9i0tzpKnG6Yk168yIyw==", "dev": true, "requires": { - "is-core-module": "^2.9.0", + "is-core-module": "^2.13.0", "path-parse": "^1.0.7", "supports-preserve-symlinks-flag": "^1.0.0" } @@ -11638,14 +11745,15 @@ "dev": true }, "schema-utils": { - "version": "2.7.1", - "resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-2.7.1.tgz", - "integrity": "sha512-SHiNtMOUGWBQJwzISiVYKu82GiV4QYGePp3odlY1tuKO7gPtphAT5R/py0fA6xtbgLL/RvtJZnU9b8s0F1q0Xg==", + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-4.2.0.tgz", + "integrity": "sha512-L0jRsrPpjdckP3oPug3/VxNKt2trR8TcabrM6FOAAlvC/9Phcmm+cuAgTlxBqdBR1WJx7Naj9WHw+aOmheSVbw==", "dev": true, "requires": { - "@types/json-schema": "^7.0.5", - "ajv": "^6.12.4", - "ajv-keywords": "^3.5.2" + "@types/json-schema": "^7.0.9", + "ajv": "^8.9.0", + "ajv-formats": "^2.1.1", + "ajv-keywords": "^5.1.0" } }, "select-hose": { @@ -11664,9 +11772,9 @@ } }, "semver": { - "version": "6.3.0", - "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", - "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", + "version": "6.3.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz", + "integrity": "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==", "dev": true }, "send": { @@ -11716,9 +11824,9 @@ } }, "serialize-javascript": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/serialize-javascript/-/serialize-javascript-6.0.0.tgz", - "integrity": "sha512-Qr3TosvguFt8ePWqsvRfrKyQXIiW+nGbYpy8XK24NQHE83caxWt+mIymTT19DGFbNWNLfEwsrkSmN64lVWB9ag==", + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/serialize-javascript/-/serialize-javascript-6.0.1.tgz", + "integrity": "sha512-owoXEFjWRllis8/M1Q+Cw5k8ZH40e3zhp/ovX+Xr/vi1qj6QesbyXXViFbpNvWvPNAD62SutwEXavefrLJWj7w==", "dev": true, "requires": { "randombytes": "^2.1.0" @@ -11834,6 +11942,12 @@ "integrity": "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==", "dev": true }, + "shell-quote": { + "version": "1.8.1", + "resolved": "https://registry.npmjs.org/shell-quote/-/shell-quote-1.8.1.tgz", + "integrity": "sha512-6j1W9l1iAs/4xYBI1SYOVZyFcCis9b4KCLQ8fgAGG07QvzaRLVVRQvAy85yNmmZSjYjg4MWh4gNvlPujU/5LpA==", + "dev": true + }, "side-channel": { "version": "1.0.4", "resolved": "https://registry.npmjs.org/side-channel/-/side-channel-1.0.4.tgz", @@ -11852,21 +11966,21 @@ "dev": true }, "socket.io-client": { - "version": "4.5.3", - "resolved": "https://registry.npmjs.org/socket.io-client/-/socket.io-client-4.5.3.tgz", - "integrity": "sha512-I/hqDYpQ6JKwtJOf5ikM+Qz+YujZPMEl6qBLhxiP0nX+TfXKhW4KZZG8lamrD6Y5ngjmYHreESVasVCgi5Kl3A==", + "version": "4.7.2", + "resolved": "https://registry.npmjs.org/socket.io-client/-/socket.io-client-4.7.2.tgz", + "integrity": "sha512-vtA0uD4ibrYD793SOIAwlo8cj6haOeMHrGvwPxJsxH7CeIksqJ+3Zc06RvWTIFgiSqx4A3sOnTXpfAEE2Zyz6w==", "dev": true, "requires": { "@socket.io/component-emitter": "~3.1.0", "debug": "~4.3.2", - "engine.io-client": "~6.2.3", - "socket.io-parser": "~4.2.0" + "engine.io-client": "~6.5.2", + "socket.io-parser": "~4.2.4" } }, "socket.io-parser": { - "version": "4.2.1", - "resolved": "https://registry.npmjs.org/socket.io-parser/-/socket.io-parser-4.2.1.tgz", - "integrity": "sha512-V4GrkLy+HeF1F/en3SpUaM+7XxYXpuMUWLGde1kSSh5nQMN4hLrbPIkD+otwh6q9R6NOQBN4AMaOZ2zVjui82g==", + "version": "4.2.4", + "resolved": "https://registry.npmjs.org/socket.io-parser/-/socket.io-parser-4.2.4.tgz", + "integrity": "sha512-/GbIKmo8ioc+NIWIhwdecY0ge+qVBSMdgxGygevmdHj24bsfgtCmcUUcQ5ZzcylGFHsN3k4HB4Cgkl96KVnuew==", "dev": true, "requires": { "@socket.io/component-emitter": "~3.1.0", @@ -12038,13 +12152,13 @@ "dev": true }, "terser": { - "version": "5.14.2", - "resolved": "https://registry.npmjs.org/terser/-/terser-5.14.2.tgz", - "integrity": "sha512-oL0rGeM/WFQCUd0y2QrWxYnq7tfSuKBiqTjRPWrRgB46WD/kiwHwF8T23z78H6Q6kGCuuHcPB+KULHRdxvVGQA==", + "version": "5.22.0", + "resolved": "https://registry.npmjs.org/terser/-/terser-5.22.0.tgz", + "integrity": "sha512-hHZVLgRA2z4NWcN6aS5rQDc+7Dcy58HOf2zbYwmFcQ+ua3h6eEFf5lIDKTzbWwlazPyOZsFQO8V80/IjVNExEw==", "dev": true, "requires": { - "@jridgewell/source-map": "^0.3.2", - "acorn": "^8.5.0", + "@jridgewell/source-map": "^0.3.3", + "acorn": "^8.8.2", "commander": "^2.20.0", "source-map-support": "~0.5.20" }, @@ -12058,22 +12172,47 @@ } }, "terser-webpack-plugin": { - "version": "5.3.5", - "resolved": "https://registry.npmjs.org/terser-webpack-plugin/-/terser-webpack-plugin-5.3.5.tgz", - "integrity": "sha512-AOEDLDxD2zylUGf/wxHxklEkOe2/r+seuyOWujejFrIxHf11brA1/dWQNIgXa1c6/Wkxgu7zvv0JhOWfc2ELEA==", + "version": "5.3.9", + "resolved": "https://registry.npmjs.org/terser-webpack-plugin/-/terser-webpack-plugin-5.3.9.tgz", + "integrity": "sha512-ZuXsqE07EcggTWQjXUj+Aot/OMcD0bMKGgF63f7UxYcu5/AJF53aIpK1YoP5xR9l6s/Hy2b+t1AM0bLNPRuhwA==", "dev": true, "requires": { - "@jridgewell/trace-mapping": "^0.3.14", + "@jridgewell/trace-mapping": "^0.3.17", "jest-worker": "^27.4.5", "schema-utils": "^3.1.1", - "serialize-javascript": "^6.0.0", - "terser": "^5.14.1" + "serialize-javascript": "^6.0.1", + "terser": "^5.16.8" }, "dependencies": { + "ajv": { + "version": "6.12.6", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz", + "integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==", + "dev": true, + "requires": { + "fast-deep-equal": "^3.1.1", + "fast-json-stable-stringify": "^2.0.0", + "json-schema-traverse": "^0.4.1", + "uri-js": "^4.2.2" + } + }, + "ajv-keywords": { + "version": "3.5.2", + "resolved": "https://registry.npmjs.org/ajv-keywords/-/ajv-keywords-3.5.2.tgz", + "integrity": "sha512-5p6WTN0DdTGVQk6VjcEju19IgaHudalcfabD7yhDGeA6bcQnmL+CpveLJq/3hvfwd1aof6L386Ougkx6RfyMIQ==", + "dev": true, + "requires": {} + }, + "json-schema-traverse": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", + "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==", + "dev": true + }, "schema-utils": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-3.1.1.tgz", - "integrity": "sha512-Y5PQxS4ITlC+EahLuXaY86TXfR7Dc5lw294alXOq86JAHCihAIZfqv8nNCWvaEJvaC51uN9hbLGeV0cFBdH+Fw==", + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-3.3.0.tgz", + "integrity": "sha512-pN/yOAvcC+5rQ5nERGuwrjLlYvLTbCibnZ1I7B1LaiAz9BRBlE9GMgE/eqV30P7aJQUf7Ddimy/RsbYO/GrVGg==", "dev": true, "requires": { "@types/json-schema": "^7.0.8", @@ -12111,9 +12250,9 @@ "dev": true }, "tslib": { - "version": "2.4.0", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.4.0.tgz", - "integrity": "sha512-d6xOpEDfsi2CZVlPQzGeux8XMwLT9hssAsaPYExaQMuYskwb+x1x7J371tWlbBdWHroy99KnVB6qIkUbs5X3UQ==", + "version": "2.5.0", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.5.0.tgz", + "integrity": "sha512-336iVw3rtn2BUK7ORdIAHTyxHGRIHVReokCR3XjbckJMK7ms8FysBfhLR8IXnAgy7T0PTPNBWKiH514FOW/WSg==", "dev": true }, "type-check": { @@ -12164,15 +12303,15 @@ } }, "unicode-match-property-value-ecmascript": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/unicode-match-property-value-ecmascript/-/unicode-match-property-value-ecmascript-2.0.0.tgz", - "integrity": "sha512-7Yhkc0Ye+t4PNYzOGKedDhXbYIBe1XEQYQxOPyhcXNMJ0WCABqqj6ckydd6pWRZTHV4GuCPKdBAUiMc60tsKVw==", + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/unicode-match-property-value-ecmascript/-/unicode-match-property-value-ecmascript-2.1.0.tgz", + "integrity": "sha512-qxkjQt6qjg/mYscYMC0XKRn3Rh0wFPlfxB0xkt9CfyTvpX1Ra0+rAmdX2QyAobptSEvuy4RtpPRui6XkV+8wjA==", "dev": true }, "unicode-property-aliases-ecmascript": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/unicode-property-aliases-ecmascript/-/unicode-property-aliases-ecmascript-2.0.0.tgz", - "integrity": "sha512-5Zfuy9q/DFr4tfO7ZPeVXb1aPoeQSdeFMLpYuFebehDAhbuevLs5yxSZmIFN1tP5F9Wl4IpJrYojg85/zgyZHQ==", + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/unicode-property-aliases-ecmascript/-/unicode-property-aliases-ecmascript-2.1.0.tgz", + "integrity": "sha512-6t3foTQI9qne+OZoVQB/8x8rk2k1eVy1gRXhV3oFQ5T6R1dqQ1xtin3XqSlx3+ATBkliTaR/hHyJBm+LVPNM8w==", "dev": true }, "unpipe": { @@ -12182,9 +12321,9 @@ "dev": true }, "update-browserslist-db": { - "version": "1.0.10", - "resolved": "https://registry.npmjs.org/update-browserslist-db/-/update-browserslist-db-1.0.10.tgz", - "integrity": "sha512-OztqDenkfFkbSG+tRxBeAnCVPckDBcvibKd35yDONx6OU8N7sqgwc7rCbkJ/WcYtVRZ4ba68d6byhC21GFh7sQ==", + "version": "1.0.13", + "resolved": "https://registry.npmjs.org/update-browserslist-db/-/update-browserslist-db-1.0.13.tgz", + "integrity": "sha512-xebP81SNcPuNpPP3uzeW1NYXxI3rxyJzF3pD6sH4jE7o/IX+WtSpwnVU+qIsDPyk0d3hmFQ7mjqc6AtV604hbg==", "dev": true, "requires": { "escalade": "^3.1.1", @@ -12239,9 +12378,9 @@ "dev": true }, "validator": { - "version": "13.7.0", - "resolved": "https://registry.npmjs.org/validator/-/validator-13.7.0.tgz", - "integrity": "sha512-nYXQLCBkpJ8X6ltALua9dRrZDHVYxjJ1wgskNt1lH9fzGjs3tgojGSCBjmEPwkWS1y29+DrizMTW19Pr9uB2nw==", + "version": "13.11.0", + "resolved": "https://registry.npmjs.org/validator/-/validator-13.11.0.tgz", + "integrity": "sha512-Ii+sehpSfZy+At5nPdnyMhx78fEoPDkR2XW/zimHEL3MyGJQOCQ7WeP20jPYRz7ZCpcKLB21NxuXHF3bxjStBQ==", "dev": true }, "vary": { @@ -12270,22 +12409,22 @@ } }, "webpack": { - "version": "5.74.0", - "resolved": "https://registry.npmjs.org/webpack/-/webpack-5.74.0.tgz", - "integrity": "sha512-A2InDwnhhGN4LYctJj6M1JEaGL7Luj6LOmyBHjcI8529cm5p6VXiTIW2sn6ffvEAKmveLzvu4jrihwXtPojlAA==", + "version": "5.89.0", + "resolved": "https://registry.npmjs.org/webpack/-/webpack-5.89.0.tgz", + "integrity": "sha512-qyfIC10pOr70V+jkmud8tMfajraGCZMBWJtrmuBymQKCrLTRejBI8STDp1MCyZu/QTdZSeacCQYpYNQVOzX5kw==", "dev": true, "requires": { "@types/eslint-scope": "^3.7.3", - "@types/estree": "^0.0.51", - "@webassemblyjs/ast": "1.11.1", - "@webassemblyjs/wasm-edit": "1.11.1", - "@webassemblyjs/wasm-parser": "1.11.1", + "@types/estree": "^1.0.0", + "@webassemblyjs/ast": "^1.11.5", + "@webassemblyjs/wasm-edit": "^1.11.5", + "@webassemblyjs/wasm-parser": "^1.11.5", "acorn": "^8.7.1", - "acorn-import-assertions": "^1.7.6", + "acorn-import-assertions": "^1.9.0", "browserslist": "^4.14.5", "chrome-trace-event": "^1.0.2", - "enhanced-resolve": "^5.10.0", - "es-module-lexer": "^0.9.0", + "enhanced-resolve": "^5.15.0", + "es-module-lexer": "^1.2.1", "eslint-scope": "5.1.1", "events": "^3.2.0", "glob-to-regexp": "^0.4.1", @@ -12294,18 +12433,31 @@ "loader-runner": "^4.2.0", "mime-types": "^2.1.27", "neo-async": "^2.6.2", - "schema-utils": "^3.1.0", + "schema-utils": "^3.2.0", "tapable": "^2.1.1", - "terser-webpack-plugin": "^5.1.3", + "terser-webpack-plugin": "^5.3.7", "watchpack": "^2.4.0", "webpack-sources": "^3.2.3" }, "dependencies": { - "acorn": { - "version": "8.8.0", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.8.0.tgz", - "integrity": "sha512-QOxyigPVrpZ2GXT+PFyZTl6TtOFc5egxHIP9IlQ+RbupQuX4RkT/Bee4/kQuC02Xkzg84JcT7oLYtDIQxp+v7w==", - "dev": true + "ajv": { + "version": "6.12.6", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz", + "integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==", + "dev": true, + "requires": { + "fast-deep-equal": "^3.1.1", + "fast-json-stable-stringify": "^2.0.0", + "json-schema-traverse": "^0.4.1", + "uri-js": "^4.2.2" + } + }, + "ajv-keywords": { + "version": "3.5.2", + "resolved": "https://registry.npmjs.org/ajv-keywords/-/ajv-keywords-3.5.2.tgz", + "integrity": "sha512-5p6WTN0DdTGVQk6VjcEju19IgaHudalcfabD7yhDGeA6bcQnmL+CpveLJq/3hvfwd1aof6L386Ougkx6RfyMIQ==", + "dev": true, + "requires": {} }, "eslint-scope": { "version": "5.1.1", @@ -12323,10 +12475,16 @@ "integrity": "sha512-39nnKffWz8xN1BU/2c79n9nB9HDzo0niYUqx6xyqUnyoAnQyyWpOTdZEeiCch8BBu515t4wp9ZmgVfVhn9EBpw==", "dev": true }, + "json-schema-traverse": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", + "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==", + "dev": true + }, "schema-utils": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-3.1.1.tgz", - "integrity": "sha512-Y5PQxS4ITlC+EahLuXaY86TXfR7Dc5lw294alXOq86JAHCihAIZfqv8nNCWvaEJvaC51uN9hbLGeV0cFBdH+Fw==", + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-3.3.0.tgz", + "integrity": "sha512-pN/yOAvcC+5rQ5nERGuwrjLlYvLTbCibnZ1I7B1LaiAz9BRBlE9GMgE/eqV30P7aJQUf7Ddimy/RsbYO/GrVGg==", "dev": true, "requires": { "@types/json-schema": "^7.0.8", @@ -12337,29 +12495,30 @@ } }, "webpack-cli": { - "version": "4.10.0", - "resolved": "https://registry.npmjs.org/webpack-cli/-/webpack-cli-4.10.0.tgz", - "integrity": "sha512-NLhDfH/h4O6UOy+0LSso42xvYypClINuMNBVVzX4vX98TmTaTUxwRbXdhucbFMd2qLaCTcLq/PdYrvi8onw90w==", + "version": "5.1.4", + "resolved": "https://registry.npmjs.org/webpack-cli/-/webpack-cli-5.1.4.tgz", + "integrity": "sha512-pIDJHIEI9LR0yxHXQ+Qh95k2EvXpWzZ5l+d+jIo+RdSm9MiHfzazIxwwni/p7+x4eJZuvG1AJwgC4TNQ7NRgsg==", "dev": true, "requires": { "@discoveryjs/json-ext": "^0.5.0", - "@webpack-cli/configtest": "^1.2.0", - "@webpack-cli/info": "^1.5.0", - "@webpack-cli/serve": "^1.7.0", + "@webpack-cli/configtest": "^2.1.1", + "@webpack-cli/info": "^2.0.2", + "@webpack-cli/serve": "^2.0.5", "colorette": "^2.0.14", - "commander": "^7.0.0", + "commander": "^10.0.1", "cross-spawn": "^7.0.3", + "envinfo": "^7.7.3", "fastest-levenshtein": "^1.0.12", "import-local": "^3.0.2", - "interpret": "^2.2.0", - "rechoir": "^0.7.0", + "interpret": "^3.1.1", + "rechoir": "^0.8.0", "webpack-merge": "^5.7.3" }, "dependencies": { "commander": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/commander/-/commander-7.2.0.tgz", - "integrity": "sha512-QrWXB+ZQSVPmIWIhtEO9H+gwHaMGYiF5ChvoJ+K9ZGHG/sVsa6yiesAD1GC/x46sET00Xlwo1u49RVVVzvcSkw==", + "version": "10.0.1", + "resolved": "https://registry.npmjs.org/commander/-/commander-10.0.1.tgz", + "integrity": "sha512-y4Mg2tXshplEbSGzx7amzPwKKOCGuoSRP/CjEdwwk0FOGlUbq6lKuoyDZTNZkmxHdJtp54hdfY/JUrdL7Xfdug==", "dev": true } } @@ -12375,53 +12534,12 @@ "mime-types": "^2.1.31", "range-parser": "^1.2.1", "schema-utils": "^4.0.0" - }, - "dependencies": { - "ajv": { - "version": "8.11.0", - "resolved": "https://registry.npmjs.org/ajv/-/ajv-8.11.0.tgz", - "integrity": "sha512-wGgprdCvMalC0BztXvitD2hC04YffAvtsUn93JbGXYLAtCUO4xd17mCCZQxUOItiBwZvJScWo8NIvQMQ71rdpg==", - "dev": true, - "requires": { - "fast-deep-equal": "^3.1.1", - "json-schema-traverse": "^1.0.0", - "require-from-string": "^2.0.2", - "uri-js": "^4.2.2" - } - }, - "ajv-keywords": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/ajv-keywords/-/ajv-keywords-5.1.0.tgz", - "integrity": "sha512-YCS/JNFAUyr5vAuhk1DWm1CBxRHW9LbJ2ozWeemrIqpbsqKjHVxYPyi5GC0rjZIT5JxJ3virVTS8wk4i/Z+krw==", - "dev": true, - "requires": { - "fast-deep-equal": "^3.1.3" - } - }, - "json-schema-traverse": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-1.0.0.tgz", - "integrity": "sha512-NM8/P9n3XjXhIZn1lLhkFaACTOURQXjWhV4BA/RnOv8xvgqtqpAX9IO4mRQxSx1Rlo4tqzeqb0sOlruaOy3dug==", - "dev": true - }, - "schema-utils": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-4.0.0.tgz", - "integrity": "sha512-1edyXKgh6XnJsJSQ8mKWXnN/BVaIbFMLpouRUrXgVq7WYne5kw3MW7UPhO44uRXQSIpTSXoJbmrR2X0w9kUTyg==", - "dev": true, - "requires": { - "@types/json-schema": "^7.0.9", - "ajv": "^8.8.0", - "ajv-formats": "^2.1.1", - "ajv-keywords": "^5.0.0" - } - } } }, "webpack-dev-server": { - "version": "4.11.1", - "resolved": "https://registry.npmjs.org/webpack-dev-server/-/webpack-dev-server-4.11.1.tgz", - "integrity": "sha512-lILVz9tAUy1zGFwieuaQtYiadImb5M3d+H+L1zDYalYoDl0cksAB1UNyuE5MMWJrG6zR1tXkCP2fitl7yoUJiw==", + "version": "4.15.1", + "resolved": "https://registry.npmjs.org/webpack-dev-server/-/webpack-dev-server-4.15.1.tgz", + "integrity": "sha512-5hbAst3h3C3L8w6W4P96L5vaV0PxSmJhxZvWKYIdgxOQm8pNZ5dEOmmSLBVpP85ReeyRt6AS1QJNyo/oFFPeVA==", "dev": true, "requires": { "@types/bonjour": "^3.5.9", @@ -12430,7 +12548,7 @@ "@types/serve-index": "^1.9.1", "@types/serve-static": "^1.13.10", "@types/sockjs": "^0.3.33", - "@types/ws": "^8.5.1", + "@types/ws": "^8.5.5", "ansi-html-community": "^0.0.8", "bonjour-service": "^1.0.11", "chokidar": "^3.5.3", @@ -12443,6 +12561,7 @@ "html-entities": "^2.3.2", "http-proxy-middleware": "^2.0.3", "ipaddr.js": "^2.0.1", + "launch-editor": "^2.6.0", "open": "^8.0.9", "p-retry": "^4.5.0", "rimraf": "^3.0.2", @@ -12452,52 +12571,13 @@ "sockjs": "^0.3.24", "spdy": "^4.0.2", "webpack-dev-middleware": "^5.3.1", - "ws": "^8.4.2" + "ws": "^8.13.0" }, "dependencies": { - "ajv": { - "version": "8.11.0", - "resolved": "https://registry.npmjs.org/ajv/-/ajv-8.11.0.tgz", - "integrity": "sha512-wGgprdCvMalC0BztXvitD2hC04YffAvtsUn93JbGXYLAtCUO4xd17mCCZQxUOItiBwZvJScWo8NIvQMQ71rdpg==", - "dev": true, - "requires": { - "fast-deep-equal": "^3.1.1", - "json-schema-traverse": "^1.0.0", - "require-from-string": "^2.0.2", - "uri-js": "^4.2.2" - } - }, - "ajv-keywords": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/ajv-keywords/-/ajv-keywords-5.1.0.tgz", - "integrity": "sha512-YCS/JNFAUyr5vAuhk1DWm1CBxRHW9LbJ2ozWeemrIqpbsqKjHVxYPyi5GC0rjZIT5JxJ3virVTS8wk4i/Z+krw==", - "dev": true, - "requires": { - "fast-deep-equal": "^3.1.3" - } - }, - "json-schema-traverse": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-1.0.0.tgz", - "integrity": "sha512-NM8/P9n3XjXhIZn1lLhkFaACTOURQXjWhV4BA/RnOv8xvgqtqpAX9IO4mRQxSx1Rlo4tqzeqb0sOlruaOy3dug==", - "dev": true - }, - "schema-utils": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-4.0.0.tgz", - "integrity": "sha512-1edyXKgh6XnJsJSQ8mKWXnN/BVaIbFMLpouRUrXgVq7WYne5kw3MW7UPhO44uRXQSIpTSXoJbmrR2X0w9kUTyg==", - "dev": true, - "requires": { - "@types/json-schema": "^7.0.9", - "ajv": "^8.8.0", - "ajv-formats": "^2.1.1", - "ajv-keywords": "^5.0.0" - } - }, "ws": { - "version": "8.8.1", - "resolved": "https://registry.npmjs.org/ws/-/ws-8.8.1.tgz", - "integrity": "sha512-bGy2JzvzkPowEJV++hF07hAD6niYSr0JzBNo/J29WsB57A2r7Wlc1UFcTR9IzrPvuNVO4B8LGqF8qcpsVOhJCA==", + "version": "8.14.2", + "resolved": "https://registry.npmjs.org/ws/-/ws-8.14.2.tgz", + "integrity": "sha512-wEBG1ftX4jcglPxgFCMJmZ2PLtSbJ2Peg6TmpJFTbe9GZYOQCDPdMYu/Tm0/bGZkw8paZnJY45J4K2PZrLYq8g==", "dev": true, "requires": {} } @@ -12609,9 +12689,9 @@ "dev": true }, "word-wrap": { - "version": "1.2.3", - "resolved": "https://registry.npmjs.org/word-wrap/-/word-wrap-1.2.3.tgz", - "integrity": "sha512-Hz/mrNwitNRh/HUAtM/VT/5VH+ygD6DV7mYKZAtHOrbs8U7lvPS6xf7EJKMF0uW1KJCl0H701g3ZGus+muE5vQ==", + "version": "1.2.5", + "resolved": "https://registry.npmjs.org/word-wrap/-/word-wrap-1.2.5.tgz", + "integrity": "sha512-BN22B5eaMMI9UMtjrGd5g5eCYPpCPDUy0FJXbYsaT5zYxjFOckS53SQDE3pWkVoWpHXVb3BrYcEN4Twa55B5cA==", "dev": true }, "wrappy": { @@ -12621,9 +12701,9 @@ "dev": true }, "ws": { - "version": "8.2.3", - "resolved": "https://registry.npmjs.org/ws/-/ws-8.2.3.tgz", - "integrity": "sha512-wBuoj1BDpC6ZQ1B7DWQBYVLphPWkm8i9Y0/3YdHjHKHiohOJ1ws+3OccDWtH+PoC9DZD5WOTrJvNbWvjS6JWaA==", + "version": "8.11.0", + "resolved": "https://registry.npmjs.org/ws/-/ws-8.11.0.tgz", + "integrity": "sha512-HPG3wQd9sNQoT9xHyNCXoDUa+Xw/VevmY9FoHyQ+g+rrMn4j6FB4np7Z0OhdTgjx6MgQLK7jwSy1YecU1+4Asg==", "dev": true, "requires": {} }, @@ -12632,6 +12712,18 @@ "resolved": "https://registry.npmjs.org/xmlhttprequest-ssl/-/xmlhttprequest-ssl-2.0.0.tgz", "integrity": "sha512-QKxVRxiRACQcVuQEYFsI1hhkrMlrXHPegbbd1yn9UHOmRxY+si12nQYzri3vbzt8VdTTRviqcKxcyllFas5z2A==", "dev": true + }, + "yallist": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-3.1.1.tgz", + "integrity": "sha512-a4UGQaWPH59mOXUYnAG2ewncQS4i4F43Tv3JoAM+s2VDAmS9NsK8GpDMLrCHPksFT7h3K6TOoUNn2pb7RoXx4g==", + "dev": true + }, + "yocto-queue": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/yocto-queue/-/yocto-queue-1.0.0.tgz", + "integrity": "sha512-9bnSc/HEW2uRy67wc+T8UwauLuPJVn28jb+GtJY16iiKWyvmYJRXVT4UamsAEGQfPohgr2q4Tq0sQbQlxTfi1g==", + "dev": true } } } diff --git a/package.json b/package.json index ebc0d9de..24614e42 100644 --- a/package.json +++ b/package.json @@ -18,21 +18,21 @@ }, "homepage": "https://github.com/wizguin/yukon#readme", "devDependencies": { - "@babel/core": "^7.20.2", - "@babel/preset-env": "^7.20.2", - "babel-loader": "^8.3.0", + "@babel/core": "^7.23.2", + "@babel/preset-env": "^7.23.2", + "babel-loader": "^9.1.3", "compression-webpack-plugin": "^10.0.0", - "core-js": "^3.26.0", - "howler": "^2.2.3", - "html-webpack-plugin": "^5.5.0", - "javascript-obfuscator": "^4.0.0", - "phasereditor2d-launcher": "^3.35.1", + "core-js": "^3.33.0", + "howler": "^2.2.4", + "html-webpack-plugin": "^5.5.3", + "javascript-obfuscator": "^4.1.0", + "phasereditor2d-launcher": "^3.63.0", "phasereditor2d-ninepatch-plugin": "^1.2.0", - "socket.io-client": "^4.5.3", + "socket.io-client": "^4.7.2", "source-map": "^0.7.4", - "webpack": "^5.74.0", - "webpack-cli": "^4.10.0", - "webpack-dev-server": "^4.11.1", + "webpack": "^5.89.0", + "webpack-cli": "^5.1.4", + "webpack-dev-server": "^4.15.1", "webpack-obfuscator": "^3.5.1" } } From 742449ba3048e4dc66f727747184a8b598857b76 Mon Sep 17 00:00:00 2001 From: wizguin <16276645+wizguin@users.noreply.github.com> Date: Wed, 18 Oct 2023 23:16:26 +0100 Subject: [PATCH 200/200] Updated version --- package-lock.json | 4 ++-- package.json | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/package-lock.json b/package-lock.json index bfabb87b..a5b980ca 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "yukon", - "version": "1.5.0-beta", + "version": "1.6.0-beta", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "yukon", - "version": "1.5.0-beta", + "version": "1.6.0-beta", "license": "MIT", "devDependencies": { "@babel/core": "^7.23.2", diff --git a/package.json b/package.json index 24614e42..6d741bf4 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "yukon", - "version": "1.5.0-beta", + "version": "1.6.0-beta", "scripts": { "dev": "webpack serve", "editor": "phasereditor2d-launcher -project . -max-number-files 5000",