feat: add unlockAllSkins option (#232)
This commit is contained in:
parent
5f2adb7b47
commit
5975aa711e
@ -18,5 +18,6 @@
|
|||||||
"unlockallShipFeatures": true,
|
"unlockallShipFeatures": true,
|
||||||
"unlockAllShipDecorations": true,
|
"unlockAllShipDecorations": true,
|
||||||
"unlockAllFlavourItems": true,
|
"unlockAllFlavourItems": true,
|
||||||
|
"unlockAllSkins": true,
|
||||||
"spoofMasteryRank": -1
|
"spoofMasteryRank": -1
|
||||||
}
|
}
|
||||||
|
@ -8,6 +8,7 @@ import allMissions from "@/static/fixed_responses/allMissions.json";
|
|||||||
import allQuestKeys from "@/static/fixed_responses/allQuestKeys.json";
|
import allQuestKeys from "@/static/fixed_responses/allQuestKeys.json";
|
||||||
import allShipDecorations from "@/static/fixed_responses/allShipDecorations.json";
|
import allShipDecorations from "@/static/fixed_responses/allShipDecorations.json";
|
||||||
import allFlavourItems from "@/static/fixed_responses/allFlavourItems.json";
|
import allFlavourItems from "@/static/fixed_responses/allFlavourItems.json";
|
||||||
|
import allSkins from "@/static/fixed_responses/allSkins.json";
|
||||||
import { ILoadoutDatabase } from "@/src/types/saveLoadoutTypes";
|
import { ILoadoutDatabase } from "@/src/types/saveLoadoutTypes";
|
||||||
import { IShipInventory, IFlavourItem } from "@/src/types/inventoryTypes/inventoryTypes";
|
import { IShipInventory, IFlavourItem } from "@/src/types/inventoryTypes/inventoryTypes";
|
||||||
|
|
||||||
@ -59,6 +60,18 @@ const inventoryController: RequestHandler = async (request: Request, response: R
|
|||||||
if (config.unlockAllShipDecorations) inventoryResponse.ShipDecorations = allShipDecorations;
|
if (config.unlockAllShipDecorations) inventoryResponse.ShipDecorations = allShipDecorations;
|
||||||
if (config.unlockAllFlavourItems) inventoryResponse.FlavourItems = allFlavourItems satisfies IFlavourItem[];
|
if (config.unlockAllFlavourItems) inventoryResponse.FlavourItems = allFlavourItems satisfies IFlavourItem[];
|
||||||
|
|
||||||
|
if (config.unlockAllSkins) {
|
||||||
|
inventoryResponse.WeaponSkins = [];
|
||||||
|
for (let skin of allSkins) {
|
||||||
|
inventoryResponse.WeaponSkins.push({
|
||||||
|
ItemId: {
|
||||||
|
$oid: "000000000000000000000000"
|
||||||
|
},
|
||||||
|
ItemType: skin
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (
|
if (
|
||||||
typeof config.spoofMasteryRank === "number" &&
|
typeof config.spoofMasteryRank === "number" &&
|
||||||
config.spoofMasteryRank >= 0 &&
|
config.spoofMasteryRank >= 0 &&
|
||||||
|
@ -16,6 +16,7 @@ interface IConfig {
|
|||||||
unlockallShipFeatures?: boolean;
|
unlockallShipFeatures?: boolean;
|
||||||
unlockAllShipDecorations?: boolean;
|
unlockAllShipDecorations?: boolean;
|
||||||
unlockAllFlavourItems?: boolean;
|
unlockAllFlavourItems?: boolean;
|
||||||
|
unlockAllSkins?: boolean;
|
||||||
spoofMasteryRank?: number;
|
spoofMasteryRank?: number;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
4031
static/fixed_responses/allSkins.json
Normal file
4031
static/fixed_responses/allSkins.json
Normal file
File diff suppressed because it is too large
Load Diff
Loading…
x
Reference in New Issue
Block a user