Compare commits
9 Commits
9662da00de
...
0a3f9549a9
| Author | SHA1 | Date | |
|---|---|---|---|
| 0a3f9549a9 | |||
| 2cfb21b98e | |||
| 3fedc701f1 | |||
| ed596aa3f3 | |||
| e2349b361e | |||
| 9221178522 | |||
| 9a5c2ab4a4 | |||
| d4c477769a | |||
| 6de9f0dcdb |
@ -7,25 +7,20 @@
|
|||||||
"myAddress": "localhost",
|
"myAddress": "localhost",
|
||||||
"httpPort": 80,
|
"httpPort": 80,
|
||||||
"httpsPort": 443,
|
"httpsPort": 443,
|
||||||
"NRS": ["localhost"],
|
|
||||||
"administratorNames": [],
|
"administratorNames": [],
|
||||||
"autoCreateAccount": true,
|
"autoCreateAccount": true,
|
||||||
"skipTutorial": false,
|
"skipTutorial": false,
|
||||||
"unlockAllScans": false,
|
|
||||||
"unlockAllShipFeatures": false,
|
|
||||||
"unlockAllShipDecorations": false,
|
"unlockAllShipDecorations": false,
|
||||||
"unlockAllFlavourItems": false,
|
"unlockAllFlavourItems": false,
|
||||||
"unlockAllSkins": false,
|
"unlockAllSkins": false,
|
||||||
"unlockAllCapturaScenes": false,
|
|
||||||
"fullyStockedVendors": false,
|
"fullyStockedVendors": false,
|
||||||
"skipClanKeyCrafting": false,
|
"skipClanKeyCrafting": false,
|
||||||
"noDojoRoomBuildStage": false,
|
"noDojoRoomBuildStage": false,
|
||||||
"noDecoBuildStage": false,
|
"noDojoDecoBuildStage": false,
|
||||||
"fastDojoRoomDestruction": false,
|
"fastDojoRoomDestruction": false,
|
||||||
"noDojoResearchCosts": false,
|
"noDojoResearchCosts": false,
|
||||||
"noDojoResearchTime": false,
|
"noDojoResearchTime": false,
|
||||||
"fastClanAscension": false,
|
"fastClanAscension": false,
|
||||||
"unlockAllSimarisResearchEntries": false,
|
|
||||||
"spoofMasteryRank": -1,
|
"spoofMasteryRank": -1,
|
||||||
"relicRewardItemCountMultiplier": 1,
|
"relicRewardItemCountMultiplier": 1,
|
||||||
"nightwaveStandingMultiplier": 1,
|
"nightwaveStandingMultiplier": 1,
|
||||||
|
|||||||
@ -38,12 +38,12 @@ export const focusController: RequestHandler = async (req, res) => {
|
|||||||
case FocusOperation.UnlockWay: {
|
case FocusOperation.UnlockWay: {
|
||||||
const focusType = (JSON.parse(String(req.body)) as IWayRequest).FocusType;
|
const focusType = (JSON.parse(String(req.body)) as IWayRequest).FocusType;
|
||||||
const focusPolarity = focusTypeToPolarity(focusType);
|
const focusPolarity = focusTypeToPolarity(focusType);
|
||||||
const inventory = await getInventory(accountId);
|
const inventory = await getInventory(accountId, "FocusAbility FocusUpgrades FocusXP");
|
||||||
const cost = inventory.FocusAbility ? 50_000 : 0;
|
const cost = inventory.FocusAbility ? 50_000 : 0;
|
||||||
inventory.FocusAbility ??= focusType;
|
inventory.FocusAbility ??= focusType;
|
||||||
inventory.FocusUpgrades.push({ ItemType: focusType });
|
inventory.FocusUpgrades.push({ ItemType: focusType });
|
||||||
if (inventory.FocusXP) {
|
if (cost) {
|
||||||
inventory.FocusXP[focusPolarity]! -= cost;
|
inventory.FocusXP![focusPolarity]! -= cost;
|
||||||
}
|
}
|
||||||
await inventory.save();
|
await inventory.save();
|
||||||
res.json({
|
res.json({
|
||||||
|
|||||||
@ -1,6 +1,4 @@
|
|||||||
import type { RequestHandler } from "express";
|
import type { RequestHandler } from "express";
|
||||||
import { config } from "../../services/configService.ts";
|
|
||||||
import allShipFeatures from "../../../static/fixed_responses/allShipFeatures.json" with { type: "json" };
|
|
||||||
import { getAccountIdForRequest } from "../../services/loginService.ts";
|
import { getAccountIdForRequest } from "../../services/loginService.ts";
|
||||||
import { createGarden, getPersonalRooms } from "../../services/personalRoomsService.ts";
|
import { createGarden, getPersonalRooms } from "../../services/personalRoomsService.ts";
|
||||||
import type { IGetShipResponse, IPersonalRoomsClient } from "../../types/personalRoomsTypes.ts";
|
import type { IGetShipResponse, IPersonalRoomsClient } from "../../types/personalRoomsTypes.ts";
|
||||||
@ -31,9 +29,5 @@ export const getShipController: RequestHandler = async (req, res) => {
|
|||||||
TailorShop: personalRooms.TailorShop
|
TailorShop: personalRooms.TailorShop
|
||||||
};
|
};
|
||||||
|
|
||||||
if (config.unlockAllShipFeatures) {
|
|
||||||
getShipResponse.Ship.Features = allShipFeatures;
|
|
||||||
}
|
|
||||||
|
|
||||||
res.json(getShipResponse);
|
res.json(getShipResponse);
|
||||||
};
|
};
|
||||||
|
|||||||
@ -1,7 +1,7 @@
|
|||||||
import type { RequestHandler } from "express";
|
import type { RequestHandler } from "express";
|
||||||
|
import { getReflexiveAddress } from "../../services/configService.ts";
|
||||||
|
|
||||||
const hubController: RequestHandler = (_req, res) => {
|
export const hubController: RequestHandler = (req, res) => {
|
||||||
res.json("hub 127.0.0.1:6952");
|
const { myAddress } = getReflexiveAddress(req);
|
||||||
|
res.json(`hub ${myAddress}:6952`);
|
||||||
};
|
};
|
||||||
|
|
||||||
export { hubController };
|
|
||||||
|
|||||||
@ -10,7 +10,7 @@ import { equipmentKeys } from "../../types/inventoryTypes/inventoryTypes.ts";
|
|||||||
import type { IPolarity } from "../../types/inventoryTypes/commonInventoryTypes.ts";
|
import type { IPolarity } from "../../types/inventoryTypes/commonInventoryTypes.ts";
|
||||||
import { ArtifactPolarity } from "../../types/inventoryTypes/commonInventoryTypes.ts";
|
import { ArtifactPolarity } from "../../types/inventoryTypes/commonInventoryTypes.ts";
|
||||||
import type { ICountedItem } from "warframe-public-export-plus";
|
import type { ICountedItem } from "warframe-public-export-plus";
|
||||||
import { eFaction, ExportCustoms, ExportFlavour, ExportResources, ExportVirtuals } from "warframe-public-export-plus";
|
import { eFaction, ExportCustoms, ExportFlavour, ExportResources } from "warframe-public-export-plus";
|
||||||
import { applyCheatsToInfestedFoundry, handleSubsumeCompletion } from "../../services/infestedFoundryService.ts";
|
import { applyCheatsToInfestedFoundry, handleSubsumeCompletion } from "../../services/infestedFoundryService.ts";
|
||||||
import {
|
import {
|
||||||
addEmailItem,
|
addEmailItem,
|
||||||
@ -358,17 +358,6 @@ export const getInventoryResponse = async (
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (config.unlockAllCapturaScenes) {
|
|
||||||
for (const uniqueName of Object.keys(ExportResources)) {
|
|
||||||
if (resourceInheritsFrom(uniqueName, "/Lotus/Types/Items/MiscItems/PhotoboothTile")) {
|
|
||||||
inventoryResponse.MiscItems.push({
|
|
||||||
ItemType: uniqueName,
|
|
||||||
ItemCount: 1
|
|
||||||
});
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if (typeof config.spoofMasteryRank === "number" && config.spoofMasteryRank >= 0) {
|
if (typeof config.spoofMasteryRank === "number" && config.spoofMasteryRank >= 0) {
|
||||||
inventoryResponse.PlayerLevel = config.spoofMasteryRank;
|
inventoryResponse.PlayerLevel = config.spoofMasteryRank;
|
||||||
if (!xpBasedLevelCapDisabled) {
|
if (!xpBasedLevelCapDisabled) {
|
||||||
@ -495,21 +484,3 @@ const getExpRequiredForMr = (rank: number): number => {
|
|||||||
}
|
}
|
||||||
return 2_250_000 + 147_500 * (rank - 30);
|
return 2_250_000 + 147_500 * (rank - 30);
|
||||||
};
|
};
|
||||||
|
|
||||||
const resourceInheritsFrom = (resourceName: string, targetName: string): boolean => {
|
|
||||||
let parentName = resourceGetParent(resourceName);
|
|
||||||
for (; parentName != undefined; parentName = resourceGetParent(parentName)) {
|
|
||||||
if (parentName == targetName) {
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return false;
|
|
||||||
};
|
|
||||||
|
|
||||||
const resourceGetParent = (resourceName: string): string | undefined => {
|
|
||||||
if (resourceName in ExportResources) {
|
|
||||||
return ExportResources[resourceName].parentName;
|
|
||||||
}
|
|
||||||
// eslint-disable-next-line @typescript-eslint/no-unnecessary-condition
|
|
||||||
return ExportVirtuals[resourceName]?.parentName;
|
|
||||||
};
|
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
import type { RequestHandler } from "express";
|
import type { RequestHandler } from "express";
|
||||||
|
|
||||||
import { config } from "../../services/configService.ts";
|
import { config, getReflexiveAddress } from "../../services/configService.ts";
|
||||||
import { buildConfig } from "../../services/buildConfigService.ts";
|
import { buildConfig } from "../../services/buildConfigService.ts";
|
||||||
|
|
||||||
import { Account } from "../../models/loginModel.ts";
|
import { Account } from "../../models/loginModel.ts";
|
||||||
@ -20,21 +20,7 @@ export const loginController: RequestHandler = async (request, response) => {
|
|||||||
? request.query.buildLabel.split(" ").join("+")
|
? request.query.buildLabel.split(" ").join("+")
|
||||||
: buildConfig.buildLabel;
|
: buildConfig.buildLabel;
|
||||||
|
|
||||||
let myAddress: string;
|
const { myAddress, myUrlBase } = getReflexiveAddress(request);
|
||||||
let myUrlBase: string = request.protocol + "://";
|
|
||||||
if (request.host.indexOf("warframe.com") == -1) {
|
|
||||||
// Client request was redirected cleanly, so we know it can reach us how it's reaching us now.
|
|
||||||
myAddress = request.hostname;
|
|
||||||
myUrlBase += request.host;
|
|
||||||
} else {
|
|
||||||
// Don't know how the client reached us, hoping the config does.
|
|
||||||
myAddress = config.myAddress;
|
|
||||||
myUrlBase += myAddress;
|
|
||||||
const port: number = request.protocol == "http" ? config.httpPort || 80 : config.httpsPort || 443;
|
|
||||||
if (port != (request.protocol == "http" ? 80 : 443)) {
|
|
||||||
myUrlBase += ":" + port;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if (
|
if (
|
||||||
!account &&
|
!account &&
|
||||||
@ -109,7 +95,7 @@ const createLoginResponse = (
|
|||||||
BuildLabel: buildLabel
|
BuildLabel: buildLabel
|
||||||
};
|
};
|
||||||
if (version_compare(buildLabel, "2015.02.13.10.41") >= 0) {
|
if (version_compare(buildLabel, "2015.02.13.10.41") >= 0) {
|
||||||
resp.NRS = config.NRS;
|
resp.NRS = [myAddress];
|
||||||
}
|
}
|
||||||
if (version_compare(buildLabel, "2015.05.14.16.29") >= 0) {
|
if (version_compare(buildLabel, "2015.05.14.16.29") >= 0) {
|
||||||
// U17 and up
|
// U17 and up
|
||||||
|
|||||||
36
src/controllers/custom/unlockAllCapturaScenesController.ts
Normal file
36
src/controllers/custom/unlockAllCapturaScenesController.ts
Normal file
@ -0,0 +1,36 @@
|
|||||||
|
import type { RequestHandler } from "express";
|
||||||
|
import { ExportResources, ExportVirtuals } from "warframe-public-export-plus";
|
||||||
|
import { getAccountIdForRequest } from "../../services/loginService.ts";
|
||||||
|
import { addItem, getInventory } from "../../services/inventoryService.ts";
|
||||||
|
|
||||||
|
export const unlockAllCapturaScenesController: RequestHandler = async (req, res) => {
|
||||||
|
const accountId = await getAccountIdForRequest(req);
|
||||||
|
const inventory = await getInventory(accountId);
|
||||||
|
|
||||||
|
for (const uniqueName of Object.keys(ExportResources)) {
|
||||||
|
if (resourceInheritsFrom(uniqueName, "/Lotus/Types/Items/MiscItems/PhotoboothTile")) {
|
||||||
|
await addItem(inventory, uniqueName, 1);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
await inventory.save();
|
||||||
|
res.end();
|
||||||
|
};
|
||||||
|
|
||||||
|
const resourceInheritsFrom = (resourceName: string, targetName: string): boolean => {
|
||||||
|
let parentName = resourceGetParent(resourceName);
|
||||||
|
for (; parentName != undefined; parentName = resourceGetParent(parentName)) {
|
||||||
|
if (parentName == targetName) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
};
|
||||||
|
|
||||||
|
const resourceGetParent = (resourceName: string): string | undefined => {
|
||||||
|
if (resourceName in ExportResources) {
|
||||||
|
return ExportResources[resourceName].parentName;
|
||||||
|
}
|
||||||
|
// eslint-disable-next-line @typescript-eslint/no-unnecessary-condition
|
||||||
|
return ExportVirtuals[resourceName]?.parentName;
|
||||||
|
};
|
||||||
23
src/controllers/custom/unlockAllScansController.ts
Normal file
23
src/controllers/custom/unlockAllScansController.ts
Normal file
@ -0,0 +1,23 @@
|
|||||||
|
import type { RequestHandler } from "express";
|
||||||
|
import allScans from "../../../static/fixed_responses/allScans.json" with { type: "json" };
|
||||||
|
import { ExportEnemies } from "warframe-public-export-plus";
|
||||||
|
import { getAccountIdForRequest } from "../../services/loginService.ts";
|
||||||
|
import { getStats } from "../../services/statsService.ts";
|
||||||
|
|
||||||
|
export const unlockAllScansController: RequestHandler = async (req, res) => {
|
||||||
|
const accountId = await getAccountIdForRequest(req);
|
||||||
|
const stats = await getStats(accountId);
|
||||||
|
|
||||||
|
const scanTypes = new Set<string>(allScans);
|
||||||
|
for (const type of Object.keys(ExportEnemies.avatars)) {
|
||||||
|
scanTypes.add(type);
|
||||||
|
}
|
||||||
|
|
||||||
|
stats.Scans = [];
|
||||||
|
for (const type of scanTypes) {
|
||||||
|
stats.Scans.push({ type, scans: 9999 });
|
||||||
|
}
|
||||||
|
|
||||||
|
await stats.save();
|
||||||
|
res.end();
|
||||||
|
};
|
||||||
19
src/controllers/custom/unlockAllShipFeaturesController.ts
Normal file
19
src/controllers/custom/unlockAllShipFeaturesController.ts
Normal file
@ -0,0 +1,19 @@
|
|||||||
|
import type { RequestHandler } from "express";
|
||||||
|
import allShipFeatures from "../../../static/fixed_responses/allShipFeatures.json" with { type: "json" };
|
||||||
|
import { getAccountIdForRequest } from "../../services/loginService.ts";
|
||||||
|
import { getPersonalRooms } from "../../services/personalRoomsService.ts";
|
||||||
|
|
||||||
|
export const unlockAllShipFeaturesController: RequestHandler = async (req, res) => {
|
||||||
|
const accountId = await getAccountIdForRequest(req);
|
||||||
|
const personalRooms = await getPersonalRooms(accountId);
|
||||||
|
|
||||||
|
const featureSet = new Set(personalRooms.Ship.Features);
|
||||||
|
for (const feature of allShipFeatures) {
|
||||||
|
if (!featureSet.has(feature)) {
|
||||||
|
personalRooms.Ship.Features.push(feature);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
await personalRooms.save();
|
||||||
|
res.end();
|
||||||
|
};
|
||||||
@ -1,8 +1,5 @@
|
|||||||
import type { RequestHandler } from "express";
|
import type { RequestHandler } from "express";
|
||||||
import { getAccountIdForRequest } from "../../services/loginService.ts";
|
import { getAccountIdForRequest } from "../../services/loginService.ts";
|
||||||
import { config } from "../../services/configService.ts";
|
|
||||||
import allScans from "../../../static/fixed_responses/allScans.json" with { type: "json" };
|
|
||||||
import { ExportEnemies } from "warframe-public-export-plus";
|
|
||||||
import { getInventory } from "../../services/inventoryService.ts";
|
import { getInventory } from "../../services/inventoryService.ts";
|
||||||
import { getStats } from "../../services/statsService.ts";
|
import { getStats } from "../../services/statsService.ts";
|
||||||
import type { IStatsClient } from "../../types/statTypes.ts";
|
import type { IStatsClient } from "../../types/statTypes.ts";
|
||||||
@ -12,7 +9,7 @@ const viewController: RequestHandler = async (req, res) => {
|
|||||||
const inventory = await getInventory(accountId, "XPInfo");
|
const inventory = await getInventory(accountId, "XPInfo");
|
||||||
const playerStats = await getStats(accountId);
|
const playerStats = await getStats(accountId);
|
||||||
|
|
||||||
const responseJson = playerStats.toJSON() as IStatsClient;
|
const responseJson = playerStats.toJSON<IStatsClient>();
|
||||||
responseJson.Weapons ??= [];
|
responseJson.Weapons ??= [];
|
||||||
for (const item of inventory.XPInfo) {
|
for (const item of inventory.XPInfo) {
|
||||||
const weaponIndex = responseJson.Weapons.findIndex(element => element.type == item.ItemType);
|
const weaponIndex = responseJson.Weapons.findIndex(element => element.type == item.ItemType);
|
||||||
@ -22,24 +19,6 @@ const viewController: RequestHandler = async (req, res) => {
|
|||||||
responseJson.Weapons.push({ type: item.ItemType, xp: item.XP });
|
responseJson.Weapons.push({ type: item.ItemType, xp: item.XP });
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (config.unlockAllScans) {
|
|
||||||
const scans = new Set(allScans);
|
|
||||||
for (const type of Object.keys(ExportEnemies.avatars)) {
|
|
||||||
if (!scans.has(type)) scans.add(type);
|
|
||||||
}
|
|
||||||
|
|
||||||
// Take any existing scans and also set them to 9999
|
|
||||||
if (responseJson.Scans) {
|
|
||||||
for (const scan of responseJson.Scans) {
|
|
||||||
scans.add(scan.type);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
responseJson.Scans = [];
|
|
||||||
|
|
||||||
for (const type of scans) {
|
|
||||||
responseJson.Scans.push({ type: type, scans: 9999 });
|
|
||||||
}
|
|
||||||
}
|
|
||||||
res.json(responseJson);
|
res.json(responseJson);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@ -16,6 +16,9 @@ import { completeAllMissionsController } from "../controllers/custom/completeAll
|
|||||||
import { addMissingHelminthBlueprintsController } from "../controllers/custom/addMissingHelminthBlueprintsController.ts";
|
import { addMissingHelminthBlueprintsController } from "../controllers/custom/addMissingHelminthBlueprintsController.ts";
|
||||||
import { unlockAllProfitTakerStagesController } from "../controllers/custom/unlockAllProfitTakerStagesController.ts";
|
import { unlockAllProfitTakerStagesController } from "../controllers/custom/unlockAllProfitTakerStagesController.ts";
|
||||||
import { unlockAllSimarisResearchEntriesController } from "../controllers/custom/unlockAllSimarisResearchEntriesController.ts";
|
import { unlockAllSimarisResearchEntriesController } from "../controllers/custom/unlockAllSimarisResearchEntriesController.ts";
|
||||||
|
import { unlockAllScansController } from "../controllers/custom/unlockAllScansController.ts";
|
||||||
|
import { unlockAllShipFeaturesController } from "../controllers/custom/unlockAllShipFeaturesController.ts";
|
||||||
|
import { unlockAllCapturaScenesController } from "../controllers/custom/unlockAllCapturaScenesController.ts";
|
||||||
|
|
||||||
import { abilityOverrideController } from "../controllers/custom/abilityOverrideController.ts";
|
import { abilityOverrideController } from "../controllers/custom/abilityOverrideController.ts";
|
||||||
import { createAccountController } from "../controllers/custom/createAccountController.ts";
|
import { createAccountController } from "../controllers/custom/createAccountController.ts";
|
||||||
@ -52,6 +55,9 @@ customRouter.get("/completeAllMissions", completeAllMissionsController);
|
|||||||
customRouter.get("/addMissingHelminthBlueprints", addMissingHelminthBlueprintsController);
|
customRouter.get("/addMissingHelminthBlueprints", addMissingHelminthBlueprintsController);
|
||||||
customRouter.get("/unlockAllProfitTakerStages", unlockAllProfitTakerStagesController);
|
customRouter.get("/unlockAllProfitTakerStages", unlockAllProfitTakerStagesController);
|
||||||
customRouter.get("/unlockAllSimarisResearchEntries", unlockAllSimarisResearchEntriesController);
|
customRouter.get("/unlockAllSimarisResearchEntries", unlockAllSimarisResearchEntriesController);
|
||||||
|
customRouter.get("/unlockAllScans", unlockAllScansController);
|
||||||
|
customRouter.get("/unlockAllShipFeatures", unlockAllShipFeaturesController);
|
||||||
|
customRouter.get("/unlockAllCapturaScenes", unlockAllCapturaScenesController);
|
||||||
|
|
||||||
customRouter.post("/abilityOverride", abilityOverrideController);
|
customRouter.post("/abilityOverride", abilityOverrideController);
|
||||||
customRouter.post("/createAccount", createAccountController);
|
customRouter.post("/createAccount", createAccountController);
|
||||||
|
|||||||
@ -3,6 +3,7 @@ import path from "path";
|
|||||||
import { repoDir } from "../helpers/pathHelper.ts";
|
import { repoDir } from "../helpers/pathHelper.ts";
|
||||||
import { args } from "../helpers/commandLineArguments.ts";
|
import { args } from "../helpers/commandLineArguments.ts";
|
||||||
import { Inbox } from "../models/inboxModel.ts";
|
import { Inbox } from "../models/inboxModel.ts";
|
||||||
|
import type { Request } from "express";
|
||||||
|
|
||||||
export interface IConfig {
|
export interface IConfig {
|
||||||
mongodbUrl: string;
|
mongodbUrl: string;
|
||||||
@ -14,16 +15,12 @@ export interface IConfig {
|
|||||||
httpPort?: number;
|
httpPort?: number;
|
||||||
httpsPort?: number;
|
httpsPort?: number;
|
||||||
myIrcAddresses?: string[];
|
myIrcAddresses?: string[];
|
||||||
NRS?: string[];
|
|
||||||
administratorNames?: string[];
|
administratorNames?: string[];
|
||||||
autoCreateAccount?: boolean;
|
autoCreateAccount?: boolean;
|
||||||
skipTutorial?: boolean;
|
skipTutorial?: boolean;
|
||||||
unlockAllScans?: boolean;
|
|
||||||
unlockAllShipFeatures?: boolean;
|
|
||||||
unlockAllShipDecorations?: boolean;
|
unlockAllShipDecorations?: boolean;
|
||||||
unlockAllFlavourItems?: boolean;
|
unlockAllFlavourItems?: boolean;
|
||||||
unlockAllSkins?: boolean;
|
unlockAllSkins?: boolean;
|
||||||
unlockAllCapturaScenes?: boolean;
|
|
||||||
unlockAllDecoRecipes?: boolean;
|
unlockAllDecoRecipes?: boolean;
|
||||||
fullyStockedVendors?: boolean;
|
fullyStockedVendors?: boolean;
|
||||||
skipClanKeyCrafting?: boolean;
|
skipClanKeyCrafting?: boolean;
|
||||||
@ -86,6 +83,7 @@ export interface IConfig {
|
|||||||
}
|
}
|
||||||
|
|
||||||
export const configRemovedOptionsKeys = [
|
export const configRemovedOptionsKeys = [
|
||||||
|
"NRS",
|
||||||
"skipAllDialogue",
|
"skipAllDialogue",
|
||||||
"infiniteCredits",
|
"infiniteCredits",
|
||||||
"infinitePlatinum",
|
"infinitePlatinum",
|
||||||
@ -105,11 +103,15 @@ export const configRemovedOptionsKeys = [
|
|||||||
"unlockArcanesEverywhere",
|
"unlockArcanesEverywhere",
|
||||||
"unlockAllProfitTakerStages",
|
"unlockAllProfitTakerStages",
|
||||||
"unlockAllSimarisResearchEntries",
|
"unlockAllSimarisResearchEntries",
|
||||||
|
"unlockAllScans",
|
||||||
|
"unlockAllShipFeatures",
|
||||||
|
"unlockAllCapturaScenes",
|
||||||
"noDailyStandingLimits",
|
"noDailyStandingLimits",
|
||||||
"noDailyFocusLimit",
|
"noDailyFocusLimit",
|
||||||
"noArgonCrystalDecay",
|
"noArgonCrystalDecay",
|
||||||
"noMasteryRankUpCooldown",
|
"noMasteryRankUpCooldown",
|
||||||
"noVendorPurchaseLimits",
|
"noVendorPurchaseLimits",
|
||||||
|
"noDecoBuildStage",
|
||||||
"noDeathMarks",
|
"noDeathMarks",
|
||||||
"noKimCooldowns",
|
"noKimCooldowns",
|
||||||
"syndicateMissionsRepeatable",
|
"syndicateMissionsRepeatable",
|
||||||
@ -164,3 +166,22 @@ export const syncConfigWithDatabase = (): void => {
|
|||||||
void Inbox.deleteMany({ goalTag: "GalleonRobbery" }).then(() => {});
|
void Inbox.deleteMany({ goalTag: "GalleonRobbery" }).then(() => {});
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
export const getReflexiveAddress = (request: Request): { myAddress: string; myUrlBase: string } => {
|
||||||
|
let myAddress: string;
|
||||||
|
let myUrlBase: string = request.protocol + "://";
|
||||||
|
if (request.host.indexOf("warframe.com") == -1) {
|
||||||
|
// Client request was redirected cleanly, so we know it can reach us how it's reaching us now.
|
||||||
|
myAddress = request.hostname;
|
||||||
|
myUrlBase += request.host;
|
||||||
|
} else {
|
||||||
|
// Don't know how the client reached us, hoping the config does.
|
||||||
|
myAddress = config.myAddress;
|
||||||
|
myUrlBase += myAddress;
|
||||||
|
const port: number = request.protocol == "http" ? config.httpPort || 80 : config.httpsPort || 443;
|
||||||
|
if (port != (request.protocol == "http" ? 80 : 443)) {
|
||||||
|
myUrlBase += ":" + port;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return { myAddress, myUrlBase };
|
||||||
|
};
|
||||||
|
|||||||
@ -209,7 +209,7 @@ export const handlePurchase = async (
|
|||||||
inventory,
|
inventory,
|
||||||
purchaseRequest.PurchaseParams.ExpectedPrice,
|
purchaseRequest.PurchaseParams.ExpectedPrice,
|
||||||
purchaseRequest.PurchaseParams.UsePremium,
|
purchaseRequest.PurchaseParams.UsePremium,
|
||||||
prePurchaseInventoryChanges
|
purchaseResponse.InventoryChanges
|
||||||
);
|
);
|
||||||
|
|
||||||
switch (purchaseRequest.PurchaseParams.Source) {
|
switch (purchaseRequest.PurchaseParams.Source) {
|
||||||
|
|||||||
@ -808,8 +808,11 @@
|
|||||||
<label class="form-check-label" for="finishInvasionsInOneMission" data-loc="cheats_finishInvasionsInOneMission"></label>
|
<label class="form-check-label" for="finishInvasionsInOneMission" data-loc="cheats_finishInvasionsInOneMission"></label>
|
||||||
</div>
|
</div>
|
||||||
<div class="mt-2 mb-2 d-flex flex-wrap gap-2">
|
<div class="mt-2 mb-2 d-flex flex-wrap gap-2">
|
||||||
|
<button class="btn btn-primary" onclick="debounce(doUnlockAllShipFeatures);" data-loc="cheats_unlockAllShipFeatures"></button>
|
||||||
<button class="btn btn-primary" onclick="debounce(unlockAllMissions);" data-loc="cheats_unlockAllMissions"></button>
|
<button class="btn btn-primary" onclick="debounce(unlockAllMissions);" data-loc="cheats_unlockAllMissions"></button>
|
||||||
<button class="btn btn-primary" onclick="debounce(markAllAsRead);" data-loc="cheats_markAllAsRead"></button>
|
<button class="btn btn-primary" onclick="debounce(markAllAsRead);" data-loc="cheats_markAllAsRead"></button>
|
||||||
|
<button class="btn btn-primary" onclick="debounce(doUnlockAllScans);" data-loc="cheats_unlockAllScans"></button>
|
||||||
|
<button class="btn btn-primary" onclick="debounce(doUnlockAllCapturaScenes);" data-loc="cheats_unlockAllCapturaScenes"></button>
|
||||||
<button class="btn btn-primary" onclick="doUnlockAllFocusSchools();" data-loc="cheats_unlockAllFocusSchools"></button>
|
<button class="btn btn-primary" onclick="doUnlockAllFocusSchools();" data-loc="cheats_unlockAllFocusSchools"></button>
|
||||||
<button class="btn btn-primary" onclick="doHelminthUnlockAll();" data-loc="cheats_helminthUnlockAll"></button>
|
<button class="btn btn-primary" onclick="doHelminthUnlockAll();" data-loc="cheats_helminthUnlockAll"></button>
|
||||||
<button class="btn btn-primary" onclick="debounce(addMissingHelminthRecipes);" data-loc="cheats_addMissingSubsumedAbilities"></button>
|
<button class="btn btn-primary" onclick="debounce(addMissingHelminthRecipes);" data-loc="cheats_addMissingSubsumedAbilities"></button>
|
||||||
@ -840,14 +843,6 @@
|
|||||||
<input class="form-check-input" type="checkbox" id="skipTutorial" />
|
<input class="form-check-input" type="checkbox" id="skipTutorial" />
|
||||||
<label class="form-check-label" for="skipTutorial" data-loc="cheats_skipTutorial"></label>
|
<label class="form-check-label" for="skipTutorial" data-loc="cheats_skipTutorial"></label>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-check">
|
|
||||||
<input class="form-check-input" type="checkbox" id="unlockAllScans" />
|
|
||||||
<label class="form-check-label" for="unlockAllScans" data-loc="cheats_unlockAllScans"></label>
|
|
||||||
</div>
|
|
||||||
<div class="form-check">
|
|
||||||
<input class="form-check-input" type="checkbox" id="unlockAllShipFeatures" />
|
|
||||||
<label class="form-check-label" for="unlockAllShipFeatures" data-loc="cheats_unlockAllShipFeatures"></label>
|
|
||||||
</div>
|
|
||||||
<div class="form-check">
|
<div class="form-check">
|
||||||
<input class="form-check-input" type="checkbox" id="unlockAllShipDecorations" />
|
<input class="form-check-input" type="checkbox" id="unlockAllShipDecorations" />
|
||||||
<label class="form-check-label" for="unlockAllShipDecorations" data-loc="cheats_unlockAllShipDecorations"></label>
|
<label class="form-check-label" for="unlockAllShipDecorations" data-loc="cheats_unlockAllShipDecorations"></label>
|
||||||
@ -860,10 +855,6 @@
|
|||||||
<input class="form-check-input" type="checkbox" id="unlockAllSkins" />
|
<input class="form-check-input" type="checkbox" id="unlockAllSkins" />
|
||||||
<label class="form-check-label" for="unlockAllSkins" data-loc="cheats_unlockAllSkins"></label>
|
<label class="form-check-label" for="unlockAllSkins" data-loc="cheats_unlockAllSkins"></label>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-check">
|
|
||||||
<input class="form-check-input" type="checkbox" id="unlockAllCapturaScenes" />
|
|
||||||
<label class="form-check-label" for="unlockAllCapturaScenes" data-loc="cheats_unlockAllCapturaScenes"></label>
|
|
||||||
</div>
|
|
||||||
<div class="form-check">
|
<div class="form-check">
|
||||||
<input class="form-check-input" type="checkbox" id="unlockAllDecoRecipes" />
|
<input class="form-check-input" type="checkbox" id="unlockAllDecoRecipes" />
|
||||||
<label class="form-check-label" for="unlockAllDecoRecipes" data-loc="cheats_unlockAllDecoRecipes"></label>
|
<label class="form-check-label" for="unlockAllDecoRecipes" data-loc="cheats_unlockAllDecoRecipes"></label>
|
||||||
|
|||||||
@ -190,7 +190,7 @@ single.on("route_load", function (event) {
|
|||||||
$("body").removeClass("logged-in");
|
$("body").removeClass("logged-in");
|
||||||
}
|
}
|
||||||
|
|
||||||
$(".nav-link").removeClass("active");
|
$("#sidebar .nav-link").removeClass("active");
|
||||||
const navLink = document.querySelector(".nav-link[href='" + event.route.paths[0] + "']");
|
const navLink = document.querySelector(".nav-link[href='" + event.route.paths[0] + "']");
|
||||||
if (navLink) {
|
if (navLink) {
|
||||||
navLink.classList.add("active");
|
navLink.classList.add("active");
|
||||||
@ -2339,7 +2339,7 @@ function unlockFocusSchool(upgradeType) {
|
|||||||
$.post({
|
$.post({
|
||||||
url: "/api/focus.php?" + window.authz + "&op=5",
|
url: "/api/focus.php?" + window.authz + "&op=5",
|
||||||
contentType: "text/plain",
|
contentType: "text/plain",
|
||||||
data: "{}"
|
data: JSON.stringify({ FocusType: null })
|
||||||
}).done(function () {
|
}).done(function () {
|
||||||
// Unlock the way now
|
// Unlock the way now
|
||||||
$.post({
|
$.post({
|
||||||
@ -2750,6 +2750,24 @@ async function doMaxPlexus() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
async function doUnlockAllScans() {
|
||||||
|
await revalidateAuthz();
|
||||||
|
await fetch("/custom/unlockAllScans?" + window.authz);
|
||||||
|
toast(loc("cheats_unlockSucc"));
|
||||||
|
}
|
||||||
|
|
||||||
|
async function doUnlockAllShipFeatures() {
|
||||||
|
await revalidateAuthz();
|
||||||
|
await fetch("/custom/unlockAllShipFeatures?" + window.authz);
|
||||||
|
toast(loc("cheats_unlockSucc"));
|
||||||
|
}
|
||||||
|
|
||||||
|
async function doUnlockAllCapturaScenes() {
|
||||||
|
await revalidateAuthz();
|
||||||
|
await fetch("/custom/unlockAllCapturaScenes?" + window.authz);
|
||||||
|
toast(loc("cheats_unlockSucc"));
|
||||||
|
}
|
||||||
|
|
||||||
async function unlockAllMissions() {
|
async function unlockAllMissions() {
|
||||||
await revalidateAuthz();
|
await revalidateAuthz();
|
||||||
await fetch("/custom/completeAllMissions?" + window.authz);
|
await fetch("/custom/completeAllMissions?" + window.authz);
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user