From 993ab264e78f7124ecfcd559df35237335794141 Mon Sep 17 00:00:00 2001 From: Flashfyre Date: Sun, 18 Feb 2024 22:59:03 -0500 Subject: [PATCH] Update Phaser to 3.80.0 beta 2 --- package-lock.json | 14 +++++++------- package.json | 2 +- src/trainer.ts | 4 ---- 3 files changed, 8 insertions(+), 12 deletions(-) diff --git a/package-lock.json b/package-lock.json index 384b4469d..50b02aaed 100644 --- a/package-lock.json +++ b/package-lock.json @@ -11,7 +11,7 @@ "@material/material-color-utilities": "^0.2.7", "crypto-js": "^4.2.0", "json-stable-stringify": "^1.1.0", - "phaser": "^3.70.0", + "phaser": "^3.80.0-beta.2", "phaser3-rex-plugins": "^1.1.84" }, "devDependencies": { @@ -2135,9 +2135,9 @@ "dev": true }, "node_modules/phaser": { - "version": "3.70.0", - "resolved": "https://registry.npmjs.org/phaser/-/phaser-3.70.0.tgz", - "integrity": "sha512-2g+gh+Jp9f/Ho9FOXOYbIJMGf3UZXyMbW2iLScFaLQw11e/LqVyxj/YmaBauWbHabeTnZjiWkPklDnxhesMH0g==", + "version": "3.80.0-beta.2", + "resolved": "https://registry.npmjs.org/phaser/-/phaser-3.80.0-beta.2.tgz", + "integrity": "sha512-W2NDQlPV8nFTpYF6wJ6zwqFAKEygih1G0J6IdA2gGF61wYy2CYtTN25o6i6E52p7hRc3amX/uDS5eIT+dMrN5g==", "dependencies": { "eventemitter3": "^5.0.1" } @@ -2630,9 +2630,9 @@ } }, "node_modules/vite": { - "version": "4.5.1", - "resolved": "https://registry.npmjs.org/vite/-/vite-4.5.1.tgz", - "integrity": "sha512-AXXFaAJ8yebyqzoNB9fu2pHoo/nWX+xZlaRwoeYUxEqBO+Zj4msE5G+BhGBll9lYEKv9Hfks52PAF2X7qDYXQA==", + "version": "4.5.2", + "resolved": "https://registry.npmjs.org/vite/-/vite-4.5.2.tgz", + "integrity": "sha512-tBCZBNSBbHQkaGyhGCDUGqeo2ph8Fstyp6FMSvTtsXeZSPpSMGlviAOav2hxVTqFcx8Hj/twtWKsMJXNY0xI8w==", "dev": true, "dependencies": { "esbuild": "^0.18.10", diff --git a/package.json b/package.json index e0ec65880..06a4e808f 100644 --- a/package.json +++ b/package.json @@ -22,7 +22,7 @@ "@material/material-color-utilities": "^0.2.7", "crypto-js": "^4.2.0", "json-stable-stringify": "^1.1.0", - "phaser": "^3.70.0", + "phaser": "^3.80.0-beta.2", "phaser3-rex-plugins": "^1.1.84" } } diff --git a/src/trainer.ts b/src/trainer.ts index 498a4e6e0..df3640409 100644 --- a/src/trainer.ts +++ b/src/trainer.ts @@ -20,10 +20,6 @@ export default class Trainer extends Phaser.GameObjects.Container { this.female = female; this.partyTemplateIndex = Math.min(partyTemplateIndex !== undefined ? partyTemplateIndex : Utils.randSeedWeightedItem(this.config.partyTemplates.map((_, i) => i)), this.config.partyTemplates.length - 1); - - // TODO: Remove when Phaser weightedPick bug is fixed - if (isNaN(this.partyTemplateIndex)) - this.partyTemplateIndex = this.config.partyTemplates.length - 1; console.log(Object.keys(trainerPartyTemplates)[Object.values(trainerPartyTemplates).indexOf(this.getPartyTemplate())]);