diff --git a/config.json.example b/config.json.example index f3803e0b..660da015 100644 --- a/config.json.example +++ b/config.json.example @@ -28,5 +28,6 @@ "unlockDoubleCapacityPotatoesEverywhere": true, "unlockExilusEverywhere": true, "unlockArcanesEverywhere": true, + "noDailyStandingLimits": true, "spoofMasteryRank": -1 } diff --git a/src/controllers/api/inventoryController.ts b/src/controllers/api/inventoryController.ts index 631cd45e..5b143728 100644 --- a/src/controllers/api/inventoryController.ts +++ b/src/controllers/api/inventoryController.ts @@ -15,6 +15,7 @@ import { ExportVirtuals } from "warframe-public-export-plus"; import { handleSubsumeCompletion } from "./infestedFoundryController"; +import { allDailyAffiliationKeys } from "@/src/services/inventoryService"; export const inventoryController: RequestHandler = async (request, response) => { const account = await getAccountForRequest(request); @@ -32,20 +33,9 @@ export const inventoryController: RequestHandler = async (request, response) => account.LastLoginDay = today; await account.save(); - inventory.DailyAffiliation = 16000 + inventory.PlayerLevel * 500; - inventory.DailyAffiliationPvp = 16000 + inventory.PlayerLevel * 500; - inventory.DailyAffiliationLibrary = 16000 + inventory.PlayerLevel * 500; - inventory.DailyAffiliationCetus = 16000 + inventory.PlayerLevel * 500; - inventory.DailyAffiliationQuills = 16000 + inventory.PlayerLevel * 500; - inventory.DailyAffiliationSolaris = 16000 + inventory.PlayerLevel * 500; - inventory.DailyAffiliationVentkids = 16000 + inventory.PlayerLevel * 500; - inventory.DailyAffiliationVox = 16000 + inventory.PlayerLevel * 500; - inventory.DailyAffiliationEntrati = 16000 + inventory.PlayerLevel * 500; - inventory.DailyAffiliationNecraloid = 16000 + inventory.PlayerLevel * 500; - inventory.DailyAffiliationZariman = 16000 + inventory.PlayerLevel * 500; - inventory.DailyAffiliationKahl = 16000 + inventory.PlayerLevel * 500; - inventory.DailyAffiliationCavia = 16000 + inventory.PlayerLevel * 500; - inventory.DailyAffiliationHex = 16000 + inventory.PlayerLevel * 500; + for (const key of allDailyAffiliationKeys) { + inventory[key] = 16000 + inventory.PlayerLevel * 500; + } inventory.DailyFocus = 250000 + inventory.PlayerLevel * 5000; await inventory.save(); } @@ -244,6 +234,12 @@ export const inventoryController: RequestHandler = async (request, response) => } } + if (config.noDailyStandingLimits) { + for (const key of allDailyAffiliationKeys) { + inventoryResponse[key] = 999_999; + } + } + // Fix for #380 inventoryResponse.NextRefill = { $date: { $numberLong: "9999999999999" } }; diff --git a/src/services/configService.ts b/src/services/configService.ts index 123e02d3..89d81e8d 100644 --- a/src/services/configService.ts +++ b/src/services/configService.ts @@ -54,6 +54,7 @@ interface IConfig { unlockDoubleCapacityPotatoesEverywhere?: boolean; unlockExilusEverywhere?: boolean; unlockArcanesEverywhere?: boolean; + noDailyStandingLimits?: boolean; spoofMasteryRank?: number; } diff --git a/src/services/inventoryService.ts b/src/services/inventoryService.ts index 754473c9..e9c4ceb2 100644 --- a/src/services/inventoryService.ts +++ b/src/services/inventoryService.ts @@ -514,8 +514,12 @@ const standingLimitBinToInventoryKey: Record< STANDING_LIMIT_BIN_HEX: "DailyAffiliationHex" }; +export const allDailyAffiliationKeys: (keyof IDailyAffiliations)[] = Object.entries(standingLimitBinToInventoryKey).map( + arr => arr[1] +); + export const getStandingLimit = (inventory: IDailyAffiliations, bin: TStandingLimitBin): number => { - if (bin == "STANDING_LIMIT_BIN_NONE") { + if (bin == "STANDING_LIMIT_BIN_NONE" || config.noDailyStandingLimits) { return Number.MAX_SAFE_INTEGER; } return inventory[standingLimitBinToInventoryKey[bin]]; @@ -526,7 +530,7 @@ export const updateStandingLimit = ( bin: TStandingLimitBin, subtrahend: number ): void => { - if (bin != "STANDING_LIMIT_BIN_NONE") { + if (bin != "STANDING_LIMIT_BIN_NONE" && !config.noDailyStandingLimits) { inventory[standingLimitBinToInventoryKey[bin]] -= subtrahend; } }; diff --git a/static/webui/index.html b/static/webui/index.html index 114464ba..319f4f61 100644 --- a/static/webui/index.html +++ b/static/webui/index.html @@ -298,6 +298,12 @@ Arcane Adapters Everywhere +
+ + +