feat: add unlockAllSkins option (#232)

This commit is contained in:
Sainan 2024-05-29 22:08:41 +02:00 committed by GitHub
parent 5f2adb7b47
commit 5975aa711e
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
4 changed files with 4046 additions and 0 deletions

View File

@ -18,5 +18,6 @@
"unlockallShipFeatures": true, "unlockallShipFeatures": true,
"unlockAllShipDecorations": true, "unlockAllShipDecorations": true,
"unlockAllFlavourItems": true, "unlockAllFlavourItems": true,
"unlockAllSkins": true,
"spoofMasteryRank": -1 "spoofMasteryRank": -1
} }

View File

@ -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 &&

View File

@ -16,6 +16,7 @@ interface IConfig {
unlockallShipFeatures?: boolean; unlockallShipFeatures?: boolean;
unlockAllShipDecorations?: boolean; unlockAllShipDecorations?: boolean;
unlockAllFlavourItems?: boolean; unlockAllFlavourItems?: boolean;
unlockAllSkins?: boolean;
spoofMasteryRank?: number; spoofMasteryRank?: number;
} }

File diff suppressed because it is too large Load Diff