feat: replace infiniteResources with infiniteCredits & infinitePlatinum (#588)
This commit is contained in:
parent
144ac5850c
commit
8a43eae230
@ -16,7 +16,8 @@
|
||||
"unlockAllMissions": true,
|
||||
"unlockAllQuests": true,
|
||||
"completeAllQuests": false,
|
||||
"infiniteResources": true,
|
||||
"infiniteCredits": true,
|
||||
"infinitePlatinum": true,
|
||||
"unlockAllShipFeatures": true,
|
||||
"unlockAllShipDecorations": true,
|
||||
"unlockAllFlavourItems": true,
|
||||
|
@ -13,21 +13,22 @@ export const getCreditsController: RequestHandler = async (req, res) => {
|
||||
return;
|
||||
}
|
||||
|
||||
if (config.infiniteResources) {
|
||||
res.json({
|
||||
RegularCredits: 999999999,
|
||||
TradesRemaining: 999999999,
|
||||
PremiumCreditsFree: 999999999,
|
||||
PremiumCredits: 999999999
|
||||
});
|
||||
return;
|
||||
}
|
||||
|
||||
const inventory = await getInventory(accountId);
|
||||
res.json({
|
||||
|
||||
const response = {
|
||||
RegularCredits: inventory.RegularCredits,
|
||||
TradesRemaining: inventory.TradesRemaining,
|
||||
PremiumCreditsFree: inventory.PremiumCreditsFree,
|
||||
PremiumCredits: inventory.PremiumCredits
|
||||
});
|
||||
};
|
||||
|
||||
if (config.infiniteCredits) {
|
||||
response.RegularCredits = 999999999;
|
||||
}
|
||||
if (config.infinitePlatinum) {
|
||||
response.PremiumCreditsFree = 999999999;
|
||||
response.PremiumCredits = 999999999;
|
||||
}
|
||||
|
||||
res.json(response);
|
||||
};
|
||||
|
@ -33,9 +33,10 @@ const inventoryController: RequestHandler = async (request, response) => {
|
||||
|
||||
const inventoryResponse = toInventoryResponse(inventoryJSON);
|
||||
|
||||
if (config.infiniteResources) {
|
||||
if (config.infiniteCredits) {
|
||||
inventoryResponse.RegularCredits = 999999999;
|
||||
inventoryResponse.TradesRemaining = 999999999;
|
||||
}
|
||||
if (config.infinitePlatinum) {
|
||||
inventoryResponse.PremiumCreditsFree = 999999999;
|
||||
inventoryResponse.PremiumCredits = 999999999;
|
||||
}
|
||||
|
@ -33,7 +33,8 @@ interface IConfig {
|
||||
unlockAllMissions?: boolean;
|
||||
unlockAllQuests?: boolean;
|
||||
completeAllQuests?: boolean;
|
||||
infiniteResources?: boolean;
|
||||
infiniteCredits?: boolean;
|
||||
infinitePlatinum?: boolean;
|
||||
unlockAllShipFeatures?: boolean;
|
||||
unlockAllShipDecorations?: boolean;
|
||||
unlockAllFlavourItems?: boolean;
|
||||
|
@ -419,7 +419,7 @@ export const updateSlots = async (accountId: string, slotName: SlotNames, slotAm
|
||||
};
|
||||
|
||||
export const updateCurrency = async (price: number, usePremium: boolean, accountId: string) => {
|
||||
if (config.infiniteResources) {
|
||||
if (usePremium ? config.infinitePlatinum : config.infiniteCredits) {
|
||||
return {};
|
||||
}
|
||||
|
||||
|
@ -209,8 +209,12 @@
|
||||
<label class="form-check-label" for="completeAllQuests">Complete All Quests</label>
|
||||
</div>
|
||||
<div class="form-check">
|
||||
<input class="form-check-input" type="checkbox" id="infiniteResources" />
|
||||
<label class="form-check-label" for="infiniteResources">Infinite Credits and Platinum</label>
|
||||
<input class="form-check-input" type="checkbox" id="infiniteCredits" />
|
||||
<label class="form-check-label" for="infiniteCredits">Infinite Credits</label>
|
||||
</div>
|
||||
<div class="form-check">
|
||||
<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="unlockAllShipFeatures" />
|
||||
|
@ -736,7 +736,8 @@ const uiConfigs = [
|
||||
"unlockAllMissions",
|
||||
"unlockAllQuests",
|
||||
"completeAllQuests",
|
||||
"infiniteResources",
|
||||
"infiniteCredits",
|
||||
"infinitePlatinum",
|
||||
"unlockAllShipFeatures",
|
||||
"unlockAllShipDecorations",
|
||||
"unlockAllFlavourItems",
|
||||
|
Loading…
x
Reference in New Issue
Block a user