feat: infiniteEndo & infiniteRegalAya (#741)

This commit is contained in:
Sainan 2025-01-06 05:36:39 +01:00 committed by GitHub
parent f56fc232f2
commit 172db2337f
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
7 changed files with 28 additions and 3 deletions

View File

@ -17,6 +17,8 @@
"completeAllQuests": true,
"infiniteCredits": true,
"infinitePlatinum": true,
"infiniteEndo": true,
"infiniteRegalAya": true,
"unlockAllShipFeatures": true,
"unlockAllShipDecorations": true,
"unlockAllFlavourItems": true,

View File

@ -74,6 +74,12 @@ export const inventoryController: RequestHandler = async (request, response) =>
inventoryResponse.PremiumCreditsFree = 999999999;
inventoryResponse.PremiumCredits = 999999999;
}
if (config.infiniteEndo) {
inventoryResponse.FusionPoints = 999999999;
}
if (config.infiniteRegalAya) {
inventoryResponse.PrimeTokens = 999999999;
}
if (config.skipAllDialogue) {
inventoryResponse.TauntHistory = [

View File

@ -43,6 +43,8 @@ interface IConfig {
completeAllQuests?: boolean;
infiniteCredits?: boolean;
infinitePlatinum?: boolean;
infiniteEndo?: boolean;
infiniteRegalAya?: boolean;
unlockAllShipFeatures?: boolean;
unlockAllShipDecorations?: boolean;
unlockAllFlavourItems?: boolean;

View File

@ -908,8 +908,12 @@ export const upgradeMod = async (artifactsData: IArtifactsRequest, accountId: st
}
}
inventory.RegularCredits -= Cost;
inventory.FusionPoints -= FusionPointCost;
if (!config.infiniteCredits) {
inventory.RegularCredits -= Cost;
}
if (!config.infiniteEndo) {
inventory.FusionPoints -= FusionPointCost;
}
const changedInventory = await inventory.save();
const itemId = changedInventory.toJSON().Upgrades[itemIndex]?.ItemId?.$oid;

View File

@ -24,6 +24,7 @@ import {
ExportVendors,
TRarity
} from "warframe-public-export-plus";
import { config } from "./configService";
export const getStoreItemCategory = (storeItem: string): string => {
const storeItemString = getSubstringFromKeyword(storeItem, "StoreItems/");
@ -152,7 +153,7 @@ export const handlePurchase = async (
purchaseResponse.InventoryChanges.MiscItems ??= [];
(purchaseResponse.InventoryChanges.MiscItems as IMiscItem[]).push(invItem);
} else {
} else if (!config.infiniteRegalAya) {
inventory.PrimeTokens -= offer.PrimePrice! * purchaseRequest.PurchaseParams.Quantity;
}
await inventory.save();

View File

@ -235,6 +235,14 @@
<input class="form-check-input" type="checkbox" id="infinitePlatinum" />
<label class="form-check-label" for="infinitePlatinum">Infinite Platinum</label>
</div>
<div class="form-check">
<input class="form-check-input" type="checkbox" id="infiniteEndo" />
<label class="form-check-label" for="infiniteEndo">Infinite Endo</label>
</div>
<div class="form-check">
<input class="form-check-input" type="checkbox" id="infiniteRegalAya" />
<label class="form-check-label" for="infiniteRegalAya">Infinite Regal Aya</label>
</div>
<div class="form-check">
<input class="form-check-input" type="checkbox" id="unlockAllShipFeatures" />
<label class="form-check-label" for="unlockAllShipFeatures">Unlock All Ship Features</label>

View File

@ -804,6 +804,8 @@ const uiConfigs = [
"completeAllQuests",
"infiniteCredits",
"infinitePlatinum",
"infiniteEndo",
"infiniteRegalAya",
"unlockAllShipFeatures",
"unlockAllShipDecorations",
"unlockAllFlavourItems",