Revert "Update Phaser to 3.80.0 beta 2"

This reverts commit 993ab264e7.
pull/16/head
Flashfyre 2024-02-18 23:01:44 -05:00
parent 993ab264e7
commit 0b70effd02
3 changed files with 12 additions and 8 deletions

14
package-lock.json generated
View File

@ -11,7 +11,7 @@
"@material/material-color-utilities": "^0.2.7", "@material/material-color-utilities": "^0.2.7",
"crypto-js": "^4.2.0", "crypto-js": "^4.2.0",
"json-stable-stringify": "^1.1.0", "json-stable-stringify": "^1.1.0",
"phaser": "^3.80.0-beta.2", "phaser": "^3.70.0",
"phaser3-rex-plugins": "^1.1.84" "phaser3-rex-plugins": "^1.1.84"
}, },
"devDependencies": { "devDependencies": {
@ -2135,9 +2135,9 @@
"dev": true "dev": true
}, },
"node_modules/phaser": { "node_modules/phaser": {
"version": "3.80.0-beta.2", "version": "3.70.0",
"resolved": "https://registry.npmjs.org/phaser/-/phaser-3.80.0-beta.2.tgz", "resolved": "https://registry.npmjs.org/phaser/-/phaser-3.70.0.tgz",
"integrity": "sha512-W2NDQlPV8nFTpYF6wJ6zwqFAKEygih1G0J6IdA2gGF61wYy2CYtTN25o6i6E52p7hRc3amX/uDS5eIT+dMrN5g==", "integrity": "sha512-2g+gh+Jp9f/Ho9FOXOYbIJMGf3UZXyMbW2iLScFaLQw11e/LqVyxj/YmaBauWbHabeTnZjiWkPklDnxhesMH0g==",
"dependencies": { "dependencies": {
"eventemitter3": "^5.0.1" "eventemitter3": "^5.0.1"
} }
@ -2630,9 +2630,9 @@
} }
}, },
"node_modules/vite": { "node_modules/vite": {
"version": "4.5.2", "version": "4.5.1",
"resolved": "https://registry.npmjs.org/vite/-/vite-4.5.2.tgz", "resolved": "https://registry.npmjs.org/vite/-/vite-4.5.1.tgz",
"integrity": "sha512-tBCZBNSBbHQkaGyhGCDUGqeo2ph8Fstyp6FMSvTtsXeZSPpSMGlviAOav2hxVTqFcx8Hj/twtWKsMJXNY0xI8w==", "integrity": "sha512-AXXFaAJ8yebyqzoNB9fu2pHoo/nWX+xZlaRwoeYUxEqBO+Zj4msE5G+BhGBll9lYEKv9Hfks52PAF2X7qDYXQA==",
"dev": true, "dev": true,
"dependencies": { "dependencies": {
"esbuild": "^0.18.10", "esbuild": "^0.18.10",

View File

@ -22,7 +22,7 @@
"@material/material-color-utilities": "^0.2.7", "@material/material-color-utilities": "^0.2.7",
"crypto-js": "^4.2.0", "crypto-js": "^4.2.0",
"json-stable-stringify": "^1.1.0", "json-stable-stringify": "^1.1.0",
"phaser": "^3.80.0-beta.2", "phaser": "^3.70.0",
"phaser3-rex-plugins": "^1.1.84" "phaser3-rex-plugins": "^1.1.84"
} }
} }

View File

@ -21,6 +21,10 @@ export default class Trainer extends Phaser.GameObjects.Container {
this.partyTemplateIndex = Math.min(partyTemplateIndex !== undefined ? partyTemplateIndex : Utils.randSeedWeightedItem(this.config.partyTemplates.map((_, i) => i)), this.partyTemplateIndex = Math.min(partyTemplateIndex !== undefined ? partyTemplateIndex : Utils.randSeedWeightedItem(this.config.partyTemplates.map((_, i) => i)),
this.config.partyTemplates.length - 1); 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())]); console.log(Object.keys(trainerPartyTemplates)[Object.values(trainerPartyTemplates).indexOf(this.getPartyTemplate())]);
const getSprite = (hasShadow?: boolean) => { const getSprite = (hasShadow?: boolean) => {