From bbca21467bdaace05cd93813a096fd1d14aacf89 Mon Sep 17 00:00:00 2001 From: Sainan Date: Fri, 17 Jan 2025 05:20:27 +0100 Subject: [PATCH] feat: noDailyStandingLimits cheat --- config.json.example | 1 + src/controllers/api/inventoryController.ts | 6 ++++++ src/controllers/api/syndicateStandingBonusController.ts | 7 +++++-- src/services/configService.ts | 1 + static/webui/index.html | 6 ++++++ 5 files changed, 19 insertions(+), 2 deletions(-) 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 d6c1236c..5b143728 100644 --- a/src/controllers/api/inventoryController.ts +++ b/src/controllers/api/inventoryController.ts @@ -234,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/controllers/api/syndicateStandingBonusController.ts b/src/controllers/api/syndicateStandingBonusController.ts index 5fafd89d..63776619 100644 --- a/src/controllers/api/syndicateStandingBonusController.ts +++ b/src/controllers/api/syndicateStandingBonusController.ts @@ -4,6 +4,7 @@ import { addMiscItems, getInventory, getStandingLimit, updateStandingLimit } fro import { IMiscItem } from "@/src/types/inventoryTypes/inventoryTypes"; import { IOid } from "@/src/types/commonTypes"; import { ExportSyndicates, ISyndicate } from "warframe-public-export-plus"; +import { config } from "@/src/services/configService"; export const syndicateStandingBonusController: RequestHandler = async (req, res) => { const accountId = await getAccountIdForRequest(req); @@ -36,13 +37,15 @@ export const syndicateStandingBonusController: RequestHandler = async (req, res) if (syndicate.Standing + gainedStanding > max) { gainedStanding = max - syndicate.Standing; } - if (gainedStanding > getStandingLimit(inventory, syndicateMeta.dailyLimitBin)) { + if (!config.noDailyStandingLimits && gainedStanding > getStandingLimit(inventory, syndicateMeta.dailyLimitBin)) { gainedStanding = getStandingLimit(inventory, syndicateMeta.dailyLimitBin); } syndicate.Standing += gainedStanding; - updateStandingLimit(inventory, syndicateMeta.dailyLimitBin, gainedStanding); + if (!config.noDailyStandingLimits) { + updateStandingLimit(inventory, syndicateMeta.dailyLimitBin, gainedStanding); + } await inventory.save(); 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/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 +
+ + +