Merge branch 'vamp-dev' of https://github.com/VampireKitten/SpaceNinjaServer into vamp-dev
This commit is contained in:
commit
3476d6b11c
475
package-lock.json
generated
475
package-lock.json
generated
@ -13,7 +13,7 @@
|
|||||||
"express": "^5.0.0-beta.3",
|
"express": "^5.0.0-beta.3",
|
||||||
"mongoose": "^8.1.1",
|
"mongoose": "^8.1.1",
|
||||||
"warframe-items": "^1.1262.74",
|
"warframe-items": "^1.1262.74",
|
||||||
"warframe-public-export-plus": "^0.2.2",
|
"warframe-public-export-plus": "^0.2.5",
|
||||||
"warframe-riven-info": "^0.1.0",
|
"warframe-riven-info": "^0.1.0",
|
||||||
"winston": "^3.11.0",
|
"winston": "^3.11.0",
|
||||||
"winston-daily-rotate-file": "^4.7.1"
|
"winston-daily-rotate-file": "^4.7.1"
|
||||||
@ -22,8 +22,8 @@
|
|||||||
"@tsconfig/node20": "^1.0.0",
|
"@tsconfig/node20": "^1.0.0",
|
||||||
"@types/express": "^4.17.20",
|
"@types/express": "^4.17.20",
|
||||||
"@types/morgan": "^1.9.7",
|
"@types/morgan": "^1.9.7",
|
||||||
"@typescript-eslint/eslint-plugin": "^6.9.0",
|
"@typescript-eslint/eslint-plugin": "^7.13.1",
|
||||||
"@typescript-eslint/parser": "^6.2.0",
|
"@typescript-eslint/parser": "^7.13.1",
|
||||||
"eslint": "^8.56.0",
|
"eslint": "^8.56.0",
|
||||||
"eslint-plugin-prettier": "^5.1.3",
|
"eslint-plugin-prettier": "^5.1.3",
|
||||||
"morgan": "^1.10.0",
|
"morgan": "^1.10.0",
|
||||||
@ -364,12 +364,6 @@
|
|||||||
"@types/send": "*"
|
"@types/send": "*"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@types/json-schema": {
|
|
||||||
"version": "7.0.14",
|
|
||||||
"resolved": "https://registry.npmjs.org/@types/json-schema/-/json-schema-7.0.14.tgz",
|
|
||||||
"integrity": "sha512-U3PUjAudAdJBeC2pgN8uTIKgxrb4nlDF3SF0++EldXQvQBGkpFZMSnwQiIoDU77tv45VgNkl/L4ouD+rEomujw==",
|
|
||||||
"dev": true
|
|
||||||
},
|
|
||||||
"node_modules/@types/mime": {
|
"node_modules/@types/mime": {
|
||||||
"version": "1.3.2",
|
"version": "1.3.2",
|
||||||
"resolved": "https://registry.npmjs.org/@types/mime/-/mime-1.3.2.tgz",
|
"resolved": "https://registry.npmjs.org/@types/mime/-/mime-1.3.2.tgz",
|
||||||
@ -403,12 +397,6 @@
|
|||||||
"integrity": "sha512-EEhsLsD6UsDM1yFhAvy0Cjr6VwmpMWqFBCb9w07wVugF7w9nfajxLuVmngTIpgS6svCnm6Vaw+MZhoDCKnOfsw==",
|
"integrity": "sha512-EEhsLsD6UsDM1yFhAvy0Cjr6VwmpMWqFBCb9w07wVugF7w9nfajxLuVmngTIpgS6svCnm6Vaw+MZhoDCKnOfsw==",
|
||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
"node_modules/@types/semver": {
|
|
||||||
"version": "7.5.4",
|
|
||||||
"resolved": "https://registry.npmjs.org/@types/semver/-/semver-7.5.4.tgz",
|
|
||||||
"integrity": "sha512-MMzuxN3GdFwskAnb6fz0orFvhfqi752yjaXylr0Rp4oDg5H0Zn1IuyRhDVvYOwAXoJirx2xuS16I3WjxnAIHiQ==",
|
|
||||||
"dev": true
|
|
||||||
},
|
|
||||||
"node_modules/@types/send": {
|
"node_modules/@types/send": {
|
||||||
"version": "0.17.1",
|
"version": "0.17.1",
|
||||||
"resolved": "https://registry.npmjs.org/@types/send/-/send-0.17.1.tgz",
|
"resolved": "https://registry.npmjs.org/@types/send/-/send-0.17.1.tgz",
|
||||||
@ -460,33 +448,31 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@typescript-eslint/eslint-plugin": {
|
"node_modules/@typescript-eslint/eslint-plugin": {
|
||||||
"version": "6.9.0",
|
"version": "7.13.1",
|
||||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-6.9.0.tgz",
|
"resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-7.13.1.tgz",
|
||||||
"integrity": "sha512-lgX7F0azQwRPB7t7WAyeHWVfW1YJ9NIgd9mvGhfQpRY56X6AVf8mwM8Wol+0z4liE7XX3QOt8MN1rUKCfSjRIA==",
|
"integrity": "sha512-kZqi+WZQaZfPKnsflLJQCz6Ze9FFSMfXrrIOcyargekQxG37ES7DJNpJUE9Q/X5n3yTIP/WPutVNzgknQ7biLg==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@eslint-community/regexpp": "^4.5.1",
|
"@eslint-community/regexpp": "^4.10.0",
|
||||||
"@typescript-eslint/scope-manager": "6.9.0",
|
"@typescript-eslint/scope-manager": "7.13.1",
|
||||||
"@typescript-eslint/type-utils": "6.9.0",
|
"@typescript-eslint/type-utils": "7.13.1",
|
||||||
"@typescript-eslint/utils": "6.9.0",
|
"@typescript-eslint/utils": "7.13.1",
|
||||||
"@typescript-eslint/visitor-keys": "6.9.0",
|
"@typescript-eslint/visitor-keys": "7.13.1",
|
||||||
"debug": "^4.3.4",
|
|
||||||
"graphemer": "^1.4.0",
|
"graphemer": "^1.4.0",
|
||||||
"ignore": "^5.2.4",
|
"ignore": "^5.3.1",
|
||||||
"natural-compare": "^1.4.0",
|
"natural-compare": "^1.4.0",
|
||||||
"semver": "^7.5.4",
|
"ts-api-utils": "^1.3.0"
|
||||||
"ts-api-utils": "^1.0.1"
|
|
||||||
},
|
},
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": "^16.0.0 || >=18.0.0"
|
"node": "^18.18.0 || >=20.0.0"
|
||||||
},
|
},
|
||||||
"funding": {
|
"funding": {
|
||||||
"type": "opencollective",
|
"type": "opencollective",
|
||||||
"url": "https://opencollective.com/typescript-eslint"
|
"url": "https://opencollective.com/typescript-eslint"
|
||||||
},
|
},
|
||||||
"peerDependencies": {
|
"peerDependencies": {
|
||||||
"@typescript-eslint/parser": "^6.0.0 || ^6.0.0-alpha",
|
"@typescript-eslint/parser": "^7.0.0",
|
||||||
"eslint": "^7.0.0 || ^8.0.0"
|
"eslint": "^8.56.0"
|
||||||
},
|
},
|
||||||
"peerDependenciesMeta": {
|
"peerDependenciesMeta": {
|
||||||
"typescript": {
|
"typescript": {
|
||||||
@ -494,97 +480,27 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@typescript-eslint/eslint-plugin/node_modules/@typescript-eslint/scope-manager": {
|
|
||||||
"version": "6.9.0",
|
|
||||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-6.9.0.tgz",
|
|
||||||
"integrity": "sha512-1R8A9Mc39n4pCCz9o79qRO31HGNDvC7UhPhv26TovDsWPBDx+Sg3rOZdCELIA3ZmNoWAuxaMOT7aWtGRSYkQxw==",
|
|
||||||
"dev": true,
|
|
||||||
"dependencies": {
|
|
||||||
"@typescript-eslint/types": "6.9.0",
|
|
||||||
"@typescript-eslint/visitor-keys": "6.9.0"
|
|
||||||
},
|
|
||||||
"engines": {
|
|
||||||
"node": "^16.0.0 || >=18.0.0"
|
|
||||||
},
|
|
||||||
"funding": {
|
|
||||||
"type": "opencollective",
|
|
||||||
"url": "https://opencollective.com/typescript-eslint"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"node_modules/@typescript-eslint/eslint-plugin/node_modules/@typescript-eslint/types": {
|
|
||||||
"version": "6.9.0",
|
|
||||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-6.9.0.tgz",
|
|
||||||
"integrity": "sha512-+KB0lbkpxBkBSiVCuQvduqMJy+I1FyDbdwSpM3IoBS7APl4Bu15lStPjgBIdykdRqQNYqYNMa8Kuidax6phaEw==",
|
|
||||||
"dev": true,
|
|
||||||
"engines": {
|
|
||||||
"node": "^16.0.0 || >=18.0.0"
|
|
||||||
},
|
|
||||||
"funding": {
|
|
||||||
"type": "opencollective",
|
|
||||||
"url": "https://opencollective.com/typescript-eslint"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"node_modules/@typescript-eslint/eslint-plugin/node_modules/@typescript-eslint/visitor-keys": {
|
|
||||||
"version": "6.9.0",
|
|
||||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-6.9.0.tgz",
|
|
||||||
"integrity": "sha512-dGtAfqjV6RFOtIP8I0B4ZTBRrlTT8NHHlZZSchQx3qReaoDeXhYM++M4So2AgFK9ZB0emRPA6JI1HkafzA2Ibg==",
|
|
||||||
"dev": true,
|
|
||||||
"dependencies": {
|
|
||||||
"@typescript-eslint/types": "6.9.0",
|
|
||||||
"eslint-visitor-keys": "^3.4.1"
|
|
||||||
},
|
|
||||||
"engines": {
|
|
||||||
"node": "^16.0.0 || >=18.0.0"
|
|
||||||
},
|
|
||||||
"funding": {
|
|
||||||
"type": "opencollective",
|
|
||||||
"url": "https://opencollective.com/typescript-eslint"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"node_modules/@typescript-eslint/eslint-plugin/node_modules/debug": {
|
|
||||||
"version": "4.3.4",
|
|
||||||
"resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz",
|
|
||||||
"integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==",
|
|
||||||
"dev": true,
|
|
||||||
"dependencies": {
|
|
||||||
"ms": "2.1.2"
|
|
||||||
},
|
|
||||||
"engines": {
|
|
||||||
"node": ">=6.0"
|
|
||||||
},
|
|
||||||
"peerDependenciesMeta": {
|
|
||||||
"supports-color": {
|
|
||||||
"optional": true
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"node_modules/@typescript-eslint/eslint-plugin/node_modules/ms": {
|
|
||||||
"version": "2.1.2",
|
|
||||||
"resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz",
|
|
||||||
"integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==",
|
|
||||||
"dev": true
|
|
||||||
},
|
|
||||||
"node_modules/@typescript-eslint/parser": {
|
"node_modules/@typescript-eslint/parser": {
|
||||||
"version": "6.2.0",
|
"version": "7.13.1",
|
||||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-6.2.0.tgz",
|
"resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-7.13.1.tgz",
|
||||||
"integrity": "sha512-igVYOqtiK/UsvKAmmloQAruAdUHihsOCvplJpplPZ+3h4aDkC/UKZZNKgB6h93ayuYLuEymU3h8nF1xMRbh37g==",
|
"integrity": "sha512-1ELDPlnLvDQ5ybTSrMhRTFDfOQEOXNM+eP+3HT/Yq7ruWpciQw+Avi73pdEbA4SooCawEWo3dtYbF68gN7Ed1A==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@typescript-eslint/scope-manager": "6.2.0",
|
"@typescript-eslint/scope-manager": "7.13.1",
|
||||||
"@typescript-eslint/types": "6.2.0",
|
"@typescript-eslint/types": "7.13.1",
|
||||||
"@typescript-eslint/typescript-estree": "6.2.0",
|
"@typescript-eslint/typescript-estree": "7.13.1",
|
||||||
"@typescript-eslint/visitor-keys": "6.2.0",
|
"@typescript-eslint/visitor-keys": "7.13.1",
|
||||||
"debug": "^4.3.4"
|
"debug": "^4.3.4"
|
||||||
},
|
},
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": "^16.0.0 || >=18.0.0"
|
"node": "^18.18.0 || >=20.0.0"
|
||||||
},
|
},
|
||||||
"funding": {
|
"funding": {
|
||||||
"type": "opencollective",
|
"type": "opencollective",
|
||||||
"url": "https://opencollective.com/typescript-eslint"
|
"url": "https://opencollective.com/typescript-eslint"
|
||||||
},
|
},
|
||||||
"peerDependencies": {
|
"peerDependencies": {
|
||||||
"eslint": "^7.0.0 || ^8.0.0"
|
"eslint": "^8.56.0"
|
||||||
},
|
},
|
||||||
"peerDependenciesMeta": {
|
"peerDependenciesMeta": {
|
||||||
"typescript": {
|
"typescript": {
|
||||||
@ -593,9 +509,9 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@typescript-eslint/parser/node_modules/debug": {
|
"node_modules/@typescript-eslint/parser/node_modules/debug": {
|
||||||
"version": "4.3.4",
|
"version": "4.3.5",
|
||||||
"resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz",
|
"resolved": "https://registry.npmjs.org/debug/-/debug-4.3.5.tgz",
|
||||||
"integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==",
|
"integrity": "sha512-pt0bNEmneDIvdL1Xsd9oDQ/wrQRkXDT4AUWlNZNPKvW5x/jyO9VFXkJUP07vQ2upmw5PlaITaPKc31jK13V+jg==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"ms": "2.1.2"
|
"ms": "2.1.2"
|
||||||
@ -616,16 +532,16 @@
|
|||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
"node_modules/@typescript-eslint/scope-manager": {
|
"node_modules/@typescript-eslint/scope-manager": {
|
||||||
"version": "6.2.0",
|
"version": "7.13.1",
|
||||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-6.2.0.tgz",
|
"resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-7.13.1.tgz",
|
||||||
"integrity": "sha512-1ZMNVgm5nnHURU8ZSJ3snsHzpFeNK84rdZjluEVBGNu7jDymfqceB3kdIZ6A4xCfEFFhRIB6rF8q/JIqJd2R0Q==",
|
"integrity": "sha512-adbXNVEs6GmbzaCpymHQ0MB6E4TqoiVbC0iqG3uijR8ZYfpAXMGttouQzF4Oat3P2GxDVIrg7bMI/P65LiQZdg==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@typescript-eslint/types": "6.2.0",
|
"@typescript-eslint/types": "7.13.1",
|
||||||
"@typescript-eslint/visitor-keys": "6.2.0"
|
"@typescript-eslint/visitor-keys": "7.13.1"
|
||||||
},
|
},
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": "^16.0.0 || >=18.0.0"
|
"node": "^18.18.0 || >=20.0.0"
|
||||||
},
|
},
|
||||||
"funding": {
|
"funding": {
|
||||||
"type": "opencollective",
|
"type": "opencollective",
|
||||||
@ -633,25 +549,25 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@typescript-eslint/type-utils": {
|
"node_modules/@typescript-eslint/type-utils": {
|
||||||
"version": "6.9.0",
|
"version": "7.13.1",
|
||||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-6.9.0.tgz",
|
"resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-7.13.1.tgz",
|
||||||
"integrity": "sha512-XXeahmfbpuhVbhSOROIzJ+b13krFmgtc4GlEuu1WBT+RpyGPIA4Y/eGnXzjbDj5gZLzpAXO/sj+IF/x2GtTMjQ==",
|
"integrity": "sha512-aWDbLu1s9bmgPGXSzNCxELu+0+HQOapV/y+60gPXafR8e2g1Bifxzevaa+4L2ytCWm+CHqpELq4CSoN9ELiwCg==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@typescript-eslint/typescript-estree": "6.9.0",
|
"@typescript-eslint/typescript-estree": "7.13.1",
|
||||||
"@typescript-eslint/utils": "6.9.0",
|
"@typescript-eslint/utils": "7.13.1",
|
||||||
"debug": "^4.3.4",
|
"debug": "^4.3.4",
|
||||||
"ts-api-utils": "^1.0.1"
|
"ts-api-utils": "^1.3.0"
|
||||||
},
|
},
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": "^16.0.0 || >=18.0.0"
|
"node": "^18.18.0 || >=20.0.0"
|
||||||
},
|
},
|
||||||
"funding": {
|
"funding": {
|
||||||
"type": "opencollective",
|
"type": "opencollective",
|
||||||
"url": "https://opencollective.com/typescript-eslint"
|
"url": "https://opencollective.com/typescript-eslint"
|
||||||
},
|
},
|
||||||
"peerDependencies": {
|
"peerDependencies": {
|
||||||
"eslint": "^7.0.0 || ^8.0.0"
|
"eslint": "^8.56.0"
|
||||||
},
|
},
|
||||||
"peerDependenciesMeta": {
|
"peerDependenciesMeta": {
|
||||||
"typescript": {
|
"typescript": {
|
||||||
@ -659,67 +575,10 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@typescript-eslint/type-utils/node_modules/@typescript-eslint/types": {
|
|
||||||
"version": "6.9.0",
|
|
||||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-6.9.0.tgz",
|
|
||||||
"integrity": "sha512-+KB0lbkpxBkBSiVCuQvduqMJy+I1FyDbdwSpM3IoBS7APl4Bu15lStPjgBIdykdRqQNYqYNMa8Kuidax6phaEw==",
|
|
||||||
"dev": true,
|
|
||||||
"engines": {
|
|
||||||
"node": "^16.0.0 || >=18.0.0"
|
|
||||||
},
|
|
||||||
"funding": {
|
|
||||||
"type": "opencollective",
|
|
||||||
"url": "https://opencollective.com/typescript-eslint"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"node_modules/@typescript-eslint/type-utils/node_modules/@typescript-eslint/typescript-estree": {
|
|
||||||
"version": "6.9.0",
|
|
||||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-6.9.0.tgz",
|
|
||||||
"integrity": "sha512-NJM2BnJFZBEAbCfBP00zONKXvMqihZCrmwCaik0UhLr0vAgb6oguXxLX1k00oQyD+vZZ+CJn3kocvv2yxm4awQ==",
|
|
||||||
"dev": true,
|
|
||||||
"dependencies": {
|
|
||||||
"@typescript-eslint/types": "6.9.0",
|
|
||||||
"@typescript-eslint/visitor-keys": "6.9.0",
|
|
||||||
"debug": "^4.3.4",
|
|
||||||
"globby": "^11.1.0",
|
|
||||||
"is-glob": "^4.0.3",
|
|
||||||
"semver": "^7.5.4",
|
|
||||||
"ts-api-utils": "^1.0.1"
|
|
||||||
},
|
|
||||||
"engines": {
|
|
||||||
"node": "^16.0.0 || >=18.0.0"
|
|
||||||
},
|
|
||||||
"funding": {
|
|
||||||
"type": "opencollective",
|
|
||||||
"url": "https://opencollective.com/typescript-eslint"
|
|
||||||
},
|
|
||||||
"peerDependenciesMeta": {
|
|
||||||
"typescript": {
|
|
||||||
"optional": true
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"node_modules/@typescript-eslint/type-utils/node_modules/@typescript-eslint/visitor-keys": {
|
|
||||||
"version": "6.9.0",
|
|
||||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-6.9.0.tgz",
|
|
||||||
"integrity": "sha512-dGtAfqjV6RFOtIP8I0B4ZTBRrlTT8NHHlZZSchQx3qReaoDeXhYM++M4So2AgFK9ZB0emRPA6JI1HkafzA2Ibg==",
|
|
||||||
"dev": true,
|
|
||||||
"dependencies": {
|
|
||||||
"@typescript-eslint/types": "6.9.0",
|
|
||||||
"eslint-visitor-keys": "^3.4.1"
|
|
||||||
},
|
|
||||||
"engines": {
|
|
||||||
"node": "^16.0.0 || >=18.0.0"
|
|
||||||
},
|
|
||||||
"funding": {
|
|
||||||
"type": "opencollective",
|
|
||||||
"url": "https://opencollective.com/typescript-eslint"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"node_modules/@typescript-eslint/type-utils/node_modules/debug": {
|
"node_modules/@typescript-eslint/type-utils/node_modules/debug": {
|
||||||
"version": "4.3.4",
|
"version": "4.3.5",
|
||||||
"resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz",
|
"resolved": "https://registry.npmjs.org/debug/-/debug-4.3.5.tgz",
|
||||||
"integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==",
|
"integrity": "sha512-pt0bNEmneDIvdL1Xsd9oDQ/wrQRkXDT4AUWlNZNPKvW5x/jyO9VFXkJUP07vQ2upmw5PlaITaPKc31jK13V+jg==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"ms": "2.1.2"
|
"ms": "2.1.2"
|
||||||
@ -740,12 +599,12 @@
|
|||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
"node_modules/@typescript-eslint/types": {
|
"node_modules/@typescript-eslint/types": {
|
||||||
"version": "6.2.0",
|
"version": "7.13.1",
|
||||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-6.2.0.tgz",
|
"resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-7.13.1.tgz",
|
||||||
"integrity": "sha512-1nRRaDlp/XYJQLvkQJG5F3uBTno5SHPT7XVcJ5n1/k2WfNI28nJsvLakxwZRNY5spuatEKO7d5nZWsQpkqXwBA==",
|
"integrity": "sha512-7K7HMcSQIAND6RBL4kDl24sG/xKM13cA85dc7JnmQXw2cBDngg7c19B++JzvJHRG3zG36n9j1i451GBzRuHchw==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": "^16.0.0 || >=18.0.0"
|
"node": "^18.18.0 || >=20.0.0"
|
||||||
},
|
},
|
||||||
"funding": {
|
"funding": {
|
||||||
"type": "opencollective",
|
"type": "opencollective",
|
||||||
@ -753,21 +612,22 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@typescript-eslint/typescript-estree": {
|
"node_modules/@typescript-eslint/typescript-estree": {
|
||||||
"version": "6.2.0",
|
"version": "7.13.1",
|
||||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-6.2.0.tgz",
|
"resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-7.13.1.tgz",
|
||||||
"integrity": "sha512-Mts6+3HQMSM+LZCglsc2yMIny37IhUgp1Qe8yJUYVyO6rHP7/vN0vajKu3JvHCBIy8TSiKddJ/Zwu80jhnGj1w==",
|
"integrity": "sha512-uxNr51CMV7npU1BxZzYjoVz9iyjckBduFBP0S5sLlh1tXYzHzgZ3BR9SVsNed+LmwKrmnqN3Kdl5t7eZ5TS1Yw==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@typescript-eslint/types": "6.2.0",
|
"@typescript-eslint/types": "7.13.1",
|
||||||
"@typescript-eslint/visitor-keys": "6.2.0",
|
"@typescript-eslint/visitor-keys": "7.13.1",
|
||||||
"debug": "^4.3.4",
|
"debug": "^4.3.4",
|
||||||
"globby": "^11.1.0",
|
"globby": "^11.1.0",
|
||||||
"is-glob": "^4.0.3",
|
"is-glob": "^4.0.3",
|
||||||
"semver": "^7.5.4",
|
"minimatch": "^9.0.4",
|
||||||
"ts-api-utils": "^1.0.1"
|
"semver": "^7.6.0",
|
||||||
|
"ts-api-utils": "^1.3.0"
|
||||||
},
|
},
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": "^16.0.0 || >=18.0.0"
|
"node": "^18.18.0 || >=20.0.0"
|
||||||
},
|
},
|
||||||
"funding": {
|
"funding": {
|
||||||
"type": "opencollective",
|
"type": "opencollective",
|
||||||
@ -779,10 +639,19 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"node_modules/@typescript-eslint/typescript-estree/node_modules/brace-expansion": {
|
||||||
|
"version": "2.0.1",
|
||||||
|
"resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz",
|
||||||
|
"integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==",
|
||||||
|
"dev": true,
|
||||||
|
"dependencies": {
|
||||||
|
"balanced-match": "^1.0.0"
|
||||||
|
}
|
||||||
|
},
|
||||||
"node_modules/@typescript-eslint/typescript-estree/node_modules/debug": {
|
"node_modules/@typescript-eslint/typescript-estree/node_modules/debug": {
|
||||||
"version": "4.3.4",
|
"version": "4.3.5",
|
||||||
"resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz",
|
"resolved": "https://registry.npmjs.org/debug/-/debug-4.3.5.tgz",
|
||||||
"integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==",
|
"integrity": "sha512-pt0bNEmneDIvdL1Xsd9oDQ/wrQRkXDT4AUWlNZNPKvW5x/jyO9VFXkJUP07vQ2upmw5PlaITaPKc31jK13V+jg==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"ms": "2.1.2"
|
"ms": "2.1.2"
|
||||||
@ -796,6 +665,21 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"node_modules/@typescript-eslint/typescript-estree/node_modules/minimatch": {
|
||||||
|
"version": "9.0.4",
|
||||||
|
"resolved": "https://registry.npmjs.org/minimatch/-/minimatch-9.0.4.tgz",
|
||||||
|
"integrity": "sha512-KqWh+VchfxcMNRAJjj2tnsSJdNbHsVgnkBhTNrW7AjVo6OvLtxw8zfT9oLw1JSohlFzJ8jCoTgaoXvJ+kHt6fw==",
|
||||||
|
"dev": true,
|
||||||
|
"dependencies": {
|
||||||
|
"brace-expansion": "^2.0.1"
|
||||||
|
},
|
||||||
|
"engines": {
|
||||||
|
"node": ">=16 || 14 >=14.17"
|
||||||
|
},
|
||||||
|
"funding": {
|
||||||
|
"url": "https://github.com/sponsors/isaacs"
|
||||||
|
}
|
||||||
|
},
|
||||||
"node_modules/@typescript-eslint/typescript-estree/node_modules/ms": {
|
"node_modules/@typescript-eslint/typescript-estree/node_modules/ms": {
|
||||||
"version": "2.1.2",
|
"version": "2.1.2",
|
||||||
"resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz",
|
"resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz",
|
||||||
@ -803,138 +687,38 @@
|
|||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
"node_modules/@typescript-eslint/utils": {
|
"node_modules/@typescript-eslint/utils": {
|
||||||
"version": "6.9.0",
|
"version": "7.13.1",
|
||||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-6.9.0.tgz",
|
"resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-7.13.1.tgz",
|
||||||
"integrity": "sha512-5Wf+Jsqya7WcCO8me504FBigeQKVLAMPmUzYgDbWchINNh1KJbxCgVya3EQ2MjvJMVeXl3pofRmprqX6mfQkjQ==",
|
"integrity": "sha512-h5MzFBD5a/Gh/fvNdp9pTfqJAbuQC4sCN2WzuXme71lqFJsZtLbjxfSk4r3p02WIArOF9N94pdsLiGutpDbrXQ==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@eslint-community/eslint-utils": "^4.4.0",
|
"@eslint-community/eslint-utils": "^4.4.0",
|
||||||
"@types/json-schema": "^7.0.12",
|
"@typescript-eslint/scope-manager": "7.13.1",
|
||||||
"@types/semver": "^7.5.0",
|
"@typescript-eslint/types": "7.13.1",
|
||||||
"@typescript-eslint/scope-manager": "6.9.0",
|
"@typescript-eslint/typescript-estree": "7.13.1"
|
||||||
"@typescript-eslint/types": "6.9.0",
|
|
||||||
"@typescript-eslint/typescript-estree": "6.9.0",
|
|
||||||
"semver": "^7.5.4"
|
|
||||||
},
|
},
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": "^16.0.0 || >=18.0.0"
|
"node": "^18.18.0 || >=20.0.0"
|
||||||
},
|
},
|
||||||
"funding": {
|
"funding": {
|
||||||
"type": "opencollective",
|
"type": "opencollective",
|
||||||
"url": "https://opencollective.com/typescript-eslint"
|
"url": "https://opencollective.com/typescript-eslint"
|
||||||
},
|
},
|
||||||
"peerDependencies": {
|
"peerDependencies": {
|
||||||
"eslint": "^7.0.0 || ^8.0.0"
|
"eslint": "^8.56.0"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@typescript-eslint/utils/node_modules/@typescript-eslint/scope-manager": {
|
|
||||||
"version": "6.9.0",
|
|
||||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-6.9.0.tgz",
|
|
||||||
"integrity": "sha512-1R8A9Mc39n4pCCz9o79qRO31HGNDvC7UhPhv26TovDsWPBDx+Sg3rOZdCELIA3ZmNoWAuxaMOT7aWtGRSYkQxw==",
|
|
||||||
"dev": true,
|
|
||||||
"dependencies": {
|
|
||||||
"@typescript-eslint/types": "6.9.0",
|
|
||||||
"@typescript-eslint/visitor-keys": "6.9.0"
|
|
||||||
},
|
|
||||||
"engines": {
|
|
||||||
"node": "^16.0.0 || >=18.0.0"
|
|
||||||
},
|
|
||||||
"funding": {
|
|
||||||
"type": "opencollective",
|
|
||||||
"url": "https://opencollective.com/typescript-eslint"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"node_modules/@typescript-eslint/utils/node_modules/@typescript-eslint/types": {
|
|
||||||
"version": "6.9.0",
|
|
||||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-6.9.0.tgz",
|
|
||||||
"integrity": "sha512-+KB0lbkpxBkBSiVCuQvduqMJy+I1FyDbdwSpM3IoBS7APl4Bu15lStPjgBIdykdRqQNYqYNMa8Kuidax6phaEw==",
|
|
||||||
"dev": true,
|
|
||||||
"engines": {
|
|
||||||
"node": "^16.0.0 || >=18.0.0"
|
|
||||||
},
|
|
||||||
"funding": {
|
|
||||||
"type": "opencollective",
|
|
||||||
"url": "https://opencollective.com/typescript-eslint"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"node_modules/@typescript-eslint/utils/node_modules/@typescript-eslint/typescript-estree": {
|
|
||||||
"version": "6.9.0",
|
|
||||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-6.9.0.tgz",
|
|
||||||
"integrity": "sha512-NJM2BnJFZBEAbCfBP00zONKXvMqihZCrmwCaik0UhLr0vAgb6oguXxLX1k00oQyD+vZZ+CJn3kocvv2yxm4awQ==",
|
|
||||||
"dev": true,
|
|
||||||
"dependencies": {
|
|
||||||
"@typescript-eslint/types": "6.9.0",
|
|
||||||
"@typescript-eslint/visitor-keys": "6.9.0",
|
|
||||||
"debug": "^4.3.4",
|
|
||||||
"globby": "^11.1.0",
|
|
||||||
"is-glob": "^4.0.3",
|
|
||||||
"semver": "^7.5.4",
|
|
||||||
"ts-api-utils": "^1.0.1"
|
|
||||||
},
|
|
||||||
"engines": {
|
|
||||||
"node": "^16.0.0 || >=18.0.0"
|
|
||||||
},
|
|
||||||
"funding": {
|
|
||||||
"type": "opencollective",
|
|
||||||
"url": "https://opencollective.com/typescript-eslint"
|
|
||||||
},
|
|
||||||
"peerDependenciesMeta": {
|
|
||||||
"typescript": {
|
|
||||||
"optional": true
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"node_modules/@typescript-eslint/utils/node_modules/@typescript-eslint/visitor-keys": {
|
|
||||||
"version": "6.9.0",
|
|
||||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-6.9.0.tgz",
|
|
||||||
"integrity": "sha512-dGtAfqjV6RFOtIP8I0B4ZTBRrlTT8NHHlZZSchQx3qReaoDeXhYM++M4So2AgFK9ZB0emRPA6JI1HkafzA2Ibg==",
|
|
||||||
"dev": true,
|
|
||||||
"dependencies": {
|
|
||||||
"@typescript-eslint/types": "6.9.0",
|
|
||||||
"eslint-visitor-keys": "^3.4.1"
|
|
||||||
},
|
|
||||||
"engines": {
|
|
||||||
"node": "^16.0.0 || >=18.0.0"
|
|
||||||
},
|
|
||||||
"funding": {
|
|
||||||
"type": "opencollective",
|
|
||||||
"url": "https://opencollective.com/typescript-eslint"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"node_modules/@typescript-eslint/utils/node_modules/debug": {
|
|
||||||
"version": "4.3.4",
|
|
||||||
"resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz",
|
|
||||||
"integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==",
|
|
||||||
"dev": true,
|
|
||||||
"dependencies": {
|
|
||||||
"ms": "2.1.2"
|
|
||||||
},
|
|
||||||
"engines": {
|
|
||||||
"node": ">=6.0"
|
|
||||||
},
|
|
||||||
"peerDependenciesMeta": {
|
|
||||||
"supports-color": {
|
|
||||||
"optional": true
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"node_modules/@typescript-eslint/utils/node_modules/ms": {
|
|
||||||
"version": "2.1.2",
|
|
||||||
"resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz",
|
|
||||||
"integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==",
|
|
||||||
"dev": true
|
|
||||||
},
|
|
||||||
"node_modules/@typescript-eslint/visitor-keys": {
|
"node_modules/@typescript-eslint/visitor-keys": {
|
||||||
"version": "6.2.0",
|
"version": "7.13.1",
|
||||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-6.2.0.tgz",
|
"resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-7.13.1.tgz",
|
||||||
"integrity": "sha512-QbaYUQVKKo9bgCzpjz45llCfwakyoxHetIy8CAvYCtd16Zu1KrpzNHofwF8kGkpPOxZB2o6kz+0nqH8ZkIzuoQ==",
|
"integrity": "sha512-k/Bfne7lrP7hcb7m9zSsgcBmo+8eicqqfNAJ7uUY+jkTFpKeH2FSkWpFRtimBxgkyvqfu9jTPRbYOvud6isdXA==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@typescript-eslint/types": "6.2.0",
|
"@typescript-eslint/types": "7.13.1",
|
||||||
"eslint-visitor-keys": "^3.4.1"
|
"eslint-visitor-keys": "^3.4.3"
|
||||||
},
|
},
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": "^16.0.0 || >=18.0.0"
|
"node": "^18.18.0 || >=20.0.0"
|
||||||
},
|
},
|
||||||
"funding": {
|
"funding": {
|
||||||
"type": "opencollective",
|
"type": "opencollective",
|
||||||
@ -1848,9 +1632,9 @@
|
|||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
"node_modules/fast-glob": {
|
"node_modules/fast-glob": {
|
||||||
"version": "3.3.1",
|
"version": "3.3.2",
|
||||||
"resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-3.3.1.tgz",
|
"resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-3.3.2.tgz",
|
||||||
"integrity": "sha512-kNFPyjhh5cKjrUltxs+wFx+ZkbRaxxmZ+X0ZU31SOsxCEtP9VPgtq2teZw1DebupL5GmDaNQ6yKMMVcM41iqDg==",
|
"integrity": "sha512-oX2ruAFQwf/Orj8m737Y5adxDQO0LAB7/S5MnxCdTNDd4p6BsyIVsv9JQsATbTSq8KHRpLwIHbVlUNatxd+1Ow==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@nodelib/fs.stat": "^2.0.2",
|
"@nodelib/fs.stat": "^2.0.2",
|
||||||
@ -2245,9 +2029,9 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/ignore": {
|
"node_modules/ignore": {
|
||||||
"version": "5.2.4",
|
"version": "5.3.1",
|
||||||
"resolved": "https://registry.npmjs.org/ignore/-/ignore-5.2.4.tgz",
|
"resolved": "https://registry.npmjs.org/ignore/-/ignore-5.3.1.tgz",
|
||||||
"integrity": "sha512-MAb38BcSbH0eHNBxn7ql2NH/kX33OkB3lZ1BNdh7ENeRChHTYsTvWrMubiIAMNS2llXEEgZ1MUOBtXChP3kaFQ==",
|
"integrity": "sha512-5Fytz/IraMjqpwfd34ke28PTVMjZjJG2MPn5t7OE4eUCUNf8BAa7b5WUS9/Qvr6mwOQS7Mk6vdsMno5he+T8Xw==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": ">= 4"
|
"node": ">= 4"
|
||||||
@ -2496,18 +2280,6 @@
|
|||||||
"resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz",
|
"resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz",
|
||||||
"integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA=="
|
"integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA=="
|
||||||
},
|
},
|
||||||
"node_modules/lru-cache": {
|
|
||||||
"version": "6.0.0",
|
|
||||||
"resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz",
|
|
||||||
"integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==",
|
|
||||||
"dev": true,
|
|
||||||
"dependencies": {
|
|
||||||
"yallist": "^4.0.0"
|
|
||||||
},
|
|
||||||
"engines": {
|
|
||||||
"node": ">=10"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"node_modules/make-error": {
|
"node_modules/make-error": {
|
||||||
"version": "1.3.6",
|
"version": "1.3.6",
|
||||||
"resolved": "https://registry.npmjs.org/make-error/-/make-error-1.3.6.tgz",
|
"resolved": "https://registry.npmjs.org/make-error/-/make-error-1.3.6.tgz",
|
||||||
@ -2550,12 +2322,12 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/micromatch": {
|
"node_modules/micromatch": {
|
||||||
"version": "4.0.5",
|
"version": "4.0.7",
|
||||||
"resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.5.tgz",
|
"resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.7.tgz",
|
||||||
"integrity": "sha512-DMy+ERcEW2q8Z2Po+WNXuw3c5YaUSFjAO5GsJqfEl7UjvtIuFKO6ZrKvcItdy98dwFI2N1tg3zNIdKaQT+aNdA==",
|
"integrity": "sha512-LPP/3KorzCwBxfeUuZmaR6bG2kdeHSbe0P2tY3FLRU4vYrjYz5hI4QZwV0njUx3jeuKe67YukQ1LSPZBKDqO/Q==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"braces": "^3.0.2",
|
"braces": "^3.0.3",
|
||||||
"picomatch": "^2.3.1"
|
"picomatch": "^2.3.1"
|
||||||
},
|
},
|
||||||
"engines": {
|
"engines": {
|
||||||
@ -3261,13 +3033,10 @@
|
|||||||
"integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg=="
|
"integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg=="
|
||||||
},
|
},
|
||||||
"node_modules/semver": {
|
"node_modules/semver": {
|
||||||
"version": "7.5.4",
|
"version": "7.6.2",
|
||||||
"resolved": "https://registry.npmjs.org/semver/-/semver-7.5.4.tgz",
|
"resolved": "https://registry.npmjs.org/semver/-/semver-7.6.2.tgz",
|
||||||
"integrity": "sha512-1bCSESV6Pv+i21Hvpxp3Dx+pSD8lIPt8uVjRrxAUt/nbswYc+tK6Y2btiULjd4+fnq15PX+nqQDC7Oft7WkwcA==",
|
"integrity": "sha512-FNAIBWCx9qcRhoHcgcJ0gvU7SN1lYU2ZXuSfl04bSC5OpvDHFyJCjdNHomPXxjQlCBU67YW64PzY7/VIEH7F2w==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"dependencies": {
|
|
||||||
"lru-cache": "^6.0.0"
|
|
||||||
},
|
|
||||||
"bin": {
|
"bin": {
|
||||||
"semver": "bin/semver.js"
|
"semver": "bin/semver.js"
|
||||||
},
|
},
|
||||||
@ -3658,12 +3427,12 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/ts-api-utils": {
|
"node_modules/ts-api-utils": {
|
||||||
"version": "1.0.1",
|
"version": "1.3.0",
|
||||||
"resolved": "https://registry.npmjs.org/ts-api-utils/-/ts-api-utils-1.0.1.tgz",
|
"resolved": "https://registry.npmjs.org/ts-api-utils/-/ts-api-utils-1.3.0.tgz",
|
||||||
"integrity": "sha512-lC/RGlPmwdrIBFTX59wwNzqh7aR2otPNPR/5brHZm/XKFYKsfqxihXUe9pU3JI+3vGkl+vyCoNNnPhJn3aLK1A==",
|
"integrity": "sha512-UQMIo7pb8WRomKR1/+MFVLTroIvDVtMX3K6OUir8ynLyzB8Jeriont2bTAtmNPa1ekAgN7YPDyf6V+ygrdU+eQ==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": ">=16.13.0"
|
"node": ">=16"
|
||||||
},
|
},
|
||||||
"peerDependencies": {
|
"peerDependencies": {
|
||||||
"typescript": ">=4.2.0"
|
"typescript": ">=4.2.0"
|
||||||
@ -3909,9 +3678,9 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/warframe-public-export-plus": {
|
"node_modules/warframe-public-export-plus": {
|
||||||
"version": "0.2.2",
|
"version": "0.2.5",
|
||||||
"resolved": "https://registry.npmjs.org/warframe-public-export-plus/-/warframe-public-export-plus-0.2.2.tgz",
|
"resolved": "https://registry.npmjs.org/warframe-public-export-plus/-/warframe-public-export-plus-0.2.5.tgz",
|
||||||
"integrity": "sha512-PAsiyiRDqXcsUwZTweihwrSksd+GT3USrbHwS/TrJUC3TqLS0Ng24OfefFKPWOmPfMxDbdkg2zV39uq72iZ/Yg=="
|
"integrity": "sha512-IsS2Z14CeTpGSpfeUxqTi8wAQjQ6qjh2kV8RC9St5hcDmII3NpwEFXmStEqz7r+JPfea72D3cZMMl+4QLHqvXw=="
|
||||||
},
|
},
|
||||||
"node_modules/warframe-riven-info": {
|
"node_modules/warframe-riven-info": {
|
||||||
"version": "0.1.0",
|
"version": "0.1.0",
|
||||||
@ -4061,12 +3830,6 @@
|
|||||||
"node": ">=10"
|
"node": ">=10"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/yallist": {
|
|
||||||
"version": "4.0.0",
|
|
||||||
"resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz",
|
|
||||||
"integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==",
|
|
||||||
"dev": true
|
|
||||||
},
|
|
||||||
"node_modules/yargs": {
|
"node_modules/yargs": {
|
||||||
"version": "16.2.0",
|
"version": "16.2.0",
|
||||||
"resolved": "https://registry.npmjs.org/yargs/-/yargs-16.2.0.tgz",
|
"resolved": "https://registry.npmjs.org/yargs/-/yargs-16.2.0.tgz",
|
||||||
|
@ -17,7 +17,7 @@
|
|||||||
"express": "^5.0.0-beta.3",
|
"express": "^5.0.0-beta.3",
|
||||||
"mongoose": "^8.1.1",
|
"mongoose": "^8.1.1",
|
||||||
"warframe-items": "^1.1262.74",
|
"warframe-items": "^1.1262.74",
|
||||||
"warframe-public-export-plus": "^0.2.2",
|
"warframe-public-export-plus": "^0.2.5",
|
||||||
"warframe-riven-info": "^0.1.0",
|
"warframe-riven-info": "^0.1.0",
|
||||||
"winston": "^3.11.0",
|
"winston": "^3.11.0",
|
||||||
"winston-daily-rotate-file": "^4.7.1"
|
"winston-daily-rotate-file": "^4.7.1"
|
||||||
@ -26,8 +26,8 @@
|
|||||||
"@tsconfig/node20": "^1.0.0",
|
"@tsconfig/node20": "^1.0.0",
|
||||||
"@types/express": "^4.17.20",
|
"@types/express": "^4.17.20",
|
||||||
"@types/morgan": "^1.9.7",
|
"@types/morgan": "^1.9.7",
|
||||||
"@typescript-eslint/eslint-plugin": "^6.9.0",
|
"@typescript-eslint/eslint-plugin": "^7.13.1",
|
||||||
"@typescript-eslint/parser": "^6.2.0",
|
"@typescript-eslint/parser": "^7.13.1",
|
||||||
"eslint": "^8.56.0",
|
"eslint": "^8.56.0",
|
||||||
"eslint-plugin-prettier": "^5.1.3",
|
"eslint-plugin-prettier": "^5.1.3",
|
||||||
"morgan": "^1.10.0",
|
"morgan": "^1.10.0",
|
||||||
|
@ -4,6 +4,7 @@ import { IUpdateGlyphRequest } from "@/src/types/requestTypes";
|
|||||||
import { getAccountIdForRequest } from "@/src/services/loginService";
|
import { getAccountIdForRequest } from "@/src/services/loginService";
|
||||||
import { getInventory } from "@/src/services/inventoryService";
|
import { getInventory } from "@/src/services/inventoryService";
|
||||||
|
|
||||||
|
// eslint-disable-next-line @typescript-eslint/no-misused-promises
|
||||||
const addFriendImageController: RequestHandler = async (req, res) => {
|
const addFriendImageController: RequestHandler = async (req, res) => {
|
||||||
const accountId = await getAccountIdForRequest(req);
|
const accountId = await getAccountIdForRequest(req);
|
||||||
const json = getJSONfromString(req.body.toString()) as IUpdateGlyphRequest;
|
const json = getJSONfromString(req.body.toString()) as IUpdateGlyphRequest;
|
||||||
|
@ -3,11 +3,11 @@
|
|||||||
|
|
||||||
import { RequestHandler } from "express";
|
import { RequestHandler } from "express";
|
||||||
import { logger } from "@/src/utils/logger";
|
import { logger } from "@/src/utils/logger";
|
||||||
import { getItemByBlueprint, getItemCategoryByUniqueName } from "@/src/services/itemDataService";
|
import { getRecipe } from "@/src/services/itemDataService";
|
||||||
import { IOid } from "@/src/types/commonTypes";
|
import { IOid } from "@/src/types/commonTypes";
|
||||||
import { getJSONfromString } from "@/src/helpers/stringHelpers";
|
import { getJSONfromString } from "@/src/helpers/stringHelpers";
|
||||||
import { getAccountIdForRequest } from "@/src/services/loginService";
|
import { getAccountIdForRequest } from "@/src/services/loginService";
|
||||||
import { getInventory } from "@/src/services/inventoryService";
|
import { getInventory, updateCurrency, addItem, addMiscItems, addRecipes } from "@/src/services/inventoryService";
|
||||||
|
|
||||||
export interface IClaimCompletedRecipeRequest {
|
export interface IClaimCompletedRecipeRequest {
|
||||||
RecipeIds: IOid[];
|
RecipeIds: IOid[];
|
||||||
@ -19,12 +19,10 @@ export const claimCompletedRecipeController: RequestHandler = async (req, res) =
|
|||||||
const accountId = await getAccountIdForRequest(req);
|
const accountId = await getAccountIdForRequest(req);
|
||||||
if (!accountId) throw new Error("no account id");
|
if (!accountId) throw new Error("no account id");
|
||||||
|
|
||||||
console.log(claimCompletedRecipeRequest);
|
|
||||||
const inventory = await getInventory(accountId);
|
const inventory = await getInventory(accountId);
|
||||||
const pendingRecipe = inventory.PendingRecipes.find(
|
const pendingRecipe = inventory.PendingRecipes.find(
|
||||||
recipe => recipe._id?.toString() === claimCompletedRecipeRequest.RecipeIds[0].$oid
|
recipe => recipe._id?.toString() === claimCompletedRecipeRequest.RecipeIds[0].$oid
|
||||||
);
|
);
|
||||||
console.log(pendingRecipe);
|
|
||||||
if (!pendingRecipe) {
|
if (!pendingRecipe) {
|
||||||
logger.error(`no pending recipe found with id ${claimCompletedRecipeRequest.RecipeIds[0].$oid}`);
|
logger.error(`no pending recipe found with id ${claimCompletedRecipeRequest.RecipeIds[0].$oid}`);
|
||||||
throw new Error(`no pending recipe found with id ${claimCompletedRecipeRequest.RecipeIds[0].$oid}`);
|
throw new Error(`no pending recipe found with id ${claimCompletedRecipeRequest.RecipeIds[0].$oid}`);
|
||||||
@ -36,29 +34,55 @@ export const claimCompletedRecipeController: RequestHandler = async (req, res) =
|
|||||||
// throw new Error(`recipe ${pendingRecipe._id} is not ready to be completed`);
|
// throw new Error(`recipe ${pendingRecipe._id} is not ready to be completed`);
|
||||||
// }
|
// }
|
||||||
|
|
||||||
//get completed Items
|
inventory.PendingRecipes.pull(pendingRecipe._id);
|
||||||
const completedItemName = getItemByBlueprint(pendingRecipe.ItemType)?.uniqueName;
|
await inventory.save();
|
||||||
|
|
||||||
if (!completedItemName) {
|
const recipe = getRecipe(pendingRecipe.ItemType);
|
||||||
|
if (!recipe) {
|
||||||
logger.error(`no completed item found for recipe ${pendingRecipe._id}`);
|
logger.error(`no completed item found for recipe ${pendingRecipe._id}`);
|
||||||
throw new Error(`no completed item found for recipe ${pendingRecipe._id}`);
|
throw new Error(`no completed item found for recipe ${pendingRecipe._id}`);
|
||||||
}
|
}
|
||||||
const itemCategory = getItemCategoryByUniqueName(completedItemName) as keyof typeof inventory;
|
|
||||||
console.log(itemCategory);
|
|
||||||
//TODO: remove all Schema.Mixed for inventory[itemCategory] not to be any
|
|
||||||
//add item
|
|
||||||
//inventory[itemCategory].
|
|
||||||
|
|
||||||
//add additional item components like mods or weapons for a sentinel.
|
if (req.query.cancel) {
|
||||||
//const additionalItemComponents = itemComponents[uniqueName]
|
const currencyChanges = await updateCurrency(recipe.buildPrice * -1, false, accountId);
|
||||||
//add these items to inventory
|
|
||||||
//return changes as InventoryChanges
|
|
||||||
|
|
||||||
//remove pending recipe
|
const inventory = await getInventory(accountId);
|
||||||
inventory.PendingRecipes.pull(pendingRecipe._id);
|
addMiscItems(inventory, recipe.ingredients);
|
||||||
// await inventory.save();
|
await inventory.save();
|
||||||
|
|
||||||
logger.debug("Claiming Completed Recipe", { completedItemName });
|
// Not a bug: In the specific case of cancelling a recipe, InventoryChanges are expected to be the root.
|
||||||
|
res.json({
|
||||||
|
...currencyChanges,
|
||||||
|
MiscItems: recipe.ingredients
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
logger.debug("Claiming Recipe", { recipe, pendingRecipe });
|
||||||
|
let InventoryChanges = {};
|
||||||
|
if (recipe.consumeOnUse) {
|
||||||
|
const recipeChanges = [
|
||||||
|
{
|
||||||
|
ItemType: pendingRecipe.ItemType,
|
||||||
|
ItemCount: -1
|
||||||
|
}
|
||||||
|
];
|
||||||
|
|
||||||
res.json({ InventoryChanges: {} });
|
InventoryChanges = { ...InventoryChanges, Recipes: recipeChanges };
|
||||||
|
|
||||||
|
const inventory = await getInventory(accountId);
|
||||||
|
addRecipes(inventory, recipeChanges);
|
||||||
|
await inventory.save();
|
||||||
|
}
|
||||||
|
if (req.query.rush) {
|
||||||
|
InventoryChanges = {
|
||||||
|
...InventoryChanges,
|
||||||
|
...(await updateCurrency(recipe.skipBuildTimePrice, true, accountId))
|
||||||
|
};
|
||||||
|
}
|
||||||
|
res.json({
|
||||||
|
InventoryChanges: {
|
||||||
|
...InventoryChanges,
|
||||||
|
...(await addItem(accountId, recipe.resultType, recipe.num)).InventoryChanges
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
@ -5,6 +5,7 @@ import { Inventory } from "@/src/models/inventoryModels/inventoryModel";
|
|||||||
import { Guild } from "@/src/models/guildModel";
|
import { Guild } from "@/src/models/guildModel";
|
||||||
import { ICreateGuildRequest } from "@/src/types/guildTypes";
|
import { ICreateGuildRequest } from "@/src/types/guildTypes";
|
||||||
|
|
||||||
|
// eslint-disable-next-line @typescript-eslint/no-misused-promises
|
||||||
const createGuildController: RequestHandler = async (req, res) => {
|
const createGuildController: RequestHandler = async (req, res) => {
|
||||||
const accountId = await getAccountIdForRequest(req);
|
const accountId = await getAccountIdForRequest(req);
|
||||||
const payload: ICreateGuildRequest = getJSONfromString(req.body.toString());
|
const payload: ICreateGuildRequest = getJSONfromString(req.body.toString());
|
||||||
|
42
src/controllers/api/evolveWeaponController.ts
Normal file
42
src/controllers/api/evolveWeaponController.ts
Normal file
@ -0,0 +1,42 @@
|
|||||||
|
import { RequestHandler } from "express";
|
||||||
|
import { getAccountIdForRequest } from "@/src/services/loginService";
|
||||||
|
import { getInventory } from "@/src/services/inventoryService";
|
||||||
|
import { getJSONfromString } from "@/src/helpers/stringHelpers";
|
||||||
|
import { WeaponTypeInternal } from "@/src/services/itemDataService";
|
||||||
|
import { EquipmentFeatures } from "@/src/types/inventoryTypes/commonInventoryTypes";
|
||||||
|
|
||||||
|
// eslint-disable-next-line @typescript-eslint/no-misused-promises
|
||||||
|
export const evolveWeaponController: RequestHandler = async (req, res) => {
|
||||||
|
const accountId = await getAccountIdForRequest(req);
|
||||||
|
const inventory = await getInventory(accountId);
|
||||||
|
const payload = getJSONfromString(req.body.toString()) as IEvolveWeaponRequest;
|
||||||
|
console.assert(payload.Action == "EWA_INSTALL");
|
||||||
|
|
||||||
|
// TODO: We should remove the Genesis item & its resources, but currently we don't know these "recipes".
|
||||||
|
|
||||||
|
const item = inventory[payload.Category].find(item => item._id.toString() == (req.query.ItemId as string))!;
|
||||||
|
item.Features ??= 0;
|
||||||
|
item.Features |= EquipmentFeatures.INCARNON_GENESIS;
|
||||||
|
|
||||||
|
item.SkillTree = "0";
|
||||||
|
|
||||||
|
inventory.EvolutionProgress ??= [];
|
||||||
|
if (!inventory.EvolutionProgress.find(entry => entry.ItemType == payload.EvoType)) {
|
||||||
|
inventory.EvolutionProgress.push({
|
||||||
|
Progress: 0,
|
||||||
|
Rank: 1,
|
||||||
|
ItemType: payload.EvoType
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
await inventory.save();
|
||||||
|
res.end();
|
||||||
|
};
|
||||||
|
|
||||||
|
interface IEvolveWeaponRequest {
|
||||||
|
Action: "EWA_INSTALL";
|
||||||
|
Category: WeaponTypeInternal;
|
||||||
|
Recipe: string; // e.g. "/Lotus/Types/Items/MiscItems/IncarnonAdapters/UnlockerBlueprints/DespairIncarnonBlueprint"
|
||||||
|
UninstallRecipe: "";
|
||||||
|
EvoType: string; // e.g. "/Lotus/Weapons/Tenno/ThrowingWeapons/StalkerKunai"
|
||||||
|
}
|
@ -5,6 +5,7 @@ import { IMiscItem, TFocusPolarity } from "@/src/types/inventoryTypes/inventoryT
|
|||||||
import { logger } from "@/src/utils/logger";
|
import { logger } from "@/src/utils/logger";
|
||||||
import baseFocusPointCosts from "@/static/json/baseFocusPointCosts.json";
|
import baseFocusPointCosts from "@/static/json/baseFocusPointCosts.json";
|
||||||
|
|
||||||
|
// eslint-disable-next-line @typescript-eslint/no-misused-promises
|
||||||
export const focusController: RequestHandler = async (req, res) => {
|
export const focusController: RequestHandler = async (req, res) => {
|
||||||
const accountId = await getAccountIdForRequest(req);
|
const accountId = await getAccountIdForRequest(req);
|
||||||
switch (req.query.op) {
|
switch (req.query.op) {
|
||||||
|
@ -4,6 +4,7 @@ import { Guild } from "@/src/models/guildModel";
|
|||||||
import { getAccountIdForRequest } from "@/src/services/loginService";
|
import { getAccountIdForRequest } from "@/src/services/loginService";
|
||||||
import { toOid } from "@/src/helpers/inventoryHelpers";
|
import { toOid } from "@/src/helpers/inventoryHelpers";
|
||||||
|
|
||||||
|
// eslint-disable-next-line @typescript-eslint/no-misused-promises
|
||||||
const getGuildController: RequestHandler = async (req, res) => {
|
const getGuildController: RequestHandler = async (req, res) => {
|
||||||
const accountId = await getAccountIdForRequest(req);
|
const accountId = await getAccountIdForRequest(req);
|
||||||
const inventory = await Inventory.findOne({ accountOwnerId: accountId });
|
const inventory = await Inventory.findOne({ accountOwnerId: accountId });
|
||||||
|
@ -4,6 +4,7 @@ import { Guild } from "@/src/models/guildModel";
|
|||||||
import { IDojoClient, IDojoComponentClient } from "@/src/types/guildTypes";
|
import { IDojoClient, IDojoComponentClient } from "@/src/types/guildTypes";
|
||||||
import { toOid, toMongoDate } from "@/src/helpers/inventoryHelpers";
|
import { toOid, toMongoDate } from "@/src/helpers/inventoryHelpers";
|
||||||
|
|
||||||
|
// eslint-disable-next-line @typescript-eslint/no-misused-promises
|
||||||
export const getGuildDojoController: RequestHandler = async (req, res) => {
|
export const getGuildDojoController: RequestHandler = async (req, res) => {
|
||||||
const guildId = req.query.guildId as string;
|
const guildId = req.query.guildId as string;
|
||||||
|
|
||||||
|
7
src/controllers/api/getVendorInfoController.ts
Normal file
7
src/controllers/api/getVendorInfoController.ts
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
import { RequestHandler } from "express";
|
||||||
|
import getVendorInfoResponse from "@/static/fixed_responses/getVendorInfo.json";
|
||||||
|
|
||||||
|
export const getVendorInfoController: RequestHandler = (req, res) => {
|
||||||
|
console.assert(req.query.vendor == "/Lotus/Types/Game/VendorManifests/Ostron/MaskSalesmanManifest");
|
||||||
|
res.json(getVendorInfoResponse);
|
||||||
|
};
|
@ -4,6 +4,7 @@ import { createNewSession } from "@/src/managers/sessionManager";
|
|||||||
import { logger } from "@/src/utils/logger";
|
import { logger } from "@/src/utils/logger";
|
||||||
import { ISession } from "@/src/types/session";
|
import { ISession } from "@/src/types/session";
|
||||||
|
|
||||||
|
// eslint-disable-next-line @typescript-eslint/no-misused-promises
|
||||||
const hostSessionController: RequestHandler = async (req, res) => {
|
const hostSessionController: RequestHandler = async (req, res) => {
|
||||||
const accountId = await getAccountIdForRequest(req);
|
const accountId = await getAccountIdForRequest(req);
|
||||||
const hostSessionRequest = JSON.parse(req.body as string) as ISession;
|
const hostSessionRequest = JSON.parse(req.body as string) as ISession;
|
||||||
|
89
src/controllers/api/infestedFoundryController.ts
Normal file
89
src/controllers/api/infestedFoundryController.ts
Normal file
@ -0,0 +1,89 @@
|
|||||||
|
import { RequestHandler } from "express";
|
||||||
|
import { getAccountIdForRequest } from "@/src/services/loginService";
|
||||||
|
import { getJSONfromString } from "@/src/helpers/stringHelpers";
|
||||||
|
import { getInventory, addMiscItems } from "@/src/services/inventoryService";
|
||||||
|
import { IOid } from "@/src/types/commonTypes";
|
||||||
|
|
||||||
|
// eslint-disable-next-line @typescript-eslint/no-misused-promises
|
||||||
|
export const infestedFoundryController: RequestHandler = async (req, res) => {
|
||||||
|
const accountId = await getAccountIdForRequest(req);
|
||||||
|
const payload = getJSONfromString(req.body.toString());
|
||||||
|
switch (req.query.mode) {
|
||||||
|
case "s": {
|
||||||
|
// shard installation
|
||||||
|
const request = payload as IShardInstallRequest;
|
||||||
|
const inventory = await getInventory(accountId);
|
||||||
|
const suit = inventory.Suits.find(suit => suit._id.toString() == request.SuitId.$oid)!;
|
||||||
|
if (
|
||||||
|
!suit.ArchonCrystalUpgrades ||
|
||||||
|
suit.ArchonCrystalUpgrades.length != 5 // we shouldn't have an array like this, but older inventories may disagree...
|
||||||
|
) {
|
||||||
|
suit.ArchonCrystalUpgrades = [{}, {}, {}, {}, {}];
|
||||||
|
}
|
||||||
|
suit.ArchonCrystalUpgrades[request.Slot] = {
|
||||||
|
UpgradeType: request.UpgradeType,
|
||||||
|
Color: request.Color
|
||||||
|
};
|
||||||
|
const miscItemChanges = [
|
||||||
|
{
|
||||||
|
ItemType: colorToShard[request.Color],
|
||||||
|
ItemCount: -1
|
||||||
|
}
|
||||||
|
];
|
||||||
|
addMiscItems(inventory, miscItemChanges);
|
||||||
|
await inventory.save();
|
||||||
|
res.json({
|
||||||
|
InventoryChanges: {
|
||||||
|
MiscItems: miscItemChanges
|
||||||
|
}
|
||||||
|
});
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
case "n": {
|
||||||
|
// name the beast
|
||||||
|
const inventory = await getInventory(accountId);
|
||||||
|
inventory.InfestedFoundry ??= {};
|
||||||
|
inventory.InfestedFoundry.Name = payload.newName as string;
|
||||||
|
await inventory.save();
|
||||||
|
res.json({
|
||||||
|
InventoryChanges: {
|
||||||
|
InfestedFoundry: {
|
||||||
|
Name: inventory.InfestedFoundry.Name
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
case "o": // offerings update
|
||||||
|
// {"OfferingsIndex":540,"SuitTypes":["/Lotus/Powersuits/PaxDuviricus/PaxDuviricusBaseSuit","/Lotus/Powersuits/Nezha/NezhaBaseSuit","/Lotus/Powersuits/Devourer/DevourerBaseSuit"],"Extra":false}
|
||||||
|
res.status(404).end();
|
||||||
|
break;
|
||||||
|
|
||||||
|
default:
|
||||||
|
throw new Error(`unhandled infestedFoundry mode: ${req.query.mode}`);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
interface IShardInstallRequest {
|
||||||
|
SuitId: IOid;
|
||||||
|
Slot: number;
|
||||||
|
UpgradeType: string;
|
||||||
|
Color: string;
|
||||||
|
}
|
||||||
|
|
||||||
|
const colorToShard: Record<string, string> = {
|
||||||
|
ACC_RED: "/Lotus/Types/Gameplay/NarmerSorties/ArchonCrystalAmar",
|
||||||
|
ACC_RED_MYTHIC: "/Lotus/Types/Gameplay/NarmerSorties/ArchonCrystalAmarMythic",
|
||||||
|
ACC_YELLOW: "/Lotus/Types/Gameplay/NarmerSorties/ArchonCrystalNira",
|
||||||
|
ACC_YELLOW_MYTHIC: "/Lotus/Types/Gameplay/NarmerSorties/ArchonCrystalNiraMythic",
|
||||||
|
ACC_BLUE: "/Lotus/Types/Gameplay/NarmerSorties/ArchonCrystalBoreal",
|
||||||
|
ACC_BLUE_MYTHIC: "/Lotus/Types/Gameplay/NarmerSorties/ArchonCrystalBorealMythic",
|
||||||
|
ACC_GREEN: "/Lotus/Types/Gameplay/NarmerSorties/ArchonCrystalGreen",
|
||||||
|
ACC_GREEN_MYTHIC: "/Lotus/Types/Gameplay/NarmerSorties/ArchonCrystalGreenMythic",
|
||||||
|
ACC_ORANGE: "/Lotus/Types/Gameplay/NarmerSorties/ArchonCrystalOrange",
|
||||||
|
ACC_ORANGE_MYTHIC: "/Lotus/Types/Gameplay/NarmerSorties/ArchonCrystalOrangeMythic",
|
||||||
|
ACC_PURPLE: "/Lotus/Types/Gameplay/NarmerSorties/ArchonCrystalViolet",
|
||||||
|
ACC_PURPLE_MYTHIC: "/Lotus/Types/Gameplay/NarmerSorties/ArchonCrystalVioletMythic"
|
||||||
|
};
|
@ -1,18 +1,15 @@
|
|||||||
/* eslint-disable @typescript-eslint/no-misused-promises */
|
import { RequestHandler } from "express";
|
||||||
import { getAccountIdForRequest } from "@/src/services/loginService";
|
import { getAccountIdForRequest } from "@/src/services/loginService";
|
||||||
import { toInventoryResponse } from "@/src/helpers/inventoryHelpers";
|
import { toInventoryResponse } from "@/src/helpers/inventoryHelpers";
|
||||||
import { Inventory } from "@/src/models/inventoryModels/inventoryModel";
|
import { Inventory } from "@/src/models/inventoryModels/inventoryModel";
|
||||||
import { Request, RequestHandler, Response } from "express";
|
|
||||||
import { config } from "@/src/services/configService";
|
import { config } from "@/src/services/configService";
|
||||||
import allMissions from "@/static/fixed_responses/allMissions.json";
|
import allMissions from "@/static/fixed_responses/allMissions.json";
|
||||||
import allQuestKeys from "@/static/fixed_responses/allQuestKeys.json";
|
|
||||||
import allShipDecorations from "@/static/fixed_responses/allShipDecorations.json";
|
|
||||||
import allFlavourItems from "@/static/fixed_responses/allFlavourItems.json";
|
|
||||||
import allSkins from "@/static/fixed_responses/allSkins.json";
|
|
||||||
import { ILoadoutDatabase } from "@/src/types/saveLoadoutTypes";
|
import { ILoadoutDatabase } from "@/src/types/saveLoadoutTypes";
|
||||||
import { IShipInventory, IFlavourItem } from "@/src/types/inventoryTypes/inventoryTypes";
|
import { IShipInventory } from "@/src/types/inventoryTypes/inventoryTypes";
|
||||||
|
import { ExportCustoms, ExportFlavour, ExportKeys, ExportResources } from "warframe-public-export-plus";
|
||||||
|
|
||||||
const inventoryController: RequestHandler = async (request: Request, response: Response) => {
|
// eslint-disable-next-line @typescript-eslint/no-misused-promises
|
||||||
|
const inventoryController: RequestHandler = async (request, response) => {
|
||||||
let accountId;
|
let accountId;
|
||||||
try {
|
try {
|
||||||
accountId = await getAccountIdForRequest(request);
|
accountId = await getAccountIdForRequest(request);
|
||||||
@ -51,46 +48,73 @@ const inventoryController: RequestHandler = async (request: Request, response: R
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (config.unlockAllQuests) {
|
if (config.unlockAllQuests) {
|
||||||
for (const questKey of allQuestKeys) {
|
for (const [k, v] of Object.entries(ExportKeys)) {
|
||||||
if (!inventoryResponse.QuestKeys.find(quest => quest.ItemType == questKey)) {
|
if ("chainStages" in v) {
|
||||||
inventoryResponse.QuestKeys.push({ ItemType: questKey });
|
if (!inventoryResponse.QuestKeys.find(quest => quest.ItemType == k)) {
|
||||||
|
inventoryResponse.QuestKeys.push({ ItemType: k });
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (config.completeAllQuests) {
|
if (config.completeAllQuests) {
|
||||||
for (const quest of inventoryResponse.QuestKeys) {
|
for (const quest of inventoryResponse.QuestKeys) {
|
||||||
quest.Completed = true;
|
quest.Completed = true;
|
||||||
|
quest.Progress = [
|
||||||
|
{
|
||||||
|
c: 0,
|
||||||
|
i: false,
|
||||||
|
m: false,
|
||||||
|
b: []
|
||||||
|
}
|
||||||
|
];
|
||||||
|
}
|
||||||
|
|
||||||
|
inventoryResponse.ArchwingEnabled = true;
|
||||||
|
|
||||||
|
// Skip "Watch The Maker"
|
||||||
|
inventoryResponse.NodeIntrosCompleted.push("/Lotus/Levels/Cinematics/NewWarIntro/NewWarStageTwo.level");
|
||||||
|
}
|
||||||
|
|
||||||
|
if (config.unlockAllShipDecorations) {
|
||||||
|
inventoryResponse.ShipDecorations = [];
|
||||||
|
for (const [uniqueName, item] of Object.entries(ExportResources)) {
|
||||||
|
if (item.productCategory == "ShipDecorations") {
|
||||||
|
inventoryResponse.ShipDecorations.push({ ItemType: uniqueName, ItemCount: 1 });
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (config.unlockAllShipDecorations) inventoryResponse.ShipDecorations = allShipDecorations;
|
if (config.unlockAllFlavourItems) {
|
||||||
if (config.unlockAllFlavourItems) inventoryResponse.FlavourItems = allFlavourItems satisfies IFlavourItem[];
|
inventoryResponse.FlavourItems = [];
|
||||||
|
for (const uniqueName in ExportFlavour) {
|
||||||
|
inventoryResponse.FlavourItems.push({ ItemType: uniqueName });
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (config.unlockAllSkins) {
|
if (config.unlockAllSkins) {
|
||||||
inventoryResponse.WeaponSkins = [];
|
inventoryResponse.WeaponSkins = [];
|
||||||
for (const skin of allSkins) {
|
for (const uniqueName in ExportCustoms) {
|
||||||
inventoryResponse.WeaponSkins.push({
|
inventoryResponse.WeaponSkins.push({
|
||||||
ItemId: {
|
ItemId: {
|
||||||
$oid: "000000000000000000000000"
|
$oid: "000000000000000000000000"
|
||||||
},
|
},
|
||||||
ItemType: skin
|
ItemType: uniqueName
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (
|
if (typeof config.spoofMasteryRank === "number" && config.spoofMasteryRank >= 0) {
|
||||||
typeof config.spoofMasteryRank === "number" &&
|
|
||||||
config.spoofMasteryRank >= 0 &&
|
|
||||||
config.spoofMasteryRank <= 5030
|
|
||||||
) {
|
|
||||||
inventoryResponse.PlayerLevel = config.spoofMasteryRank;
|
inventoryResponse.PlayerLevel = config.spoofMasteryRank;
|
||||||
inventoryResponse.XPInfo = [];
|
if (!("xpBasedLevelCapDisabled" in request.query)) {
|
||||||
let numFrames = getExpRequiredForMr(config.spoofMasteryRank) / 6000;
|
// This client has not been patched to accept any mastery rank, need to fake the XP.
|
||||||
while (numFrames-- > 0) {
|
inventoryResponse.XPInfo = [];
|
||||||
inventoryResponse.XPInfo.push({
|
let numFrames = getExpRequiredForMr(Math.min(config.spoofMasteryRank, 5030)) / 6000;
|
||||||
ItemType: "/Lotus/Powersuits/Mag/Mag",
|
while (numFrames-- > 0) {
|
||||||
XP: 1_600_000
|
inventoryResponse.XPInfo.push({
|
||||||
});
|
ItemType: "/Lotus/Powersuits/Mag/Mag",
|
||||||
|
XP: 1_600_000
|
||||||
|
});
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2,7 +2,7 @@ import { getAccountIdForRequest } from "@/src/services/loginService";
|
|||||||
import { updateCurrency } from "@/src/services/inventoryService";
|
import { updateCurrency } from "@/src/services/inventoryService";
|
||||||
import { RequestHandler } from "express";
|
import { RequestHandler } from "express";
|
||||||
import { updateSlots } from "@/src/services/inventoryService";
|
import { updateSlots } from "@/src/services/inventoryService";
|
||||||
import { SlotNameToInventoryName } from "@/src/types/purchaseTypes";
|
import { InventorySlot } from "@/src/types/inventoryTypes/inventoryTypes";
|
||||||
|
|
||||||
/*
|
/*
|
||||||
loadout slots are additionally purchased slots only
|
loadout slots are additionally purchased slots only
|
||||||
@ -28,7 +28,7 @@ export const inventorySlotsController: RequestHandler = async (req, res) => {
|
|||||||
//TODO: check which slot was purchased because pvpBonus is also possible
|
//TODO: check which slot was purchased because pvpBonus is also possible
|
||||||
|
|
||||||
const currencyChanges = await updateCurrency(20, true, accountId);
|
const currencyChanges = await updateCurrency(20, true, accountId);
|
||||||
await updateSlots(accountId, SlotNameToInventoryName.LOADOUT, 1, 1);
|
await updateSlots(accountId, InventorySlot.PVE_LOADOUTS, 1, 1);
|
||||||
|
|
||||||
//console.log({ InventoryChanges: currencyChanges }, " added loadout changes:");
|
//console.log({ InventoryChanges: currencyChanges }, " added loadout changes:");
|
||||||
|
|
||||||
|
@ -43,7 +43,7 @@ const loginController: RequestHandler = async (request, response) => {
|
|||||||
platformCDNs: platformCDNs,
|
platformCDNs: platformCDNs,
|
||||||
NRS: [config.myAddress],
|
NRS: [config.myAddress],
|
||||||
DTLS: DTLS,
|
DTLS: DTLS,
|
||||||
IRC: [config.myAddress],
|
IRC: config.myIrcAddresses ?? [config.myAddress],
|
||||||
HUB: HUB,
|
HUB: HUB,
|
||||||
BuildLabel: buildConfig.buildLabel,
|
BuildLabel: buildConfig.buildLabel,
|
||||||
MatchmakingBuildId: buildConfig.matchmakingBuildId
|
MatchmakingBuildId: buildConfig.matchmakingBuildId
|
||||||
@ -79,7 +79,7 @@ const loginController: RequestHandler = async (request, response) => {
|
|||||||
platformCDNs: platformCDNs,
|
platformCDNs: platformCDNs,
|
||||||
NRS: [config.myAddress],
|
NRS: [config.myAddress],
|
||||||
DTLS: DTLS,
|
DTLS: DTLS,
|
||||||
IRC: [config.myAddress],
|
IRC: config.myIrcAddresses ?? [config.myAddress],
|
||||||
HUB: HUB,
|
HUB: HUB,
|
||||||
BuildLabel: buildConfig.buildLabel,
|
BuildLabel: buildConfig.buildLabel,
|
||||||
MatchmakingBuildId: buildConfig.matchmakingBuildId
|
MatchmakingBuildId: buildConfig.matchmakingBuildId
|
||||||
|
@ -2,6 +2,7 @@ import { RequestHandler } from "express";
|
|||||||
import { getAccountIdForRequest } from "@/src/services/loginService";
|
import { getAccountIdForRequest } from "@/src/services/loginService";
|
||||||
import { Account } from "@/src/models/loginModel";
|
import { Account } from "@/src/models/loginModel";
|
||||||
|
|
||||||
|
// eslint-disable-next-line @typescript-eslint/no-misused-promises
|
||||||
const logoutController: RequestHandler = async (req, res) => {
|
const logoutController: RequestHandler = async (req, res) => {
|
||||||
const accountId = await getAccountIdForRequest(req);
|
const accountId = await getAccountIdForRequest(req);
|
||||||
const account = await Account.findOne({ _id: accountId });
|
const account = await Account.findOne({ _id: accountId });
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
import { RequestHandler } from "express";
|
import { RequestHandler } from "express";
|
||||||
import { missionInventoryUpdate } from "@/src/services/inventoryService";
|
import { missionInventoryUpdate } from "@/src/services/inventoryService";
|
||||||
import { combineRewardAndLootInventory, getRewards } from "@/src/services/missionInventoryUpdateService ";
|
import { combineRewardAndLootInventory, getRewards } from "@/src/services/missionInventoryUpdateService";
|
||||||
import { getJSONfromString } from "@/src/helpers/stringHelpers";
|
import { getJSONfromString } from "@/src/helpers/stringHelpers";
|
||||||
import { getAccountIdForRequest } from "@/src/services/loginService";
|
import { getAccountIdForRequest } from "@/src/services/loginService";
|
||||||
import { IMissionInventoryUpdateRequest } from "@/src/types/requestTypes";
|
import { IMissionInventoryUpdateRequest } from "@/src/types/requestTypes";
|
||||||
|
57
src/controllers/api/modularWeaponCraftingController.ts
Normal file
57
src/controllers/api/modularWeaponCraftingController.ts
Normal file
@ -0,0 +1,57 @@
|
|||||||
|
import { RequestHandler } from "express";
|
||||||
|
import { getAccountIdForRequest } from "@/src/services/loginService";
|
||||||
|
import { getJSONfromString } from "@/src/helpers/stringHelpers";
|
||||||
|
import { WeaponTypeInternal } from "@/src/services/itemDataService";
|
||||||
|
import { getInventory, updateCurrency, addWeapon, addMiscItems } from "@/src/services/inventoryService";
|
||||||
|
|
||||||
|
const modularWeaponTypes: Record<string, WeaponTypeInternal | "Hoverboards"> = {
|
||||||
|
"/Lotus/Weapons/SolarisUnited/Primary/LotusModularPrimaryBeam": "LongGuns",
|
||||||
|
"/Lotus/Weapons/SolarisUnited/Secondary/LotusModularSecondary": "Pistols",
|
||||||
|
"/Lotus/Weapons/SolarisUnited/Secondary/LotusModularSecondaryBeam": "Pistols",
|
||||||
|
"/Lotus/Weapons/SolarisUnited/Secondary/LotusModularSecondaryShotgun": "Pistols",
|
||||||
|
"/Lotus/Weapons/Ostron/Melee/LotusModularWeapon": "Melee",
|
||||||
|
"/Lotus/Weapons/Sentients/OperatorAmplifiers/OperatorAmpWeapon": "OperatorAmps",
|
||||||
|
"/Lotus/Types/Vehicles/Hoverboard/HoverboardSuit": "Hoverboards"
|
||||||
|
};
|
||||||
|
|
||||||
|
interface IModularCraftRequest {
|
||||||
|
WeaponType: string;
|
||||||
|
Parts: string[];
|
||||||
|
}
|
||||||
|
|
||||||
|
// eslint-disable-next-line @typescript-eslint/no-misused-promises
|
||||||
|
export const modularWeaponCraftingController: RequestHandler = async (req, res) => {
|
||||||
|
const accountId = await getAccountIdForRequest(req);
|
||||||
|
const data: IModularCraftRequest = getJSONfromString(req.body.toString());
|
||||||
|
if (!(data.WeaponType in modularWeaponTypes)) {
|
||||||
|
throw new Error(`unknown modular weapon type: ${data.WeaponType}`);
|
||||||
|
}
|
||||||
|
const category = modularWeaponTypes[data.WeaponType];
|
||||||
|
|
||||||
|
// Give weapon
|
||||||
|
const weapon = await addWeapon(category, data.WeaponType, accountId, data.Parts);
|
||||||
|
|
||||||
|
// Remove credits
|
||||||
|
const currencyChanges = await updateCurrency(category == "Hoverboards" ? 5000 : 4000, false, accountId);
|
||||||
|
|
||||||
|
// Remove parts
|
||||||
|
const miscItemChanges = [];
|
||||||
|
for (const part of data.Parts) {
|
||||||
|
miscItemChanges.push({
|
||||||
|
ItemType: part,
|
||||||
|
ItemCount: -1
|
||||||
|
});
|
||||||
|
}
|
||||||
|
const inventory = await getInventory(accountId);
|
||||||
|
addMiscItems(inventory, miscItemChanges);
|
||||||
|
await inventory.save();
|
||||||
|
|
||||||
|
// Tell client what we did
|
||||||
|
res.json({
|
||||||
|
InventoryChanges: {
|
||||||
|
...currencyChanges,
|
||||||
|
[category]: [weapon],
|
||||||
|
MiscItems: miscItemChanges
|
||||||
|
}
|
||||||
|
});
|
||||||
|
};
|
28
src/controllers/api/nameWeaponController.ts
Normal file
28
src/controllers/api/nameWeaponController.ts
Normal file
@ -0,0 +1,28 @@
|
|||||||
|
import { RequestHandler } from "express";
|
||||||
|
import { getAccountIdForRequest } from "@/src/services/loginService";
|
||||||
|
import { getInventory, updateCurrency } from "@/src/services/inventoryService";
|
||||||
|
import { getJSONfromString } from "@/src/helpers/stringHelpers";
|
||||||
|
import { TEquipmentKey } from "@/src/types/inventoryTypes/inventoryTypes";
|
||||||
|
|
||||||
|
interface INameWeaponRequest {
|
||||||
|
ItemName: string;
|
||||||
|
}
|
||||||
|
|
||||||
|
// eslint-disable-next-line @typescript-eslint/no-misused-promises
|
||||||
|
export const nameWeaponController: RequestHandler = async (req, res) => {
|
||||||
|
const accountId = await getAccountIdForRequest(req);
|
||||||
|
const inventory = await getInventory(accountId);
|
||||||
|
const body = getJSONfromString(req.body.toString()) as INameWeaponRequest;
|
||||||
|
const item = inventory[req.query.Category as string as TEquipmentKey].find(
|
||||||
|
item => item._id.toString() == (req.query.ItemId as string)
|
||||||
|
)!;
|
||||||
|
if (body.ItemName != "") {
|
||||||
|
item.ItemName = body.ItemName;
|
||||||
|
} else {
|
||||||
|
item.ItemName = undefined;
|
||||||
|
}
|
||||||
|
await inventory.save();
|
||||||
|
res.json({
|
||||||
|
InventoryChanges: await updateCurrency("webui" in req.query ? 0 : 15, true, accountId)
|
||||||
|
});
|
||||||
|
};
|
@ -1,9 +1,10 @@
|
|||||||
|
import { RequestHandler } from "express";
|
||||||
import { getAccountIdForRequest } from "@/src/services/loginService";
|
import { getAccountIdForRequest } from "@/src/services/loginService";
|
||||||
import { toPurchaseRequest } from "@/src/helpers/purchaseHelpers";
|
import { toPurchaseRequest } from "@/src/helpers/purchaseHelpers";
|
||||||
import { handlePurchase } from "@/src/services/purchaseService";
|
import { handlePurchase } from "@/src/services/purchaseService";
|
||||||
import { Request, Response } from "express";
|
|
||||||
|
|
||||||
export const purchaseController = async (req: Request, res: Response) => {
|
// eslint-disable-next-line @typescript-eslint/no-misused-promises
|
||||||
|
export const purchaseController: RequestHandler = async (req, res) => {
|
||||||
const purchaseRequest = toPurchaseRequest(JSON.parse(String(req.body)));
|
const purchaseRequest = toPurchaseRequest(JSON.parse(String(req.body)));
|
||||||
const accountId = await getAccountIdForRequest(req);
|
const accountId = await getAccountIdForRequest(req);
|
||||||
const response = await handlePurchase(purchaseRequest, accountId);
|
const response = await handlePurchase(purchaseRequest, accountId);
|
||||||
|
@ -1,8 +1,9 @@
|
|||||||
import { RequestHandler } from "express";
|
import { RequestHandler } from "express";
|
||||||
import { ISellRequest } from "@/src/types/sellTypes";
|
import { ISellRequest } from "@/src/types/sellTypes";
|
||||||
import { getAccountIdForRequest } from "@/src/services/loginService";
|
import { getAccountIdForRequest } from "@/src/services/loginService";
|
||||||
import { getInventory, addMods } from "@/src/services/inventoryService";
|
import { getInventory, addMods, addRecipes } from "@/src/services/inventoryService";
|
||||||
|
|
||||||
|
// eslint-disable-next-line @typescript-eslint/no-misused-promises
|
||||||
export const sellController: RequestHandler = async (req, res) => {
|
export const sellController: RequestHandler = async (req, res) => {
|
||||||
const payload: ISellRequest = JSON.parse(req.body.toString());
|
const payload: ISellRequest = JSON.parse(req.body.toString());
|
||||||
const accountId = await getAccountIdForRequest(req);
|
const accountId = await getAccountIdForRequest(req);
|
||||||
@ -39,8 +40,14 @@ export const sellController: RequestHandler = async (req, res) => {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
if (payload.Items.Recipes) {
|
if (payload.Items.Recipes) {
|
||||||
// TODO
|
const recipeChanges = [];
|
||||||
// Note: sellItem.String is a uniqueName in this case
|
for (const sellItem of payload.Items.Recipes) {
|
||||||
|
recipeChanges.push({
|
||||||
|
ItemType: sellItem.String,
|
||||||
|
ItemCount: sellItem.Count * -1
|
||||||
|
});
|
||||||
|
}
|
||||||
|
addRecipes(inventory, recipeChanges);
|
||||||
}
|
}
|
||||||
if (payload.Items.Upgrades) {
|
if (payload.Items.Upgrades) {
|
||||||
payload.Items.Upgrades.forEach(sellItem => {
|
payload.Items.Upgrades.forEach(sellItem => {
|
||||||
|
@ -3,6 +3,7 @@ import { getAccountIdForRequest } from "@/src/services/loginService";
|
|||||||
import { getPersonalRooms } from "@/src/services/personalRoomsService";
|
import { getPersonalRooms } from "@/src/services/personalRoomsService";
|
||||||
import { TBootLocation } from "@/src/types/shipTypes";
|
import { TBootLocation } from "@/src/types/shipTypes";
|
||||||
|
|
||||||
|
// eslint-disable-next-line @typescript-eslint/no-misused-promises
|
||||||
export const setBootLocationController: RequestHandler = async (req, res) => {
|
export const setBootLocationController: RequestHandler = async (req, res) => {
|
||||||
const accountId = await getAccountIdForRequest(req);
|
const accountId = await getAccountIdForRequest(req);
|
||||||
const personalRooms = await getPersonalRooms(accountId);
|
const personalRooms = await getPersonalRooms(accountId);
|
||||||
|
@ -2,6 +2,7 @@ import { RequestHandler } from "express";
|
|||||||
import { getAccountIdForRequest } from "@/src/services/loginService";
|
import { getAccountIdForRequest } from "@/src/services/loginService";
|
||||||
import { getInventory } from "@/src/services/inventoryService";
|
import { getInventory } from "@/src/services/inventoryService";
|
||||||
|
|
||||||
|
// eslint-disable-next-line @typescript-eslint/no-misused-promises
|
||||||
export const setSupportedSyndicateController: RequestHandler = async (req, res) => {
|
export const setSupportedSyndicateController: RequestHandler = async (req, res) => {
|
||||||
const accountId = await getAccountIdForRequest(req);
|
const accountId = await getAccountIdForRequest(req);
|
||||||
const inventory = await getInventory(accountId);
|
const inventory = await getInventory(accountId);
|
||||||
|
24
src/controllers/api/setWeaponSkillTreeController.ts
Normal file
24
src/controllers/api/setWeaponSkillTreeController.ts
Normal file
@ -0,0 +1,24 @@
|
|||||||
|
import { RequestHandler } from "express";
|
||||||
|
import { getAccountIdForRequest } from "@/src/services/loginService";
|
||||||
|
import { getInventory } from "@/src/services/inventoryService";
|
||||||
|
import { getJSONfromString } from "@/src/helpers/stringHelpers";
|
||||||
|
import { WeaponTypeInternal } from "@/src/services/itemDataService";
|
||||||
|
|
||||||
|
// eslint-disable-next-line @typescript-eslint/no-misused-promises
|
||||||
|
export const setWeaponSkillTreeController: RequestHandler = async (req, res) => {
|
||||||
|
const accountId = await getAccountIdForRequest(req);
|
||||||
|
const inventory = await getInventory(accountId);
|
||||||
|
const payload = getJSONfromString(req.body.toString()) as ISetWeaponSkillTreeRequest;
|
||||||
|
|
||||||
|
const item = inventory[req.query.Category as WeaponTypeInternal].find(
|
||||||
|
item => item._id.toString() == (req.query.ItemId as string)
|
||||||
|
)!;
|
||||||
|
item.SkillTree = payload.SkillTree;
|
||||||
|
|
||||||
|
await inventory.save();
|
||||||
|
res.end();
|
||||||
|
};
|
||||||
|
|
||||||
|
interface ISetWeaponSkillTreeRequest {
|
||||||
|
SkillTree: string;
|
||||||
|
}
|
@ -8,6 +8,7 @@ interface IStartDojoRecipeRequest {
|
|||||||
Revision: number;
|
Revision: number;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// eslint-disable-next-line @typescript-eslint/no-misused-promises
|
||||||
export const startDojoRecipeController: RequestHandler = async (req, res) => {
|
export const startDojoRecipeController: RequestHandler = async (req, res) => {
|
||||||
const guild = await getGuildForRequest(req);
|
const guild = await getGuildForRequest(req);
|
||||||
// At this point, we know that a member of the guild is making this request. Assuming they are allowed to start a build.
|
// At this point, we know that a member of the guild is making this request. Assuming they are allowed to start a build.
|
||||||
|
15
src/controllers/api/stepSequencersController.ts
Normal file
15
src/controllers/api/stepSequencersController.ts
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
import { RequestHandler } from "express";
|
||||||
|
import { getAccountIdForRequest } from "@/src/services/loginService";
|
||||||
|
import { getInventory } from "@/src/services/inventoryService";
|
||||||
|
import { IStepSequencer } from "@/src/types/inventoryTypes/inventoryTypes";
|
||||||
|
|
||||||
|
// eslint-disable-next-line @typescript-eslint/no-misused-promises
|
||||||
|
export const stepSequencersController: RequestHandler = async (req, res) => {
|
||||||
|
const accountId = await getAccountIdForRequest(req);
|
||||||
|
const inventory = await getInventory(accountId);
|
||||||
|
const stepSequencer = JSON.parse(req.body.toString()) as IStepSequencer;
|
||||||
|
delete stepSequencer.ItemId;
|
||||||
|
const stepSequencerIndex = inventory.StepSequencers.push(stepSequencer);
|
||||||
|
const changedInventory = await inventory.save();
|
||||||
|
res.json(changedInventory.StepSequencers[stepSequencerIndex - 1]); // unsure about the expected response format, but it seems anything works.
|
||||||
|
};
|
@ -3,6 +3,7 @@ import { syndicateSacrifice } from "@/src/services/inventoryService";
|
|||||||
import { ISyndicateSacrifice } from "@/src/types/syndicateTypes";
|
import { ISyndicateSacrifice } from "@/src/types/syndicateTypes";
|
||||||
import { RequestHandler } from "express";
|
import { RequestHandler } from "express";
|
||||||
import { getAccountIdForRequest } from "@/src/services/loginService";
|
import { getAccountIdForRequest } from "@/src/services/loginService";
|
||||||
|
|
||||||
// eslint-disable-next-line @typescript-eslint/no-misused-promises
|
// eslint-disable-next-line @typescript-eslint/no-misused-promises
|
||||||
const syndicateSacrificeController: RequestHandler = async (request, response) => {
|
const syndicateSacrificeController: RequestHandler = async (request, response) => {
|
||||||
const accountId = await getAccountIdForRequest(request);
|
const accountId = await getAccountIdForRequest(request);
|
||||||
|
@ -4,6 +4,7 @@ import { getAccountIdForRequest } from "@/src/services/loginService";
|
|||||||
import { updateChallengeProgress } from "@/src/services/inventoryService";
|
import { updateChallengeProgress } from "@/src/services/inventoryService";
|
||||||
import { IUpdateChallengeProgressRequest } from "@/src/types/requestTypes";
|
import { IUpdateChallengeProgressRequest } from "@/src/types/requestTypes";
|
||||||
|
|
||||||
|
// eslint-disable-next-line @typescript-eslint/no-misused-promises
|
||||||
const updateChallengeProgressController: RequestHandler = async (req, res) => {
|
const updateChallengeProgressController: RequestHandler = async (req, res) => {
|
||||||
const payload: IUpdateChallengeProgressRequest = getJSONfromString(req.body.toString());
|
const payload: IUpdateChallengeProgressRequest = getJSONfromString(req.body.toString());
|
||||||
const accountId = await getAccountIdForRequest(req);
|
const accountId = await getAccountIdForRequest(req);
|
||||||
|
@ -1,10 +1,11 @@
|
|||||||
import { RequestHandler } from "express";
|
import { RequestHandler } from "express";
|
||||||
import { IUpgradesRequest } from "@/src/types/requestTypes";
|
import { IUpgradesRequest } from "@/src/types/requestTypes";
|
||||||
import { FocusSchool } from "@/src/types/inventoryTypes/commonInventoryTypes";
|
import { FocusSchool, IEquipmentDatabase, EquipmentFeatures } from "@/src/types/inventoryTypes/commonInventoryTypes";
|
||||||
import { IGenericItemDatabase, IMiscItem, TGenericItemKey } from "@/src/types/inventoryTypes/inventoryTypes";
|
import { IMiscItem, TEquipmentKey } from "@/src/types/inventoryTypes/inventoryTypes";
|
||||||
import { getAccountIdForRequest } from "@/src/services/loginService";
|
import { getAccountIdForRequest } from "@/src/services/loginService";
|
||||||
import { addMiscItems, getInventory, updateCurrency } from "@/src/services/inventoryService";
|
import { addMiscItems, getInventory, updateCurrency } from "@/src/services/inventoryService";
|
||||||
|
|
||||||
|
// eslint-disable-next-line @typescript-eslint/no-misused-promises
|
||||||
export const upgradesController: RequestHandler = async (req, res) => {
|
export const upgradesController: RequestHandler = async (req, res) => {
|
||||||
const accountId = await getAccountIdForRequest(req);
|
const accountId = await getAccountIdForRequest(req);
|
||||||
const payload = JSON.parse(req.body.toString()) as IUpgradesRequest;
|
const payload = JSON.parse(req.body.toString()) as IUpgradesRequest;
|
||||||
@ -28,20 +29,20 @@ export const upgradesController: RequestHandler = async (req, res) => {
|
|||||||
switch (operation.UpgradeRequirement) {
|
switch (operation.UpgradeRequirement) {
|
||||||
case "/Lotus/Types/Items/MiscItems/OrokinReactor":
|
case "/Lotus/Types/Items/MiscItems/OrokinReactor":
|
||||||
case "/Lotus/Types/Items/MiscItems/OrokinCatalyst":
|
case "/Lotus/Types/Items/MiscItems/OrokinCatalyst":
|
||||||
for (const item of inventory[payload.ItemCategory as TGenericItemKey] as IGenericItemDatabase[]) {
|
for (const item of inventory[payload.ItemCategory as TEquipmentKey] as IEquipmentDatabase[]) {
|
||||||
if (item._id.toString() == payload.ItemId.$oid) {
|
if (item._id.toString() == payload.ItemId.$oid) {
|
||||||
item.Features ??= 0;
|
item.Features ??= 0;
|
||||||
item.Features |= 1;
|
item.Features |= EquipmentFeatures.DOUBLE_CAPACITY;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case "/Lotus/Types/Items/MiscItems/UtilityUnlocker":
|
case "/Lotus/Types/Items/MiscItems/UtilityUnlocker":
|
||||||
case "/Lotus/Types/Items/MiscItems/WeaponUtilityUnlocker":
|
case "/Lotus/Types/Items/MiscItems/WeaponUtilityUnlocker":
|
||||||
for (const item of inventory[payload.ItemCategory as TGenericItemKey] as IGenericItemDatabase[]) {
|
for (const item of inventory[payload.ItemCategory as TEquipmentKey] as IEquipmentDatabase[]) {
|
||||||
if (item._id.toString() == payload.ItemId.$oid) {
|
if (item._id.toString() == payload.ItemId.$oid) {
|
||||||
item.Features ??= 0;
|
item.Features ??= 0;
|
||||||
item.Features |= 2;
|
item.Features |= EquipmentFeatures.UTILITY_SLOT;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -49,10 +50,10 @@ export const upgradesController: RequestHandler = async (req, res) => {
|
|||||||
case "/Lotus/Types/Items/MiscItems/WeaponPrimaryArcaneUnlocker":
|
case "/Lotus/Types/Items/MiscItems/WeaponPrimaryArcaneUnlocker":
|
||||||
case "/Lotus/Types/Items/MiscItems/WeaponSecondaryArcaneUnlocker":
|
case "/Lotus/Types/Items/MiscItems/WeaponSecondaryArcaneUnlocker":
|
||||||
case "/Lotus/Types/Items/MiscItems/WeaponMeleeArcaneUnlocker":
|
case "/Lotus/Types/Items/MiscItems/WeaponMeleeArcaneUnlocker":
|
||||||
for (const item of inventory[payload.ItemCategory as TGenericItemKey] as IGenericItemDatabase[]) {
|
for (const item of inventory[payload.ItemCategory as TEquipmentKey] as IEquipmentDatabase[]) {
|
||||||
if (item._id.toString() == payload.ItemId.$oid) {
|
if (item._id.toString() == payload.ItemId.$oid) {
|
||||||
item.Features ??= 0;
|
item.Features ??= 0;
|
||||||
item.Features |= 32;
|
item.Features |= EquipmentFeatures.ARCANE_SLOT;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -61,7 +62,7 @@ export const upgradesController: RequestHandler = async (req, res) => {
|
|||||||
case "/Lotus/Types/Items/MiscItems/FormaUmbra":
|
case "/Lotus/Types/Items/MiscItems/FormaUmbra":
|
||||||
case "/Lotus/Types/Items/MiscItems/FormaAura":
|
case "/Lotus/Types/Items/MiscItems/FormaAura":
|
||||||
case "/Lotus/Types/Items/MiscItems/FormaStance":
|
case "/Lotus/Types/Items/MiscItems/FormaStance":
|
||||||
for (const item of inventory[payload.ItemCategory as TGenericItemKey] as IGenericItemDatabase[]) {
|
for (const item of inventory[payload.ItemCategory as TEquipmentKey] as IEquipmentDatabase[]) {
|
||||||
if (item._id.toString() == payload.ItemId.$oid) {
|
if (item._id.toString() == payload.ItemId.$oid) {
|
||||||
item.XP = 0;
|
item.XP = 0;
|
||||||
setSlotPolarity(item, operation.PolarizeSlot, operation.PolarizeValue);
|
setSlotPolarity(item, operation.PolarizeSlot, operation.PolarizeValue);
|
||||||
@ -72,7 +73,7 @@ export const upgradesController: RequestHandler = async (req, res) => {
|
|||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case "/Lotus/Types/Items/MiscItems/ModSlotUnlocker":
|
case "/Lotus/Types/Items/MiscItems/ModSlotUnlocker":
|
||||||
for (const item of inventory[payload.ItemCategory as TGenericItemKey] as IGenericItemDatabase[]) {
|
for (const item of inventory[payload.ItemCategory as TEquipmentKey] as IEquipmentDatabase[]) {
|
||||||
if (item._id.toString() == payload.ItemId.$oid) {
|
if (item._id.toString() == payload.ItemId.$oid) {
|
||||||
item.ModSlotPurchases ??= 0;
|
item.ModSlotPurchases ??= 0;
|
||||||
item.ModSlotPurchases += 1;
|
item.ModSlotPurchases += 1;
|
||||||
@ -87,7 +88,7 @@ export const upgradesController: RequestHandler = async (req, res) => {
|
|||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case "/Lotus/Types/Items/MiscItems/CustomizationSlotUnlocker":
|
case "/Lotus/Types/Items/MiscItems/CustomizationSlotUnlocker":
|
||||||
for (const item of inventory[payload.ItemCategory as TGenericItemKey] as IGenericItemDatabase[]) {
|
for (const item of inventory[payload.ItemCategory as TEquipmentKey] as IEquipmentDatabase[]) {
|
||||||
if (item._id.toString() == payload.ItemId.$oid) {
|
if (item._id.toString() == payload.ItemId.$oid) {
|
||||||
item.CustomizationSlotPurchases ??= 0;
|
item.CustomizationSlotPurchases ??= 0;
|
||||||
item.CustomizationSlotPurchases += 1;
|
item.CustomizationSlotPurchases += 1;
|
||||||
@ -103,7 +104,7 @@ export const upgradesController: RequestHandler = async (req, res) => {
|
|||||||
break;
|
break;
|
||||||
case "":
|
case "":
|
||||||
console.assert(operation.OperationType == "UOT_SWAP_POLARITY");
|
console.assert(operation.OperationType == "UOT_SWAP_POLARITY");
|
||||||
for (const item of inventory[payload.ItemCategory as TGenericItemKey] as IGenericItemDatabase[]) {
|
for (const item of inventory[payload.ItemCategory as TEquipmentKey] as IEquipmentDatabase[]) {
|
||||||
if (item._id.toString() == payload.ItemId.$oid) {
|
if (item._id.toString() == payload.ItemId.$oid) {
|
||||||
for (let i = 0; i != operation.PolarityRemap.length; ++i) {
|
for (let i = 0; i != operation.PolarityRemap.length; ++i) {
|
||||||
if (operation.PolarityRemap[i].Slot != i) {
|
if (operation.PolarityRemap[i].Slot != i) {
|
||||||
@ -122,7 +123,7 @@ export const upgradesController: RequestHandler = async (req, res) => {
|
|||||||
res.json({ InventoryChanges });
|
res.json({ InventoryChanges });
|
||||||
};
|
};
|
||||||
|
|
||||||
const setSlotPolarity = (item: IGenericItemDatabase, slot: number, polarity: FocusSchool): void => {
|
const setSlotPolarity = (item: IEquipmentDatabase, slot: number, polarity: FocusSchool): void => {
|
||||||
item.Polarity ??= [];
|
item.Polarity ??= [];
|
||||||
const entry = item.Polarity.find(entry => entry.Slot == slot);
|
const entry = item.Polarity.find(entry => entry.Slot == slot);
|
||||||
if (entry) {
|
if (entry) {
|
||||||
|
@ -1,8 +1,8 @@
|
|||||||
import { RequestHandler } from "express";
|
import { RequestHandler } from "express";
|
||||||
import configFile from "@/config.json";
|
import { config } from "@/src/services/configService";
|
||||||
|
|
||||||
const getConfigDataController: RequestHandler = (_req, res) => {
|
const getConfigDataController: RequestHandler = (_req, res) => {
|
||||||
res.json(configFile);
|
res.json(config);
|
||||||
};
|
};
|
||||||
|
|
||||||
export { getConfigDataController };
|
export { getConfigDataController };
|
||||||
|
@ -1,7 +1,13 @@
|
|||||||
import { RequestHandler } from "express";
|
import { RequestHandler } from "express";
|
||||||
import { MinItem, MinWeapon, warframes, items, getEnglishString } from "@/src/services/itemDataService";
|
import { MinItem, items, getEnglishString } from "@/src/services/itemDataService";
|
||||||
import badItems from "@/static/json/exclude-mods.json";
|
import badItems from "@/static/json/exclude-mods.json";
|
||||||
import { ExportArcanes, ExportWeapons } from "warframe-public-export-plus";
|
import {
|
||||||
|
ExportArcanes,
|
||||||
|
ExportGear,
|
||||||
|
ExportResources,
|
||||||
|
ExportWarframes,
|
||||||
|
ExportWeapons
|
||||||
|
} from "warframe-public-export-plus";
|
||||||
|
|
||||||
interface ListedItem {
|
interface ListedItem {
|
||||||
uniqueName: string;
|
uniqueName: string;
|
||||||
@ -20,6 +26,36 @@ function reduceItems(items: MinItem[]): ListedItem[] {
|
|||||||
}
|
}
|
||||||
|
|
||||||
const getItemListsController: RequestHandler = (_req, res) => {
|
const getItemListsController: RequestHandler = (_req, res) => {
|
||||||
|
const weapons = [];
|
||||||
|
const miscitems = [];
|
||||||
|
for (const [uniqueName, item] of Object.entries(ExportWeapons)) {
|
||||||
|
if (item.productCategory !== "OperatorAmps") {
|
||||||
|
if (item.totalDamage !== 0) {
|
||||||
|
weapons.push({
|
||||||
|
uniqueName,
|
||||||
|
name: getEnglishString(item.name)
|
||||||
|
});
|
||||||
|
} else if (!item.excludeFromCodex) {
|
||||||
|
miscitems.push({
|
||||||
|
uniqueName: "MiscItems:" + uniqueName,
|
||||||
|
name: getEnglishString(item.name)
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
for (const [uniqueName, item] of Object.entries(ExportResources)) {
|
||||||
|
miscitems.push({
|
||||||
|
uniqueName: "MiscItems:" + uniqueName,
|
||||||
|
name: getEnglishString(item.name)
|
||||||
|
});
|
||||||
|
}
|
||||||
|
for (const [uniqueName, item] of Object.entries(ExportGear)) {
|
||||||
|
miscitems.push({
|
||||||
|
uniqueName: "Consumables:" + uniqueName,
|
||||||
|
name: getEnglishString(item.name)
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
const mods = reduceItems(items.filter(item => item.category == "Mods"));
|
const mods = reduceItems(items.filter(item => item.category == "Mods"));
|
||||||
for (const [uniqueName, arcane] of Object.entries(ExportArcanes)) {
|
for (const [uniqueName, arcane] of Object.entries(ExportArcanes)) {
|
||||||
mods.push({
|
mods.push({
|
||||||
@ -27,25 +63,18 @@ const getItemListsController: RequestHandler = (_req, res) => {
|
|||||||
name: getEnglishString(arcane.name)
|
name: getEnglishString(arcane.name)
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
res.json({
|
res.json({
|
||||||
warframes: reduceItems(warframes),
|
warframes: Object.entries(ExportWarframes)
|
||||||
weapons: Object.entries(ExportWeapons)
|
.filter(([_uniqueName, warframe]) => warframe.productCategory == "Suits")
|
||||||
.filter(([_uniqueName, weapon]) => weapon.productCategory !== "OperatorAmps" && weapon.totalDamage !== 0)
|
.map(([uniqueName, warframe]) => {
|
||||||
.map(([uniqueName, weapon]) => {
|
|
||||||
return {
|
return {
|
||||||
uniqueName,
|
uniqueName,
|
||||||
name: getEnglishString(weapon.name)
|
name: getEnglishString(warframe.name)
|
||||||
};
|
};
|
||||||
}),
|
}),
|
||||||
miscitems: reduceItems(
|
weapons,
|
||||||
items.filter(
|
miscitems,
|
||||||
item =>
|
|
||||||
item.category == "Misc" ||
|
|
||||||
item.category == "Resources" ||
|
|
||||||
item.category == "Fish" ||
|
|
||||||
((item as any).productCategory == "Pistols" && (item as MinWeapon).totalDamage == 0)
|
|
||||||
)
|
|
||||||
),
|
|
||||||
mods,
|
mods,
|
||||||
badItems
|
badItems
|
||||||
});
|
});
|
||||||
|
@ -1,16 +1,10 @@
|
|||||||
import { RequestHandler } from "express";
|
import { RequestHandler } from "express";
|
||||||
import path from "path";
|
import { updateConfig } from "@/src/services/configService";
|
||||||
import fs from "fs";
|
|
||||||
const rootDir = path.join(__dirname, "../../..");
|
|
||||||
|
|
||||||
const updateConfigDataController: RequestHandler = (req) => {
|
// eslint-disable-next-line @typescript-eslint/no-misused-promises
|
||||||
const updateSettingsData = req.body;
|
const updateConfigDataController: RequestHandler = async (req, res) => {
|
||||||
|
await updateConfig(req.body.toString());
|
||||||
fs.writeFile(path.join(rootDir, "config.json"), updateSettingsData, function(err:any) {
|
res.end();
|
||||||
if(err) {
|
|
||||||
return console.log(err);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
};
|
};
|
||||||
|
|
||||||
export { updateConfigDataController };
|
export { updateConfigDataController };
|
||||||
|
@ -6,6 +6,7 @@ import { config } from "@/src/services/configService";
|
|||||||
import view from "@/static/fixed_responses/view.json";
|
import view from "@/static/fixed_responses/view.json";
|
||||||
import allScans from "@/static/fixed_responses/allScans.json";
|
import allScans from "@/static/fixed_responses/allScans.json";
|
||||||
|
|
||||||
|
// eslint-disable-next-line @typescript-eslint/no-misused-promises
|
||||||
const viewController: RequestHandler = async (req, res) => {
|
const viewController: RequestHandler = async (req, res) => {
|
||||||
const accountId = await getAccountIdForRequest(req);
|
const accountId = await getAccountIdForRequest(req);
|
||||||
const inventory = await Inventory.findOne({ accountOwnerId: accountId });
|
const inventory = await Inventory.findOne({ accountOwnerId: accountId });
|
||||||
|
@ -8,7 +8,6 @@ import {
|
|||||||
IBooster,
|
IBooster,
|
||||||
IInventoryResponse,
|
IInventoryResponse,
|
||||||
ISlots,
|
ISlots,
|
||||||
IGenericItem,
|
|
||||||
IMailbox,
|
IMailbox,
|
||||||
IDuviriInfo,
|
IDuviriInfo,
|
||||||
IPendingRecipe as IPendingRecipeDatabase,
|
IPendingRecipe as IPendingRecipeDatabase,
|
||||||
@ -16,14 +15,13 @@ import {
|
|||||||
ITypeCount,
|
ITypeCount,
|
||||||
IFocusXP,
|
IFocusXP,
|
||||||
IFocusUpgrades,
|
IFocusUpgrades,
|
||||||
IGenericItem2,
|
|
||||||
ITypeXPItem,
|
ITypeXPItem,
|
||||||
IChallengeProgress,
|
IChallengeProgress,
|
||||||
IStepSequencer,
|
IStepSequencer,
|
||||||
IAffiliation,
|
IAffiliation,
|
||||||
INotePacks,
|
INotePacks,
|
||||||
ICompletedJobChain,
|
ICompletedJobChain,
|
||||||
ISeasonChallengeHistory,
|
ISeasonChallenge,
|
||||||
IPlayerSkills,
|
IPlayerSkills,
|
||||||
ISettings,
|
ISettings,
|
||||||
IInfestedFoundry,
|
IInfestedFoundry,
|
||||||
@ -37,18 +35,19 @@ import {
|
|||||||
ITauntHistory,
|
ITauntHistory,
|
||||||
IPeriodicMissionCompletionDatabase,
|
IPeriodicMissionCompletionDatabase,
|
||||||
IPeriodicMissionCompletionResponse,
|
IPeriodicMissionCompletionResponse,
|
||||||
ILoreFragmentScan
|
ILoreFragmentScan,
|
||||||
|
IEvolutionProgress
|
||||||
} from "../../types/inventoryTypes/inventoryTypes";
|
} from "../../types/inventoryTypes/inventoryTypes";
|
||||||
import { IOid } from "../../types/commonTypes";
|
import { IOid } from "../../types/commonTypes";
|
||||||
import { ISuitDatabase } from "@/src/types/inventoryTypes/SuitTypes";
|
|
||||||
import { IWeaponDatabase } from "@/src/types/inventoryTypes/weaponTypes";
|
|
||||||
import {
|
import {
|
||||||
IAbilityOverride,
|
IAbilityOverride,
|
||||||
IColor,
|
IColor,
|
||||||
IItemConfig,
|
IItemConfig,
|
||||||
IOperatorConfigClient,
|
|
||||||
IOperatorConfigDatabase,
|
IOperatorConfigDatabase,
|
||||||
IPolarity
|
IPolarity,
|
||||||
|
IEquipmentDatabase,
|
||||||
|
IOperatorConfigClient,
|
||||||
|
IArchonCrystalUpgrade
|
||||||
} from "@/src/types/inventoryTypes/commonInventoryTypes";
|
} from "@/src/types/inventoryTypes/commonInventoryTypes";
|
||||||
import { toMongoDate, toOid } from "@/src/helpers/inventoryHelpers";
|
import { toMongoDate, toOid } from "@/src/helpers/inventoryHelpers";
|
||||||
|
|
||||||
@ -163,14 +162,17 @@ const ItemConfigSchema = new Schema<IItemConfig>(
|
|||||||
facial: colorSchema,
|
facial: colorSchema,
|
||||||
syancol: colorSchema,
|
syancol: colorSchema,
|
||||||
Upgrades: [String],
|
Upgrades: [String],
|
||||||
Songs: [
|
Songs: {
|
||||||
{
|
type: [
|
||||||
m: String,
|
{
|
||||||
b: String,
|
m: String,
|
||||||
p: String,
|
b: String,
|
||||||
s: String
|
p: String,
|
||||||
}
|
s: String
|
||||||
],
|
}
|
||||||
|
],
|
||||||
|
default: undefined
|
||||||
|
},
|
||||||
Name: String,
|
Name: String,
|
||||||
AbilityOverride: abilityOverrideSchema,
|
AbilityOverride: abilityOverrideSchema,
|
||||||
PvpUpgrades: [String],
|
PvpUpgrades: [String],
|
||||||
@ -185,8 +187,21 @@ ItemConfigSchema.set("toJSON", {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
//TODO: migrate to one schema for weapons and suits.. and possibly others
|
const ArchonCrystalUpgradeSchema = new Schema<IArchonCrystalUpgrade>(
|
||||||
const WeaponSchema = new Schema<IWeaponDatabase>(
|
{
|
||||||
|
UpgradeType: String,
|
||||||
|
Color: String
|
||||||
|
},
|
||||||
|
{ _id: false }
|
||||||
|
);
|
||||||
|
|
||||||
|
ArchonCrystalUpgradeSchema.set("toJSON", {
|
||||||
|
transform(_document, returnedObject) {
|
||||||
|
delete returnedObject.__v;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
const EquipmentSchema = new Schema<IEquipmentDatabase>(
|
||||||
{
|
{
|
||||||
ItemType: String,
|
ItemType: String,
|
||||||
Configs: [ItemConfigSchema],
|
Configs: [ItemConfigSchema],
|
||||||
@ -198,20 +213,26 @@ const WeaponSchema = new Schema<IWeaponDatabase>(
|
|||||||
FocusLens: String,
|
FocusLens: String,
|
||||||
ModSlotPurchases: Number,
|
ModSlotPurchases: Number,
|
||||||
CustomizationSlotPurchases: Number,
|
CustomizationSlotPurchases: Number,
|
||||||
UpgradeType: Schema.Types.Mixed, //todo
|
UpgradeType: String,
|
||||||
UpgradeFingerprint: String,
|
UpgradeFingerprint: String,
|
||||||
ItemName: String,
|
ItemName: String,
|
||||||
ModularParts: [String],
|
InfestationDate: Date,
|
||||||
UnlockLevel: Number
|
InfestationDays: Number,
|
||||||
|
InfestationType: String,
|
||||||
|
ModularParts: { type: [String], default: undefined },
|
||||||
|
UnlockLevel: Number,
|
||||||
|
Expiry: Date,
|
||||||
|
SkillTree: String,
|
||||||
|
ArchonCrystalUpgrades: { type: [ArchonCrystalUpgradeSchema], default: undefined }
|
||||||
},
|
},
|
||||||
{ id: false }
|
{ id: false }
|
||||||
);
|
);
|
||||||
|
|
||||||
WeaponSchema.virtual("ItemId").get(function () {
|
EquipmentSchema.virtual("ItemId").get(function () {
|
||||||
return { $oid: this._id.toString() } satisfies IOid;
|
return { $oid: this._id.toString() } satisfies IOid;
|
||||||
});
|
});
|
||||||
|
|
||||||
WeaponSchema.set("toJSON", {
|
EquipmentSchema.set("toJSON", {
|
||||||
virtuals: true,
|
virtuals: true,
|
||||||
transform(_document, returnedObject) {
|
transform(_document, returnedObject) {
|
||||||
delete returnedObject._id;
|
delete returnedObject._id;
|
||||||
@ -248,7 +269,7 @@ RawUpgrades.set("toJSON", {
|
|||||||
});
|
});
|
||||||
|
|
||||||
//TODO: find out what this is
|
//TODO: find out what this is
|
||||||
const upgrqadesSchema = new Schema(
|
const upgradesSchema = new Schema(
|
||||||
{
|
{
|
||||||
UpgradeFingerprint: String,
|
UpgradeFingerprint: String,
|
||||||
ItemType: String
|
ItemType: String
|
||||||
@ -256,42 +277,11 @@ const upgrqadesSchema = new Schema(
|
|||||||
{ id: false }
|
{ id: false }
|
||||||
);
|
);
|
||||||
|
|
||||||
upgrqadesSchema.virtual("ItemId").get(function () {
|
upgradesSchema.virtual("ItemId").get(function () {
|
||||||
return toOid(this._id);
|
return toOid(this._id);
|
||||||
});
|
});
|
||||||
|
|
||||||
upgrqadesSchema.set("toJSON", {
|
upgradesSchema.set("toJSON", {
|
||||||
virtuals: true,
|
|
||||||
transform(_document, returnedObject) {
|
|
||||||
delete returnedObject._id;
|
|
||||||
delete returnedObject.__v;
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
//TODO: reduce weapon and suit schemas to one schema if reasonable
|
|
||||||
const suitSchema = new Schema<ISuitDatabase>(
|
|
||||||
{
|
|
||||||
ItemType: String,
|
|
||||||
Configs: [ItemConfigSchema],
|
|
||||||
UpgradeVer: Number,
|
|
||||||
XP: Number,
|
|
||||||
InfestationDate: Date,
|
|
||||||
Features: Number,
|
|
||||||
Polarity: [polaritySchema],
|
|
||||||
Polarized: Number,
|
|
||||||
ModSlotPurchases: Number,
|
|
||||||
CustomizationSlotPurchases: Number,
|
|
||||||
FocusLens: String,
|
|
||||||
UnlockLevel: Number
|
|
||||||
},
|
|
||||||
{ id: false }
|
|
||||||
);
|
|
||||||
|
|
||||||
suitSchema.virtual("ItemId").get(function () {
|
|
||||||
return { $oid: this._id.toString() } satisfies IOid;
|
|
||||||
});
|
|
||||||
|
|
||||||
suitSchema.set("toJSON", {
|
|
||||||
virtuals: true,
|
virtuals: true,
|
||||||
transform(_document, returnedObject) {
|
transform(_document, returnedObject) {
|
||||||
delete returnedObject._id;
|
delete returnedObject._id;
|
||||||
@ -321,33 +311,6 @@ FlavourItemSchema.set("toJSON", {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
const GenericItemSchema = new Schema<IGenericItem>(
|
|
||||||
{
|
|
||||||
ItemType: String,
|
|
||||||
Configs: [ItemConfigSchema],
|
|
||||||
UpgradeVer: Number,
|
|
||||||
XP: Number,
|
|
||||||
Features: Number,
|
|
||||||
Polarity: [polaritySchema],
|
|
||||||
Polarized: Number,
|
|
||||||
ModSlotPurchases: Number,
|
|
||||||
CustomizationSlotPurchases: Number
|
|
||||||
},
|
|
||||||
{ id: false }
|
|
||||||
);
|
|
||||||
|
|
||||||
GenericItemSchema.virtual("ItemId").get(function () {
|
|
||||||
return { $oid: this._id.toString() } satisfies IOid;
|
|
||||||
});
|
|
||||||
|
|
||||||
GenericItemSchema.set("toJSON", {
|
|
||||||
virtuals: true,
|
|
||||||
transform(_document, returnedObject) {
|
|
||||||
delete returnedObject._id;
|
|
||||||
delete returnedObject.__v;
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
// "Mailbox": { "LastInboxId": { "$oid": "123456780000000000000000" } }
|
// "Mailbox": { "LastInboxId": { "$oid": "123456780000000000000000" } }
|
||||||
const MailboxSchema = new Schema<IMailbox>(
|
const MailboxSchema = new Schema<IMailbox>(
|
||||||
{
|
{
|
||||||
@ -384,30 +347,6 @@ DuviriInfoSchema.set("toJSON", {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
||||||
const GenericItemSchema2 = new Schema<IGenericItem2>({
|
|
||||||
ItemType: String,
|
|
||||||
ItemName: String,
|
|
||||||
XP: Number,
|
|
||||||
UpgradeVer: Number, //this is probably __v
|
|
||||||
Features: Number,
|
|
||||||
Polarized: Number,
|
|
||||||
CustomizationSlotPurchases: Number,
|
|
||||||
ModSlotPurchases: Number,
|
|
||||||
FocusLens: String,
|
|
||||||
Expiry: Date, //TODO: needs conversion
|
|
||||||
Polarity: [polaritySchema],
|
|
||||||
Configs: [ItemConfigSchema],
|
|
||||||
ModularParts: [String],
|
|
||||||
SkillTree: String,
|
|
||||||
UpgradeType: String,
|
|
||||||
UpgradeFingerprint: String,
|
|
||||||
OffensiveUpgrade: String,
|
|
||||||
DefensiveUpgrade: String,
|
|
||||||
UpgradesExpiry: Date, //TODO: needs conversion
|
|
||||||
ArchonCrystalUpgrades: []
|
|
||||||
});
|
|
||||||
|
|
||||||
const TypeXPItemSchema = new Schema<ITypeXPItem>(
|
const TypeXPItemSchema = new Schema<ITypeXPItem>(
|
||||||
{
|
{
|
||||||
ItemType: String,
|
ItemType: String,
|
||||||
@ -475,7 +414,7 @@ const completedJobChainsSchema = new Schema<ICompletedJobChain>(
|
|||||||
{ _id: false }
|
{ _id: false }
|
||||||
);
|
);
|
||||||
|
|
||||||
const seasonChallengeHistorySchema = new Schema<ISeasonChallengeHistory>(
|
const seasonChallengeHistorySchema = new Schema<ISeasonChallenge>(
|
||||||
{
|
{
|
||||||
challenge: String,
|
challenge: String,
|
||||||
id: String
|
id: String
|
||||||
@ -515,16 +454,19 @@ const consumedSchuitsSchema = new Schema<IConsumedSuit>({
|
|||||||
c: colorSchema
|
c: colorSchema
|
||||||
});
|
});
|
||||||
|
|
||||||
const infestedFoundrySchema = new Schema<IInfestedFoundry>({
|
const infestedFoundrySchema = new Schema<IInfestedFoundry>(
|
||||||
Name: String,
|
{
|
||||||
Resources: [typeCountSchema],
|
Name: String,
|
||||||
Slots: Number,
|
Resources: { type: [typeCountSchema], default: undefined },
|
||||||
XP: Number,
|
Slots: Number,
|
||||||
ConsumedSuits: [consumedSchuitsSchema],
|
XP: Number,
|
||||||
InvigorationIndex: Number,
|
ConsumedSuits: { type: [consumedSchuitsSchema], default: undefined },
|
||||||
InvigorationSuitOfferings: [String],
|
InvigorationIndex: Number,
|
||||||
InvigorationsApplied: Number
|
InvigorationSuitOfferings: { type: [String], default: undefined },
|
||||||
});
|
InvigorationsApplied: Number
|
||||||
|
},
|
||||||
|
{ _id: false }
|
||||||
|
);
|
||||||
|
|
||||||
const questProgressSchema = new Schema<IQuestProgress>({
|
const questProgressSchema = new Schema<IQuestProgress>({
|
||||||
c: Number,
|
c: Number,
|
||||||
@ -621,6 +563,15 @@ const loreFragmentScansSchema = new Schema<ILoreFragmentScan>(
|
|||||||
{ _id: false }
|
{ _id: false }
|
||||||
);
|
);
|
||||||
|
|
||||||
|
const evolutionProgressSchema = new Schema<IEvolutionProgress>(
|
||||||
|
{
|
||||||
|
Progress: Number,
|
||||||
|
Rank: Number,
|
||||||
|
ItemType: String
|
||||||
|
},
|
||||||
|
{ _id: false }
|
||||||
|
);
|
||||||
|
|
||||||
const inventorySchema = new Schema<IInventoryDatabase, InventoryDocumentProps>(
|
const inventorySchema = new Schema<IInventoryDatabase, InventoryDocumentProps>(
|
||||||
{
|
{
|
||||||
accountOwnerId: Schema.Types.ObjectId,
|
accountOwnerId: Schema.Types.ObjectId,
|
||||||
@ -696,31 +647,31 @@ const inventorySchema = new Schema<IInventoryDatabase, InventoryDocumentProps>(
|
|||||||
//Non Upgrade Mods Example:I have 999 item WeaponElectricityDamageMod (only "ItemCount"+"ItemType")
|
//Non Upgrade Mods Example:I have 999 item WeaponElectricityDamageMod (only "ItemCount"+"ItemType")
|
||||||
RawUpgrades: [RawUpgrades],
|
RawUpgrades: [RawUpgrades],
|
||||||
//Upgrade Mods\Riven\Arcane Example:"UpgradeFingerprint"+"ItemType"+""
|
//Upgrade Mods\Riven\Arcane Example:"UpgradeFingerprint"+"ItemType"+""
|
||||||
Upgrades: [upgrqadesSchema],
|
Upgrades: [upgradesSchema],
|
||||||
|
|
||||||
//Warframe
|
//Warframe
|
||||||
Suits: [suitSchema],
|
Suits: [EquipmentSchema],
|
||||||
//Primary Weapon
|
//Primary Weapon
|
||||||
LongGuns: [WeaponSchema],
|
LongGuns: [EquipmentSchema],
|
||||||
//Secondary Weapon
|
//Secondary Weapon
|
||||||
Pistols: [WeaponSchema],
|
Pistols: [EquipmentSchema],
|
||||||
//Melee Weapon
|
//Melee Weapon
|
||||||
Melee: [WeaponSchema],
|
Melee: [EquipmentSchema],
|
||||||
//Ability Weapon like Ultimate Mech\Excalibur\Ivara etc
|
//Ability Weapon like Ultimate Mech\Excalibur\Ivara etc
|
||||||
SpecialItems: [GenericItemSchema],
|
SpecialItems: [EquipmentSchema],
|
||||||
//The Mandachord(Octavia) is a step sequencer
|
//The Mandachord(Octavia) is a step sequencer
|
||||||
StepSequencers: [StepSequencersSchema],
|
StepSequencers: [StepSequencersSchema],
|
||||||
|
|
||||||
//Sentinel(like Helios or modular)
|
//Sentinel(like Helios or modular)
|
||||||
Sentinels: [Schema.Types.Mixed],
|
Sentinels: [EquipmentSchema],
|
||||||
//Any /Sentinels/SentinelWeapons/ (like warframe weapon)
|
//Any /Sentinels/SentinelWeapons/ (like warframe weapon)
|
||||||
SentinelWeapons: [Schema.Types.Mixed],
|
SentinelWeapons: [EquipmentSchema],
|
||||||
//Modular Pets
|
//Modular Pets
|
||||||
MoaPets: [Schema.Types.Mixed],
|
MoaPets: [EquipmentSchema],
|
||||||
|
|
||||||
KubrowPetEggs: [Schema.Types.Mixed],
|
KubrowPetEggs: [Schema.Types.Mixed],
|
||||||
//Like PowerSuit Cat\Kubrow or etc Pets
|
//Like PowerSuit Cat\Kubrow or etc Pets
|
||||||
KubrowPets: [Schema.Types.Mixed],
|
KubrowPets: [EquipmentSchema],
|
||||||
//Prints Cat(3 Prints)\Kubrow(2 Prints) Pets
|
//Prints Cat(3 Prints)\Kubrow(2 Prints) Pets
|
||||||
KubrowPetPrints: [Schema.Types.Mixed],
|
KubrowPetPrints: [Schema.Types.Mixed],
|
||||||
|
|
||||||
@ -735,27 +686,27 @@ const inventorySchema = new Schema<IInventoryDatabase, InventoryDocumentProps>(
|
|||||||
|
|
||||||
//to use add SummonItem to Consumables+EquippedGear
|
//to use add SummonItem to Consumables+EquippedGear
|
||||||
//Archwing need Suits+Melee+Guns
|
//Archwing need Suits+Melee+Guns
|
||||||
SpaceSuits: [GenericItemSchema],
|
SpaceSuits: [EquipmentSchema],
|
||||||
SpaceMelee: [GenericItemSchema],
|
SpaceMelee: [EquipmentSchema],
|
||||||
SpaceGuns: [Schema.Types.Mixed],
|
SpaceGuns: [EquipmentSchema],
|
||||||
ArchwingEnabled: Boolean,
|
ArchwingEnabled: Boolean,
|
||||||
//Mech need Suits+SpaceGuns+SpecialItem
|
//Mech need Suits+SpaceGuns+SpecialItem
|
||||||
MechSuits: [suitSchema],
|
MechSuits: [EquipmentSchema],
|
||||||
///Restoratives/HoverboardSummon (like Suit)
|
///Restoratives/HoverboardSummon (like Suit)
|
||||||
Hoverboards: [Schema.Types.Mixed],
|
Hoverboards: [EquipmentSchema],
|
||||||
|
|
||||||
//Use Operator\Drifter
|
//Use Operator\Drifter
|
||||||
UseAdultOperatorLoadout: Boolean,
|
UseAdultOperatorLoadout: Boolean,
|
||||||
//Operator\Drifter Weapon
|
//Operator\Drifter Weapon
|
||||||
OperatorAmps: [Schema.Types.Mixed],
|
OperatorAmps: [EquipmentSchema],
|
||||||
//Operator
|
//Operator
|
||||||
OperatorLoadOuts: [operatorConfigSchema],
|
OperatorLoadOuts: [operatorConfigSchema],
|
||||||
//Drifter
|
//Drifter
|
||||||
AdultOperatorLoadOuts: [operatorConfigSchema],
|
AdultOperatorLoadOuts: [operatorConfigSchema],
|
||||||
DrifterMelee: [GenericItemSchema],
|
DrifterMelee: [EquipmentSchema],
|
||||||
DrifterGuns: [GenericItemSchema],
|
DrifterGuns: [EquipmentSchema],
|
||||||
//ErsatzHorsePowerSuit
|
//ErsatzHorsePowerSuit
|
||||||
Horses: [GenericItemSchema],
|
Horses: [EquipmentSchema],
|
||||||
|
|
||||||
//LandingCraft like Liset
|
//LandingCraft like Liset
|
||||||
Ships: { type: [Schema.Types.ObjectId], ref: "Ships" },
|
Ships: { type: [Schema.Types.ObjectId], ref: "Ships" },
|
||||||
@ -763,7 +714,7 @@ const inventorySchema = new Schema<IInventoryDatabase, InventoryDocumentProps>(
|
|||||||
ShipDecorations: [typeCountSchema],
|
ShipDecorations: [typeCountSchema],
|
||||||
|
|
||||||
//RailJack Setting(Mods,Skin,Weapon,etc)
|
//RailJack Setting(Mods,Skin,Weapon,etc)
|
||||||
CrewShipHarnesses: [Schema.Types.Mixed],
|
CrewShipHarnesses: [EquipmentSchema],
|
||||||
//Railjack/Components(https://warframe.fandom.com/wiki/Railjack/Components)
|
//Railjack/Components(https://warframe.fandom.com/wiki/Railjack/Components)
|
||||||
CrewShipRawSalvage: [Schema.Types.Mixed],
|
CrewShipRawSalvage: [Schema.Types.Mixed],
|
||||||
|
|
||||||
@ -790,7 +741,7 @@ const inventorySchema = new Schema<IInventoryDatabase, InventoryDocumentProps>(
|
|||||||
FlavourItems: [FlavourItemSchema],
|
FlavourItems: [FlavourItemSchema],
|
||||||
|
|
||||||
//Lunaro Weapon
|
//Lunaro Weapon
|
||||||
Scoops: [GenericItemSchema],
|
Scoops: [EquipmentSchema],
|
||||||
|
|
||||||
//Mastery Rank*(Need item XPInfo to rank up)
|
//Mastery Rank*(Need item XPInfo to rank up)
|
||||||
PlayerLevel: Number,
|
PlayerLevel: Number,
|
||||||
@ -907,7 +858,7 @@ const inventorySchema = new Schema<IInventoryDatabase, InventoryDocumentProps>(
|
|||||||
InvasionChainProgress: [Schema.Types.Mixed],
|
InvasionChainProgress: [Schema.Types.Mixed],
|
||||||
|
|
||||||
//https://warframe.fandom.com/wiki/Parazon
|
//https://warframe.fandom.com/wiki/Parazon
|
||||||
DataKnives: [GenericItemSchema],
|
DataKnives: [EquipmentSchema],
|
||||||
|
|
||||||
//CorpusLich or GrineerLich
|
//CorpusLich or GrineerLich
|
||||||
NemesisAbandonedRewards: [String],
|
NemesisAbandonedRewards: [String],
|
||||||
@ -940,7 +891,7 @@ const inventorySchema = new Schema<IInventoryDatabase, InventoryDocumentProps>(
|
|||||||
|
|
||||||
//Progress+Rank+ItemType(ZarimanPumpShotgun)
|
//Progress+Rank+ItemType(ZarimanPumpShotgun)
|
||||||
//https://warframe.fandom.com/wiki/Incarnon
|
//https://warframe.fandom.com/wiki/Incarnon
|
||||||
EvolutionProgress: [Schema.Types.Mixed],
|
EvolutionProgress: { type: [evolutionProgressSchema], default: undefined },
|
||||||
|
|
||||||
//Unknown and system
|
//Unknown and system
|
||||||
DuviriInfo: DuviriInfoSchema,
|
DuviriInfo: DuviriInfoSchema,
|
||||||
@ -950,7 +901,7 @@ const inventorySchema = new Schema<IInventoryDatabase, InventoryDocumentProps>(
|
|||||||
ChallengesFixVersion: Number,
|
ChallengesFixVersion: Number,
|
||||||
PlayedParkourTutorial: Boolean,
|
PlayedParkourTutorial: Boolean,
|
||||||
SubscribedToEmailsPersonalized: Number,
|
SubscribedToEmailsPersonalized: Number,
|
||||||
LastInventorySync: Schema.Types.Mixed,
|
LastInventorySync: Schema.Types.Mixed, // this should be Schema.Types.ObjectId, but older inventories may break with that.
|
||||||
ActiveLandscapeTraps: [Schema.Types.Mixed],
|
ActiveLandscapeTraps: [Schema.Types.Mixed],
|
||||||
RepVotes: [Schema.Types.Mixed],
|
RepVotes: [Schema.Types.Mixed],
|
||||||
LeagueTickets: [Schema.Types.Mixed],
|
LeagueTickets: [Schema.Types.Mixed],
|
||||||
@ -976,7 +927,7 @@ const inventorySchema = new Schema<IInventoryDatabase, InventoryDocumentProps>(
|
|||||||
//Grustag three
|
//Grustag three
|
||||||
DeathSquadable: Boolean
|
DeathSquadable: Boolean
|
||||||
},
|
},
|
||||||
{ timestamps: { createdAt: "Created", updatedAt: "LastInventorySync" } }
|
{ timestamps: { createdAt: "Created" } }
|
||||||
);
|
);
|
||||||
|
|
||||||
inventorySchema.set("toJSON", {
|
inventorySchema.set("toJSON", {
|
||||||
@ -1000,25 +951,31 @@ inventorySchema.set("toJSON", {
|
|||||||
|
|
||||||
// type overwrites for subdocuments/subdocument arrays
|
// type overwrites for subdocuments/subdocument arrays
|
||||||
type InventoryDocumentProps = {
|
type InventoryDocumentProps = {
|
||||||
Suits: Types.DocumentArray<ISuitDatabase>;
|
Suits: Types.DocumentArray<IEquipmentDatabase>;
|
||||||
LongGuns: Types.DocumentArray<IWeaponDatabase>;
|
LongGuns: Types.DocumentArray<IEquipmentDatabase>;
|
||||||
Pistols: Types.DocumentArray<IWeaponDatabase>;
|
Pistols: Types.DocumentArray<IEquipmentDatabase>;
|
||||||
Melee: Types.DocumentArray<IWeaponDatabase>;
|
Melee: Types.DocumentArray<IEquipmentDatabase>;
|
||||||
|
OperatorAmps: Types.DocumentArray<IEquipmentDatabase>;
|
||||||
FlavourItems: Types.DocumentArray<IFlavourItem>;
|
FlavourItems: Types.DocumentArray<IFlavourItem>;
|
||||||
RawUpgrades: Types.DocumentArray<IRawUpgrade>;
|
RawUpgrades: Types.DocumentArray<IRawUpgrade>;
|
||||||
Upgrades: Types.DocumentArray<ICrewShipSalvagedWeaponSkin>;
|
Upgrades: Types.DocumentArray<ICrewShipSalvagedWeaponSkin>;
|
||||||
MiscItems: Types.DocumentArray<IMiscItem>;
|
MiscItems: Types.DocumentArray<IMiscItem>;
|
||||||
Boosters: Types.DocumentArray<IBooster>;
|
Boosters: Types.DocumentArray<IBooster>;
|
||||||
OperatorLoadOuts: Types.DocumentArray<IOperatorConfigClient>;
|
OperatorLoadOuts: Types.DocumentArray<IOperatorConfigClient>;
|
||||||
SpecialItems: Types.DocumentArray<IGenericItem>;
|
SpecialItems: Types.DocumentArray<IEquipmentDatabase>;
|
||||||
AdultOperatorLoadOuts: Types.DocumentArray<IOperatorConfigClient>; //TODO: this should still contain _id
|
AdultOperatorLoadOuts: Types.DocumentArray<IOperatorConfigClient>; //TODO: this should still contain _id
|
||||||
MechSuits: Types.DocumentArray<ISuitDatabase>;
|
MechSuits: Types.DocumentArray<IEquipmentDatabase>;
|
||||||
Scoops: Types.DocumentArray<IGenericItem>;
|
Scoops: Types.DocumentArray<IEquipmentDatabase>;
|
||||||
DataKnives: Types.DocumentArray<IGenericItem>;
|
DataKnives: Types.DocumentArray<IEquipmentDatabase>;
|
||||||
DrifterMelee: Types.DocumentArray<IGenericItem>;
|
DrifterMelee: Types.DocumentArray<IEquipmentDatabase>;
|
||||||
Sentinels: Types.DocumentArray<IWeaponDatabase>;
|
Sentinels: Types.DocumentArray<IEquipmentDatabase>;
|
||||||
Horses: Types.DocumentArray<IGenericItem>;
|
Horses: Types.DocumentArray<IEquipmentDatabase>;
|
||||||
PendingRecipes: Types.DocumentArray<IPendingRecipeDatabase>;
|
PendingRecipes: Types.DocumentArray<IPendingRecipeDatabase>;
|
||||||
|
SpaceSuits: Types.DocumentArray<IEquipmentDatabase>;
|
||||||
|
SpaceGuns: Types.DocumentArray<IEquipmentDatabase>;
|
||||||
|
SpaceMelee: Types.DocumentArray<IEquipmentDatabase>;
|
||||||
|
SentinelWeapons: Types.DocumentArray<IEquipmentDatabase>;
|
||||||
|
Hoverboards: Types.DocumentArray<IEquipmentDatabase>;
|
||||||
};
|
};
|
||||||
|
|
||||||
// eslint-disable-next-line @typescript-eslint/ban-types
|
// eslint-disable-next-line @typescript-eslint/ban-types
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
import { IOid } from "@/src/types/commonTypes";
|
import { IOid } from "@/src/types/commonTypes";
|
||||||
import { ILoadoutConfigDatabase, ILoadoutDatabase, IEquipmentSelection } from "@/src/types/saveLoadoutTypes";
|
import { IEquipmentSelection } from "@/src/types/inventoryTypes/commonInventoryTypes";
|
||||||
|
import { ILoadoutConfigDatabase, ILoadoutDatabase } from "@/src/types/saveLoadoutTypes";
|
||||||
import { Model, Schema, Types, model } from "mongoose";
|
import { Model, Schema, Types, model } from "mongoose";
|
||||||
|
|
||||||
const oidSchema = new Schema<IOid>(
|
const oidSchema = new Schema<IOid>(
|
||||||
|
@ -7,7 +7,8 @@ const placedDecosSchema = new Schema<IPlacedDecosDatabase>(
|
|||||||
{
|
{
|
||||||
Type: String,
|
Type: String,
|
||||||
Pos: [Number],
|
Pos: [Number],
|
||||||
Rot: [Number]
|
Rot: [Number],
|
||||||
|
Scale: Number
|
||||||
},
|
},
|
||||||
{ id: false }
|
{ id: false }
|
||||||
);
|
);
|
||||||
|
@ -1,124 +1,135 @@
|
|||||||
|
import express from "express";
|
||||||
|
import { addFriendImageController } from "@/src/controllers/api/addFriendImageController";
|
||||||
|
import { artifactsController } from "../controllers/api/artifactsController";
|
||||||
import { checkDailyMissionBonusController } from "@/src/controllers/api/checkDailyMissionBonusController";
|
import { checkDailyMissionBonusController } from "@/src/controllers/api/checkDailyMissionBonusController";
|
||||||
|
import { claimCompletedRecipeController } from "@/src/controllers/api/claimCompletedRecipeController";
|
||||||
|
import { createGuildController } from "@/src/controllers/api/createGuildController";
|
||||||
import { deleteSessionController } from "@/src/controllers/api/deleteSessionController";
|
import { deleteSessionController } from "@/src/controllers/api/deleteSessionController";
|
||||||
|
import { dojoController } from "@/src/controllers/api/dojoController";
|
||||||
import { dronesController } from "@/src/controllers/api/dronesController";
|
import { dronesController } from "@/src/controllers/api/dronesController";
|
||||||
|
import { evolveWeaponController } from "@/src/controllers/api/evolveWeaponController";
|
||||||
import { findSessionsController } from "@/src/controllers/api/findSessionsController";
|
import { findSessionsController } from "@/src/controllers/api/findSessionsController";
|
||||||
|
import { focusController } from "@/src/controllers/api/focusController";
|
||||||
import { genericUpdateController } from "@/src/controllers/api/genericUpdateController";
|
import { genericUpdateController } from "@/src/controllers/api/genericUpdateController";
|
||||||
import { getAllianceController } from "@/src/controllers/api/getAllianceController";
|
import { getAllianceController } from "@/src/controllers/api/getAllianceController";
|
||||||
import { getCreditsController } from "@/src/controllers/api/getCreditsController";
|
import { getCreditsController } from "@/src/controllers/api/getCreditsController";
|
||||||
|
import { getDailyDealStockLevelsController } from "@/src/controllers/api/getDailyDealStockLevelsController";
|
||||||
import { getFriendsController } from "@/src/controllers/api/getFriendsController";
|
import { getFriendsController } from "@/src/controllers/api/getFriendsController";
|
||||||
|
import { getGuildController } from "@/src/controllers/api/getGuildController";
|
||||||
|
import { getGuildDojoController } from "@/src/controllers/api/getGuildDojoController";
|
||||||
|
import { getGuildLogController } from "../controllers/api/getGuildLogController";
|
||||||
import { getIgnoredUsersController } from "@/src/controllers/api/getIgnoredUsersController";
|
import { getIgnoredUsersController } from "@/src/controllers/api/getIgnoredUsersController";
|
||||||
import { getNewRewardSeedController } from "@/src/controllers/api/getNewRewardSeedController";
|
import { getNewRewardSeedController } from "@/src/controllers/api/getNewRewardSeedController";
|
||||||
import { getShipController } from "@/src/controllers/api/getShipController";
|
import { getShipController } from "@/src/controllers/api/getShipController";
|
||||||
|
import { getVendorInfoController } from "@/src/controllers/api/getVendorInfoController";
|
||||||
|
import { guildTechController } from "../controllers/api/guildTechController";
|
||||||
import { hostSessionController } from "@/src/controllers/api/hostSessionController";
|
import { hostSessionController } from "@/src/controllers/api/hostSessionController";
|
||||||
import { hubController } from "@/src/controllers/api/hubController";
|
import { hubController } from "@/src/controllers/api/hubController";
|
||||||
import { hubInstancesController } from "@/src/controllers/api/hubInstancesController";
|
import { hubInstancesController } from "@/src/controllers/api/hubInstancesController";
|
||||||
import { inboxController } from "@/src/controllers/api/inboxController";
|
import { inboxController } from "@/src/controllers/api/inboxController";
|
||||||
|
import { infestedFoundryController } from "@/src/controllers/api/infestedFoundryController";
|
||||||
import { inventoryController } from "@/src/controllers/api/inventoryController";
|
import { inventoryController } from "@/src/controllers/api/inventoryController";
|
||||||
|
import { inventorySlotsController } from "@/src/controllers/api/inventorySlotsController";
|
||||||
|
import { joinSessionController } from "@/src/controllers/api/joinSessionController";
|
||||||
import { loginController } from "@/src/controllers/api/loginController";
|
import { loginController } from "@/src/controllers/api/loginController";
|
||||||
import { loginRewardsController } from "@/src/controllers/api/loginRewardsController";
|
import { loginRewardsController } from "@/src/controllers/api/loginRewardsController";
|
||||||
import { logoutController } from "@/src/controllers/api/logoutController";
|
import { logoutController } from "@/src/controllers/api/logoutController";
|
||||||
import { marketRecommendationsController } from "@/src/controllers/api/marketRecommendationsController";
|
import { marketRecommendationsController } from "@/src/controllers/api/marketRecommendationsController";
|
||||||
import { missionInventoryUpdateController } from "@/src/controllers/api/missionInventoryUpdateController";
|
import { missionInventoryUpdateController } from "@/src/controllers/api/missionInventoryUpdateController";
|
||||||
|
import { modularWeaponCraftingController } from "@/src/controllers/api/modularWeaponCraftingController";
|
||||||
import { modularWeaponSaleController } from "@/src/controllers/api/modularWeaponSaleController";
|
import { modularWeaponSaleController } from "@/src/controllers/api/modularWeaponSaleController";
|
||||||
|
import { nameWeaponController } from "@/src/controllers/api/nameWeaponController";
|
||||||
import { purchaseController } from "@/src/controllers/api/purchaseController";
|
import { purchaseController } from "@/src/controllers/api/purchaseController";
|
||||||
|
import { queueDojoComponentDestructionController } from "@/src/controllers/api/queueDojoComponentDestructionController";
|
||||||
import { rerollRandomModController } from "@/src/controllers/api/rerollRandomModController";
|
import { rerollRandomModController } from "@/src/controllers/api/rerollRandomModController";
|
||||||
|
import { saveLoadoutController } from "@/src/controllers/api/saveLoadout";
|
||||||
|
import { sellController } from "@/src/controllers/api/sellController";
|
||||||
import { setActiveQuestController } from "@/src/controllers/api/setActiveQuestController";
|
import { setActiveQuestController } from "@/src/controllers/api/setActiveQuestController";
|
||||||
|
import { setActiveShipController } from "@/src/controllers/api/setActiveShipController";
|
||||||
|
import { setBootLocationController } from "@/src/controllers/api/setBootLocationController";
|
||||||
|
import { setShipCustomizationsController } from "@/src/controllers/api/setShipCustomizationsController";
|
||||||
|
import { setSupportedSyndicateController } from "@/src/controllers/api/setSupportedSyndicateController";
|
||||||
|
import { setWeaponSkillTreeController } from "../controllers/api/setWeaponSkillTreeController";
|
||||||
|
import { shipDecorationsController } from "@/src/controllers/api/shipDecorationsController";
|
||||||
|
import { startDojoRecipeController } from "@/src/controllers/api/startDojoRecipeController";
|
||||||
|
import { startRecipeController } from "@/src/controllers/api/startRecipeController";
|
||||||
|
import { stepSequencersController } from "@/src/controllers/api/stepSequencersController";
|
||||||
import { surveysController } from "@/src/controllers/api/surveysController";
|
import { surveysController } from "@/src/controllers/api/surveysController";
|
||||||
|
import { syndicateSacrificeController } from "../controllers/api/syndicateSacrificeController";
|
||||||
|
import { trainingResultController } from "@/src/controllers/api/trainingResultController";
|
||||||
import { updateChallengeProgressController } from "@/src/controllers/api/updateChallengeProgressController";
|
import { updateChallengeProgressController } from "@/src/controllers/api/updateChallengeProgressController";
|
||||||
import { updateSessionGetController, updateSessionPostController } from "@/src/controllers/api/updateSessionController";
|
import { updateSessionGetController, updateSessionPostController } from "@/src/controllers/api/updateSessionController";
|
||||||
import { joinSessionController } from "@/src/controllers/api/joinSessionController";
|
|
||||||
import { saveLoadoutController } from "@/src/controllers/api/saveLoadout";
|
|
||||||
import { trainingResultController } from "@/src/controllers/api/trainingResultController";
|
|
||||||
import { artifactsController } from "../controllers/api/artifactsController";
|
|
||||||
|
|
||||||
import express from "express";
|
|
||||||
import { setBootLocationController } from "@/src/controllers/api/setBootLocationController";
|
|
||||||
import { focusController } from "@/src/controllers/api/focusController";
|
|
||||||
import { inventorySlotsController } from "@/src/controllers/api/inventorySlotsController";
|
|
||||||
import { startRecipeController } from "@/src/controllers/api/startRecipeController";
|
|
||||||
import { claimCompletedRecipeController } from "@/src/controllers/api/claimCompletedRecipeController";
|
|
||||||
import { shipDecorationsController } from "@/src/controllers/api/shipDecorationsController";
|
|
||||||
import { setShipCustomizationsController } from "@/src/controllers/api/setShipCustomizationsController";
|
|
||||||
import { setActiveShipController } from "@/src/controllers/api/setActiveShipController";
|
|
||||||
import { updateThemeController } from "../controllers/api/updateThemeController";
|
import { updateThemeController } from "../controllers/api/updateThemeController";
|
||||||
import { getGuildController } from "@/src/controllers/api/getGuildController";
|
|
||||||
import { addFriendImageController } from "@/src/controllers/api/addFriendImageController";
|
|
||||||
import { createGuildController } from "@/src/controllers/api/createGuildController";
|
|
||||||
import { sellController } from "@/src/controllers/api/sellController";
|
|
||||||
import { upgradesController } from "@/src/controllers/api/upgradesController";
|
import { upgradesController } from "@/src/controllers/api/upgradesController";
|
||||||
import { setSupportedSyndicateController } from "@/src/controllers/api/setSupportedSyndicateController";
|
|
||||||
import { getDailyDealStockLevelsController } from "@/src/controllers/api/getDailyDealStockLevelsController";
|
|
||||||
import { getGuildLogController } from "../controllers/api/getGuildLogController";
|
|
||||||
import { guildTechController } from "../controllers/api/guildTechController";
|
|
||||||
import { dojoController } from "@/src/controllers/api/dojoController";
|
|
||||||
import { getGuildDojoController } from "@/src/controllers/api/getGuildDojoController";
|
|
||||||
import { syndicateSacrificeController } from "../controllers/api/syndicateSacrificeController";
|
|
||||||
import { startDojoRecipeController } from "@/src/controllers/api/startDojoRecipeController";
|
|
||||||
import { queueDojoComponentDestructionController } from "@/src/controllers/api/queueDojoComponentDestructionController";
|
|
||||||
|
|
||||||
const apiRouter = express.Router();
|
const apiRouter = express.Router();
|
||||||
|
|
||||||
// get
|
// get
|
||||||
apiRouter.get("/inventory.php", inventoryController);
|
|
||||||
apiRouter.get("/getFriends.php", getFriendsController);
|
|
||||||
apiRouter.get("/marketRecommendations.php", marketRecommendationsController);
|
|
||||||
apiRouter.get("/marketSearchRecommendations.php", marketRecommendationsController);
|
|
||||||
apiRouter.get("/surveys.php", surveysController);
|
|
||||||
apiRouter.get("/loginRewards.php", loginRewardsController);
|
|
||||||
apiRouter.get("/checkDailyMissionBonus.php", checkDailyMissionBonusController);
|
apiRouter.get("/checkDailyMissionBonus.php", checkDailyMissionBonusController);
|
||||||
apiRouter.get("/inbox.php", inboxController);
|
apiRouter.get("/credits.php", getCreditsController);
|
||||||
apiRouter.get("/getShip.php", getShipController);
|
apiRouter.get("/deleteSession.php", deleteSessionController);
|
||||||
|
apiRouter.get("/dojo", dojoController);
|
||||||
apiRouter.get("/drones.php", dronesController);
|
apiRouter.get("/drones.php", dronesController);
|
||||||
|
apiRouter.get("/getDailyDealStockLevels.php", getDailyDealStockLevelsController);
|
||||||
|
apiRouter.get("/getFriends.php", getFriendsController);
|
||||||
|
apiRouter.get("/getGuild.php", getGuildController);
|
||||||
|
apiRouter.get("/getGuildDojo.php", getGuildDojoController);
|
||||||
|
apiRouter.get("/getGuildLog.php", getGuildLogController);
|
||||||
apiRouter.get("/getIgnoredUsers.php", getIgnoredUsersController);
|
apiRouter.get("/getIgnoredUsers.php", getIgnoredUsersController);
|
||||||
apiRouter.get("/getNewRewardSeed.php", getNewRewardSeedController);
|
apiRouter.get("/getNewRewardSeed.php", getNewRewardSeedController);
|
||||||
apiRouter.get("/setActiveQuest.php", setActiveQuestController);
|
apiRouter.get("/getShip.php", getShipController);
|
||||||
apiRouter.get("/updateSession.php", updateSessionGetController);
|
apiRouter.get("/getVendorInfo.php", getVendorInfoController);
|
||||||
apiRouter.get("/credits.php", getCreditsController);
|
|
||||||
apiRouter.get("/hubInstances", hubInstancesController);
|
|
||||||
apiRouter.get("/hub", hubController);
|
apiRouter.get("/hub", hubController);
|
||||||
apiRouter.get("/modularWeaponSale.php", modularWeaponSaleController);
|
apiRouter.get("/hubInstances", hubInstancesController);
|
||||||
apiRouter.get("/deleteSession.php", deleteSessionController);
|
apiRouter.get("/inbox.php", inboxController);
|
||||||
|
apiRouter.get("/inventory.php", inventoryController);
|
||||||
|
apiRouter.get("/loginRewards.php", loginRewardsController);
|
||||||
apiRouter.get("/logout.php", logoutController);
|
apiRouter.get("/logout.php", logoutController);
|
||||||
apiRouter.get("/setBootLocation.php", setBootLocationController);
|
apiRouter.get("/marketRecommendations.php", marketRecommendationsController);
|
||||||
apiRouter.get("/setActiveShip.php", setActiveShipController);
|
apiRouter.get("/marketSearchRecommendations.php", marketRecommendationsController);
|
||||||
apiRouter.get("/getGuild.php", getGuildController);
|
apiRouter.get("/modularWeaponSale.php", modularWeaponSaleController);
|
||||||
apiRouter.get("/setSupportedSyndicate.php", setSupportedSyndicateController);
|
|
||||||
apiRouter.get("/getDailyDealStockLevels.php", getDailyDealStockLevelsController);
|
|
||||||
apiRouter.get("/getGuildLog.php", getGuildLogController);
|
|
||||||
apiRouter.get("/dojo", dojoController);
|
|
||||||
apiRouter.get("/getGuildDojo.php", getGuildDojoController);
|
|
||||||
apiRouter.get("/queueDojoComponentDestruction.php", queueDojoComponentDestructionController);
|
apiRouter.get("/queueDojoComponentDestruction.php", queueDojoComponentDestructionController);
|
||||||
|
apiRouter.get("/setActiveQuest.php", setActiveQuestController);
|
||||||
|
apiRouter.get("/setActiveShip.php", setActiveShipController);
|
||||||
|
apiRouter.get("/setBootLocation.php", setBootLocationController);
|
||||||
|
apiRouter.get("/setSupportedSyndicate.php", setSupportedSyndicateController);
|
||||||
|
apiRouter.get("/surveys.php", surveysController);
|
||||||
|
apiRouter.get("/updateSession.php", updateSessionGetController);
|
||||||
|
|
||||||
// post
|
// post
|
||||||
// eslint-disable-next-line @typescript-eslint/no-misused-promises
|
|
||||||
apiRouter.post("/shipDecorations.php", shipDecorationsController);
|
|
||||||
apiRouter.post("/setShipCustomizations.php", setShipCustomizationsController);
|
|
||||||
apiRouter.post("/claimCompletedRecipe.php", claimCompletedRecipeController);
|
|
||||||
apiRouter.post("/startRecipe.php", startRecipeController);
|
|
||||||
apiRouter.post("/inventorySlots.php", inventorySlotsController);
|
|
||||||
apiRouter.post("/focus.php", focusController);
|
|
||||||
apiRouter.post("/artifacts.php", artifactsController);
|
|
||||||
apiRouter.post("/findSessions.php", findSessionsController);
|
|
||||||
// eslint-disable-next-line @typescript-eslint/no-misused-promises
|
|
||||||
apiRouter.post("/purchase.php", purchaseController);
|
|
||||||
apiRouter.post("/login.php", loginController);
|
|
||||||
apiRouter.post("/getAlliance.php", getAllianceController);
|
|
||||||
apiRouter.post("/updateChallengeProgress.php", updateChallengeProgressController);
|
|
||||||
apiRouter.post("/hostSession.php", hostSessionController);
|
|
||||||
apiRouter.post("/updateSession.php", updateSessionPostController);
|
|
||||||
apiRouter.post("/missionInventoryUpdate.php", missionInventoryUpdateController);
|
|
||||||
apiRouter.post("/genericUpdate.php", genericUpdateController);
|
|
||||||
apiRouter.post("/rerollRandomMod.php", rerollRandomModController);
|
|
||||||
apiRouter.post("/joinSession.php", joinSessionController);
|
|
||||||
apiRouter.post("/saveLoadout.php", saveLoadoutController);
|
|
||||||
apiRouter.post("/trainingResult.php", trainingResultController);
|
|
||||||
apiRouter.post("/updateTheme.php", updateThemeController);
|
|
||||||
apiRouter.post("/addFriendImage.php", addFriendImageController);
|
apiRouter.post("/addFriendImage.php", addFriendImageController);
|
||||||
|
apiRouter.post("/artifacts.php", artifactsController);
|
||||||
|
apiRouter.post("/claimCompletedRecipe.php", claimCompletedRecipeController);
|
||||||
apiRouter.post("/createGuild.php", createGuildController);
|
apiRouter.post("/createGuild.php", createGuildController);
|
||||||
apiRouter.post("/sell.php", sellController);
|
apiRouter.post("/evolveWeapon.php", evolveWeaponController);
|
||||||
apiRouter.post("/upgrades.php", upgradesController);
|
apiRouter.post("/findSessions.php", findSessionsController);
|
||||||
|
apiRouter.post("/focus.php", focusController);
|
||||||
|
apiRouter.post("/genericUpdate.php", genericUpdateController);
|
||||||
|
apiRouter.post("/getAlliance.php", getAllianceController);
|
||||||
apiRouter.post("/guildTech.php", guildTechController);
|
apiRouter.post("/guildTech.php", guildTechController);
|
||||||
apiRouter.post("/syndicateSacrifice.php", syndicateSacrificeController);
|
apiRouter.post("/hostSession.php", hostSessionController);
|
||||||
|
apiRouter.post("/infestedFoundry.php", infestedFoundryController);
|
||||||
|
apiRouter.post("/inventorySlots.php", inventorySlotsController);
|
||||||
|
apiRouter.post("/joinSession.php", joinSessionController);
|
||||||
|
apiRouter.post("/login.php", loginController);
|
||||||
|
apiRouter.post("/missionInventoryUpdate.php", missionInventoryUpdateController);
|
||||||
|
apiRouter.post("/modularWeaponCrafting.php", modularWeaponCraftingController);
|
||||||
|
apiRouter.post("/nameWeapon.php", nameWeaponController);
|
||||||
|
apiRouter.post("/purchase.php", purchaseController);
|
||||||
|
apiRouter.post("/rerollRandomMod.php", rerollRandomModController);
|
||||||
|
apiRouter.post("/saveLoadout.php", saveLoadoutController);
|
||||||
|
apiRouter.post("/sell.php", sellController);
|
||||||
|
apiRouter.post("/setShipCustomizations.php", setShipCustomizationsController);
|
||||||
|
apiRouter.post("/setWeaponSkillTree.php", setWeaponSkillTreeController);
|
||||||
|
apiRouter.post("/shipDecorations.php", shipDecorationsController);
|
||||||
apiRouter.post("/startDojoRecipe.php", startDojoRecipeController);
|
apiRouter.post("/startDojoRecipe.php", startDojoRecipeController);
|
||||||
|
apiRouter.post("/startRecipe.php", startRecipeController);
|
||||||
|
apiRouter.post("/stepSequencers.php", stepSequencersController);
|
||||||
|
apiRouter.post("/syndicateSacrifice.php", syndicateSacrificeController);
|
||||||
|
apiRouter.post("/trainingResult.php", trainingResultController);
|
||||||
|
apiRouter.post("/updateChallengeProgress.php", updateChallengeProgressController);
|
||||||
|
apiRouter.post("/updateSession.php", updateSessionPostController);
|
||||||
|
apiRouter.post("/updateTheme.php", updateThemeController);
|
||||||
|
apiRouter.post("/upgrades.php", upgradesController);
|
||||||
|
|
||||||
export { apiRouter };
|
export { apiRouter };
|
||||||
|
@ -16,6 +16,7 @@ cacheRouter.get(/^\/origin\/[a-zA-Z0-9]+\/[0-9]+\/H\.Cache\.bin.*$/, (_req, res)
|
|||||||
res.sendFile(`static/data/H.Cache_${buildConfig.version}.bin`, { root: "./" });
|
res.sendFile(`static/data/H.Cache_${buildConfig.version}.bin`, { root: "./" });
|
||||||
});
|
});
|
||||||
|
|
||||||
|
// eslint-disable-next-line @typescript-eslint/no-misused-promises
|
||||||
cacheRouter.get(/\.bk2!/, async (req, res) => {
|
cacheRouter.get(/\.bk2!/, async (req, res) => {
|
||||||
try {
|
try {
|
||||||
const dir = req.path.substr(0, req.path.lastIndexOf("/"));
|
const dir = req.path.substr(0, req.path.lastIndexOf("/"));
|
||||||
|
@ -1,4 +1,22 @@
|
|||||||
import rawConfig from "@/config.json";
|
import path from "path";
|
||||||
|
import fs from "fs";
|
||||||
|
import fsPromises from "fs/promises";
|
||||||
|
import { logger } from "@/src/utils/logger";
|
||||||
|
|
||||||
|
const rootDir = path.join(__dirname, "../..");
|
||||||
|
const repoDir = path.basename(rootDir) == "build" ? path.join(rootDir, "..") : rootDir;
|
||||||
|
const configPath = path.join(repoDir, "config.json");
|
||||||
|
export const config: IConfig = JSON.parse(fs.readFileSync(configPath, "utf-8"));
|
||||||
|
|
||||||
|
let amnesia = false;
|
||||||
|
fs.watchFile(configPath, () => {
|
||||||
|
if (amnesia) {
|
||||||
|
amnesia = false;
|
||||||
|
} else {
|
||||||
|
logger.info("Detected a change to config.json, reloading its contents.");
|
||||||
|
Object.assign(config, JSON.parse(fs.readFileSync(configPath, "utf-8")));
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
interface IConfig {
|
interface IConfig {
|
||||||
mongodbUrl: string;
|
mongodbUrl: string;
|
||||||
@ -6,6 +24,7 @@ interface IConfig {
|
|||||||
myAddress: string;
|
myAddress: string;
|
||||||
httpPort?: number;
|
httpPort?: number;
|
||||||
httpsPort?: number;
|
httpsPort?: number;
|
||||||
|
myIrcAddresses?: string[];
|
||||||
autoCreateAccount?: boolean;
|
autoCreateAccount?: boolean;
|
||||||
skipStoryModeChoice?: boolean;
|
skipStoryModeChoice?: boolean;
|
||||||
skipTutorial?: boolean;
|
skipTutorial?: boolean;
|
||||||
@ -26,4 +45,8 @@ interface ILoggerConfig {
|
|||||||
level: string; // "fatal" | "error" | "warn" | "info" | "http" | "debug" | "trace";
|
level: string; // "fatal" | "error" | "warn" | "info" | "http" | "debug" | "trace";
|
||||||
}
|
}
|
||||||
|
|
||||||
export const config: IConfig = rawConfig;
|
export const updateConfig = async (data: string) => {
|
||||||
|
amnesia = true;
|
||||||
|
await fsPromises.writeFile(configPath, data);
|
||||||
|
Object.assign(config, JSON.parse(data));
|
||||||
|
};
|
||||||
|
@ -2,9 +2,7 @@ import { Inventory } from "@/src/models/inventoryModels/inventoryModel";
|
|||||||
import new_inventory from "@/static/fixed_responses/postTutorialInventory.json";
|
import new_inventory from "@/static/fixed_responses/postTutorialInventory.json";
|
||||||
import { config } from "@/src/services/configService";
|
import { config } from "@/src/services/configService";
|
||||||
import { Types } from "mongoose";
|
import { Types } from "mongoose";
|
||||||
import { ISuitClient } from "@/src/types/inventoryTypes/SuitTypes";
|
import { SlotNames, IInventoryChanges } from "@/src/types/purchaseTypes";
|
||||||
import { SlotNames } from "@/src/types/purchaseTypes";
|
|
||||||
import { IWeaponClient } from "@/src/types/inventoryTypes/weaponTypes";
|
|
||||||
import {
|
import {
|
||||||
IChallengeProgress,
|
IChallengeProgress,
|
||||||
IConsumable,
|
IConsumable,
|
||||||
@ -13,8 +11,9 @@ import {
|
|||||||
IMiscItem,
|
IMiscItem,
|
||||||
IMission,
|
IMission,
|
||||||
IRawUpgrade,
|
IRawUpgrade,
|
||||||
ISeasonChallengeHistory,
|
ISeasonChallenge,
|
||||||
ITypeCount
|
ITypeCount,
|
||||||
|
InventorySlot
|
||||||
} from "@/src/types/inventoryTypes/inventoryTypes";
|
} from "@/src/types/inventoryTypes/inventoryTypes";
|
||||||
import { IGenericUpdate } from "../types/genericUpdate";
|
import { IGenericUpdate } from "../types/genericUpdate";
|
||||||
import {
|
import {
|
||||||
@ -24,8 +23,10 @@ import {
|
|||||||
IUpdateChallengeProgressRequest
|
IUpdateChallengeProgressRequest
|
||||||
} from "../types/requestTypes";
|
} from "../types/requestTypes";
|
||||||
import { logger } from "@/src/utils/logger";
|
import { logger } from "@/src/utils/logger";
|
||||||
import { WeaponTypeInternal, getExalted } from "@/src/services/itemDataService";
|
import { WeaponTypeInternal, getWeaponType, getExalted } from "@/src/services/itemDataService";
|
||||||
import { ISyndicateSacrifice, ISyndicateSacrificeResponse } from "../types/syndicateTypes";
|
import { ISyndicateSacrifice, ISyndicateSacrificeResponse } from "../types/syndicateTypes";
|
||||||
|
import { IEquipmentClient } from "../types/inventoryTypes/commonInventoryTypes";
|
||||||
|
import { ExportRecipes, ExportResources } from "warframe-public-export-plus";
|
||||||
|
|
||||||
export const createInventory = async (
|
export const createInventory = async (
|
||||||
accountOwnerId: Types.ObjectId,
|
accountOwnerId: Types.ObjectId,
|
||||||
@ -65,6 +66,204 @@ export const getInventory = async (accountOwnerId: string) => {
|
|||||||
return inventory;
|
return inventory;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
export const addItem = async (
|
||||||
|
accountId: string,
|
||||||
|
typeName: string,
|
||||||
|
quantity: number = 1
|
||||||
|
): Promise<{ InventoryChanges: IInventoryChanges }> => {
|
||||||
|
// Strict typing
|
||||||
|
if (typeName in ExportRecipes) {
|
||||||
|
const inventory = await getInventory(accountId);
|
||||||
|
const recipeChanges = [
|
||||||
|
{
|
||||||
|
ItemType: typeName,
|
||||||
|
ItemCount: quantity
|
||||||
|
} satisfies ITypeCount
|
||||||
|
];
|
||||||
|
addRecipes(inventory, recipeChanges);
|
||||||
|
await inventory.save();
|
||||||
|
return {
|
||||||
|
InventoryChanges: {
|
||||||
|
Recipes: recipeChanges
|
||||||
|
}
|
||||||
|
};
|
||||||
|
}
|
||||||
|
if (typeName in ExportResources) {
|
||||||
|
const inventory = await getInventory(accountId);
|
||||||
|
const miscItemChanges = [
|
||||||
|
{
|
||||||
|
ItemType: typeName,
|
||||||
|
ItemCount: quantity
|
||||||
|
} satisfies IMiscItem
|
||||||
|
];
|
||||||
|
addMiscItems(inventory, miscItemChanges);
|
||||||
|
await inventory.save();
|
||||||
|
return {
|
||||||
|
InventoryChanges: {
|
||||||
|
MiscItems: miscItemChanges
|
||||||
|
}
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
// Path-based duck typing
|
||||||
|
switch (typeName.substr(1).split("/")[1]) {
|
||||||
|
case "Powersuits":
|
||||||
|
switch (typeName.substr(1).split("/")[2]) {
|
||||||
|
default: {
|
||||||
|
const suit = await addPowerSuit(typeName, accountId);
|
||||||
|
await updateSlots(accountId, InventorySlot.SUITS, 0, 1);
|
||||||
|
return {
|
||||||
|
InventoryChanges: {
|
||||||
|
SuitBin: {
|
||||||
|
count: 1,
|
||||||
|
platinum: 0,
|
||||||
|
Slots: -1
|
||||||
|
},
|
||||||
|
Suits: [suit]
|
||||||
|
}
|
||||||
|
};
|
||||||
|
}
|
||||||
|
case "Archwing": {
|
||||||
|
const spaceSuit = await addSpaceSuit(typeName, accountId);
|
||||||
|
await updateSlots(accountId, InventorySlot.SPACESUITS, 0, 1);
|
||||||
|
return {
|
||||||
|
InventoryChanges: {
|
||||||
|
SpaceSuitBin: {
|
||||||
|
count: 1,
|
||||||
|
platinum: 0,
|
||||||
|
Slots: -1
|
||||||
|
},
|
||||||
|
SpaceSuits: [spaceSuit]
|
||||||
|
}
|
||||||
|
};
|
||||||
|
}
|
||||||
|
case "EntratiMech": {
|
||||||
|
const mechSuit = await addMechSuit(typeName, accountId);
|
||||||
|
await updateSlots(accountId, InventorySlot.MECHSUITS, 0, 1);
|
||||||
|
return {
|
||||||
|
InventoryChanges: {
|
||||||
|
MechBin: {
|
||||||
|
count: 1,
|
||||||
|
platinum: 0,
|
||||||
|
Slots: -1
|
||||||
|
},
|
||||||
|
MechSuits: [mechSuit]
|
||||||
|
}
|
||||||
|
};
|
||||||
|
}
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case "Weapons":
|
||||||
|
const weaponType = getWeaponType(typeName);
|
||||||
|
const weapon = await addWeapon(weaponType, typeName, accountId);
|
||||||
|
await updateSlots(accountId, InventorySlot.WEAPONS, 0, 1);
|
||||||
|
return {
|
||||||
|
InventoryChanges: {
|
||||||
|
WeaponBin: { count: 1, platinum: 0, Slots: -1 },
|
||||||
|
[weaponType]: [weapon]
|
||||||
|
}
|
||||||
|
};
|
||||||
|
case "Interface":
|
||||||
|
return {
|
||||||
|
InventoryChanges: {
|
||||||
|
FlavourItems: [await addCustomization(typeName, accountId)]
|
||||||
|
}
|
||||||
|
};
|
||||||
|
case "Objects": {
|
||||||
|
// /Lotus/Objects/Tenno/Props/TnoLisetTextProjector (Note Beacon)
|
||||||
|
const inventory = await getInventory(accountId);
|
||||||
|
const changes = [
|
||||||
|
{
|
||||||
|
ItemType: typeName,
|
||||||
|
ItemCount: quantity
|
||||||
|
} satisfies IMiscItem
|
||||||
|
];
|
||||||
|
addShipDecorations(inventory, changes);
|
||||||
|
await inventory.save();
|
||||||
|
return {
|
||||||
|
InventoryChanges: {
|
||||||
|
ShipDecorations: changes
|
||||||
|
}
|
||||||
|
};
|
||||||
|
}
|
||||||
|
case "Types":
|
||||||
|
switch (typeName.substr(1).split("/")[2]) {
|
||||||
|
case "AvatarImages":
|
||||||
|
case "SuitCustomizations":
|
||||||
|
return {
|
||||||
|
InventoryChanges: {
|
||||||
|
FlavourItems: [await addCustomization(typeName, accountId)]
|
||||||
|
}
|
||||||
|
};
|
||||||
|
case "Sentinels":
|
||||||
|
// TOOD: Sentinels should also grant their DefaultUpgrades & SentinelWeapon.
|
||||||
|
const sentinel = await addSentinel(typeName, accountId);
|
||||||
|
await updateSlots(accountId, InventorySlot.SENTINELS, 0, 1);
|
||||||
|
return {
|
||||||
|
InventoryChanges: {
|
||||||
|
SentinelBin: { count: 1, platinum: 0, Slots: -1 },
|
||||||
|
Sentinels: [sentinel]
|
||||||
|
}
|
||||||
|
};
|
||||||
|
case "Items": {
|
||||||
|
switch (typeName.substr(1).split("/")[3]) {
|
||||||
|
case "ShipDecos": {
|
||||||
|
const inventory = await getInventory(accountId);
|
||||||
|
const changes = [
|
||||||
|
{
|
||||||
|
ItemType: typeName,
|
||||||
|
ItemCount: quantity
|
||||||
|
} satisfies IMiscItem
|
||||||
|
];
|
||||||
|
addShipDecorations(inventory, changes);
|
||||||
|
await inventory.save();
|
||||||
|
return {
|
||||||
|
InventoryChanges: {
|
||||||
|
ShipDecorations: changes
|
||||||
|
}
|
||||||
|
};
|
||||||
|
}
|
||||||
|
default: {
|
||||||
|
const inventory = await getInventory(accountId);
|
||||||
|
const miscItemChanges = [
|
||||||
|
{
|
||||||
|
ItemType: typeName,
|
||||||
|
ItemCount: quantity
|
||||||
|
} satisfies IMiscItem
|
||||||
|
];
|
||||||
|
addMiscItems(inventory, miscItemChanges);
|
||||||
|
await inventory.save();
|
||||||
|
return {
|
||||||
|
InventoryChanges: {
|
||||||
|
MiscItems: miscItemChanges
|
||||||
|
}
|
||||||
|
};
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
case "Restoratives": // Codex Scanner, Remote Observer, Starburst
|
||||||
|
const inventory = await getInventory(accountId);
|
||||||
|
const consumablesChanges = [
|
||||||
|
{
|
||||||
|
ItemType: typeName,
|
||||||
|
ItemCount: quantity
|
||||||
|
} satisfies IConsumable
|
||||||
|
];
|
||||||
|
addConsumables(inventory, consumablesChanges);
|
||||||
|
await inventory.save();
|
||||||
|
return {
|
||||||
|
InventoryChanges: {
|
||||||
|
Consumables: consumablesChanges
|
||||||
|
}
|
||||||
|
};
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
const errorMessage = `unable to add item: ${typeName}`;
|
||||||
|
logger.error(errorMessage);
|
||||||
|
throw new Error(errorMessage);
|
||||||
|
};
|
||||||
|
|
||||||
//TODO: maybe genericMethod for all the add methods, they share a lot of logic
|
//TODO: maybe genericMethod for all the add methods, they share a lot of logic
|
||||||
export const addSentinel = async (sentinelName: string, accountId: string) => {
|
export const addSentinel = async (sentinelName: string, accountId: string) => {
|
||||||
const inventory = await getInventory(accountId);
|
const inventory = await getInventory(accountId);
|
||||||
@ -73,7 +272,7 @@ export const addSentinel = async (sentinelName: string, accountId: string) => {
|
|||||||
return changedInventory.Sentinels[sentinelIndex - 1].toJSON();
|
return changedInventory.Sentinels[sentinelIndex - 1].toJSON();
|
||||||
};
|
};
|
||||||
|
|
||||||
export const addPowerSuit = async (powersuitName: string, accountId: string): Promise<ISuitClient> => {
|
export const addPowerSuit = async (powersuitName: string, accountId: string): Promise<IEquipmentClient> => {
|
||||||
const specialItems = getExalted(powersuitName);
|
const specialItems = getExalted(powersuitName);
|
||||||
if (specialItems != false) {
|
if (specialItems != false) {
|
||||||
for await (const specialItem of specialItems) {
|
for await (const specialItem of specialItems) {
|
||||||
@ -112,6 +311,13 @@ export const addSpecialItem = async (itemName: string, accountId: string) => {
|
|||||||
return changedInventory.SpecialItems[specialItemIndex - 1].toJSON();
|
return changedInventory.SpecialItems[specialItemIndex - 1].toJSON();
|
||||||
};
|
};
|
||||||
|
|
||||||
|
export const addSpaceSuit = async (spacesuitName: string, accountId: string) => {
|
||||||
|
const inventory = await getInventory(accountId);
|
||||||
|
const suitIndex = inventory.SpaceSuits.push({ ItemType: spacesuitName, Configs: [], UpgradeVer: 101, XP: 0 });
|
||||||
|
const changedInventory = await inventory.save();
|
||||||
|
return changedInventory.SpaceSuits[suitIndex - 1].toJSON();
|
||||||
|
};
|
||||||
|
|
||||||
export const updateSlots = async (accountId: string, slotName: SlotNames, slotAmount: number, extraAmount: number) => {
|
export const updateSlots = async (accountId: string, slotName: SlotNames, slotAmount: number, extraAmount: number) => {
|
||||||
const inventory = await getInventory(accountId);
|
const inventory = await getInventory(accountId);
|
||||||
|
|
||||||
@ -219,26 +425,19 @@ export const syndicateSacrifice = async (
|
|||||||
};
|
};
|
||||||
|
|
||||||
export const addWeapon = async (
|
export const addWeapon = async (
|
||||||
weaponType: WeaponTypeInternal,
|
weaponType: WeaponTypeInternal | "Hoverboards",
|
||||||
weaponName: string,
|
weaponName: string,
|
||||||
accountId: string
|
accountId: string,
|
||||||
): Promise<IWeaponClient> => {
|
modularParts: string[] | undefined = undefined
|
||||||
|
): Promise<IEquipmentClient> => {
|
||||||
const inventory = await getInventory(accountId);
|
const inventory = await getInventory(accountId);
|
||||||
|
|
||||||
let weaponIndex;
|
const weaponIndex = inventory[weaponType].push({
|
||||||
switch (weaponType) {
|
ItemType: weaponName,
|
||||||
case "LongGuns":
|
Configs: [],
|
||||||
weaponIndex = inventory.LongGuns.push({ ItemType: weaponName, Configs: [], XP: 0 });
|
XP: 0,
|
||||||
break;
|
ModularParts: modularParts
|
||||||
case "Pistols":
|
});
|
||||||
weaponIndex = inventory.Pistols.push({ ItemType: weaponName, Configs: [], XP: 0 });
|
|
||||||
break;
|
|
||||||
case "Melee":
|
|
||||||
weaponIndex = inventory.Melee.push({ ItemType: weaponName, Configs: [], XP: 0 });
|
|
||||||
break;
|
|
||||||
default:
|
|
||||||
throw new Error("unknown weapon type: " + weaponType);
|
|
||||||
}
|
|
||||||
|
|
||||||
const changedInventory = await inventory.save();
|
const changedInventory = await inventory.save();
|
||||||
return changedInventory[weaponType][weaponIndex - 1].toJSON();
|
return changedInventory[weaponType][weaponIndex - 1].toJSON();
|
||||||
@ -254,7 +453,7 @@ export const addCustomization = async (customizatonName: string, accountId: stri
|
|||||||
|
|
||||||
const addGearExpByCategory = (
|
const addGearExpByCategory = (
|
||||||
inventory: IInventoryDatabaseDocument,
|
inventory: IInventoryDatabaseDocument,
|
||||||
gearArray: ISuitClient[] | IWeaponClient[] | undefined,
|
gearArray: IEquipmentClient[] | undefined,
|
||||||
categoryName: "Pistols" | "LongGuns" | "Melee" | "Suits"
|
categoryName: "Pistols" | "LongGuns" | "Melee" | "Suits"
|
||||||
) => {
|
) => {
|
||||||
const category = inventory[categoryName];
|
const category = inventory[categoryName];
|
||||||
@ -300,6 +499,21 @@ export const addMiscItems = (inventory: IInventoryDatabaseDocument, itemsArray:
|
|||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
|
export const addShipDecorations = (inventory: IInventoryDatabaseDocument, itemsArray: IConsumable[] | undefined) => {
|
||||||
|
const { ShipDecorations } = inventory;
|
||||||
|
|
||||||
|
itemsArray?.forEach(({ ItemCount, ItemType }) => {
|
||||||
|
const itemIndex = ShipDecorations.findIndex(miscItem => miscItem.ItemType === ItemType);
|
||||||
|
|
||||||
|
if (itemIndex !== -1) {
|
||||||
|
ShipDecorations[itemIndex].ItemCount += ItemCount;
|
||||||
|
inventory.markModified(`ShipDecorations.${itemIndex}.ItemCount`);
|
||||||
|
} else {
|
||||||
|
ShipDecorations.push({ ItemCount, ItemType });
|
||||||
|
}
|
||||||
|
});
|
||||||
|
};
|
||||||
|
|
||||||
export const addConsumables = (inventory: IInventoryDatabaseDocument, itemsArray: IConsumable[] | undefined) => {
|
export const addConsumables = (inventory: IInventoryDatabaseDocument, itemsArray: IConsumable[] | undefined) => {
|
||||||
const { Consumables } = inventory;
|
const { Consumables } = inventory;
|
||||||
|
|
||||||
@ -355,7 +569,7 @@ export const updateChallengeProgress = async (challenges: IUpdateChallengeProgre
|
|||||||
|
|
||||||
export const addSeasonalChallengeHistory = (
|
export const addSeasonalChallengeHistory = (
|
||||||
inventory: IInventoryDatabaseDocument,
|
inventory: IInventoryDatabaseDocument,
|
||||||
itemsArray: ISeasonChallengeHistory[] | undefined
|
itemsArray: ISeasonChallenge[] | undefined
|
||||||
) => {
|
) => {
|
||||||
const category = inventory.SeasonChallengeHistory;
|
const category = inventory.SeasonChallengeHistory;
|
||||||
|
|
||||||
@ -431,6 +645,22 @@ export const missionInventoryUpdate = async (data: IMissionInventoryUpdateReques
|
|||||||
// Gear XP
|
// Gear XP
|
||||||
gearKeys.forEach(key => addGearExpByCategory(inventory, data[key], key));
|
gearKeys.forEach(key => addGearExpByCategory(inventory, data[key], key));
|
||||||
|
|
||||||
|
// Incarnon Challenges
|
||||||
|
if (data.EvolutionProgress) {
|
||||||
|
for (const evoProgress of data.EvolutionProgress) {
|
||||||
|
const entry = inventory.EvolutionProgress
|
||||||
|
? inventory.EvolutionProgress.find(entry => entry.ItemType == evoProgress.ItemType)
|
||||||
|
: undefined;
|
||||||
|
if (entry) {
|
||||||
|
entry.Progress = evoProgress.Progress;
|
||||||
|
entry.Rank = evoProgress.Rank;
|
||||||
|
} else {
|
||||||
|
inventory.EvolutionProgress ??= [];
|
||||||
|
inventory.EvolutionProgress.push(evoProgress);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// other
|
// other
|
||||||
addMods(inventory, RawUpgrades);
|
addMods(inventory, RawUpgrades);
|
||||||
addMiscItems(inventory, MiscItems);
|
addMiscItems(inventory, MiscItems);
|
||||||
|
@ -1,23 +1,20 @@
|
|||||||
import { getIndexAfter } from "@/src/helpers/stringHelpers";
|
import { getIndexAfter } from "@/src/helpers/stringHelpers";
|
||||||
import { logger } from "@/src/utils/logger";
|
import { logger } from "@/src/utils/logger";
|
||||||
import Items, { Buildable, Category, MinimalItem, Warframe, Weapon } from "warframe-items";
|
import Items, { Category, MinimalItem, Warframe, Weapon } from "warframe-items";
|
||||||
import badItems from "@/static/json/exclude-mods.json";
|
import badItems from "@/static/json/exclude-mods.json";
|
||||||
import { dict_en, ExportWarframes, ExportWeapons, IPowersuit } from "warframe-public-export-plus";
|
import {
|
||||||
|
dict_en,
|
||||||
|
ExportRecipes,
|
||||||
|
ExportWarframes,
|
||||||
|
ExportWeapons,
|
||||||
|
IPowersuit,
|
||||||
|
IRecipe
|
||||||
|
} from "warframe-public-export-plus";
|
||||||
|
|
||||||
export type MinWarframe = Omit<Warframe, "patchlogs">;
|
export type MinWarframe = Omit<Warframe, "patchlogs">;
|
||||||
export type MinWeapon = Omit<Weapon, "patchlogs">;
|
export type MinWeapon = Omit<Weapon, "patchlogs">;
|
||||||
export type MinItem = Omit<MinimalItem, "patchlogs">;
|
export type MinItem = Omit<MinimalItem, "patchlogs">;
|
||||||
|
|
||||||
export const warframes: MinWarframe[] = Array.from(new Items({ category: ["Warframes"] }) as Warframe[])
|
|
||||||
.filter(item => {
|
|
||||||
return item.uniqueName.substring(0, 30) != "/Lotus/Powersuits/EntratiMech/";
|
|
||||||
})
|
|
||||||
.map(item => {
|
|
||||||
const next = { ...item };
|
|
||||||
delete next.patchlogs;
|
|
||||||
return next;
|
|
||||||
});
|
|
||||||
|
|
||||||
export type WeaponTypeInternal =
|
export type WeaponTypeInternal =
|
||||||
| "LongGuns"
|
| "LongGuns"
|
||||||
| "Pistols"
|
| "Pistols"
|
||||||
@ -100,13 +97,8 @@ export const blueprintNames = Object.fromEntries(
|
|||||||
.map(name => [name, craftNames[name]])
|
.map(name => [name, craftNames[name]])
|
||||||
);
|
);
|
||||||
|
|
||||||
const buildables = items.filter(item => !!(item as Buildable).components);
|
export const getRecipe = (uniqueName: string): IRecipe | undefined => {
|
||||||
|
return ExportRecipes[uniqueName];
|
||||||
export const getItemByBlueprint = (uniqueName: string): (MinItem & Buildable) | undefined => {
|
|
||||||
const item = buildables.find(item =>
|
|
||||||
(item as Buildable).components?.find(component => component.uniqueName === uniqueName)
|
|
||||||
);
|
|
||||||
return item;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
export const getExalted = (uniqueName: string) => {
|
export const getExalted = (uniqueName: string) => {
|
||||||
|
@ -174,7 +174,7 @@ const itemCheck = (
|
|||||||
};
|
};
|
||||||
for (const key of Object.keys(rewardCheck) as IInventoryFieldType[]) {
|
for (const key of Object.keys(rewardCheck) as IInventoryFieldType[]) {
|
||||||
if (rewardCheck[key]) {
|
if (rewardCheck[key]) {
|
||||||
addRewardResponse(InventoryChanges, MissionRewards, name, rewardCheck[key]!, key);
|
addRewardResponse(InventoryChanges, MissionRewards, name, rewardCheck[key], key);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -1,23 +1,9 @@
|
|||||||
import { parseSlotPurchaseName } from "@/src/helpers/purchaseHelpers";
|
import { parseSlotPurchaseName } from "@/src/helpers/purchaseHelpers";
|
||||||
import { getWeaponType } from "@/src/services/itemDataService";
|
|
||||||
import { getSubstringFromKeyword } from "@/src/helpers/stringHelpers";
|
import { getSubstringFromKeyword } from "@/src/helpers/stringHelpers";
|
||||||
import {
|
import { addItem, addBooster, updateCurrency, updateSlots } from "@/src/services/inventoryService";
|
||||||
addBooster,
|
import { IPurchaseRequest, SlotPurchase, IInventoryChanges, IBinChanges } from "@/src/types/purchaseTypes";
|
||||||
addConsumables,
|
|
||||||
addCustomization,
|
|
||||||
addMechSuit,
|
|
||||||
addMiscItems,
|
|
||||||
addPowerSuit,
|
|
||||||
addRecipes,
|
|
||||||
addSentinel,
|
|
||||||
addWeapon,
|
|
||||||
getInventory,
|
|
||||||
updateCurrency,
|
|
||||||
updateSlots
|
|
||||||
} from "@/src/services/inventoryService";
|
|
||||||
import { IConsumable, IMiscItem, ITypeCount } from "@/src/types/inventoryTypes/inventoryTypes";
|
|
||||||
import { IPurchaseRequest, IPurchaseResponse, SlotNameToInventoryName, SlotPurchase } from "@/src/types/purchaseTypes";
|
|
||||||
import { logger } from "@/src/utils/logger";
|
import { logger } from "@/src/utils/logger";
|
||||||
|
import { ExportBundles, TRarity } from "warframe-public-export-plus";
|
||||||
|
|
||||||
export const getStoreItemCategory = (storeItem: string) => {
|
export const getStoreItemCategory = (storeItem: string) => {
|
||||||
const storeItemString = getSubstringFromKeyword(storeItem, "StoreItems/");
|
const storeItemString = getSubstringFromKeyword(storeItem, "StoreItems/");
|
||||||
@ -36,38 +22,15 @@ export const getStoreItemTypesCategory = (typesItem: string) => {
|
|||||||
|
|
||||||
export const handlePurchase = async (purchaseRequest: IPurchaseRequest, accountId: string) => {
|
export const handlePurchase = async (purchaseRequest: IPurchaseRequest, accountId: string) => {
|
||||||
logger.debug("purchase request", purchaseRequest);
|
logger.debug("purchase request", purchaseRequest);
|
||||||
const storeCategory = getStoreItemCategory(purchaseRequest.PurchaseParams.StoreItem);
|
|
||||||
const internalName = purchaseRequest.PurchaseParams.StoreItem.replace("/StoreItems", "");
|
|
||||||
logger.debug(`store category ${storeCategory}`);
|
|
||||||
|
|
||||||
let inventoryChanges;
|
const purchaseResponse = await handleStoreItemAcquisition(
|
||||||
switch (storeCategory) {
|
purchaseRequest.PurchaseParams.StoreItem,
|
||||||
case "Powersuits":
|
accountId,
|
||||||
inventoryChanges = await handlePowersuitPurchase(internalName, accountId);
|
purchaseRequest.PurchaseParams.Quantity,
|
||||||
break;
|
"COMMON"
|
||||||
case "Weapons":
|
);
|
||||||
inventoryChanges = await handleWeaponsPurchase(internalName, accountId);
|
|
||||||
break;
|
|
||||||
case "Types":
|
|
||||||
inventoryChanges = await handleTypesPurchase(
|
|
||||||
internalName,
|
|
||||||
accountId,
|
|
||||||
purchaseRequest.PurchaseParams.Quantity
|
|
||||||
);
|
|
||||||
break;
|
|
||||||
case "Boosters":
|
|
||||||
inventoryChanges = await handleBoostersPurchase(internalName, accountId);
|
|
||||||
break;
|
|
||||||
case "Interface":
|
|
||||||
inventoryChanges = await handleCustomizationPurchase(internalName, accountId);
|
|
||||||
break;
|
|
||||||
default:
|
|
||||||
const errorMessage = `unknown store category: ${storeCategory} not implemented or new`;
|
|
||||||
logger.error(errorMessage);
|
|
||||||
throw new Error(errorMessage);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!inventoryChanges) throw new Error("purchase response was undefined");
|
if (!purchaseResponse) throw new Error("purchase response was undefined");
|
||||||
|
|
||||||
const currencyChanges = await updateCurrency(
|
const currencyChanges = await updateCurrency(
|
||||||
purchaseRequest.PurchaseParams.ExpectedPrice,
|
purchaseRequest.PurchaseParams.ExpectedPrice,
|
||||||
@ -75,12 +38,82 @@ export const handlePurchase = async (purchaseRequest: IPurchaseRequest, accountI
|
|||||||
accountId
|
accountId
|
||||||
);
|
);
|
||||||
|
|
||||||
inventoryChanges.InventoryChanges = {
|
purchaseResponse.InventoryChanges = {
|
||||||
...currencyChanges,
|
...currencyChanges,
|
||||||
...inventoryChanges.InventoryChanges
|
...purchaseResponse.InventoryChanges
|
||||||
};
|
};
|
||||||
|
|
||||||
return inventoryChanges;
|
return purchaseResponse;
|
||||||
|
};
|
||||||
|
|
||||||
|
const addInventoryChanges = (InventoryChanges: IInventoryChanges, delta: IInventoryChanges): void => {
|
||||||
|
for (const key in delta) {
|
||||||
|
if (!(key in InventoryChanges)) {
|
||||||
|
InventoryChanges[key] = delta[key];
|
||||||
|
} else if (Array.isArray(delta[key])) {
|
||||||
|
const left = InventoryChanges[key] as object[];
|
||||||
|
const right = delta[key] as object[];
|
||||||
|
for (const item of right) {
|
||||||
|
left.push(item);
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
console.assert(key.substring(-3) == "Bin");
|
||||||
|
const left = InventoryChanges[key] as IBinChanges;
|
||||||
|
const right = delta[key] as IBinChanges;
|
||||||
|
left.count += right.count;
|
||||||
|
left.platinum += right.platinum;
|
||||||
|
left.Slots += right.Slots;
|
||||||
|
if (right.Extra) {
|
||||||
|
left.Extra ??= 0;
|
||||||
|
left.Extra += right.Extra;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
const handleStoreItemAcquisition = async (
|
||||||
|
storeItemName: string,
|
||||||
|
accountId: string,
|
||||||
|
quantity: number,
|
||||||
|
durability: TRarity
|
||||||
|
): Promise<{ InventoryChanges: IInventoryChanges }> => {
|
||||||
|
let purchaseResponse = {
|
||||||
|
InventoryChanges: {}
|
||||||
|
};
|
||||||
|
logger.debug(`handling acquision of ${storeItemName}`);
|
||||||
|
if (storeItemName in ExportBundles) {
|
||||||
|
const bundle = ExportBundles[storeItemName];
|
||||||
|
logger.debug("acquiring bundle", bundle);
|
||||||
|
for (const component of bundle.components) {
|
||||||
|
addInventoryChanges(
|
||||||
|
purchaseResponse.InventoryChanges,
|
||||||
|
(
|
||||||
|
await handleStoreItemAcquisition(
|
||||||
|
component.typeName,
|
||||||
|
accountId,
|
||||||
|
component.purchaseQuantity,
|
||||||
|
component.durability
|
||||||
|
)
|
||||||
|
).InventoryChanges
|
||||||
|
);
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
const storeCategory = getStoreItemCategory(storeItemName);
|
||||||
|
const internalName = storeItemName.replace("/StoreItems", "");
|
||||||
|
logger.debug(`store category ${storeCategory}`);
|
||||||
|
switch (storeCategory) {
|
||||||
|
default:
|
||||||
|
purchaseResponse = await addItem(accountId, internalName);
|
||||||
|
break;
|
||||||
|
case "Types":
|
||||||
|
purchaseResponse = await handleTypesPurchase(internalName, accountId, quantity);
|
||||||
|
break;
|
||||||
|
case "Boosters":
|
||||||
|
purchaseResponse = await handleBoostersPurchase(internalName, accountId, durability);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return purchaseResponse;
|
||||||
};
|
};
|
||||||
|
|
||||||
export const slotPurchaseNameToSlotName: SlotPurchase = {
|
export const slotPurchaseNameToSlotName: SlotPurchase = {
|
||||||
@ -100,7 +133,10 @@ export const slotPurchaseNameToSlotName: SlotPurchase = {
|
|||||||
// // new slot above base = extra + 1 and slots +1
|
// // new slot above base = extra + 1 and slots +1
|
||||||
// // new frame = slots -1
|
// // new frame = slots -1
|
||||||
// // number of frames = extra - slots + 2
|
// // number of frames = extra - slots + 2
|
||||||
const handleSlotPurchase = async (slotPurchaseNameFull: string, accountId: string) => {
|
const handleSlotPurchase = async (
|
||||||
|
slotPurchaseNameFull: string,
|
||||||
|
accountId: string
|
||||||
|
): Promise<{ InventoryChanges: IInventoryChanges }> => {
|
||||||
logger.debug(`slot name ${slotPurchaseNameFull}`);
|
logger.debug(`slot name ${slotPurchaseNameFull}`);
|
||||||
const slotPurchaseName = parseSlotPurchaseName(
|
const slotPurchaseName = parseSlotPurchaseName(
|
||||||
slotPurchaseNameFull.substring(slotPurchaseNameFull.lastIndexOf("/") + 1)
|
slotPurchaseNameFull.substring(slotPurchaseNameFull.lastIndexOf("/") + 1)
|
||||||
@ -126,102 +162,22 @@ const handleSlotPurchase = async (slotPurchaseNameFull: string, accountId: strin
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
const handleWeaponsPurchase = async (weaponName: string, accountId: string) => {
|
|
||||||
const weaponType = getWeaponType(weaponName);
|
|
||||||
const addedWeapon = await addWeapon(weaponType, weaponName, accountId);
|
|
||||||
|
|
||||||
await updateSlots(accountId, SlotNameToInventoryName.WEAPON, 0, 1);
|
|
||||||
|
|
||||||
return {
|
|
||||||
InventoryChanges: {
|
|
||||||
WeaponBin: { count: 1, platinum: 0, Slots: -1 },
|
|
||||||
[weaponType]: [addedWeapon]
|
|
||||||
}
|
|
||||||
} as IPurchaseResponse;
|
|
||||||
};
|
|
||||||
|
|
||||||
const handlePowersuitPurchase = async (powersuitName: string, accountId: string) => {
|
|
||||||
if (powersuitName.includes("EntratiMech")) {
|
|
||||||
const mechSuit = await addMechSuit(powersuitName, accountId);
|
|
||||||
|
|
||||||
await updateSlots(accountId, SlotNameToInventoryName.MECHSUIT, 0, 1);
|
|
||||||
logger.debug("mech suit", mechSuit);
|
|
||||||
|
|
||||||
return {
|
|
||||||
InventoryChanges: {
|
|
||||||
MechBin: {
|
|
||||||
count: 1,
|
|
||||||
platinum: 0,
|
|
||||||
Slots: -1
|
|
||||||
},
|
|
||||||
MechSuits: [mechSuit]
|
|
||||||
}
|
|
||||||
} as IPurchaseResponse;
|
|
||||||
}
|
|
||||||
|
|
||||||
const suit = await addPowerSuit(powersuitName, accountId);
|
|
||||||
await updateSlots(accountId, SlotNameToInventoryName.SUIT, 0, 1);
|
|
||||||
|
|
||||||
return {
|
|
||||||
InventoryChanges: {
|
|
||||||
SuitBin: {
|
|
||||||
count: 1,
|
|
||||||
platinum: 0,
|
|
||||||
Slots: -1
|
|
||||||
},
|
|
||||||
Suits: [suit]
|
|
||||||
}
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
//TODO: change to getInventory, apply changes then save at the end
|
//TODO: change to getInventory, apply changes then save at the end
|
||||||
const handleTypesPurchase = async (typesName: string, accountId: string, quantity: number) => {
|
const handleTypesPurchase = async (
|
||||||
|
typesName: string,
|
||||||
|
accountId: string,
|
||||||
|
quantity: number
|
||||||
|
): Promise<{ InventoryChanges: IInventoryChanges }> => {
|
||||||
const typeCategory = getStoreItemTypesCategory(typesName);
|
const typeCategory = getStoreItemTypesCategory(typesName);
|
||||||
logger.debug(`type category ${typeCategory}`);
|
logger.debug(`type category ${typeCategory}`);
|
||||||
switch (typeCategory) {
|
switch (typeCategory) {
|
||||||
case "AvatarImages":
|
default:
|
||||||
case "SuitCustomizations":
|
return await addItem(accountId, typesName, quantity);
|
||||||
return await handleCustomizationPurchase(typesName, accountId);
|
|
||||||
case "Sentinels":
|
|
||||||
return await handleSentinelPurchase(typesName, accountId);
|
|
||||||
case "SlotItems":
|
case "SlotItems":
|
||||||
return await handleSlotPurchase(typesName, accountId);
|
return await handleSlotPurchase(typesName, accountId);
|
||||||
case "Items":
|
|
||||||
return await handleMiscItemPurchase(typesName, accountId, quantity);
|
|
||||||
case "Recipes":
|
|
||||||
case "Consumables": // Blueprints for Ciphers, Antitoxins
|
|
||||||
return await handleRecipesPurchase(typesName, accountId, quantity);
|
|
||||||
case "Restoratives": // Codex Scanner, Remote Observer, Starburst
|
|
||||||
return await handleRestorativesPurchase(typesName, accountId, quantity);
|
|
||||||
break;
|
|
||||||
default:
|
|
||||||
throw new Error(`unknown Types category: ${typeCategory} not implemented or new`);
|
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
const handleSentinelPurchase = async (sentinelName: string, accountId: string) => {
|
|
||||||
const sentinel = await addSentinel(sentinelName, accountId);
|
|
||||||
|
|
||||||
await updateSlots(accountId, SlotNameToInventoryName.SENTINEL, 0, 1);
|
|
||||||
|
|
||||||
return {
|
|
||||||
InventoryChanges: {
|
|
||||||
SentinelBin: { count: 1, platinum: 0, Slots: -1 },
|
|
||||||
Sentinels: [sentinel]
|
|
||||||
}
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
const handleCustomizationPurchase = async (customizationName: string, accountId: string) => {
|
|
||||||
const customization = await addCustomization(customizationName, accountId);
|
|
||||||
|
|
||||||
return {
|
|
||||||
InventoryChanges: {
|
|
||||||
FlavourItems: [customization]
|
|
||||||
}
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
const boosterCollection = [
|
const boosterCollection = [
|
||||||
"/Lotus/Types/Boosters/ResourceAmountBooster",
|
"/Lotus/Types/Boosters/ResourceAmountBooster",
|
||||||
"/Lotus/Types/Boosters/AffinityBooster",
|
"/Lotus/Types/Boosters/AffinityBooster",
|
||||||
@ -229,15 +185,25 @@ const boosterCollection = [
|
|||||||
"/Lotus/Types/Boosters/CreditBooster"
|
"/Lotus/Types/Boosters/CreditBooster"
|
||||||
];
|
];
|
||||||
|
|
||||||
const handleBoostersPurchase = async (boosterStoreName: string, accountId: string) => {
|
const boosterDuration: Record<TRarity, number> = {
|
||||||
const match = boosterStoreName.match(/(\d+)Day/);
|
COMMON: 3 * 86400,
|
||||||
if (!match) return;
|
UNCOMMON: 7 * 86400,
|
||||||
|
RARE: 30 * 86400,
|
||||||
|
LEGENDARY: 90 * 86400
|
||||||
|
};
|
||||||
|
|
||||||
const extractedDigit = Number(match[1]);
|
const handleBoostersPurchase = async (
|
||||||
const ItemType = boosterCollection.find(i =>
|
boosterStoreName: string,
|
||||||
boosterStoreName.includes(i.split("/").pop()!.replace("Booster", ""))
|
accountId: string,
|
||||||
)!;
|
durability: TRarity
|
||||||
const ExpiryDate = extractedDigit * 86400;
|
): Promise<{ InventoryChanges: IInventoryChanges }> => {
|
||||||
|
const ItemType = boosterStoreName.replace("StoreItem", "");
|
||||||
|
if (!boosterCollection.find(x => x == ItemType)) {
|
||||||
|
logger.error(`unknown booster type: ${ItemType}`);
|
||||||
|
return { InventoryChanges: {} };
|
||||||
|
}
|
||||||
|
|
||||||
|
const ExpiryDate = boosterDuration[durability];
|
||||||
|
|
||||||
await addBooster(ItemType, ExpiryDate, accountId);
|
await addBooster(ItemType, ExpiryDate, accountId);
|
||||||
|
|
||||||
@ -247,54 +213,3 @@ const handleBoostersPurchase = async (boosterStoreName: string, accountId: strin
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
const handleMiscItemPurchase = async (uniqueName: string, accountId: string, quantity: number) => {
|
|
||||||
const inventory = await getInventory(accountId);
|
|
||||||
const miscItemChanges = [
|
|
||||||
{
|
|
||||||
ItemType: uniqueName,
|
|
||||||
ItemCount: quantity
|
|
||||||
} satisfies IMiscItem
|
|
||||||
];
|
|
||||||
addMiscItems(inventory, miscItemChanges);
|
|
||||||
await inventory.save();
|
|
||||||
return {
|
|
||||||
InventoryChanges: {
|
|
||||||
MiscItems: miscItemChanges
|
|
||||||
}
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
const handleRecipesPurchase = async (uniqueName: string, accountId: string, quantity: number) => {
|
|
||||||
const inventory = await getInventory(accountId);
|
|
||||||
const recipeChanges = [
|
|
||||||
{
|
|
||||||
ItemType: uniqueName,
|
|
||||||
ItemCount: quantity
|
|
||||||
} satisfies ITypeCount
|
|
||||||
];
|
|
||||||
addRecipes(inventory, recipeChanges);
|
|
||||||
await inventory.save();
|
|
||||||
return {
|
|
||||||
InventoryChanges: {
|
|
||||||
Recipes: recipeChanges
|
|
||||||
}
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
const handleRestorativesPurchase = async (uniqueName: string, accountId: string, quantity: number) => {
|
|
||||||
const inventory = await getInventory(accountId);
|
|
||||||
const consumablesChanges = [
|
|
||||||
{
|
|
||||||
ItemType: uniqueName,
|
|
||||||
ItemCount: quantity
|
|
||||||
} satisfies IConsumable
|
|
||||||
];
|
|
||||||
addConsumables(inventory, consumablesChanges);
|
|
||||||
await inventory.save();
|
|
||||||
return {
|
|
||||||
InventoryChanges: {
|
|
||||||
Consumables: consumablesChanges
|
|
||||||
}
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
@ -1,65 +1,30 @@
|
|||||||
import { unixTimesInMs } from "@/src/constants/timeConstants";
|
import { unixTimesInMs } from "@/src/constants/timeConstants";
|
||||||
import { getInventory } from "@/src/services/inventoryService";
|
import { addMiscItems, getInventory, updateCurrency } from "@/src/services/inventoryService";
|
||||||
import { getItemByBlueprint } from "@/src/services/itemDataService";
|
import { getRecipe } from "@/src/services/itemDataService";
|
||||||
import { logger } from "@/src/utils/logger";
|
import { logger } from "@/src/utils/logger";
|
||||||
import { Types } from "mongoose";
|
import { Types } from "mongoose";
|
||||||
|
|
||||||
export interface IResource {
|
|
||||||
uniqueName: string;
|
|
||||||
count: number;
|
|
||||||
}
|
|
||||||
|
|
||||||
// export const updateResources = async (accountId: string, components: IResource[]) => {
|
|
||||||
// const inventory = await getInventory(accountId);
|
|
||||||
|
|
||||||
// for (const component of components) {
|
|
||||||
// const category = getItemCategoryByUniqueName(component.uniqueName) as keyof typeof inventory;
|
|
||||||
// //validate category
|
|
||||||
|
|
||||||
// console.log(component.uniqueName);
|
|
||||||
// console.log("cate", category);
|
|
||||||
|
|
||||||
// const invItem = inventory[category];
|
|
||||||
// console.log("invItem", invItem);
|
|
||||||
|
|
||||||
// inventory["MiscItems"];
|
|
||||||
// }
|
|
||||||
// };
|
|
||||||
|
|
||||||
export const startRecipe = async (recipeName: string, accountId: string) => {
|
export const startRecipe = async (recipeName: string, accountId: string) => {
|
||||||
const recipe = getItemByBlueprint(recipeName);
|
const recipe = getRecipe(recipeName);
|
||||||
|
|
||||||
if (!recipe) {
|
if (!recipe) {
|
||||||
logger.error(`unknown recipe ${recipeName}`);
|
logger.error(`unknown recipe ${recipeName}`);
|
||||||
throw new Error(`unknown recipe ${recipeName}`);
|
throw new Error(`unknown recipe ${recipeName}`);
|
||||||
}
|
}
|
||||||
|
|
||||||
const componentsNeeded = recipe.components?.map(component => ({
|
await updateCurrency(recipe.buildPrice, false, accountId);
|
||||||
uniqueName: component.uniqueName,
|
|
||||||
count: component.itemCount
|
const ingredientsInverse = recipe.ingredients.map(component => ({
|
||||||
|
ItemType: component.ItemType,
|
||||||
|
ItemCount: component.ItemCount * -1
|
||||||
}));
|
}));
|
||||||
|
|
||||||
if (!componentsNeeded) {
|
const inventory = await getInventory(accountId);
|
||||||
logger.error(`recipe ${recipeName} has no components`);
|
addMiscItems(inventory, ingredientsInverse);
|
||||||
throw new Error(`recipe ${recipeName} has no components`);
|
|
||||||
}
|
|
||||||
|
|
||||||
//TODO: consume components used
|
|
||||||
//await updateResources(accountId, componentsNeeded);
|
|
||||||
|
|
||||||
//might be redundant
|
|
||||||
if (recipe.consumeOnBuild) {
|
|
||||||
//consume
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!recipe.buildTime) {
|
|
||||||
logger.error(`recipe ${recipeName} has no build time`);
|
|
||||||
throw new Error(`recipe ${recipeName} has no build time`);
|
|
||||||
}
|
|
||||||
//buildtime is in seconds
|
//buildtime is in seconds
|
||||||
const completionDate = new Date(Date.now() + recipe.buildTime * unixTimesInMs.second);
|
const completionDate = new Date(Date.now() + recipe.buildTime * unixTimesInMs.second);
|
||||||
|
|
||||||
const inventory = await getInventory(accountId);
|
|
||||||
inventory.PendingRecipes.push({
|
inventory.PendingRecipes.push({
|
||||||
ItemType: recipeName,
|
ItemType: recipeName,
|
||||||
CompletionDate: completionDate,
|
CompletionDate: completionDate,
|
||||||
|
@ -132,7 +132,19 @@ export const handleInventoryItemConfigChange = async (
|
|||||||
case "DataKnives":
|
case "DataKnives":
|
||||||
case "DrifterMelee":
|
case "DrifterMelee":
|
||||||
case "Sentinels":
|
case "Sentinels":
|
||||||
case "Horses": {
|
case "Horses":
|
||||||
|
case "OperatorAmps":
|
||||||
|
case "SentinelWeapons":
|
||||||
|
case "KubrowPets":
|
||||||
|
case "SpaceSuits":
|
||||||
|
case "SpaceGuns":
|
||||||
|
case "SpaceMelee":
|
||||||
|
case "SpecialItems":
|
||||||
|
case "MoaPets":
|
||||||
|
case "Hoverboards":
|
||||||
|
case "MechSuits":
|
||||||
|
case "CrewShipHarnesses":
|
||||||
|
case "CrewShips": {
|
||||||
logger.debug(`general Item config saved of type ${equipmentName}`, { config: equipment });
|
logger.debug(`general Item config saved of type ${equipmentName}`, { config: equipment });
|
||||||
|
|
||||||
const itemEntries = equipment as IItemEntry;
|
const itemEntries = equipment as IItemEntry;
|
||||||
@ -159,21 +171,13 @@ export const handleInventoryItemConfigChange = async (
|
|||||||
inventory.EquippedGear = equipment as string[];
|
inventory.EquippedGear = equipment as string[];
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
case "UseAdultOperatorLoadout": {
|
||||||
|
inventory.UseAdultOperatorLoadout = equipment as boolean;
|
||||||
|
break;
|
||||||
|
}
|
||||||
default: {
|
default: {
|
||||||
logger.error(`category not implemented: ${equipmentName}`, { config: equipment });
|
logger.error(`category not implemented: ${equipmentName}`, { config: equipment });
|
||||||
}
|
}
|
||||||
//case "OperatorAmps":
|
|
||||||
// case "SentinelWeapons":
|
|
||||||
// case "KubrowPets":
|
|
||||||
// case "SpaceSuits":
|
|
||||||
// case "SpaceGuns":
|
|
||||||
// case "SpaceMelee":
|
|
||||||
// case "SpecialItems":
|
|
||||||
// case "MoaPets":
|
|
||||||
// case "Hoverboards":
|
|
||||||
// case "MechSuits":
|
|
||||||
// case "CrewShipHarnesses":
|
|
||||||
// case "CrewShips":
|
|
||||||
//case "KahlLoadOuts": not sure yet how to handle kahl: it is not sent in inventory
|
//case "KahlLoadOuts": not sure yet how to handle kahl: it is not sent in inventory
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -6,6 +6,7 @@ import {
|
|||||||
IShipDecorationsRequest,
|
IShipDecorationsRequest,
|
||||||
IShipDecorationsResponse
|
IShipDecorationsResponse
|
||||||
} from "@/src/types/shipTypes";
|
} from "@/src/types/shipTypes";
|
||||||
|
import { logger } from "@/src/utils/logger";
|
||||||
import { Types } from "mongoose";
|
import { Types } from "mongoose";
|
||||||
|
|
||||||
export const setShipCustomizations = async (shipCustomization: ISetShipCustomizationsRequest) => {
|
export const setShipCustomizations = async (shipCustomization: ISetShipCustomizationsRequest) => {
|
||||||
@ -37,12 +38,74 @@ export const handleSetShipDecorations = async (
|
|||||||
|
|
||||||
const rooms = placedDecoration.IsApartment ? personalRooms.Apartment.Rooms : personalRooms.Ship.Rooms;
|
const rooms = placedDecoration.IsApartment ? personalRooms.Apartment.Rooms : personalRooms.Ship.Rooms;
|
||||||
|
|
||||||
const room = rooms.find(room => room.Name === placedDecoration.Room);
|
const roomToPlaceIn = rooms.find(room => room.Name === placedDecoration.Room);
|
||||||
|
|
||||||
|
if (!roomToPlaceIn) {
|
||||||
|
logger.error("room not found");
|
||||||
|
throw new Error("room not found");
|
||||||
|
}
|
||||||
|
|
||||||
|
if (placedDecoration.MoveId) {
|
||||||
|
//moved within the same room
|
||||||
|
if (placedDecoration.OldRoom === placedDecoration.Room) {
|
||||||
|
const existingDecorationIndex = roomToPlaceIn?.PlacedDecos?.findIndex(
|
||||||
|
deco => deco._id.toString() === placedDecoration.MoveId
|
||||||
|
);
|
||||||
|
|
||||||
|
if (existingDecorationIndex === -1) {
|
||||||
|
logger.error("decoration to be moved not found");
|
||||||
|
throw new Error("decoration to be moved not found");
|
||||||
|
}
|
||||||
|
|
||||||
|
roomToPlaceIn.PlacedDecos[existingDecorationIndex].Pos = placedDecoration.Pos;
|
||||||
|
roomToPlaceIn.PlacedDecos[existingDecorationIndex].Rot = placedDecoration.Rot;
|
||||||
|
|
||||||
|
if (placedDecoration.Scale) {
|
||||||
|
roomToPlaceIn.PlacedDecos[existingDecorationIndex].Scale = placedDecoration.Scale;
|
||||||
|
}
|
||||||
|
|
||||||
|
await personalRooms.save();
|
||||||
|
return {
|
||||||
|
OldRoom: placedDecoration.OldRoom,
|
||||||
|
NewRoom: placedDecoration.Room,
|
||||||
|
IsApartment: placedDecoration.IsApartment,
|
||||||
|
MaxCapacityIncrease: 0 // TODO: calculate capacity change upon removal
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
//moved to a different room
|
||||||
|
const oldRoom = rooms.find(room => room.Name === placedDecoration.OldRoom);
|
||||||
|
|
||||||
|
if (!oldRoom) {
|
||||||
|
logger.error("old room not found");
|
||||||
|
throw new Error("old room not found");
|
||||||
|
}
|
||||||
|
|
||||||
|
oldRoom.PlacedDecos.pull({ _id: placedDecoration.MoveId });
|
||||||
|
|
||||||
|
const newDecoration = {
|
||||||
|
Type: placedDecoration.Type,
|
||||||
|
Pos: placedDecoration.Pos,
|
||||||
|
Rot: placedDecoration.Rot,
|
||||||
|
Scale: placedDecoration.Scale || 1,
|
||||||
|
_id: placedDecoration.MoveId
|
||||||
|
};
|
||||||
|
|
||||||
|
//the new room is still roomToPlaceIn
|
||||||
|
roomToPlaceIn.PlacedDecos.push(newDecoration);
|
||||||
|
await personalRooms.save();
|
||||||
|
return {
|
||||||
|
OldRoom: placedDecoration.OldRoom,
|
||||||
|
NewRoom: placedDecoration.Room,
|
||||||
|
IsApartment: placedDecoration.IsApartment,
|
||||||
|
MaxCapacityIncrease: 0 // TODO: calculate capacity change upon removal
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
//TODO: check whether to remove from shipitems
|
//TODO: check whether to remove from shipitems
|
||||||
|
|
||||||
if (placedDecoration.RemoveId) {
|
if (placedDecoration.RemoveId) {
|
||||||
room?.PlacedDecos?.pull({ _id: placedDecoration.RemoveId });
|
roomToPlaceIn.PlacedDecos.pull({ _id: placedDecoration.RemoveId });
|
||||||
await personalRooms.save();
|
await personalRooms.save();
|
||||||
return {
|
return {
|
||||||
DecoId: placedDecoration.RemoveId,
|
DecoId: placedDecoration.RemoveId,
|
||||||
@ -54,11 +117,13 @@ export const handleSetShipDecorations = async (
|
|||||||
|
|
||||||
// TODO: handle capacity
|
// TODO: handle capacity
|
||||||
|
|
||||||
|
//place decoration
|
||||||
const decoId = new Types.ObjectId();
|
const decoId = new Types.ObjectId();
|
||||||
room?.PlacedDecos?.push({
|
roomToPlaceIn.PlacedDecos?.push({
|
||||||
Type: placedDecoration.Type,
|
Type: placedDecoration.Type,
|
||||||
Pos: placedDecoration.Pos,
|
Pos: placedDecoration.Pos,
|
||||||
Rot: placedDecoration.Rot,
|
Rot: placedDecoration.Rot,
|
||||||
|
Scale: placedDecoration.Scale || 1,
|
||||||
_id: decoId
|
_id: decoId
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -1,25 +0,0 @@
|
|||||||
import { IOid } from "@/src/types/commonTypes";
|
|
||||||
import { IPolarity } from "@/src/types/inventoryTypes/commonInventoryTypes";
|
|
||||||
import { Types } from "mongoose";
|
|
||||||
import { IItemConfig } from "./commonInventoryTypes";
|
|
||||||
|
|
||||||
export interface ISuitClient extends Omit<ISuitDatabase, "_id"> {
|
|
||||||
ItemId: IOid;
|
|
||||||
}
|
|
||||||
|
|
||||||
export interface ISuitDatabase {
|
|
||||||
ItemType: string;
|
|
||||||
Configs: IItemConfig[];
|
|
||||||
UpgradeVer?: number;
|
|
||||||
XP?: number;
|
|
||||||
InfestationDate?: Date;
|
|
||||||
Features?: number;
|
|
||||||
Polarity?: IPolarity[];
|
|
||||||
Polarized?: number;
|
|
||||||
ModSlotPurchases?: number;
|
|
||||||
CustomizationSlotPurchases?: number;
|
|
||||||
FocusLens?: string;
|
|
||||||
UnlockLevel?: number;
|
|
||||||
_id: Types.ObjectId;
|
|
||||||
ItemId?: IOid; // only in response
|
|
||||||
}
|
|
@ -1,4 +1,4 @@
|
|||||||
import { IOid } from "@/src/types/commonTypes";
|
import { IMongoDate, IOid } from "@/src/types/commonTypes";
|
||||||
import { Types } from "mongoose";
|
import { Types } from "mongoose";
|
||||||
|
|
||||||
export interface IPolarity {
|
export interface IPolarity {
|
||||||
@ -38,15 +38,8 @@ export interface ISlotsBin {
|
|||||||
Slots: number;
|
Slots: number;
|
||||||
}
|
}
|
||||||
|
|
||||||
// ISigCol? IsIgCoL? ISIGCOL!
|
export interface IItemConfig {
|
||||||
export interface Isigcol {
|
Skins?: string[];
|
||||||
t0: number;
|
|
||||||
t1: number;
|
|
||||||
en: number;
|
|
||||||
}
|
|
||||||
|
|
||||||
interface IItemConfigBase {
|
|
||||||
Skins: string[];
|
|
||||||
pricol?: IColor;
|
pricol?: IColor;
|
||||||
attcol?: IColor;
|
attcol?: IColor;
|
||||||
sigcol?: IColor;
|
sigcol?: IColor;
|
||||||
@ -56,12 +49,7 @@ interface IItemConfigBase {
|
|||||||
cloth?: IColor;
|
cloth?: IColor;
|
||||||
Upgrades?: string[];
|
Upgrades?: string[];
|
||||||
Name?: string;
|
Name?: string;
|
||||||
ugly?: boolean;
|
OperatorAmp?: IOid;
|
||||||
}
|
|
||||||
|
|
||||||
//TODO: Proper names for the different config types, this should be something like
|
|
||||||
//IItemConfigPlayable
|
|
||||||
export interface IItemConfig extends IItemConfigBase {
|
|
||||||
Songs?: ISong[];
|
Songs?: ISong[];
|
||||||
AbilityOverride?: IAbilityOverride;
|
AbilityOverride?: IAbilityOverride;
|
||||||
PvpUpgrades?: string[];
|
PvpUpgrades?: string[];
|
||||||
@ -74,14 +62,59 @@ export interface ISong {
|
|||||||
p?: string;
|
p?: string;
|
||||||
s: string;
|
s: string;
|
||||||
}
|
}
|
||||||
|
export interface IOperatorConfigDatabase extends IItemConfig {
|
||||||
//TODO: Consider renaming it to loadout instead of config
|
|
||||||
export interface IOperatorConfigDatabase extends IItemConfigBase {
|
|
||||||
_id: Types.ObjectId;
|
_id: Types.ObjectId;
|
||||||
AbilityOverride?: IAbilityOverride; // not present in adultOperator
|
|
||||||
OperatorAmp?: IOid; // not present in adultOperator
|
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface IOperatorConfigClient extends Omit<IOperatorConfigDatabase, "_id"> {
|
export interface IOperatorConfigClient extends Omit<IOperatorConfigDatabase, "_id"> {
|
||||||
ItemId: IOid;
|
ItemId: IOid;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export interface IEquipmentSelection {
|
||||||
|
ItemId: IOid;
|
||||||
|
mod?: number;
|
||||||
|
cus?: number;
|
||||||
|
ItemType?: string;
|
||||||
|
hide?: boolean;
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface IEquipmentClient extends Omit<IEquipmentDatabase, "_id"> {
|
||||||
|
ItemId: IOid;
|
||||||
|
}
|
||||||
|
|
||||||
|
export enum EquipmentFeatures {
|
||||||
|
DOUBLE_CAPACITY = 1,
|
||||||
|
UTILITY_SLOT = 2,
|
||||||
|
ARCANE_SLOT = 32,
|
||||||
|
INCARNON_GENESIS = 512
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface IEquipmentDatabase {
|
||||||
|
ItemType: string;
|
||||||
|
ItemName?: string;
|
||||||
|
Configs: IItemConfig[];
|
||||||
|
UpgradeVer?: number;
|
||||||
|
XP?: number;
|
||||||
|
Features?: number;
|
||||||
|
Polarized?: number;
|
||||||
|
Polarity?: IPolarity[];
|
||||||
|
FocusLens?: string;
|
||||||
|
ModSlotPurchases?: number;
|
||||||
|
CustomizationSlotPurchases?: number;
|
||||||
|
UpgradeType?: string;
|
||||||
|
UpgradeFingerprint?: string;
|
||||||
|
InfestationDate?: IMongoDate;
|
||||||
|
InfestationDays?: number;
|
||||||
|
InfestationType?: string;
|
||||||
|
ModularParts?: string[];
|
||||||
|
UnlockLevel?: number;
|
||||||
|
Expiry?: IMongoDate;
|
||||||
|
SkillTree?: string;
|
||||||
|
ArchonCrystalUpgrades?: IArchonCrystalUpgrade[];
|
||||||
|
_id: Types.ObjectId;
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface IArchonCrystalUpgrade {
|
||||||
|
UpgradeType?: string;
|
||||||
|
Color?: string;
|
||||||
|
}
|
||||||
|
@ -2,15 +2,13 @@
|
|||||||
import { Document, Types } from "mongoose";
|
import { Document, Types } from "mongoose";
|
||||||
import { IOid, IMongoDate } from "../commonTypes";
|
import { IOid, IMongoDate } from "../commonTypes";
|
||||||
import {
|
import {
|
||||||
IAbilityOverride,
|
|
||||||
IColor,
|
IColor,
|
||||||
FocusSchool,
|
FocusSchool,
|
||||||
IPolarity,
|
|
||||||
IItemConfig,
|
IItemConfig,
|
||||||
IOperatorConfigClient
|
IOperatorConfigClient,
|
||||||
|
IEquipmentSelection,
|
||||||
|
IEquipmentDatabase
|
||||||
} from "@/src/types/inventoryTypes/commonInventoryTypes";
|
} from "@/src/types/inventoryTypes/commonInventoryTypes";
|
||||||
import { ISuitDatabase } from "@/src/types/inventoryTypes/SuitTypes";
|
|
||||||
import { IOperatorLoadOutSigcol, IWeaponDatabase } from "@/src/types/inventoryTypes/weaponTypes";
|
|
||||||
|
|
||||||
//Document extends will be deleted soon. TODO: delete and migrate uses to ...
|
//Document extends will be deleted soon. TODO: delete and migrate uses to ...
|
||||||
export interface IInventoryDatabaseDocument extends IInventoryDatabase, Document {}
|
export interface IInventoryDatabaseDocument extends IInventoryDatabase, Document {}
|
||||||
@ -61,48 +59,14 @@ export interface ITypeCount {
|
|||||||
ItemCount: number;
|
ItemCount: number;
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface IGenericItem2 {
|
export type TEquipmentKey =
|
||||||
ItemType: string;
|
| "Suits"
|
||||||
ItemName: string;
|
| "LongGuns"
|
||||||
ItemId: IOid;
|
| "Pistols"
|
||||||
XP: number;
|
| "Melee"
|
||||||
UpgradeVer: number;
|
| "SpecialItems"
|
||||||
Features: number;
|
| "Sentinels"
|
||||||
Polarized: number;
|
| "SentinelWeapons";
|
||||||
CustomizationSlotPurchases: number;
|
|
||||||
ModSlotPurchases: number;
|
|
||||||
FocusLens: string;
|
|
||||||
Expiry: IMongoDate;
|
|
||||||
Polarity: IPolarity[];
|
|
||||||
Configs: IItemConfig[];
|
|
||||||
ModularParts: string[];
|
|
||||||
SkillTree: string;
|
|
||||||
UpgradeType: string;
|
|
||||||
UpgradeFingerprint: string;
|
|
||||||
OffensiveUpgrade: string;
|
|
||||||
DefensiveUpgrade: string;
|
|
||||||
UpgradesExpiry: IMongoDate;
|
|
||||||
ArchonCrystalUpgrades: [];
|
|
||||||
}
|
|
||||||
|
|
||||||
export interface IGenericItem {
|
|
||||||
ItemType: string;
|
|
||||||
XP?: number;
|
|
||||||
Configs: IItemConfig[];
|
|
||||||
UpgradeVer: number;
|
|
||||||
ItemId: IOid;
|
|
||||||
Features?: number;
|
|
||||||
Polarity?: IPolarity[];
|
|
||||||
Polarized?: number;
|
|
||||||
ModSlotPurchases?: number;
|
|
||||||
CustomizationSlotPurchases?: number;
|
|
||||||
}
|
|
||||||
|
|
||||||
export interface IGenericItemDatabase extends Omit<IGenericItem, "ItemId"> {
|
|
||||||
_id: Types.ObjectId;
|
|
||||||
}
|
|
||||||
|
|
||||||
export type TGenericItemKey = "Suits" | "LongGuns" | "Pistols" | "Melee";
|
|
||||||
|
|
||||||
export interface IDuviriInfo {
|
export interface IDuviriInfo {
|
||||||
Seed: number;
|
Seed: number;
|
||||||
@ -119,12 +83,12 @@ export interface IPendingRecipeResponse extends Omit<IPendingRecipe, "Completion
|
|||||||
CompletionDate: IMongoDate;
|
CompletionDate: IMongoDate;
|
||||||
}
|
}
|
||||||
export interface IInventoryResponse {
|
export interface IInventoryResponse {
|
||||||
Horses: IGenericItem[];
|
Horses: IEquipmentDatabase[];
|
||||||
DrifterMelee: IGenericItem[];
|
DrifterMelee: IEquipmentDatabase[];
|
||||||
DrifterGuns: IGenericItem[];
|
DrifterGuns: IEquipmentDatabase[];
|
||||||
DuviriInfo: IDuviriInfo;
|
DuviriInfo: IDuviriInfo;
|
||||||
Mailbox: IMailbox;
|
Mailbox: IMailbox;
|
||||||
KahlLoadOuts: IGenericItem[];
|
KahlLoadOuts: IEquipmentDatabase[];
|
||||||
SubscribedToEmails: number;
|
SubscribedToEmails: number;
|
||||||
Created: IMongoDate;
|
Created: IMongoDate;
|
||||||
RewardSeed: number;
|
RewardSeed: number;
|
||||||
@ -156,19 +120,19 @@ export interface IInventoryResponse {
|
|||||||
ChallengeProgress: IChallengeProgress[];
|
ChallengeProgress: IChallengeProgress[];
|
||||||
RawUpgrades: IRawUpgrade[];
|
RawUpgrades: IRawUpgrade[];
|
||||||
ReceivedStartingGear: boolean;
|
ReceivedStartingGear: boolean;
|
||||||
Suits: ISuitDatabase[];
|
Suits: IEquipmentDatabase[];
|
||||||
LongGuns: IWeaponDatabase[];
|
LongGuns: IEquipmentDatabase[];
|
||||||
Pistols: IWeaponDatabase[];
|
Pistols: IEquipmentDatabase[];
|
||||||
Melee: IWeaponDatabase[];
|
Melee: IEquipmentDatabase[];
|
||||||
Ships: IShipInventory[];
|
Ships: IShipInventory[];
|
||||||
QuestKeys: IQuestKeyResponse[];
|
QuestKeys: IQuestKeyResponse[];
|
||||||
FlavourItems: IFlavourItem[];
|
FlavourItems: IFlavourItem[];
|
||||||
Scoops: IGenericItem[];
|
Scoops: IEquipmentDatabase[];
|
||||||
TrainingRetriesLeft: number;
|
TrainingRetriesLeft: number;
|
||||||
LoadOutPresets: ILoadOutPresets;
|
LoadOutPresets: ILoadOutPresets;
|
||||||
CurrentLoadOutIds: Array<any[] | IOid>;
|
CurrentLoadOutIds: Array<any[] | IOid>;
|
||||||
Missions: IMission[];
|
Missions: IMission[];
|
||||||
RandomUpgradesIdentified: number;
|
RandomUpgradesIdentified?: number;
|
||||||
LastRegionPlayed: string;
|
LastRegionPlayed: string;
|
||||||
XPInfo: ITypeXPItem[];
|
XPInfo: ITypeXPItem[];
|
||||||
Recipes: ITypeCount[];
|
Recipes: ITypeCount[];
|
||||||
@ -198,15 +162,15 @@ export interface IInventoryResponse {
|
|||||||
Affiliations: IAffiliation[];
|
Affiliations: IAffiliation[];
|
||||||
QualifyingInvasions: any[];
|
QualifyingInvasions: any[];
|
||||||
FactionScores: number[];
|
FactionScores: number[];
|
||||||
SpaceSuits: IGenericItem[];
|
SpaceSuits: IEquipmentDatabase[];
|
||||||
SpaceMelee: IGenericItem[];
|
SpaceMelee: IEquipmentDatabase[];
|
||||||
SpaceGuns: ISpaceGun[];
|
SpaceGuns: IEquipmentDatabase[];
|
||||||
ArchwingEnabled: boolean;
|
ArchwingEnabled: boolean;
|
||||||
PendingSpectreLoadouts: any[];
|
PendingSpectreLoadouts: any[];
|
||||||
SpectreLoadouts: ISpectreLoadout[];
|
SpectreLoadouts: ISpectreLoadout[];
|
||||||
SentinelWeapons: IWeaponDatabase[];
|
SentinelWeapons: IEquipmentDatabase[];
|
||||||
Sentinels: IWeaponDatabase[];
|
Sentinels: IEquipmentDatabase[];
|
||||||
EmailItems: ITypeXPItem[];
|
EmailItems: ITypeCount[];
|
||||||
CompletedSyndicates: string[];
|
CompletedSyndicates: string[];
|
||||||
FocusXP: IFocusXP;
|
FocusXP: IFocusXP;
|
||||||
Wishlist: string[];
|
Wishlist: string[];
|
||||||
@ -216,7 +180,7 @@ export interface IInventoryResponse {
|
|||||||
Drones: IDrone[];
|
Drones: IDrone[];
|
||||||
StepSequencers: IStepSequencer[];
|
StepSequencers: IStepSequencer[];
|
||||||
ActiveAvatarImageType: string;
|
ActiveAvatarImageType: string;
|
||||||
KubrowPets: IKubrowPet[];
|
KubrowPets: IEquipmentDatabase[];
|
||||||
ShipDecorations: IConsumable[];
|
ShipDecorations: IConsumable[];
|
||||||
DailyAffiliationCetus: number;
|
DailyAffiliationCetus: number;
|
||||||
DailyAffiliationQuills: number;
|
DailyAffiliationQuills: number;
|
||||||
@ -224,14 +188,14 @@ export interface IInventoryResponse {
|
|||||||
CompletedJobs: ICompletedJob[];
|
CompletedJobs: ICompletedJob[];
|
||||||
FocusAbility: string;
|
FocusAbility: string;
|
||||||
FocusUpgrades: IFocusUpgrade[];
|
FocusUpgrades: IFocusUpgrade[];
|
||||||
OperatorAmps: IOperatorAmp[];
|
OperatorAmps: IEquipmentDatabase[];
|
||||||
HasContributedToDojo: boolean;
|
HasContributedToDojo?: boolean;
|
||||||
HWIDProtectEnabled: boolean;
|
HWIDProtectEnabled: boolean;
|
||||||
KubrowPetPrints: IKubrowPetPrint[];
|
KubrowPetPrints: IKubrowPetPrint[];
|
||||||
AlignmentReplay: IAlignment;
|
AlignmentReplay: IAlignment;
|
||||||
PersonalGoalProgress: IPersonalGoalProgress[];
|
PersonalGoalProgress: IPersonalGoalProgress[];
|
||||||
DailyAffiliationSolaris: number;
|
DailyAffiliationSolaris: number;
|
||||||
SpecialItems: IGenericItem[];
|
SpecialItems: IEquipmentDatabase[];
|
||||||
ThemeStyle: string;
|
ThemeStyle: string;
|
||||||
ThemeBackground: string;
|
ThemeBackground: string;
|
||||||
ThemeSounds: string;
|
ThemeSounds: string;
|
||||||
@ -242,17 +206,17 @@ export interface IInventoryResponse {
|
|||||||
DailyAffiliationVentkids: number;
|
DailyAffiliationVentkids: number;
|
||||||
DailyAffiliationVox: number;
|
DailyAffiliationVox: number;
|
||||||
RecentVendorPurchases: Array<number | string>;
|
RecentVendorPurchases: Array<number | string>;
|
||||||
Hoverboards: IHoverboard[];
|
Hoverboards: IEquipmentDatabase[];
|
||||||
NodeIntrosCompleted: string[];
|
NodeIntrosCompleted: string[];
|
||||||
GuildId?: IOid;
|
GuildId?: IOid;
|
||||||
CompletedJobChains: ICompletedJobChain[];
|
CompletedJobChains: ICompletedJobChain[];
|
||||||
SeasonChallengeHistory: ISeasonChallengeHistory[];
|
SeasonChallengeHistory: ISeasonChallenge[];
|
||||||
MoaPets: IMoaPet[];
|
MoaPets: IEquipmentDatabase[];
|
||||||
EquippedInstrument: string;
|
EquippedInstrument: string;
|
||||||
InvasionChainProgress: IInvasionChainProgress[];
|
InvasionChainProgress: IInvasionChainProgress[];
|
||||||
DataKnives: IGenericItem[];
|
DataKnives: IEquipmentDatabase[];
|
||||||
NemesisHistory: INemesisHistory[];
|
NemesisHistory: INemesisHistory[];
|
||||||
LastNemesisAllySpawnTime: IMongoDate;
|
LastNemesisAllySpawnTime?: IMongoDate;
|
||||||
Settings: ISettings;
|
Settings: ISettings;
|
||||||
PersonalTechProjects: IPersonalTechProject[];
|
PersonalTechProjects: IPersonalTechProject[];
|
||||||
CrewShips: ICrewShip[];
|
CrewShips: ICrewShip[];
|
||||||
@ -262,27 +226,27 @@ export interface IInventoryResponse {
|
|||||||
CrewShipWeapons: ICrewShipWeapon[];
|
CrewShipWeapons: ICrewShipWeapon[];
|
||||||
CrewShipSalvagedWeapons: ICrewShipWeapon[];
|
CrewShipSalvagedWeapons: ICrewShipWeapon[];
|
||||||
CrewShipWeaponSkins: ICrewShipSalvagedWeaponSkin[];
|
CrewShipWeaponSkins: ICrewShipSalvagedWeaponSkin[];
|
||||||
TradeBannedUntil: IMongoDate;
|
TradeBannedUntil?: IMongoDate;
|
||||||
PlayedParkourTutorial: boolean;
|
PlayedParkourTutorial: boolean;
|
||||||
SubscribedToEmailsPersonalized: number;
|
SubscribedToEmailsPersonalized: number;
|
||||||
DailyAffiliationEntrati: number;
|
DailyAffiliationEntrati: number;
|
||||||
DailyAffiliationNecraloid: number;
|
DailyAffiliationNecraloid: number;
|
||||||
MechSuits: ISuitDatabase[];
|
MechSuits: IEquipmentDatabase[];
|
||||||
InfestedFoundry: IInfestedFoundry;
|
InfestedFoundry?: IInfestedFoundry;
|
||||||
BlessingCooldown: IMongoDate;
|
BlessingCooldown: IMongoDate;
|
||||||
CrewShipHarnesses: ICrewShipHarness[];
|
CrewShipHarnesses: IEquipmentDatabase[];
|
||||||
CrewShipRawSalvage: IConsumable[];
|
CrewShipRawSalvage: IConsumable[];
|
||||||
CrewMembers: ICrewMember[];
|
CrewMembers: ICrewMember[];
|
||||||
AdultOperatorLoadOuts: IOperatorConfigClient[];
|
AdultOperatorLoadOuts: IOperatorConfigClient[];
|
||||||
LotusCustomization: ILotusCustomization;
|
LotusCustomization: ILotusCustomization;
|
||||||
UseAdultOperatorLoadout: boolean;
|
UseAdultOperatorLoadout?: boolean;
|
||||||
DailyAffiliationZariman: number;
|
DailyAffiliationZariman: number;
|
||||||
NemesisAbandonedRewards: string[];
|
NemesisAbandonedRewards: string[];
|
||||||
DailyAffiliationKahl: number;
|
DailyAffiliationKahl: number;
|
||||||
LastInventorySync: IOid;
|
LastInventorySync: IOid;
|
||||||
NextRefill: IMongoDate;
|
NextRefill: IMongoDate;
|
||||||
ActiveLandscapeTraps: any[];
|
ActiveLandscapeTraps: any[];
|
||||||
EvolutionProgress: any[];
|
EvolutionProgress?: IEvolutionProgress[];
|
||||||
RepVotes: any[];
|
RepVotes: any[];
|
||||||
LeagueTickets: any[];
|
LeagueTickets: any[];
|
||||||
Quests: any[];
|
Quests: any[];
|
||||||
@ -297,16 +261,6 @@ export interface IInventoryResponse {
|
|||||||
DeathSquadable: boolean;
|
DeathSquadable: boolean;
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface IAdultOperatorLoadOut {
|
|
||||||
Skins: string[];
|
|
||||||
attcol: IColor;
|
|
||||||
eyecol: IColor;
|
|
||||||
facial: IColor;
|
|
||||||
pricol: IColor;
|
|
||||||
Upgrades?: string[];
|
|
||||||
ItemId: IOid;
|
|
||||||
}
|
|
||||||
|
|
||||||
export interface IAffiliation {
|
export interface IAffiliation {
|
||||||
Initiated?: boolean;
|
Initiated?: boolean;
|
||||||
Standing: number;
|
Standing: number;
|
||||||
@ -384,14 +338,11 @@ export interface ICrewMember {
|
|||||||
WeaponId: IOid;
|
WeaponId: IOid;
|
||||||
XP: number;
|
XP: number;
|
||||||
PowersuitType: string;
|
PowersuitType: string;
|
||||||
Configs: ICrewMemberConfig[];
|
Configs: IItemConfig[];
|
||||||
SecondInCommand: boolean;
|
SecondInCommand: boolean;
|
||||||
ItemId: IOid;
|
ItemId: IOid;
|
||||||
}
|
}
|
||||||
|
|
||||||
// eslint-disable-next-line @typescript-eslint/no-empty-interface
|
|
||||||
export interface ICrewMemberConfig {}
|
|
||||||
|
|
||||||
export interface ISkillEfficiency {
|
export interface ISkillEfficiency {
|
||||||
PILOTING: ICombat;
|
PILOTING: ICombat;
|
||||||
GUNNERY: ICombat;
|
GUNNERY: ICombat;
|
||||||
@ -404,19 +355,13 @@ export interface ICombat {
|
|||||||
Assigned: number;
|
Assigned: number;
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface ICrewShipHarness {
|
export enum InventorySlot {
|
||||||
ItemType: string;
|
SUITS = "SuitBin",
|
||||||
Configs: ICrewShipHarnessConfig[];
|
WEAPONS = "WeaponBin",
|
||||||
Features: number;
|
SPACESUITS = "SpaceSuitBin",
|
||||||
UpgradeVer: number;
|
MECHSUITS = "MechBin",
|
||||||
XP: number;
|
PVE_LOADOUTS = "PveBonusLoadoutBin",
|
||||||
Polarity: IPolarity[];
|
SENTINELS = "SentinelBin"
|
||||||
Polarized: number;
|
|
||||||
ItemId: IOid;
|
|
||||||
}
|
|
||||||
|
|
||||||
export interface ICrewShipHarnessConfig {
|
|
||||||
Upgrades?: string[];
|
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface ISlots {
|
export interface ISlots {
|
||||||
@ -435,25 +380,21 @@ export interface ICrewShipWeapon {
|
|||||||
ItemType: string;
|
ItemType: string;
|
||||||
UpgradeType?: string;
|
UpgradeType?: string;
|
||||||
UpgradeFingerprint?: string;
|
UpgradeFingerprint?: string;
|
||||||
Configs?: ICrewShipHarnessConfig[];
|
Configs?: IItemConfig[];
|
||||||
UpgradeVer?: number;
|
UpgradeVer?: number;
|
||||||
ItemId: IOid;
|
ItemId: IOid;
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface ICrewShip {
|
export interface ICrewShip {
|
||||||
ItemType: string;
|
ItemType: string;
|
||||||
Configs: ICrewShipConfig[];
|
Configs: IItemConfig[];
|
||||||
Weapon: ICrewshipWeapon;
|
Weapon: ICrewshipWeapon;
|
||||||
Customization: ICustomization;
|
Customization: ICustomization;
|
||||||
ItemName: string;
|
ItemName: string;
|
||||||
RailjackImage: IFlavourItem;
|
RailjackImage: IFlavourItem;
|
||||||
CrewMembers: ICrewMembers;
|
CrewMembers: ICrewMembers;
|
||||||
ItemId: IOid;
|
ItemId: IOid;
|
||||||
}
|
_id: Types.ObjectId;
|
||||||
|
|
||||||
export interface ICrewShipConfig {
|
|
||||||
Skins?: string[];
|
|
||||||
pricol?: IColor;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface ICrewMembers {
|
export interface ICrewMembers {
|
||||||
@ -476,16 +417,6 @@ export interface IShipExterior {
|
|||||||
ShipAttachments?: IShipAttachments;
|
ShipAttachments?: IShipAttachments;
|
||||||
}
|
}
|
||||||
|
|
||||||
//TODO: check whether it makes sense to use this specifity of color.
|
|
||||||
export interface IShipExteriorColors {
|
|
||||||
t0: number;
|
|
||||||
t1: number;
|
|
||||||
t2: number;
|
|
||||||
t3: number;
|
|
||||||
m0: number;
|
|
||||||
en: number;
|
|
||||||
}
|
|
||||||
|
|
||||||
export interface IShipAttachments {
|
export interface IShipAttachments {
|
||||||
HOOD_ORNAMENT: string; //TODO: Others are probably possible
|
HOOD_ORNAMENT: string; //TODO: Others are probably possible
|
||||||
}
|
}
|
||||||
@ -504,22 +435,12 @@ export interface ICrewshipWeapon {
|
|||||||
PORT_GUNS: IPortGuns;
|
PORT_GUNS: IPortGuns;
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface IPilot {
|
|
||||||
PRIMARY_A: IL;
|
|
||||||
SECONDARY_A: IL;
|
|
||||||
}
|
|
||||||
|
|
||||||
// L? Bozo.
|
|
||||||
export interface IL {
|
|
||||||
ItemId?: IOid;
|
|
||||||
mod?: number;
|
|
||||||
cus?: number;
|
|
||||||
ItemType?: string;
|
|
||||||
hide?: boolean;
|
|
||||||
}
|
|
||||||
|
|
||||||
export interface IPortGuns {
|
export interface IPortGuns {
|
||||||
PRIMARY_A: IL;
|
PRIMARY_A: IEquipmentSelection;
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface IPilot extends IPortGuns {
|
||||||
|
SECONDARY_A: IEquipmentSelection;
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface IDiscoveredMarker {
|
export interface IDiscoveredMarker {
|
||||||
@ -561,47 +482,15 @@ export interface IFusionTreasure {
|
|||||||
Sockets: number;
|
Sockets: number;
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface IHoverboard {
|
|
||||||
ItemType: string;
|
|
||||||
Configs: IHoverboardConfig[];
|
|
||||||
ModularParts: string[];
|
|
||||||
ItemName?: string;
|
|
||||||
Polarity?: IPolarity[];
|
|
||||||
UpgradeVer: number;
|
|
||||||
XP: number;
|
|
||||||
Features: number;
|
|
||||||
ItemId: IOid;
|
|
||||||
}
|
|
||||||
|
|
||||||
export interface IHoverboardConfig {
|
|
||||||
Upgrades?: string[];
|
|
||||||
Skins?: IPurpleSkin[];
|
|
||||||
pricol?: IColor;
|
|
||||||
sigcol?: ISigcol;
|
|
||||||
attcol?: IColor;
|
|
||||||
}
|
|
||||||
|
|
||||||
export enum IPurpleSkin {
|
|
||||||
Empty = "",
|
|
||||||
The5Be4Af71A38E4A9306040E15 = "5be4af71a38e4a9306040e15",
|
|
||||||
The5C930Ac3A38E4A24Bc3Ad5De = "5c930ac3a38e4a24bc3ad5de",
|
|
||||||
The5C9C6F9857904A7A3B25656B = "5c9c6f9857904a7a3b25656b",
|
|
||||||
The5Dd8A8E3A38E4A321A45E6A0 = "5dd8a8e3a38e4a321a45e6a0"
|
|
||||||
}
|
|
||||||
|
|
||||||
export interface ISigcol {
|
|
||||||
t3: number;
|
|
||||||
}
|
|
||||||
|
|
||||||
export interface IInfestedFoundry {
|
export interface IInfestedFoundry {
|
||||||
Name: string;
|
Name?: string;
|
||||||
Resources: ITypeCount[];
|
Resources?: ITypeCount[];
|
||||||
Slots: number;
|
Slots?: number;
|
||||||
XP: number;
|
XP?: number;
|
||||||
ConsumedSuits: IConsumedSuit[];
|
ConsumedSuits?: IConsumedSuit[];
|
||||||
InvigorationIndex: number;
|
InvigorationIndex?: number;
|
||||||
InvigorationSuitOfferings: string[];
|
InvigorationSuitOfferings?: string[];
|
||||||
InvigorationsApplied: number;
|
InvigorationsApplied?: number;
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface IConsumedSuit {
|
export interface IConsumedSuit {
|
||||||
@ -645,44 +534,13 @@ export interface ITraits {
|
|||||||
Personality: string;
|
Personality: string;
|
||||||
BodyType: string;
|
BodyType: string;
|
||||||
Head?: string;
|
Head?: string;
|
||||||
Tail?: Tail;
|
Tail?: string;
|
||||||
}
|
|
||||||
|
|
||||||
export enum Tail {
|
|
||||||
Empty = "",
|
|
||||||
LotusTypesGameCatbrowPetTailsCatbrowTailA = "/Lotus/Types/Game/CatbrowPet/Tails/CatbrowTailA",
|
|
||||||
LotusTypesGameCatbrowPetTailsCatbrowTailB = "/Lotus/Types/Game/CatbrowPet/Tails/CatbrowTailB",
|
|
||||||
LotusTypesGameCatbrowPetTailsCatbrowTailC = "/Lotus/Types/Game/CatbrowPet/Tails/CatbrowTailC",
|
|
||||||
LotusTypesGameCatbrowPetTailsCatbrowTailD = "/Lotus/Types/Game/CatbrowPet/Tails/CatbrowTailD"
|
|
||||||
}
|
}
|
||||||
|
|
||||||
export enum KubrowPetPrintItemType {
|
export enum KubrowPetPrintItemType {
|
||||||
LotusTypesGameKubrowPetImprintedTraitPrint = "/Lotus/Types/Game/KubrowPet/ImprintedTraitPrint"
|
LotusTypesGameKubrowPetImprintedTraitPrint = "/Lotus/Types/Game/KubrowPet/ImprintedTraitPrint"
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface IKubrowPet {
|
|
||||||
ItemType: string;
|
|
||||||
Configs: IKubrowPetConfig[];
|
|
||||||
UpgradeVer: number;
|
|
||||||
Details: IDetails;
|
|
||||||
XP?: number;
|
|
||||||
Polarized?: number;
|
|
||||||
Polarity?: IPolarity[];
|
|
||||||
Features?: number;
|
|
||||||
InfestationDate?: IMongoDate;
|
|
||||||
InfestationDays?: number;
|
|
||||||
InfestationType?: string;
|
|
||||||
ItemId: IOid;
|
|
||||||
ModularParts?: string[];
|
|
||||||
}
|
|
||||||
|
|
||||||
export interface IKubrowPetConfig {
|
|
||||||
Skins?: string[];
|
|
||||||
pricol?: IColor;
|
|
||||||
attcol?: IColor;
|
|
||||||
Upgrades?: string[];
|
|
||||||
}
|
|
||||||
|
|
||||||
export interface IDetails {
|
export interface IDetails {
|
||||||
Name: string;
|
Name: string;
|
||||||
IsPuppy: boolean;
|
IsPuppy: boolean;
|
||||||
@ -725,74 +583,32 @@ export interface ILibraryPersonalProgress {
|
|||||||
|
|
||||||
//this needs to be checked against ILoadoutDatabase
|
//this needs to be checked against ILoadoutDatabase
|
||||||
export interface ILoadOutPresets {
|
export interface ILoadOutPresets {
|
||||||
NORMAL: INormal[];
|
NORMAL: ILoadoutConfigClient[];
|
||||||
NORMAL_PVP: IArchwing[];
|
NORMAL_PVP: ILoadoutConfigClient[];
|
||||||
LUNARO: ILunaro[];
|
LUNARO: ILoadoutConfigClient[];
|
||||||
ARCHWING: IArchwing[];
|
ARCHWING: ILoadoutConfigClient[];
|
||||||
SENTINEL: IArchwing[];
|
SENTINEL: ILoadoutConfigClient[];
|
||||||
OPERATOR: IArchwing[];
|
OPERATOR: ILoadoutConfigClient[];
|
||||||
GEAR: IGear[];
|
GEAR: ILoadoutConfigClient[];
|
||||||
KDRIVE: IKdrive[];
|
KDRIVE: ILoadoutConfigClient[];
|
||||||
DATAKNIFE: IArchwing[];
|
DATAKNIFE: ILoadoutConfigClient[];
|
||||||
MECH: IMech[];
|
MECH: ILoadoutConfigClient[];
|
||||||
OPERATOR_ADULT: IArchwing[];
|
OPERATOR_ADULT: ILoadoutConfigClient[];
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface IArchwing {
|
export interface ILoadoutConfigClient {
|
||||||
PresetIcon: string;
|
FocusSchool?: FocusSchool;
|
||||||
Favorite: boolean;
|
PresetIcon?: string;
|
||||||
n?: string;
|
Favorite?: boolean;
|
||||||
s: IL;
|
n?: string; // Loadout name
|
||||||
l?: IL;
|
s?: IEquipmentSelection; // Suit
|
||||||
m?: IL;
|
p?: IEquipmentSelection;
|
||||||
ItemId: IOid;
|
l?: IEquipmentSelection; // Primary weapon
|
||||||
p?: IL;
|
m?: IEquipmentSelection; // Melee weapon
|
||||||
}
|
h?: IEquipmentSelection; // Gravimag weapon
|
||||||
|
a?: IEquipmentSelection;
|
||||||
export interface IGear {
|
|
||||||
n: string;
|
|
||||||
s: IL;
|
|
||||||
p: IL;
|
|
||||||
l: IL;
|
|
||||||
m: IL;
|
|
||||||
ItemId: IOid;
|
|
||||||
}
|
|
||||||
|
|
||||||
export interface IKdrive {
|
|
||||||
PresetIcon: string;
|
|
||||||
Favorite: boolean;
|
|
||||||
s: IL;
|
|
||||||
ItemId: IOid;
|
|
||||||
}
|
|
||||||
|
|
||||||
export interface ILunaro {
|
|
||||||
n: string;
|
|
||||||
s: IL;
|
|
||||||
m: IL;
|
|
||||||
ItemId: IOid;
|
|
||||||
}
|
|
||||||
|
|
||||||
export interface IMech {
|
|
||||||
PresetIcon: string;
|
|
||||||
Favorite: boolean;
|
|
||||||
s: IL;
|
|
||||||
h: IL;
|
|
||||||
a: IL;
|
|
||||||
ItemId: IOid;
|
|
||||||
}
|
|
||||||
|
|
||||||
export interface INormal {
|
|
||||||
FocusSchool: FocusSchool;
|
|
||||||
PresetIcon: string;
|
|
||||||
Favorite: boolean;
|
|
||||||
n: string;
|
|
||||||
s: IL;
|
|
||||||
p: IL;
|
|
||||||
l: IL;
|
|
||||||
m: IL;
|
|
||||||
h: IL;
|
|
||||||
a?: IL;
|
|
||||||
ItemId: IOid;
|
ItemId: IOid;
|
||||||
|
Remove?: boolean; // when client wants to remove a config, it only includes ItemId & Remove.
|
||||||
}
|
}
|
||||||
|
|
||||||
export enum UpgradeType {
|
export enum UpgradeType {
|
||||||
@ -805,16 +621,7 @@ export interface ILoreFragmentScan {
|
|||||||
ItemType: string;
|
ItemType: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface ILotusCustomization {
|
export interface ILotusCustomization extends IItemConfig {
|
||||||
Upgrades: any[];
|
|
||||||
PvpUpgrades: any[];
|
|
||||||
Skins: string[];
|
|
||||||
pricol: IColor;
|
|
||||||
attcol: any[];
|
|
||||||
sigcol: any[];
|
|
||||||
eyecol: any[];
|
|
||||||
facial: any[];
|
|
||||||
Songs: any[];
|
|
||||||
Persona: string;
|
Persona: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -825,18 +632,6 @@ export interface IMission {
|
|||||||
RewardsCooldownTime?: IMongoDate;
|
RewardsCooldownTime?: IMongoDate;
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface IMoaPet {
|
|
||||||
ItemType: string;
|
|
||||||
Configs: IKubrowPetConfig[];
|
|
||||||
UpgradeVer: number;
|
|
||||||
ModularParts: string[];
|
|
||||||
XP?: number;
|
|
||||||
Features?: number;
|
|
||||||
ItemName: string;
|
|
||||||
Polarity?: IPolarity[];
|
|
||||||
ItemId: IOid;
|
|
||||||
}
|
|
||||||
|
|
||||||
export interface INemesisHistory {
|
export interface INemesisHistory {
|
||||||
fp: number;
|
fp: number;
|
||||||
manifest: Manifest;
|
manifest: Manifest;
|
||||||
@ -871,30 +666,6 @@ export enum Manifest {
|
|||||||
LotusTypesGameNemesisKuvaLichKuvaLichManifestVersionTwo = "/Lotus/Types/Game/Nemesis/KuvaLich/KuvaLichManifestVersionTwo"
|
LotusTypesGameNemesisKuvaLichKuvaLichManifestVersionTwo = "/Lotus/Types/Game/Nemesis/KuvaLich/KuvaLichManifestVersionTwo"
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface IOperatorAmp {
|
|
||||||
ItemType: string;
|
|
||||||
Configs: IKubrowPetConfig[];
|
|
||||||
ModularParts?: string[];
|
|
||||||
XP?: number;
|
|
||||||
UpgradeVer?: number;
|
|
||||||
ItemName?: string;
|
|
||||||
Features?: number;
|
|
||||||
ItemId: IOid;
|
|
||||||
}
|
|
||||||
|
|
||||||
export interface IOperatorLoadOut {
|
|
||||||
Skins: string[];
|
|
||||||
pricol?: IColor;
|
|
||||||
attcol?: IColor;
|
|
||||||
eyecol: IColor;
|
|
||||||
facial?: IColor;
|
|
||||||
sigcol?: IOperatorLoadOutSigcol;
|
|
||||||
OperatorAmp?: IOid;
|
|
||||||
Upgrades?: string[];
|
|
||||||
AbilityOverride: IAbilityOverride;
|
|
||||||
ItemId: IOid;
|
|
||||||
}
|
|
||||||
|
|
||||||
export interface IPendingCoupon {
|
export interface IPendingCoupon {
|
||||||
Expiry: IMongoDate;
|
Expiry: IMongoDate;
|
||||||
Discount: number;
|
Discount: number;
|
||||||
@ -1023,12 +794,7 @@ export interface IRawUpgrade {
|
|||||||
LastAdded?: IOid;
|
LastAdded?: IOid;
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface ISeasonChallengeHistory {
|
export interface ISeasonChallenge {
|
||||||
challenge: string;
|
|
||||||
id: string;
|
|
||||||
}
|
|
||||||
|
|
||||||
export interface ISeasonChallengeCompletions {
|
|
||||||
challenge: string;
|
challenge: string;
|
||||||
id: string;
|
id: string;
|
||||||
}
|
}
|
||||||
@ -1052,30 +818,6 @@ export interface IShipInventory {
|
|||||||
ItemId: IOid;
|
ItemId: IOid;
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface ISpaceGun {
|
|
||||||
ItemType: string;
|
|
||||||
Configs: ISpaceGunConfig[];
|
|
||||||
XP?: number;
|
|
||||||
UpgradeVer?: number;
|
|
||||||
ItemId: IOid;
|
|
||||||
Features?: number;
|
|
||||||
Polarized?: number;
|
|
||||||
Polarity?: IPolarity[];
|
|
||||||
UpgradeType?: UpgradeType;
|
|
||||||
UpgradeFingerprint?: string;
|
|
||||||
ItemName?: string;
|
|
||||||
}
|
|
||||||
|
|
||||||
export interface ISpaceGunConfig {
|
|
||||||
Skins?: string[];
|
|
||||||
pricol?: IColor;
|
|
||||||
Upgrades?: string[];
|
|
||||||
}
|
|
||||||
|
|
||||||
export interface IPurpleCol {
|
|
||||||
en: number;
|
|
||||||
}
|
|
||||||
|
|
||||||
export interface ISpectreLoadout {
|
export interface ISpectreLoadout {
|
||||||
LongGuns: string;
|
LongGuns: string;
|
||||||
Melee: string;
|
Melee: string;
|
||||||
@ -1090,7 +832,7 @@ export interface IStepSequencer {
|
|||||||
NotePacks: INotePacks;
|
NotePacks: INotePacks;
|
||||||
FingerPrint: string;
|
FingerPrint: string;
|
||||||
Name: string;
|
Name: string;
|
||||||
ItemId: IOid;
|
ItemId?: IOid;
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface INotePacks {
|
export interface INotePacks {
|
||||||
@ -1125,3 +867,9 @@ export interface IWebFlags {
|
|||||||
Anniversary2021: boolean;
|
Anniversary2021: boolean;
|
||||||
HitDownloadBtn: IMongoDate;
|
HitDownloadBtn: IMongoDate;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export interface IEvolutionProgress {
|
||||||
|
Progress: number;
|
||||||
|
Rank: number;
|
||||||
|
ItemType: string;
|
||||||
|
}
|
||||||
|
@ -1,33 +0,0 @@
|
|||||||
import { IOid } from "@/src/types/commonTypes";
|
|
||||||
import { IItemConfig } from "./commonInventoryTypes";
|
|
||||||
import { IPolarity } from "@/src/types/inventoryTypes/commonInventoryTypes";
|
|
||||||
import { Types } from "mongoose";
|
|
||||||
|
|
||||||
export interface IWeaponClient extends Omit<IWeaponDatabase, "_id"> {
|
|
||||||
ItemId: IOid;
|
|
||||||
}
|
|
||||||
|
|
||||||
export interface IWeaponDatabase {
|
|
||||||
ItemType: string;
|
|
||||||
Configs: IItemConfig[];
|
|
||||||
UpgradeVer?: number;
|
|
||||||
XP?: number;
|
|
||||||
Features?: number;
|
|
||||||
Polarized?: number;
|
|
||||||
Polarity?: IPolarity[];
|
|
||||||
FocusLens?: string;
|
|
||||||
ModSlotPurchases?: number;
|
|
||||||
CustomizationSlotPurchases?: number;
|
|
||||||
UpgradeType?: string;
|
|
||||||
UpgradeFingerprint?: string;
|
|
||||||
ItemName?: string;
|
|
||||||
ModularParts?: string[];
|
|
||||||
UnlockLevel?: number;
|
|
||||||
_id: Types.ObjectId;
|
|
||||||
}
|
|
||||||
|
|
||||||
export interface IOperatorLoadOutSigcol {
|
|
||||||
t0?: number;
|
|
||||||
t1?: number;
|
|
||||||
en?: number;
|
|
||||||
}
|
|
@ -1,7 +1,3 @@
|
|||||||
import { ISuitClient } from "@/src/types/inventoryTypes/SuitTypes";
|
|
||||||
import { IFlavourItem } from "@/src/types/inventoryTypes/inventoryTypes";
|
|
||||||
import { IWeaponClient } from "@/src/types/inventoryTypes/weaponTypes";
|
|
||||||
|
|
||||||
export interface IPurchaseRequest {
|
export interface IPurchaseRequest {
|
||||||
PurchaseParams: IPurchaseParams;
|
PurchaseParams: IPurchaseParams;
|
||||||
buildLabel: string;
|
buildLabel: string;
|
||||||
@ -18,22 +14,7 @@ export interface IPurchaseParams {
|
|||||||
ExpectedPrice: number;
|
ExpectedPrice: number;
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface IPurchaseResponse {
|
export type IInventoryChanges = Record<string, IBinChanges | object[]>;
|
||||||
InventoryChanges: {
|
|
||||||
SuitBin?: IBinChanges;
|
|
||||||
WeaponBin?: IBinChanges;
|
|
||||||
MechBin?: IBinChanges;
|
|
||||||
MechSuits?: ISuitClient[];
|
|
||||||
Suits?: ISuitClient[];
|
|
||||||
LongGuns?: IWeaponClient[];
|
|
||||||
Pistols?: IWeaponClient[];
|
|
||||||
Melee?: IWeaponClient[];
|
|
||||||
PremiumCredits?: number;
|
|
||||||
PremiumCreditsFree?: number;
|
|
||||||
RegularCredits?: number;
|
|
||||||
FlavourItems?: IFlavourItem[];
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
||||||
export type IBinChanges = {
|
export type IBinChanges = {
|
||||||
count: number;
|
count: number;
|
||||||
@ -42,14 +23,6 @@ export type IBinChanges = {
|
|||||||
Extra?: number;
|
Extra?: number;
|
||||||
};
|
};
|
||||||
|
|
||||||
export enum SlotNameToInventoryName {
|
|
||||||
SUIT = "SuitBin",
|
|
||||||
WEAPON = "WeaponBin",
|
|
||||||
MECHSUIT = "MechBin",
|
|
||||||
LOADOUT = "PveBonusLoadoutBin",
|
|
||||||
SENTINEL = "SentinelBin"
|
|
||||||
}
|
|
||||||
|
|
||||||
export type SlotPurchaseName =
|
export type SlotPurchaseName =
|
||||||
| "SuitSlotItem"
|
| "SuitSlotItem"
|
||||||
| "TwoSentinelSlotItem"
|
| "TwoSentinelSlotItem"
|
||||||
|
@ -1,18 +1,16 @@
|
|||||||
import { IOid } from "./commonTypes";
|
import { IOid } from "./commonTypes";
|
||||||
import { IPolarity, FocusSchool } from "@/src/types/inventoryTypes/commonInventoryTypes";
|
import { IPolarity, FocusSchool, IEquipmentClient } from "@/src/types/inventoryTypes/commonInventoryTypes";
|
||||||
import {
|
import {
|
||||||
IBooster,
|
IBooster,
|
||||||
IChallengeProgress,
|
IChallengeProgress,
|
||||||
IConsumable,
|
IConsumable,
|
||||||
ICrewShipSalvagedWeaponSkin,
|
ICrewShipSalvagedWeaponSkin,
|
||||||
|
IEvolutionProgress,
|
||||||
IMiscItem,
|
IMiscItem,
|
||||||
IMission,
|
IMission,
|
||||||
IRawUpgrade,
|
IRawUpgrade,
|
||||||
ISeasonChallengeCompletions,
|
ISeasonChallenge
|
||||||
ISeasonChallengeHistory
|
|
||||||
} from "./inventoryTypes/inventoryTypes";
|
} from "./inventoryTypes/inventoryTypes";
|
||||||
import { IWeaponClient } from "./inventoryTypes/weaponTypes";
|
|
||||||
import { ISuitClient } from "./inventoryTypes/SuitTypes";
|
|
||||||
|
|
||||||
export interface IArtifactsRequest {
|
export interface IArtifactsRequest {
|
||||||
Upgrade: ICrewShipSalvagedWeaponSkin;
|
Upgrade: ICrewShipSalvagedWeaponSkin;
|
||||||
@ -35,18 +33,18 @@ export interface IAffiliationChange {
|
|||||||
|
|
||||||
export interface IUpdateChallengeProgressRequest {
|
export interface IUpdateChallengeProgressRequest {
|
||||||
ChallengeProgress: IChallengeProgress[];
|
ChallengeProgress: IChallengeProgress[];
|
||||||
SeasonChallengeHistory: ISeasonChallengeHistory[];
|
SeasonChallengeHistory: ISeasonChallenge[];
|
||||||
SeasonChallengeCompletions: ISeasonChallengeCompletions[];
|
SeasonChallengeCompletions: ISeasonChallenge[];
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface IMissionInventoryUpdateRequest {
|
export interface IMissionInventoryUpdateRequest {
|
||||||
rewardsMultiplier?: number;
|
rewardsMultiplier?: number;
|
||||||
ActiveBoosters?: IBooster[];
|
ActiveBoosters?: IBooster[];
|
||||||
AffiliationChanges?: IAffiliationChange[];
|
AffiliationChanges?: IAffiliationChange[];
|
||||||
LongGuns?: IWeaponClient[];
|
LongGuns?: IEquipmentClient[];
|
||||||
Pistols?: IWeaponClient[];
|
Pistols?: IEquipmentClient[];
|
||||||
Suits?: ISuitClient[];
|
Suits?: IEquipmentClient[];
|
||||||
Melee?: IWeaponClient[];
|
Melee?: IEquipmentClient[];
|
||||||
RawUpgrades?: IRawUpgrade[];
|
RawUpgrades?: IRawUpgrade[];
|
||||||
MiscItems?: IMiscItem[];
|
MiscItems?: IMiscItem[];
|
||||||
Consumables?: IConsumable[];
|
Consumables?: IConsumable[];
|
||||||
@ -56,6 +54,7 @@ export interface IMissionInventoryUpdateRequest {
|
|||||||
RewardInfo?: IMissionInventoryUpdateRequestRewardInfo;
|
RewardInfo?: IMissionInventoryUpdateRequestRewardInfo;
|
||||||
FusionPoints?: number;
|
FusionPoints?: number;
|
||||||
Missions?: IMission;
|
Missions?: IMission;
|
||||||
|
EvolutionProgress?: IEvolutionProgress[];
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface IMissionInventoryUpdateRequestRewardInfo {
|
export interface IMissionInventoryUpdateRequestRewardInfo {
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
import { IOid } from "@/src/types/commonTypes";
|
import { IOid } from "@/src/types/commonTypes";
|
||||||
import { IItemConfig, IOperatorConfigClient } from "@/src/types/inventoryTypes/commonInventoryTypes";
|
import { IItemConfig, IOperatorConfigClient } from "@/src/types/inventoryTypes/commonInventoryTypes";
|
||||||
import { Types } from "mongoose";
|
import { Types } from "mongoose";
|
||||||
|
import { ILoadoutConfigClient } from "./inventoryTypes/inventoryTypes";
|
||||||
|
|
||||||
export interface ISaveLoadoutRequest {
|
export interface ISaveLoadoutRequest {
|
||||||
LoadOuts: ILoadoutClient;
|
LoadOuts: ILoadoutClient;
|
||||||
@ -32,6 +33,7 @@ export interface ISaveLoadoutRequest {
|
|||||||
CurrentLoadOutIds: IOid[];
|
CurrentLoadOutIds: IOid[];
|
||||||
ValidNewLoadoutId: string;
|
ValidNewLoadoutId: string;
|
||||||
EquippedGear: string[];
|
EquippedGear: string[];
|
||||||
|
UseAdultOperatorLoadout: boolean;
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface ISaveLoadoutRequestNoUpgradeVer extends Omit<ISaveLoadoutRequest, "UpgradeVer"> {}
|
export interface ISaveLoadoutRequestNoUpgradeVer extends Omit<ISaveLoadoutRequest, "UpgradeVer"> {}
|
||||||
@ -72,23 +74,3 @@ export interface ILoadoutEntry {
|
|||||||
export interface ILoadoutConfigDatabase extends Omit<ILoadoutConfigClient, "ItemId"> {
|
export interface ILoadoutConfigDatabase extends Omit<ILoadoutConfigClient, "ItemId"> {
|
||||||
_id: Types.ObjectId;
|
_id: Types.ObjectId;
|
||||||
}
|
}
|
||||||
|
|
||||||
// for request and response from and to client
|
|
||||||
export interface ILoadoutConfigClient {
|
|
||||||
ItemId: IOid;
|
|
||||||
Remove?: boolean; // when client wants to remove a config, it only includes ItemId & Remove.
|
|
||||||
n?: string;
|
|
||||||
PresetIcon?: string;
|
|
||||||
Favorite?: boolean;
|
|
||||||
s?: IEquipmentSelection;
|
|
||||||
p?: IEquipmentSelection;
|
|
||||||
l?: IEquipmentSelection;
|
|
||||||
m?: IEquipmentSelection;
|
|
||||||
}
|
|
||||||
|
|
||||||
export interface IEquipmentSelection {
|
|
||||||
ItemId?: IOid;
|
|
||||||
mod?: number;
|
|
||||||
cus?: number;
|
|
||||||
hide?: boolean;
|
|
||||||
}
|
|
||||||
|
@ -69,6 +69,7 @@ export interface IPlacedDecosDatabase {
|
|||||||
Type: string;
|
Type: string;
|
||||||
Pos: [number, number, number];
|
Pos: [number, number, number];
|
||||||
Rot: [number, number, number];
|
Rot: [number, number, number];
|
||||||
|
Scale: number;
|
||||||
_id: Types.ObjectId;
|
_id: Types.ObjectId;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -100,12 +101,17 @@ export interface IShipDecorationsRequest {
|
|||||||
Rot: [number, number, number];
|
Rot: [number, number, number];
|
||||||
Room: string;
|
Room: string;
|
||||||
IsApartment: boolean;
|
IsApartment: boolean;
|
||||||
RemoveId: string;
|
RemoveId?: string;
|
||||||
|
MoveId?: string;
|
||||||
|
OldRoom?: string;
|
||||||
|
Scale?: number;
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface IShipDecorationsResponse {
|
export interface IShipDecorationsResponse {
|
||||||
DecoId: string;
|
DecoId?: string;
|
||||||
Room: string;
|
Room?: string;
|
||||||
IsApartment: boolean;
|
IsApartment: boolean;
|
||||||
MaxCapacityIncrease?: number;
|
MaxCapacityIncrease?: number;
|
||||||
|
OldRoom?: string;
|
||||||
|
NewRoom?: string;
|
||||||
}
|
}
|
||||||
|
File diff suppressed because it is too large
Load Diff
@ -1249,6 +1249,11 @@
|
|||||||
"Tier": 1,
|
"Tier": 1,
|
||||||
"Tag": "SolNode721"
|
"Tag": "SolNode721"
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"Completes": 1,
|
||||||
|
"Tier": 1,
|
||||||
|
"Tag": "SolNode723"
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"Completes": 1,
|
"Completes": 1,
|
||||||
"Tier": 1,
|
"Tier": 1,
|
||||||
@ -1516,6 +1521,7 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"Completes": 1,
|
"Completes": 1,
|
||||||
|
"Tier": 1,
|
||||||
"Tag": "UranusToNeptuneJunction"
|
"Tag": "UranusToNeptuneJunction"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
@ -1,38 +0,0 @@
|
|||||||
[
|
|
||||||
"/Lotus/Types/Keys/VorsPrize/VorsPrizeQuestKeyChain",
|
|
||||||
"/Lotus/Types/Keys/GlassQuest/GlassQuestKeyChain",
|
|
||||||
"/Lotus/Types/Keys/SolarisQuest/SolarisQuestKeyChain",
|
|
||||||
"/Lotus/Types/Keys/InfestedIntroQuest/InfestedIntroQuestKeyChain",
|
|
||||||
"/Lotus/Types/Keys/KubrowQuest/KubrowQuestKeyChain",
|
|
||||||
"/Lotus/Types/Keys/ArchwingQuest/ArchwingQuestKeyChain",
|
|
||||||
"/Lotus/Types/Keys/GetClemQuest/GetClemQuestKeyChain",
|
|
||||||
"/Lotus/Types/Keys/SpyQuestKeyChain/SpyQuestKeyChain",
|
|
||||||
"/Lotus/Types/Keys/DragonQuest/DragonQuestKeyChain",
|
|
||||||
"/Lotus/Types/Keys/LimboQuest/LimboQuestKeyChain",
|
|
||||||
"/Lotus/Types/Keys/SentientQuest/SentientQuestKeyChain",
|
|
||||||
"/Lotus/Types/Keys/OrokinMoonQuest/OrokinMoonQuestKeyChain",
|
|
||||||
"/Lotus/Types/Keys/MirageQuest/MirageQuestKeyChain",
|
|
||||||
"/Lotus/Types/Keys/WarWithinQuest/WarWithinQuestKeyChain",
|
|
||||||
"/Lotus/Types/Keys/InfestedAladVQuest/InfestedAladVQuestKeyChain",
|
|
||||||
"/Lotus/Types/Keys/GolemQuest/GolemQuestKeyChainItem",
|
|
||||||
"/Lotus/Types/Keys/BardQuest/BardQuestKeyChain",
|
|
||||||
"/Lotus/Types/Keys/FairyQuest/FairyQuestKeyChain",
|
|
||||||
"/Lotus/Types/Keys/IndexQuest/IndexQuestKeyChain",
|
|
||||||
"/Lotus/Types/Keys/PriestFrameQuest/PriestQuestKeyChain",
|
|
||||||
"/Lotus/Types/Keys/ApostasyQuest/ApostasyKeyChain",
|
|
||||||
"/Lotus/Types/Keys/SacrificeQuest/SacrificeQuestKeyChain",
|
|
||||||
"/Lotus/Types/Keys/ChimeraQuest/ChimeraKeyChain",
|
|
||||||
"/Lotus/Types/Keys/MummyQuest/MummyQuestKeyChain",
|
|
||||||
"/Lotus/Types/Keys/RailJackBuildQuest/RailjackBuildQuestKeyChain",
|
|
||||||
"/Lotus/Types/Keys/NewWarIntroQuest/NewWarIntroKeyChain",
|
|
||||||
"/Lotus/Types/Keys/ProteaQuest/ProteaQuestKeyChain",
|
|
||||||
"/Lotus/Types/Keys/RevenantQuest/RevenantQuestKeyChain",
|
|
||||||
"/Lotus/Types/Keys/InfestedMicroplanetQuest/InfestedMicroplanetQuestKeyChain",
|
|
||||||
"/Lotus/Types/Keys/WraithQuest/WraithQuestKeyChain",
|
|
||||||
"/Lotus/Types/Keys/YareliQuest/YareliQuestKeyChain",
|
|
||||||
"/Lotus/Types/Keys/NewWarQuest/NewWarQuestKeyChain",
|
|
||||||
"/Lotus/Types/Keys/ZarimanQuest/ZarimanQuestKeyChain",
|
|
||||||
"/Lotus/Types/Keys/KahlQuest/KahlQuestKeyChain",
|
|
||||||
"/Lotus/Types/Keys/DuviriQuest/DuviriQuestKeyChain",
|
|
||||||
"/Lotus/Types/Keys/EntratiLab/EntratiQuestKeyChain"
|
|
||||||
]
|
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
301
static/fixed_responses/getVendorInfo.json
Normal file
301
static/fixed_responses/getVendorInfo.json
Normal file
@ -0,0 +1,301 @@
|
|||||||
|
{
|
||||||
|
"VendorInfo": {
|
||||||
|
"_id": {
|
||||||
|
"$oid": "598a090d9a4a313746fd1f24"
|
||||||
|
},
|
||||||
|
"TypeName": "/Lotus/Types/Game/VendorManifests/Ostron/MaskSalesmanManifest",
|
||||||
|
"ItemManifest": [
|
||||||
|
{
|
||||||
|
"StoreItem": "/Lotus/StoreItems/Upgrades/Skins/Ostron/RevenantMask",
|
||||||
|
"ItemPrices": [
|
||||||
|
{
|
||||||
|
"ItemCount": 1,
|
||||||
|
"ItemType": "/Lotus/Types/Gameplay/Eidolon/Resources/CetusWispItem",
|
||||||
|
"ProductCategory": "MiscItems"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"Bin": "BIN_0",
|
||||||
|
"QuantityMultiplier": 1,
|
||||||
|
"Expiry": {
|
||||||
|
"$date": {
|
||||||
|
"$numberLong": "9999999000000"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"AllowMultipurchase": true,
|
||||||
|
"Id": {
|
||||||
|
"$oid": "63ed01ef4c37f93d0b797674"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"StoreItem": "/Lotus/StoreItems/Types/Items/ShipDecos/Plushies/PlushyThumper",
|
||||||
|
"ItemPrices": [
|
||||||
|
{
|
||||||
|
"ItemCount": 2,
|
||||||
|
"ItemType": "/Lotus/Types/Gameplay/Eidolon/Resources/CetusWispItem",
|
||||||
|
"ProductCategory": "MiscItems"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"ItemType": "/Lotus/Types/Items/Fish/Eidolon/FishParts/BothUncommonFishBPartItem",
|
||||||
|
"ItemCount": 10,
|
||||||
|
"ProductCategory": "MiscItems"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"ItemType": "/Lotus/Types/Gameplay/Eidolon/Resources/NistlebrushItem",
|
||||||
|
"ItemCount": 10,
|
||||||
|
"ProductCategory": "MiscItems"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"ItemType": "/Lotus/Types/Items/Gems/Eidolon/CommonOreAAlloyAItem",
|
||||||
|
"ItemCount": 32,
|
||||||
|
"ProductCategory": "MiscItems"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"Bin": "BIN_0",
|
||||||
|
"QuantityMultiplier": 1,
|
||||||
|
"Expiry": {
|
||||||
|
"$date": {
|
||||||
|
"$numberLong": "9999999000000"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"AllowMultipurchase": true,
|
||||||
|
"Id": {
|
||||||
|
"$oid": "63ed01ef4c37f93d0b797675"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"StoreItem": "/Lotus/StoreItems/Types/Items/ShipDecos/Plushies/PlushyThumperMedium",
|
||||||
|
"ItemPrices": [
|
||||||
|
{
|
||||||
|
"ItemCount": 4,
|
||||||
|
"ItemType": "/Lotus/Types/Gameplay/Eidolon/Resources/CetusWispItem",
|
||||||
|
"ProductCategory": "MiscItems"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"ItemType": "/Lotus/Types/Items/Gems/Eidolon/CommonGemBCutAItem",
|
||||||
|
"ItemCount": 24,
|
||||||
|
"ProductCategory": "MiscItems"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"ItemType": "/Lotus/Types/Items/Fish/Eidolon/FishParts/BothUncommonFishAPartItem",
|
||||||
|
"ItemCount": 18,
|
||||||
|
"ProductCategory": "MiscItems"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"ItemType": "/Lotus/Types/Items/Fish/Eidolon/FishParts/BothUncommonFishBPartItem",
|
||||||
|
"ItemCount": 27,
|
||||||
|
"ProductCategory": "MiscItems"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"Bin": "BIN_1",
|
||||||
|
"QuantityMultiplier": 1,
|
||||||
|
"Expiry": {
|
||||||
|
"$date": {
|
||||||
|
"$numberLong": "9999999000000"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"AllowMultipurchase": true,
|
||||||
|
"Id": {
|
||||||
|
"$oid": "63ed01ef4c37f93d0b797676"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"StoreItem": "/Lotus/StoreItems/Types/Items/ShipDecos/Plushies/PlushyThumperLarge",
|
||||||
|
"ItemPrices": [
|
||||||
|
{
|
||||||
|
"ItemCount": 6,
|
||||||
|
"ItemType": "/Lotus/Types/Gameplay/Eidolon/Resources/CetusWispItem",
|
||||||
|
"ProductCategory": "MiscItems"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"ItemType": "/Lotus/Types/Items/Gems/Eidolon/CommonGemACutAItem",
|
||||||
|
"ItemCount": 35,
|
||||||
|
"ProductCategory": "MiscItems"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"ItemType": "/Lotus/Types/Items/Fish/Eidolon/FishParts/BothCommonFishAPartItem",
|
||||||
|
"ItemCount": 95,
|
||||||
|
"ProductCategory": "MiscItems"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"ItemType": "/Lotus/Types/Gameplay/Eidolon/Resources/NistlebrushItem",
|
||||||
|
"ItemCount": 60,
|
||||||
|
"ProductCategory": "MiscItems"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"Bin": "BIN_0",
|
||||||
|
"QuantityMultiplier": 1,
|
||||||
|
"Expiry": {
|
||||||
|
"$date": {
|
||||||
|
"$numberLong": "9999999000000"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"AllowMultipurchase": true,
|
||||||
|
"Id": {
|
||||||
|
"$oid": "63ed01ef4c37f93d0b797677"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"StoreItem": "/Lotus/StoreItems/Types/Recipes/SynthicatorRecipes/FlareBlueBlueprint",
|
||||||
|
"ItemPrices": [
|
||||||
|
{
|
||||||
|
"ItemType": "/Lotus/Types/Items/Fish/Eidolon/FishParts/BothUncommonFishBPartItem",
|
||||||
|
"ItemCount": 10,
|
||||||
|
"ProductCategory": "MiscItems"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"ItemType": "/Lotus/Types/Items/Fish/Eidolon/FishParts/DayCommonFishCPartItem",
|
||||||
|
"ItemCount": 10,
|
||||||
|
"ProductCategory": "MiscItems"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"Bin": "BIN_0",
|
||||||
|
"QuantityMultiplier": 1,
|
||||||
|
"Expiry": {
|
||||||
|
"$date": {
|
||||||
|
"$numberLong": "9999999000000"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"AllowMultipurchase": true,
|
||||||
|
"Id": {
|
||||||
|
"$oid": "6651291214e90115b91b50a1"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"StoreItem": "/Lotus/StoreItems/Types/Recipes/SynthicatorRecipes/FlareRedBlueprint",
|
||||||
|
"ItemPrices": [
|
||||||
|
{
|
||||||
|
"ItemType": "/Lotus/Types/Items/Gems/Eidolon/CommonOreAAlloyAItem",
|
||||||
|
"ItemCount": 37,
|
||||||
|
"ProductCategory": "MiscItems"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"ItemType": "/Lotus/Types/Items/Fish/Eidolon/FishParts/BothUncommonFishAPartItem",
|
||||||
|
"ItemCount": 7,
|
||||||
|
"ProductCategory": "MiscItems"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"Bin": "BIN_0",
|
||||||
|
"QuantityMultiplier": 1,
|
||||||
|
"Expiry": {
|
||||||
|
"$date": {
|
||||||
|
"$numberLong": "9999999000000"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"AllowMultipurchase": true,
|
||||||
|
"Id": {
|
||||||
|
"$oid": "6651291214e90115b91b50a2"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"StoreItem": "/Lotus/StoreItems/Upgrades/Skins/Ostron/VoltMask",
|
||||||
|
"ItemPrices": [
|
||||||
|
{
|
||||||
|
"ItemType": "/Lotus/Types/Items/Gems/Eidolon/CommonOreBAlloyBItem",
|
||||||
|
"ItemCount": 34,
|
||||||
|
"ProductCategory": "MiscItems"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"ItemType": "/Lotus/Types/Gameplay/Eidolon/Resources/GrokdrulItem",
|
||||||
|
"ItemCount": 17,
|
||||||
|
"ProductCategory": "MiscItems"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"Bin": "BIN_0",
|
||||||
|
"QuantityMultiplier": 1,
|
||||||
|
"Expiry": {
|
||||||
|
"$date": {
|
||||||
|
"$numberLong": "9999999000000"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"AllowMultipurchase": true,
|
||||||
|
"Id": {
|
||||||
|
"$oid": "6651291214e90115b91b50a3"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"StoreItem": "/Lotus/StoreItems/Upgrades/Skins/Ostron/MagMask",
|
||||||
|
"ItemPrices": [
|
||||||
|
{
|
||||||
|
"ItemType": "/Lotus/Types/Items/Fish/Eidolon/FishParts/DayCommonFishBPartItem",
|
||||||
|
"ItemCount": 16,
|
||||||
|
"ProductCategory": "MiscItems"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"ItemType": "/Lotus/Types/Gameplay/Eidolon/Resources/ForestRodentPartItem",
|
||||||
|
"ItemCount": 5,
|
||||||
|
"ProductCategory": "MiscItems"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"Bin": "BIN_0",
|
||||||
|
"QuantityMultiplier": 1,
|
||||||
|
"Expiry": {
|
||||||
|
"$date": {
|
||||||
|
"$numberLong": "9999999000000"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"AllowMultipurchase": true,
|
||||||
|
"Id": {
|
||||||
|
"$oid": "6651291214e90115b91b50a4"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"StoreItem": "/Lotus/StoreItems/Upgrades/Skins/Ostron/ExcaliburMask",
|
||||||
|
"ItemPrices": [
|
||||||
|
{
|
||||||
|
"ItemType": "/Lotus/Types/Gameplay/Eidolon/Resources/BirdOfPreyPartItem",
|
||||||
|
"ItemCount": 5,
|
||||||
|
"ProductCategory": "MiscItems"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"ItemType": "/Lotus/Types/Gameplay/Eidolon/Resources/GrokdrulItem",
|
||||||
|
"ItemCount": 20,
|
||||||
|
"ProductCategory": "MiscItems"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"Bin": "BIN_0",
|
||||||
|
"QuantityMultiplier": 1,
|
||||||
|
"Expiry": {
|
||||||
|
"$date": {
|
||||||
|
"$numberLong": "9999999000000"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"AllowMultipurchase": true,
|
||||||
|
"Id": {
|
||||||
|
"$oid": "6651291214e90115b91b50a5"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"StoreItem": "/Lotus/StoreItems/Upgrades/Skins/Ostron/GrineerMask",
|
||||||
|
"ItemPrices": [
|
||||||
|
{
|
||||||
|
"ItemType": "/Lotus/Types/Items/Fish/Eidolon/FishParts/DayCommonFishBPartItem",
|
||||||
|
"ItemCount": 20,
|
||||||
|
"ProductCategory": "MiscItems"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"ItemType": "/Lotus/Types/Items/Gems/Eidolon/CommonOreAAlloyAItem",
|
||||||
|
"ItemCount": 31,
|
||||||
|
"ProductCategory": "MiscItems"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"Bin": "BIN_1",
|
||||||
|
"QuantityMultiplier": 1,
|
||||||
|
"Expiry": {
|
||||||
|
"$date": {
|
||||||
|
"$numberLong": "9999999000000"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"AllowMultipurchase": true,
|
||||||
|
"Id": {
|
||||||
|
"$oid": "6651291214e90115b91b50a6"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"PropertyTextHash": "6AACA376DA34B35B5C16F1B40DBC017D",
|
||||||
|
"Expiry": {
|
||||||
|
"$date": {
|
||||||
|
"$numberLong": "9999999000000"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
@ -2,66 +2,82 @@
|
|||||||
"SaleInfos": [
|
"SaleInfos": [
|
||||||
{
|
{
|
||||||
"Name": "Ostron",
|
"Name": "Ostron",
|
||||||
"Expiry": { "$date": { "$numberLong": "1683586800000" } },
|
"Expiry": {
|
||||||
"Revision": 3045,
|
"$date": {
|
||||||
|
"$numberLong": "9999999900000"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"Revision": 3453,
|
||||||
"Weapons": [
|
"Weapons": [
|
||||||
{
|
{
|
||||||
"ItemType": "/Lotus/Weapons/Ostron/Melee/LotusModularWeapon",
|
"ItemType": "/Lotus/Weapons/Ostron/Melee/LotusModularWeapon",
|
||||||
"PremiumPrice": 171,
|
"PremiumPrice": 162,
|
||||||
"ModularParts": [
|
"ModularParts": [
|
||||||
"/Lotus/Weapons/Ostron/Melee/ModularMelee01/Handle/HandleFive",
|
"/Lotus/Weapons/Ostron/Melee/ModularMelee01/Handle/HandleFive",
|
||||||
"/Lotus/Weapons/Ostron/Melee/ModularMelee01/Tip/TipSix",
|
"/Lotus/Weapons/Ostron/Melee/ModularMelee01/Tip/TipFour",
|
||||||
"/Lotus/Weapons/Ostron/Melee/ModularMelee01/Balance/BalanceDamageICritII"
|
"/Lotus/Weapons/Ostron/Melee/ModularMelee01/Balance/BalanceSpeedICritII"
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"Name": "SolarisUnitedHoverboard",
|
"Name": "SolarisUnitedHoverboard",
|
||||||
"Expiry": { "$date": { "$numberLong": "1683586800000" } },
|
"Expiry": {
|
||||||
"Revision": 1650,
|
"$date": {
|
||||||
|
"$numberLong": "9999999900000"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"Revision": 2058,
|
||||||
"Weapons": [
|
"Weapons": [
|
||||||
{
|
{
|
||||||
"ItemType": "/Lotus/Types/Vehicles/Hoverboard/HoverboardSuit",
|
"ItemType": "/Lotus/Types/Vehicles/Hoverboard/HoverboardSuit",
|
||||||
"PremiumPrice": 51,
|
"PremiumPrice": 51,
|
||||||
"ModularParts": [
|
"ModularParts": [
|
||||||
"/Lotus/Types/Vehicles/Hoverboard/HoverboardParts/PartComponents/HoverboardCorpusC/HoverboardCorpusCDeck",
|
"/Lotus/Types/Vehicles/Hoverboard/HoverboardParts/PartComponents/HoverboardSolarisA/HoverboardSolarisADeck",
|
||||||
"/Lotus/Types/Vehicles/Hoverboard/HoverboardParts/PartComponents/HoverboardCorpusC/HoverboardCorpusCEngine",
|
"/Lotus/Types/Vehicles/Hoverboard/HoverboardParts/PartComponents/HoverboardCorpusA/HoverboardCorpusAEngine",
|
||||||
"/Lotus/Types/Vehicles/Hoverboard/HoverboardParts/PartComponents/HoverboardCorpusB/HoverboardCorpusBFront",
|
"/Lotus/Types/Vehicles/Hoverboard/HoverboardParts/PartComponents/HoverboardSolarisA/HoverboardSolarisAFront",
|
||||||
"/Lotus/Types/Vehicles/Hoverboard/HoverboardParts/PartComponents/HoverboardCorpusC/HoverboardCorpusCJet"
|
"/Lotus/Types/Vehicles/Hoverboard/HoverboardParts/PartComponents/HoverboardCorpusB/HoverboardCorpusBJet"
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"Name": "SolarisUnitedMoaPet",
|
"Name": "SolarisUnitedMoaPet",
|
||||||
"Expiry": { "$date": { "$numberLong": "1683586800000" } },
|
"Expiry": {
|
||||||
"Revision": 1650,
|
"$date": {
|
||||||
|
"$numberLong": "9999999900000"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"Revision": 2058,
|
||||||
"Weapons": [
|
"Weapons": [
|
||||||
{
|
{
|
||||||
"ItemType": "/Lotus/Types/Friendly/Pets/MoaPets/MoaPetPowerSuit",
|
"ItemType": "/Lotus/Types/Friendly/Pets/MoaPets/MoaPetPowerSuit",
|
||||||
"PremiumPrice": 175,
|
"PremiumPrice": 180,
|
||||||
"ModularParts": [
|
"ModularParts": [
|
||||||
"/Lotus/Types/Friendly/Pets/MoaPets/MoaPetParts/MoaPetLegC",
|
"/Lotus/Types/Friendly/Pets/MoaPets/MoaPetParts/MoaPetLegB",
|
||||||
"/Lotus/Types/Friendly/Pets/MoaPets/MoaPetParts/MoaPetHeadOloro",
|
"/Lotus/Types/Friendly/Pets/MoaPets/MoaPetParts/MoaPetHeadPara",
|
||||||
"/Lotus/Types/Friendly/Pets/MoaPets/MoaPetParts/MoaPetEngineKrisys",
|
"/Lotus/Types/Friendly/Pets/MoaPets/MoaPetParts/MoaPetEngineArcotek",
|
||||||
"/Lotus/Types/Friendly/Pets/MoaPets/MoaPetParts/MoaPetPayloadThermocor"
|
"/Lotus/Types/Friendly/Pets/MoaPets/MoaPetParts/MoaPetPayloadMunitron"
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"Name": "SolarisUnitedKitGun",
|
"Name": "SolarisUnitedKitGun",
|
||||||
"Expiry": { "$date": { "$numberLong": "1683586800000" } },
|
"Expiry": {
|
||||||
"Revision": 1650,
|
"$date": {
|
||||||
|
"$numberLong": "9999999900000"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"Revision": 2058,
|
||||||
"Weapons": [
|
"Weapons": [
|
||||||
{
|
{
|
||||||
"ItemType": "/Lotus/Weapons/SolarisUnited/Primary/LotusModularPrimaryBeam",
|
"ItemType": "/Lotus/Weapons/SolarisUnited/Secondary/LotusModularSecondary",
|
||||||
"PremiumPrice": 157,
|
"PremiumPrice": 184,
|
||||||
"ModularParts": [
|
"ModularParts": [
|
||||||
"/Lotus/Weapons/SolarisUnited/Primary/SUModularPrimarySet1/Handles/SUModularPrimaryHandleAPart",
|
"/Lotus/Weapons/SolarisUnited/Secondary/SUModularSecondarySet1/Handle/SUModularSecondaryHandleCPart",
|
||||||
"/Lotus/Weapons/SolarisUnited/Secondary/SUModularSecondarySet1/Barrel/SUModularSecondaryBarrelDPart",
|
"/Lotus/Weapons/SolarisUnited/Secondary/SUModularSecondarySet1/Barrel/SUModularSecondaryBarrelBPart",
|
||||||
"/Lotus/Weapons/SolarisUnited/Secondary/SUModularSecondarySet1/Clip/SUModularCritIReloadIIClipPart"
|
"/Lotus/Weapons/SolarisUnited/Secondary/SUModularSecondarySet1/Clip/SUModularStatIReloadIIClipPart"
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
@ -96,8 +96,8 @@
|
|||||||
</div>
|
</div>
|
||||||
<div data-route="/webui/inventory" data-title="Inventory | OpenWF WebUI">
|
<div data-route="/webui/inventory" data-title="Inventory | OpenWF WebUI">
|
||||||
<p id="refresh-note" class="mb-4">
|
<p id="refresh-note" class="mb-4">
|
||||||
Note: Changes made here will only be reflected in-game when the game re-downloads your inventory.
|
Note: Changes made here will only be reflected in-game when the game re-downloads your
|
||||||
Visiting the navigation should be the easiest way to trigger that.
|
inventory. Visiting the navigation should be the easiest way to trigger that.
|
||||||
</p>
|
</p>
|
||||||
<div class="card mb-4">
|
<div class="card mb-4">
|
||||||
<h5 class="card-header">Add Items</h5>
|
<h5 class="card-header">Add Items</h5>
|
||||||
@ -144,8 +144,8 @@
|
|||||||
</div>
|
</div>
|
||||||
<div data-route="/webui/mods" data-title="Mods | OpenWF WebUI">
|
<div data-route="/webui/mods" data-title="Mods | OpenWF WebUI">
|
||||||
<p id="refresh-note" class="mb-4">
|
<p id="refresh-note" class="mb-4">
|
||||||
Note: Changes made here will only be reflected in-game when the game re-downloads your inventory.
|
Note: Changes made here will only be reflected in-game when the game re-downloads your
|
||||||
Visiting the navigation should be the easiest way to trigger that.
|
inventory. Visiting the navigation should be the easiest way to trigger that.
|
||||||
</p>
|
</p>
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-xxl-6">
|
<div class="col-xxl-6">
|
||||||
@ -204,60 +204,63 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div data-route="/webui/settings" data-title="Settings | OpenWF WebUI">
|
<div data-route="/webui/settings" data-title="Settings | OpenWF WebUI">
|
||||||
<div class="card mb-4">
|
<form onsubmit="doChangeSettings();return false;">
|
||||||
<h5 class="card-header">Change Settings</h5>
|
<div class="form-check">
|
||||||
<form class="card-body" onsubmit="doChangeSettings();return false;">
|
<input class="form-check-input" type="checkbox" id="skipStoryModeChoice" />
|
||||||
<div class="form-check">
|
<label class="form-check-label" for="skipStoryModeChoice">Skip Story Mode Choice</label>
|
||||||
<input class="form-check-input" type="checkbox" value="" id="skipStoryModeChoice" />
|
</div>
|
||||||
<label label class="form-check-label" for="skipStoryModeChoice">Skip Story Mode Choice?</label>
|
<div class="form-check">
|
||||||
</div>
|
<input class="form-check-input" type="checkbox" id="skipTutorial" />
|
||||||
<div class="form-check">
|
<label class="form-check-label" for="skipTutorial">Skip Tutorial</label>
|
||||||
<input class="form-check-input" type="checkbox" value="" id="skipTutorial" />
|
</div>
|
||||||
<label label class="form-check-label" for="skipTutorial">Skip Tutorial?</label>
|
<div class="form-check">
|
||||||
</div>
|
<input class="form-check-input" type="checkbox" id="unlockAllScans" />
|
||||||
<div class="form-check">
|
<label class="form-check-label" for="unlockAllScans">Unlock All Scans</label>
|
||||||
<input class="form-check-input" type="checkbox" value="" id="unlockAllScans" />
|
</div>
|
||||||
<label label class="form-check-label" for="unlockAllScans">Unlock All Scans?</label>
|
<div class="form-check">
|
||||||
</div>
|
<input class="form-check-input" type="checkbox" id="unlockAllMissions" />
|
||||||
<div class="form-check">
|
<label class="form-check-label" for="unlockAllMissions">Unlock All Missions</label>
|
||||||
<input class="form-check-input" type="checkbox" value="" id="unlockAllMissions" />
|
</div>
|
||||||
<label label class="form-check-label" for="unlockAllMissions">Unlock All Missions?</label>
|
<div class="form-check">
|
||||||
</div>
|
<input class="form-check-input" type="checkbox" id="unlockAllQuests" />
|
||||||
<div class="form-check">
|
<label class="form-check-label" for="unlockAllQuests">Unlock All Quests</label>
|
||||||
<input class="form-check-input" type="checkbox" value="" id="unlockAllQuests" />
|
</div>
|
||||||
<label label class="form-check-label" for="unlockAllQuests">Unlock All Quests?</label>
|
<div class="form-check">
|
||||||
</div>
|
<input class="form-check-input" type="checkbox" id="completeAllQuests" />
|
||||||
<div class="form-check">
|
<label class="form-check-label" for="completeAllQuests">Complete All Quests</label>
|
||||||
<input class="form-check-input" type="checkbox" value="" id="completeAllQuests" />
|
</div>
|
||||||
<label label class="form-check-label" for="completeAllQuests">Complete All Quests?</label>
|
<div class="form-check">
|
||||||
</div>
|
<input class="form-check-input" type="checkbox" id="infiniteResources" />
|
||||||
<div class="form-check">
|
<label class="form-check-label" for="infiniteResources"
|
||||||
<input class="form-check-input" type="checkbox" value="" id="infiniteResources" />
|
>Infinite Credits and Platinum</label
|
||||||
<label label class="form-check-label" for="infiniteResources">Infinite Credits and Platinum?</label>
|
>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-check">
|
<div class="form-check">
|
||||||
<input class="form-check-input" type="checkbox" value="" id="unlockallShipFeatures" />
|
<input class="form-check-input" type="checkbox" id="unlockAllShipFeatures" />
|
||||||
<label label class="form-check-label" for="unlockallShipFeatures">Unlock All Ship Features?</label>
|
<label class="form-check-label" for="unlockAllShipFeatures">Unlock All Ship Features</label>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-check">
|
<div class="form-check">
|
||||||
<input class="form-check-input" type="checkbox" value="" id="unlockAllShipDecorations" />
|
<input class="form-check-input" type="checkbox" id="unlockAllShipDecorations" />
|
||||||
<label label class="form-check-label" for="unlockAllShipDecorations">Unlock All Ship Decorations?</label>
|
<label class="form-check-label" for="unlockAllShipDecorations"
|
||||||
</div>
|
>Unlock All Ship Decorations</label
|
||||||
<div class="form-check">
|
>
|
||||||
<input class="form-check-input" type="checkbox" value="" id="unlockAllFlavourItems" />
|
</div>
|
||||||
<label label class="form-check-label" for="unlockAllFlavourItems">Unlock All Accessories?</label>
|
<div class="form-check">
|
||||||
</div>
|
<input class="form-check-input" type="checkbox" id="unlockAllFlavourItems" />
|
||||||
<div class="form-check">
|
<label class="form-check-label" for="unlockAllFlavourItems">Unlock All Accessories</label>
|
||||||
<input class="form-check-input" type="checkbox" value="" id="unlockAllSkins" />
|
</div>
|
||||||
<label label class="form-check-label" for="unlockAllSkins">Unlock All Skins?</label>
|
<div class="form-check">
|
||||||
</div>
|
<input class="form-check-input" type="checkbox" id="unlockAllSkins" />
|
||||||
<div class="form-check">
|
<label class="form-check-label" for="unlockAllSkins">Unlock All Skins</label>
|
||||||
<label label class="form-check-label" for="spoofMasteryRank">Spoofed Mastery Rank (-1 to disable)</label>
|
</div>
|
||||||
<input class="form-control" id="spoofMasteryRank" type="number" min="-1" value="" />
|
<div class="form-group">
|
||||||
</div>
|
<label class="form-label" for="spoofMasteryRank"
|
||||||
<button class="btn btn-primary" type="submit">Save Settings</button>
|
>Spoofed Mastery Rank (-1 to disable)</label
|
||||||
</form>
|
>
|
||||||
</div>
|
<input class="form-control" id="spoofMasteryRank" type="number" min="-1" />
|
||||||
|
</div>
|
||||||
|
<button class="btn btn-primary mt-3" type="submit">Save Settings</button>
|
||||||
|
</form>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -95,6 +95,12 @@ window.itemListPromise = new Promise(resolve => {
|
|||||||
"/Lotus/Weapons/Tenno/Pistol/LotusPistol": { name: "Pistol" },
|
"/Lotus/Weapons/Tenno/Pistol/LotusPistol": { name: "Pistol" },
|
||||||
"/Lotus/Weapons/Tenno/Rifle/LotusRifle": { name: "Rifle" },
|
"/Lotus/Weapons/Tenno/Rifle/LotusRifle": { name: "Rifle" },
|
||||||
"/Lotus/Weapons/Tenno/Shotgun/LotusShotgun": { name: "Shotgun" },
|
"/Lotus/Weapons/Tenno/Shotgun/LotusShotgun": { name: "Shotgun" },
|
||||||
|
// Modular weapons
|
||||||
|
"/Lotus/Weapons/SolarisUnited/Primary/LotusModularPrimaryBeam": { name: "Kitgun" },
|
||||||
|
"/Lotus/Weapons/SolarisUnited/Secondary/LotusModularSecondary": { name: "Kitgun" },
|
||||||
|
"/Lotus/Weapons/SolarisUnited/Secondary/LotusModularSecondaryBeam": { name: "Kitgun" },
|
||||||
|
"/Lotus/Weapons/SolarisUnited/Secondary/LotusModularSecondaryShotgun": { name: "Kitgun" },
|
||||||
|
"/Lotus/Weapons/Ostron/Melee/LotusModularWeapon": { name: "Zaw" },
|
||||||
// Missing in data sources
|
// Missing in data sources
|
||||||
"/Lotus/Upgrades/CosmeticEnhancers/Peculiars/CyoteMod": { name: "Traumatic Peculiar" }
|
"/Lotus/Upgrades/CosmeticEnhancers/Peculiars/CyoteMod": { name: "Traumatic Peculiar" }
|
||||||
};
|
};
|
||||||
@ -103,10 +109,7 @@ window.itemListPromise = new Promise(resolve => {
|
|||||||
items.forEach(item => {
|
items.forEach(item => {
|
||||||
if (item.uniqueName in data.badItems) {
|
if (item.uniqueName in data.badItems) {
|
||||||
item.name += " (Imposter)";
|
item.name += " (Imposter)";
|
||||||
} else if (
|
} else if (item.uniqueName.substr(0, 18) != "/Lotus/Types/Game/") {
|
||||||
item.uniqueName.substr(0, 18) != "/Lotus/Types/Game/" &&
|
|
||||||
item.uniqueName.substr(0, 18) != "/Lotus/StoreItems/"
|
|
||||||
) {
|
|
||||||
const option = document.createElement("option");
|
const option = document.createElement("option");
|
||||||
option.setAttribute("data-key", item.uniqueName);
|
option.setAttribute("data-key", item.uniqueName);
|
||||||
option.value = item.name;
|
option.value = item.name;
|
||||||
@ -121,7 +124,7 @@ window.itemListPromise = new Promise(resolve => {
|
|||||||
});
|
});
|
||||||
|
|
||||||
function updateInventory() {
|
function updateInventory() {
|
||||||
const req = $.get("/api/inventory.php?" + window.authz);
|
const req = $.get("/api/inventory.php?" + window.authz + "&xpBasedLevelCapDisabled=1");
|
||||||
req.done(data => {
|
req.done(data => {
|
||||||
window.itemListPromise.then(itemMap => {
|
window.itemListPromise.then(itemMap => {
|
||||||
document.getElementById("warframe-list").innerHTML = "";
|
document.getElementById("warframe-list").innerHTML = "";
|
||||||
@ -130,6 +133,9 @@ function updateInventory() {
|
|||||||
{
|
{
|
||||||
const td = document.createElement("td");
|
const td = document.createElement("td");
|
||||||
td.textContent = itemMap[item.ItemType]?.name ?? item.ItemType;
|
td.textContent = itemMap[item.ItemType]?.name ?? item.ItemType;
|
||||||
|
if (item.ItemName) {
|
||||||
|
td.textContent = item.ItemName + " (" + td.textContent + ")";
|
||||||
|
}
|
||||||
tr.appendChild(td);
|
tr.appendChild(td);
|
||||||
}
|
}
|
||||||
{
|
{
|
||||||
@ -142,12 +148,21 @@ function updateInventory() {
|
|||||||
event.preventDefault();
|
event.preventDefault();
|
||||||
addGearExp("Suits", item.ItemId.$oid, 1_600_000 - item.XP);
|
addGearExp("Suits", item.ItemId.$oid, 1_600_000 - item.XP);
|
||||||
};
|
};
|
||||||
a.textContent = "Make Rank 30";
|
a.title = "Make Rank 30";
|
||||||
|
a.innerHTML = `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 384 512"><!--!Font Awesome Free 6.5.2 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free Copyright 2024 Fonticons, Inc.--><path d="M214.6 41.4c-12.5-12.5-32.8-12.5-45.3 0l-160 160c-12.5 12.5-12.5 32.8 0 45.3s32.8 12.5 45.3 0L160 141.2V448c0 17.7 14.3 32 32 32s32-14.3 32-32V141.2L329.4 246.6c12.5 12.5 32.8 12.5 45.3 0s12.5-32.8 0-45.3l-160-160z"/></svg>`;
|
||||||
|
td.appendChild(a);
|
||||||
|
}
|
||||||
|
{
|
||||||
|
const a = document.createElement("a");
|
||||||
|
a.href = "#";
|
||||||
|
a.onclick = function (event) {
|
||||||
|
event.preventDefault();
|
||||||
|
const name = prompt("Enter new custom name:");
|
||||||
|
renameGear("Suits", item.ItemId.$oid, name);
|
||||||
|
};
|
||||||
|
a.title = "Rename";
|
||||||
|
a.innerHTML = `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 448 512"><!--!Font Awesome Free 6.5.2 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free Copyright 2024 Fonticons, Inc.--><path d="M0 80V229.5c0 17 6.7 33.3 18.7 45.3l176 176c25 25 65.5 25 90.5 0L418.7 317.3c25-25 25-65.5 0-90.5l-176-176c-12-12-28.3-18.7-45.3-18.7H48C21.5 32 0 53.5 0 80zm112 32a32 32 0 1 1 0 64 32 32 0 1 1 0-64z"/></svg>`;
|
||||||
td.appendChild(a);
|
td.appendChild(a);
|
||||||
|
|
||||||
const span = document.createElement("span");
|
|
||||||
span.innerHTML = " · ";
|
|
||||||
td.appendChild(span);
|
|
||||||
}
|
}
|
||||||
{
|
{
|
||||||
const a = document.createElement("a");
|
const a = document.createElement("a");
|
||||||
@ -156,7 +171,8 @@ function updateInventory() {
|
|||||||
event.preventDefault();
|
event.preventDefault();
|
||||||
disposeOfGear("Suits", item.ItemId.$oid);
|
disposeOfGear("Suits", item.ItemId.$oid);
|
||||||
};
|
};
|
||||||
a.textContent = "Remove";
|
a.title = "Remove";
|
||||||
|
a.innerHTML = `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 448 512"><!--!Font Awesome Free 6.5.2 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free Copyright 2024 Fonticons, Inc.--><path d="M135.2 17.7L128 32H32C14.3 32 0 46.3 0 64S14.3 96 32 96H416c17.7 0 32-14.3 32-32s-14.3-32-32-32H320l-7.2-14.3C307.4 6.8 296.3 0 284.2 0H163.8c-12.1 0-23.2 6.8-28.6 17.7zM416 128H32L53.2 467c1.6 25.3 22.6 45 47.9 45H346.9c25.3 0 46.3-19.7 47.9-45L416 128z"/></svg>`;
|
||||||
td.appendChild(a);
|
td.appendChild(a);
|
||||||
}
|
}
|
||||||
tr.appendChild(td);
|
tr.appendChild(td);
|
||||||
@ -171,6 +187,9 @@ function updateInventory() {
|
|||||||
{
|
{
|
||||||
const td = document.createElement("td");
|
const td = document.createElement("td");
|
||||||
td.textContent = itemMap[item.ItemType]?.name ?? item.ItemType;
|
td.textContent = itemMap[item.ItemType]?.name ?? item.ItemType;
|
||||||
|
if (item.ItemName) {
|
||||||
|
td.textContent = item.ItemName + " (" + td.textContent + ")";
|
||||||
|
}
|
||||||
tr.appendChild(td);
|
tr.appendChild(td);
|
||||||
}
|
}
|
||||||
{
|
{
|
||||||
@ -183,12 +202,21 @@ function updateInventory() {
|
|||||||
event.preventDefault();
|
event.preventDefault();
|
||||||
addGearExp(category, item.ItemId.$oid, 800_000 - item.XP);
|
addGearExp(category, item.ItemId.$oid, 800_000 - item.XP);
|
||||||
};
|
};
|
||||||
a.textContent = "Make Rank 30";
|
a.title = "Make Rank 30";
|
||||||
|
a.innerHTML = `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 384 512"><!--!Font Awesome Free 6.5.2 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free Copyright 2024 Fonticons, Inc.--><path d="M214.6 41.4c-12.5-12.5-32.8-12.5-45.3 0l-160 160c-12.5 12.5-12.5 32.8 0 45.3s32.8 12.5 45.3 0L160 141.2V448c0 17.7 14.3 32 32 32s32-14.3 32-32V141.2L329.4 246.6c12.5 12.5 32.8 12.5 45.3 0s12.5-32.8 0-45.3l-160-160z"/></svg>`;
|
||||||
|
td.appendChild(a);
|
||||||
|
}
|
||||||
|
{
|
||||||
|
const a = document.createElement("a");
|
||||||
|
a.href = "#";
|
||||||
|
a.onclick = function (event) {
|
||||||
|
event.preventDefault();
|
||||||
|
const name = prompt("Enter new custom name:");
|
||||||
|
renameGear(category, item.ItemId.$oid, name);
|
||||||
|
};
|
||||||
|
a.title = "Rename";
|
||||||
|
a.innerHTML = `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 448 512"><!--!Font Awesome Free 6.5.2 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free Copyright 2024 Fonticons, Inc.--><path d="M0 80V229.5c0 17 6.7 33.3 18.7 45.3l176 176c25 25 65.5 25 90.5 0L418.7 317.3c25-25 25-65.5 0-90.5l-176-176c-12-12-28.3-18.7-45.3-18.7H48C21.5 32 0 53.5 0 80zm112 32a32 32 0 1 1 0 64 32 32 0 1 1 0-64z"/></svg>`;
|
||||||
td.appendChild(a);
|
td.appendChild(a);
|
||||||
|
|
||||||
const span = document.createElement("span");
|
|
||||||
span.innerHTML = " · ";
|
|
||||||
td.appendChild(span);
|
|
||||||
}
|
}
|
||||||
{
|
{
|
||||||
const a = document.createElement("a");
|
const a = document.createElement("a");
|
||||||
@ -197,7 +225,8 @@ function updateInventory() {
|
|||||||
event.preventDefault();
|
event.preventDefault();
|
||||||
disposeOfGear(category, item.ItemId.$oid);
|
disposeOfGear(category, item.ItemId.$oid);
|
||||||
};
|
};
|
||||||
a.textContent = "Remove";
|
a.title = "Remove";
|
||||||
|
a.innerHTML = `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 448 512"><!--!Font Awesome Free 6.5.2 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free Copyright 2024 Fonticons, Inc.--><path d="M135.2 17.7L128 32H32C14.3 32 0 46.3 0 64S14.3 96 32 96H416c17.7 0 32-14.3 32-32s-14.3-32-32-32H320l-7.2-14.3C307.4 6.8 296.3 0 284.2 0H163.8c-12.1 0-23.2 6.8-28.6 17.7zM416 128H32L53.2 467c1.6 25.3 22.6 45 47.9 45H346.9c25.3 0 46.3-19.7 47.9-45L416 128z"/></svg>`;
|
||||||
td.appendChild(a);
|
td.appendChild(a);
|
||||||
}
|
}
|
||||||
tr.appendChild(td);
|
tr.appendChild(td);
|
||||||
@ -239,14 +268,10 @@ function updateInventory() {
|
|||||||
})
|
})
|
||||||
);
|
);
|
||||||
a.target = "_blank";
|
a.target = "_blank";
|
||||||
a.textContent = "View Stats";
|
a.title = "View Stats";
|
||||||
|
a.innerHTML = `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 448 512"><!--!Font Awesome Free 6.5.2 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free Copyright 2024 Fonticons, Inc.--><path d="M160 80c0-26.5 21.5-48 48-48h32c26.5 0 48 21.5 48 48V432c0 26.5-21.5 48-48 48H208c-26.5 0-48-21.5-48-48V80zM0 272c0-26.5 21.5-48 48-48H80c26.5 0 48 21.5 48 48V432c0 26.5-21.5 48-48 48H48c-26.5 0-48-21.5-48-48V272zM368 96h32c26.5 0 48 21.5 48 48V432c0 26.5-21.5 48-48 48H368c-26.5 0-48-21.5-48-48V144c0-26.5 21.5-48 48-48z"/></svg>`;
|
||||||
td.appendChild(a);
|
td.appendChild(a);
|
||||||
}
|
}
|
||||||
{
|
|
||||||
const span = document.createElement("span");
|
|
||||||
span.innerHTML = " · ";
|
|
||||||
td.appendChild(span);
|
|
||||||
}
|
|
||||||
{
|
{
|
||||||
const a = document.createElement("a");
|
const a = document.createElement("a");
|
||||||
a.href = "#";
|
a.href = "#";
|
||||||
@ -254,7 +279,8 @@ function updateInventory() {
|
|||||||
event.preventDefault();
|
event.preventDefault();
|
||||||
disposeOfGear("Upgrades", item.ItemId.$oid);
|
disposeOfGear("Upgrades", item.ItemId.$oid);
|
||||||
};
|
};
|
||||||
a.textContent = "Remove";
|
a.title = "Remove";
|
||||||
|
a.innerHTML = `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 448 512"><!--!Font Awesome Free 6.5.2 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free Copyright 2024 Fonticons, Inc.--><path d="M135.2 17.7L128 32H32C14.3 32 0 46.3 0 64S14.3 96 32 96H416c17.7 0 32-14.3 32-32s-14.3-32-32-32H320l-7.2-14.3C307.4 6.8 296.3 0 284.2 0H163.8c-12.1 0-23.2 6.8-28.6 17.7zM416 128H32L53.2 467c1.6 25.3 22.6 45 47.9 45H346.9c25.3 0 46.3-19.7 47.9-45L416 128z"/></svg>`;
|
||||||
td.appendChild(a);
|
td.appendChild(a);
|
||||||
}
|
}
|
||||||
tr.appendChild(td);
|
tr.appendChild(td);
|
||||||
@ -280,12 +306,9 @@ function updateInventory() {
|
|||||||
event.preventDefault();
|
event.preventDefault();
|
||||||
setFingerprint(item.ItemType, item.ItemId, { lvl: maxRank });
|
setFingerprint(item.ItemType, item.ItemId, { lvl: maxRank });
|
||||||
};
|
};
|
||||||
a.textContent = "Max Rank";
|
a.title = "Max Rank";
|
||||||
|
a.innerHTML = `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 384 512"><!--!Font Awesome Free 6.5.2 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free Copyright 2024 Fonticons, Inc.--><path d="M214.6 41.4c-12.5-12.5-32.8-12.5-45.3 0l-160 160c-12.5 12.5-12.5 32.8 0 45.3s32.8 12.5 45.3 0L160 141.2V448c0 17.7 14.3 32 32 32s32-14.3 32-32V141.2L329.4 246.6c12.5 12.5 32.8 12.5 45.3 0s12.5-32.8 0-45.3l-160-160z"/></svg>`;
|
||||||
td.appendChild(a);
|
td.appendChild(a);
|
||||||
|
|
||||||
const span = document.createElement("span");
|
|
||||||
span.innerHTML = " · ";
|
|
||||||
td.appendChild(span);
|
|
||||||
}
|
}
|
||||||
{
|
{
|
||||||
const a = document.createElement("a");
|
const a = document.createElement("a");
|
||||||
@ -294,7 +317,8 @@ function updateInventory() {
|
|||||||
event.preventDefault();
|
event.preventDefault();
|
||||||
disposeOfGear("Upgrades", item.ItemId.$oid);
|
disposeOfGear("Upgrades", item.ItemId.$oid);
|
||||||
};
|
};
|
||||||
a.textContent = "Remove";
|
a.title = "Remove";
|
||||||
|
a.innerHTML = `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 448 512"><!--!Font Awesome Free 6.5.2 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free Copyright 2024 Fonticons, Inc.--><path d="M135.2 17.7L128 32H32C14.3 32 0 46.3 0 64S14.3 96 32 96H416c17.7 0 32-14.3 32-32s-14.3-32-32-32H320l-7.2-14.3C307.4 6.8 296.3 0 284.2 0H163.8c-12.1 0-23.2 6.8-28.6 17.7zM416 128H32L53.2 467c1.6 25.3 22.6 45 47.9 45H346.9c25.3 0 46.3-19.7 47.9-45L416 128z"/></svg>`;
|
||||||
td.appendChild(a);
|
td.appendChild(a);
|
||||||
}
|
}
|
||||||
tr.appendChild(td);
|
tr.appendChild(td);
|
||||||
@ -325,14 +349,10 @@ function updateInventory() {
|
|||||||
event.preventDefault();
|
event.preventDefault();
|
||||||
setFingerprint(item.ItemType, item.LastAdded, { lvl: maxRank });
|
setFingerprint(item.ItemType, item.LastAdded, { lvl: maxRank });
|
||||||
};
|
};
|
||||||
a.textContent = "Max Rank";
|
a.title = "Max Rank";
|
||||||
|
a.innerHTML = `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 384 512"><!--!Font Awesome Free 6.5.2 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free Copyright 2024 Fonticons, Inc.--><path d="M214.6 41.4c-12.5-12.5-32.8-12.5-45.3 0l-160 160c-12.5 12.5-12.5 32.8 0 45.3s32.8 12.5 45.3 0L160 141.2V448c0 17.7 14.3 32 32 32s32-14.3 32-32V141.2L329.4 246.6c12.5 12.5 32.8 12.5 45.3 0s12.5-32.8 0-45.3l-160-160z"/></svg>`;
|
||||||
td.appendChild(a);
|
td.appendChild(a);
|
||||||
}
|
}
|
||||||
{
|
|
||||||
const span = document.createElement("span");
|
|
||||||
span.innerHTML = " · ";
|
|
||||||
td.appendChild(span);
|
|
||||||
}
|
|
||||||
{
|
{
|
||||||
const a = document.createElement("a");
|
const a = document.createElement("a");
|
||||||
a.href = "#";
|
a.href = "#";
|
||||||
@ -340,7 +360,8 @@ function updateInventory() {
|
|||||||
event.preventDefault();
|
event.preventDefault();
|
||||||
disposeOfItems("Upgrades", item.ItemType, item.ItemCount);
|
disposeOfItems("Upgrades", item.ItemType, item.ItemCount);
|
||||||
};
|
};
|
||||||
a.textContent = "Remove";
|
a.title = "Remove";
|
||||||
|
a.innerHTML = `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 448 512"><!--!Font Awesome Free 6.5.2 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free Copyright 2024 Fonticons, Inc.--><path d="M135.2 17.7L128 32H32C14.3 32 0 46.3 0 64S14.3 96 32 96H416c17.7 0 32-14.3 32-32s-14.3-32-32-32H320l-7.2-14.3C307.4 6.8 296.3 0 284.2 0H163.8c-12.1 0-23.2 6.8-28.6 17.7zM416 128H32L53.2 467c1.6 25.3 22.6 45 47.9 45H346.9c25.3 0 46.3-19.7 47.9-45L416 128z"/></svg>`;
|
||||||
td.appendChild(a);
|
td.appendChild(a);
|
||||||
}
|
}
|
||||||
tr.appendChild(td);
|
tr.appendChild(td);
|
||||||
@ -430,6 +451,20 @@ function addGearExp(category, oid, xp) {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function renameGear(category, oid, name) {
|
||||||
|
revalidateAuthz(() => {
|
||||||
|
$.post({
|
||||||
|
url: "/api/nameWeapon.php?" + window.authz + "&Category=" + category + "&ItemId=" + oid + "&webui=1",
|
||||||
|
contentType: "text/plain",
|
||||||
|
data: JSON.stringify({
|
||||||
|
ItemName: name
|
||||||
|
})
|
||||||
|
}).done(function () {
|
||||||
|
updateInventory();
|
||||||
|
});
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
function disposeOfGear(category, oid) {
|
function disposeOfGear(category, oid) {
|
||||||
const data = {
|
const data = {
|
||||||
SellCurrency: "SC_RegularCredits",
|
SellCurrency: "SC_RegularCredits",
|
||||||
@ -477,20 +512,21 @@ function disposeOfItems(category, type, count) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function doAcquireMiscItems() {
|
function doAcquireMiscItems() {
|
||||||
const uniqueName = getKey(document.getElementById("miscitem-type"));
|
const data = getKey(document.getElementById("miscitem-type"));
|
||||||
if (!uniqueName) {
|
if (!data) {
|
||||||
$("#miscitem-type").addClass("is-invalid").focus();
|
$("#miscitem-type").addClass("is-invalid").focus();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
const [category, uniqueName] = data.split(":");
|
||||||
revalidateAuthz(() => {
|
revalidateAuthz(() => {
|
||||||
$.post({
|
$.post({
|
||||||
url: "/api/missionInventoryUpdate.php?" + window.authz,
|
url: "/api/missionInventoryUpdate.php?" + window.authz,
|
||||||
contentType: "text/plain",
|
contentType: "text/plain",
|
||||||
data: JSON.stringify({
|
data: JSON.stringify({
|
||||||
MiscItems: [
|
[category]: [
|
||||||
{
|
{
|
||||||
ItemType: uniqueName,
|
ItemType: uniqueName,
|
||||||
ItemCount: $("#miscitem-count").val()
|
ItemCount: parseInt($("#miscitem-count").val())
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
})
|
})
|
||||||
@ -500,8 +536,8 @@ function doAcquireMiscItems() {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
$("#miscitem-name").on("input", () => {
|
$("#miscitem-type").on("input", () => {
|
||||||
$("#miscitem-name").removeClass("is-invalid");
|
$("#miscitem-type").removeClass("is-invalid");
|
||||||
});
|
});
|
||||||
|
|
||||||
function doAcquireRiven() {
|
function doAcquireRiven() {
|
||||||
@ -537,7 +573,7 @@ function doAcquireRiven() {
|
|||||||
})
|
})
|
||||||
}).done(function () {
|
}).done(function () {
|
||||||
// Get riven's assigned id
|
// Get riven's assigned id
|
||||||
$.get("/api/inventory.php?" + window.authz).done(data => {
|
$.get("/api/inventory.php?" + window.authz + "&xpBasedLevelCapDisabled=1").done(data => {
|
||||||
for (const rawUpgrade of data.RawUpgrades) {
|
for (const rawUpgrade of data.RawUpgrades) {
|
||||||
if (rawUpgrade.ItemType === uniqueName) {
|
if (rawUpgrade.ItemType === uniqueName) {
|
||||||
// Add fingerprint to riven
|
// Add fingerprint to riven
|
||||||
@ -621,38 +657,40 @@ $("#mod-to-acquire").on("input", () => {
|
|||||||
});
|
});
|
||||||
|
|
||||||
function fetchSettings() {
|
function fetchSettings() {
|
||||||
fetch('/custom/config')
|
fetch("/custom/config")
|
||||||
.then((response) => response.json())
|
.then(response => response.json())
|
||||||
.then((json) => Object.entries(json).forEach((entry) => {
|
.then(json =>
|
||||||
const [key, value] = entry;
|
Object.entries(json).forEach(entry => {
|
||||||
var x = document.getElementById(`${key}`);
|
const [key, value] = entry;
|
||||||
if (x!=null) {
|
var x = document.getElementById(`${key}`);
|
||||||
if (x.type == "checkbox") {
|
if (x != null) {
|
||||||
if (value === true) {
|
if (x.type == "checkbox") {
|
||||||
x.setAttribute("checked", "checked")
|
if (value === true) {
|
||||||
|
x.setAttribute("checked", "checked");
|
||||||
|
}
|
||||||
|
} else if (x.type == "number") {
|
||||||
|
x.setAttribute("value", `${value}`);
|
||||||
}
|
}
|
||||||
} else if (x.type == "number") {
|
|
||||||
x.setAttribute("value", `${value}`)
|
|
||||||
}
|
}
|
||||||
}
|
})
|
||||||
}));
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
function doChangeSettings() {
|
function doChangeSettings() {
|
||||||
fetch('/custom/config')
|
fetch("/custom/config")
|
||||||
.then((response) => response.json())
|
.then(response => response.json())
|
||||||
.then((json) => {
|
.then(json => {
|
||||||
for(var i in json) {
|
for (var i in json) {
|
||||||
var x = document.getElementById(`${i}`);
|
var x = document.getElementById(`${i}`);
|
||||||
if (x!=null) {
|
if (x != null) {
|
||||||
if (x.type == "checkbox") {
|
if (x.type == "checkbox") {
|
||||||
if (x.checked === true) {
|
if (x.checked === true) {
|
||||||
json[i]=true;
|
json[i] = true;
|
||||||
} else {
|
} else {
|
||||||
json[i]=false;
|
json[i] = false;
|
||||||
}
|
}
|
||||||
} else if (x.type == "number") {
|
} else if (x.type == "number") {
|
||||||
json[i]=parseInt(x.value);
|
json[i] = parseInt(x.value);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -660,6 +698,6 @@ function doChangeSettings() {
|
|||||||
url: "/custom/config",
|
url: "/custom/config",
|
||||||
contentType: "text/plain",
|
contentType: "text/plain",
|
||||||
data: JSON.stringify(json, null, 2)
|
data: JSON.stringify(json, null, 2)
|
||||||
})
|
});
|
||||||
})
|
});
|
||||||
}
|
}
|
@ -20,3 +20,10 @@ body:not(.logged-in) .nav-item.dropdown,
|
|||||||
body:not(.logged-in) #refresh-note {
|
body:not(.logged-in) #refresh-note {
|
||||||
display: none;
|
display: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
td.text-end > a > svg {
|
||||||
|
fill: currentColor;
|
||||||
|
height: 1em;
|
||||||
|
margin-left: 0.5em;
|
||||||
|
margin-bottom: 4px; /* to centre the icon */
|
||||||
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user