Add Infinite Platinum Option #346
@ -16,6 +16,7 @@
|
|||||||
"unlockAllQuests": true,
|
"unlockAllQuests": true,
|
||||||
"completeAllQuests": false,
|
"completeAllQuests": false,
|
||||||
"infiniteResources": true,
|
"infiniteResources": true,
|
||||||
|
"infinitePlatinum": true,
|
||||||
"unlockAllShipFeatures": true,
|
"unlockAllShipFeatures": true,
|
||||||
"unlockAllShipDecorations": true,
|
"unlockAllShipDecorations": true,
|
||||||
"unlockAllFlavourItems": true,
|
"unlockAllFlavourItems": true,
|
||||||
|
@ -24,6 +24,16 @@ export const getCreditsController: RequestHandler = async (req, res) => {
|
|||||||
}
|
}
|
||||||
|
|
||||||
const inventory = await getInventory(accountId);
|
const inventory = await getInventory(accountId);
|
||||||
|
if (config.infinitePlatinum) {
|
||||||
|
res.json({
|
||||||
|
RegularCredits: inventory.RegularCredits,
|
||||||
|
TradesRemaining: inventory.TradesRemaining,
|
||||||
|
PremiumCreditsFree: 999999999,
|
||||||
|
PremiumCredits: 999999999
|
||||||
|
|||||||
|
});
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
res.json({
|
res.json({
|
||||||
RegularCredits: inventory.RegularCredits,
|
RegularCredits: inventory.RegularCredits,
|
||||||
TradesRemaining: inventory.TradesRemaining,
|
TradesRemaining: inventory.TradesRemaining,
|
||||||
|
@ -42,6 +42,11 @@ const inventoryController: RequestHandler = async (request, response) => {
|
|||||||
inventoryResponse.PremiumCredits = 999999999;
|
inventoryResponse.PremiumCredits = 999999999;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (config.infinitePlatinum) {
|
||||||
|
inventoryResponse.PremiumCreditsFree = 999999999;
|
||||||
|
inventoryResponse.PremiumCredits = 999999999;
|
||||||
|
}
|
||||||
|
|
||||||
if (config.unlockAllMissions) {
|
if (config.unlockAllMissions) {
|
||||||
inventoryResponse.Missions = allMissions;
|
inventoryResponse.Missions = allMissions;
|
||||||
inventoryResponse.NodeIntrosCompleted.push("TeshinHardModeUnlocked");
|
inventoryResponse.NodeIntrosCompleted.push("TeshinHardModeUnlocked");
|
||||||
|
@ -33,6 +33,7 @@ interface IConfig {
|
|||||||
unlockAllQuests?: boolean;
|
unlockAllQuests?: boolean;
|
||||||
completeAllQuests?: boolean;
|
completeAllQuests?: boolean;
|
||||||
infiniteResources?: boolean;
|
infiniteResources?: boolean;
|
||||||
|
infinitePlatinum?: boolean;
|
||||||
unlockAllShipFeatures?: boolean;
|
unlockAllShipFeatures?: boolean;
|
||||||
unlockAllShipDecorations?: boolean;
|
unlockAllShipDecorations?: boolean;
|
||||||
unlockAllFlavourItems?: boolean;
|
unlockAllFlavourItems?: boolean;
|
||||||
|
@ -339,7 +339,9 @@ export const updateCurrency = async (price: number, usePremium: boolean, account
|
|||||||
const inventory = await getInventory(accountId);
|
const inventory = await getInventory(accountId);
|
||||||
|
|
||||||
if (usePremium) {
|
if (usePremium) {
|
||||||
if (inventory.PremiumCreditsFree > 0) {
|
if (config.infinitePlatinum) {
|
||||||
|
return {};
|
||||||
|
} else if (inventory.PremiumCreditsFree > 0) {
|
||||||
inventory.PremiumCreditsFree -= Math.min(price, inventory.PremiumCreditsFree);
|
inventory.PremiumCreditsFree -= Math.min(price, inventory.PremiumCreditsFree);
|
||||||
}
|
}
|
||||||
inventory.PremiumCredits -= price;
|
inventory.PremiumCredits -= price;
|
||||||
|
@ -231,9 +231,11 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="form-check">
|
<div class="form-check">
|
||||||
<input class="form-check-input" type="checkbox" id="infiniteResources" />
|
<input class="form-check-input" type="checkbox" id="infiniteResources" />
|
||||||
<label class="form-check-label" for="infiniteResources"
|
<label class="form-check-label" for="infiniteResources">Infinite Credits and Platinum</label>
|
||||||
>Infinite Credits and Platinum</label
|
</div>
|
||||||
>
|
<div class="form-check">
|
||||||
|
<input class="form-check-input" type="checkbox" id="infinitePlatinum" />
|
||||||
|
<label class="form-check-label" for="infinitePlatinum">Infinite Platinum Only</label>
|
||||||
</div>
|
</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" />
|
||||||
@ -241,9 +243,7 @@
|
|||||||
</div>
|
</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"
|
<label class="form-check-label" for="unlockAllShipDecorations">Unlock All Ship Decorations</label>
|
||||||
>Unlock All Ship Decorations</label
|
|
||||||
>
|
|
||||||
</div>
|
</div>
|
||||||
<div class="form-check">
|
<div class="form-check">
|
||||||
<input class="form-check-input" type="checkbox" id="unlockAllFlavourItems" />
|
<input class="form-check-input" type="checkbox" id="unlockAllFlavourItems" />
|
||||||
@ -254,9 +254,7 @@
|
|||||||
<label class="form-check-label" for="unlockAllSkins">Unlock All Skins</label>
|
<label class="form-check-label" for="unlockAllSkins">Unlock All Skins</label>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label class="form-label" for="spoofMasteryRank"
|
<label class="form-label" for="spoofMasteryRank">Spoofed Mastery Rank (-1 to disable)</label>
|
||||||
>Spoofed Mastery Rank (-1 to disable)</label
|
|
||||||
>
|
|
||||||
<input class="form-control" id="spoofMasteryRank" type="number" min="-1" />
|
<input class="form-control" id="spoofMasteryRank" type="number" min="-1" />
|
||||||
</div>
|
</div>
|
||||||
<button class="btn btn-primary mt-3" type="submit">Save Settings</button>
|
<button class="btn btn-primary mt-3" type="submit">Save Settings</button>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user
formatting - are you not using prettier?