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, "completeAllQuests": true,
"infiniteCredits": true, "infiniteCredits": true,
"infinitePlatinum": true, "infinitePlatinum": true,
"infiniteEndo": true,
"infiniteRegalAya": true,
"unlockAllShipFeatures": true, "unlockAllShipFeatures": true,
"unlockAllShipDecorations": true, "unlockAllShipDecorations": true,
"unlockAllFlavourItems": true, "unlockAllFlavourItems": true,

View File

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

View File

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

View File

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

View File

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

View File

@ -235,6 +235,14 @@
<input class="form-check-input" type="checkbox" id="infinitePlatinum" /> <input class="form-check-input" type="checkbox" id="infinitePlatinum" />
<label class="form-check-label" for="infinitePlatinum">Infinite Platinum</label> <label class="form-check-label" for="infinitePlatinum">Infinite Platinum</label>
</div> </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"> <div class="form-check">
<input class="form-check-input" type="checkbox" id="unlockAllShipFeatures" /> <input class="form-check-input" type="checkbox" id="unlockAllShipFeatures" />
<label class="form-check-label" for="unlockAllShipFeatures">Unlock All Ship Features</label> <label class="form-check-label" for="unlockAllShipFeatures">Unlock All Ship Features</label>

View File

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