Compare commits
6 Commits
c00f5a764e
...
d60e5b3e9f
Author | SHA1 | Date | |
---|---|---|---|
d60e5b3e9f | |||
69bde43fa6 | |||
9f0be223e6 | |||
eb56442d63 | |||
a259afe912 | |||
4d7b3b543b |
6
package-lock.json
generated
6
package-lock.json
generated
@ -4093,9 +4093,9 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/warframe-public-export-plus": {
|
"node_modules/warframe-public-export-plus": {
|
||||||
"version": "0.5.30",
|
"version": "0.5.32",
|
||||||
"resolved": "https://registry.npmjs.org/warframe-public-export-plus/-/warframe-public-export-plus-0.5.30.tgz",
|
"resolved": "https://registry.npmjs.org/warframe-public-export-plus/-/warframe-public-export-plus-0.5.32.tgz",
|
||||||
"integrity": "sha512-vzs+naEqp3iFZTbgIky4jiNbjNIovuR4oSimrFiuyIbrnfTlfXFzDfzT0hG2rgS8yEXBAbOcv2Zfm3fmWuZ0Kg=="
|
"integrity": "sha512-jO9i2Gzz9DWibiHlEO17D975ajs6KrTay8cS5I0GkUUe1XWVU8mML4b+IYCHzM4FWq1t6p2YPCGznQfknqvorg=="
|
||||||
},
|
},
|
||||||
"node_modules/warframe-riven-info": {
|
"node_modules/warframe-riven-info": {
|
||||||
"version": "0.1.2",
|
"version": "0.1.2",
|
||||||
|
@ -10,7 +10,7 @@ export const giveKeyChainTriggeredItemsController: RequestHandler = async (req,
|
|||||||
const keyChainInfo = getJSONfromString<IKeyChainRequest>((req.body as string).toString());
|
const keyChainInfo = getJSONfromString<IKeyChainRequest>((req.body as string).toString());
|
||||||
|
|
||||||
const inventory = await getInventory(accountId);
|
const inventory = await getInventory(accountId);
|
||||||
const inventoryChanges = giveKeyChainItem(inventory, keyChainInfo);
|
const inventoryChanges = await giveKeyChainItem(inventory, keyChainInfo);
|
||||||
await inventory.save();
|
await inventory.save();
|
||||||
|
|
||||||
res.send(inventoryChanges);
|
res.send(inventoryChanges);
|
||||||
|
@ -1 +1,127 @@
|
|||||||
export const giveStartingGearController = async () => {};
|
import { getJSONfromString } from "@/src/helpers/stringHelpers";
|
||||||
|
import { InventoryDocumentProps } from "@/src/models/inventoryModels/inventoryModel";
|
||||||
|
import {
|
||||||
|
addEquipment,
|
||||||
|
addItem,
|
||||||
|
combineInventoryChanges,
|
||||||
|
getInventory,
|
||||||
|
updateSlots
|
||||||
|
} from "@/src/services/inventoryService";
|
||||||
|
import { getAccountIdForRequest } from "@/src/services/loginService";
|
||||||
|
import { IInventoryClient, IInventoryDatabase, InventorySlot } from "@/src/types/inventoryTypes/inventoryTypes";
|
||||||
|
import { IInventoryChanges } from "@/src/types/purchaseTypes";
|
||||||
|
import { RequestHandler } from "express";
|
||||||
|
import { HydratedDocument } from "mongoose";
|
||||||
|
|
||||||
|
type TPartialStartingGear = Pick<IInventoryClient, "LongGuns" | "Suits" | "Pistols" | "Melee">;
|
||||||
|
|
||||||
|
export const giveStartingGearController: RequestHandler = async (req, res) => {
|
||||||
|
const accountId = await getAccountIdForRequest(req);
|
||||||
|
const startingGear = getJSONfromString<TPartialStartingGear>(String(req.body));
|
||||||
|
const inventory = await getInventory(accountId);
|
||||||
|
|
||||||
|
const inventoryChanges = await addStartingGear(inventory, startingGear);
|
||||||
|
await inventory.save();
|
||||||
|
|
||||||
|
res.send(inventoryChanges);
|
||||||
|
};
|
||||||
|
|
||||||
|
//TODO: RawUpgrades might need to return a LastAdded
|
||||||
|
const awakeningRewards = [
|
||||||
|
"/Lotus/Types/StoreItems/AvatarImages/AvatarImageItem1",
|
||||||
|
"/Lotus/Types/StoreItems/AvatarImages/AvatarImageItem2",
|
||||||
|
"/Lotus/Types/StoreItems/AvatarImages/AvatarImageItem3",
|
||||||
|
"/Lotus/Types/StoreItems/AvatarImages/AvatarImageItem4",
|
||||||
|
"/Lotus/Types/Restoratives/LisetAutoHack",
|
||||||
|
"/Lotus/Upgrades/Mods/Warframe/AvatarShieldMaxMod"
|
||||||
|
];
|
||||||
|
|
||||||
|
export const addStartingGear = async (
|
||||||
|
inventory: HydratedDocument<IInventoryDatabase, InventoryDocumentProps>,
|
||||||
|
startingGear: TPartialStartingGear | undefined = undefined
|
||||||
|
) => {
|
||||||
|
const { LongGuns, Pistols, Suits, Melee } = startingGear || {
|
||||||
|
LongGuns: [{ ItemType: "/Lotus/Weapons/Tenno/Rifle/Rifle" }],
|
||||||
|
Pistols: [{ ItemType: "/Lotus/Weapons/Tenno/Pistol/Pistol" }],
|
||||||
|
Suits: [{ ItemType: "/Lotus/Powersuits/Excalibur/Excalibur" }],
|
||||||
|
Melee: [{ ItemType: "/Lotus/Weapons/Tenno/Melee/LongSword/LongSword" }]
|
||||||
|
};
|
||||||
|
|
||||||
|
//TODO: properly merge weapon bin changes it is currently static here
|
||||||
|
const inventoryChanges: IInventoryChanges = {};
|
||||||
|
addEquipment(inventory, "LongGuns", LongGuns[0].ItemType, undefined, inventoryChanges);
|
||||||
|
addEquipment(inventory, "Pistols", Pistols[0].ItemType, undefined, inventoryChanges);
|
||||||
|
addEquipment(inventory, "Melee", Melee[0].ItemType, undefined, inventoryChanges);
|
||||||
|
addEquipment(inventory, "Suits", Suits[0].ItemType, undefined, inventoryChanges, { Configs: Suits[0].Configs });
|
||||||
|
addEquipment(
|
||||||
|
inventory,
|
||||||
|
"DataKnives",
|
||||||
|
"/Lotus/Weapons/Tenno/HackingDevices/TnHackingDevice/TnHackingDeviceWeapon",
|
||||||
|
undefined,
|
||||||
|
inventoryChanges,
|
||||||
|
{ XP: 450_000 }
|
||||||
|
);
|
||||||
|
addEquipment(
|
||||||
|
inventory,
|
||||||
|
"Scoops",
|
||||||
|
"/Lotus/Weapons/Tenno/Speedball/SpeedballWeaponTest",
|
||||||
|
undefined,
|
||||||
|
inventoryChanges
|
||||||
|
);
|
||||||
|
|
||||||
|
updateSlots(inventory, InventorySlot.SUITS, 0, 1);
|
||||||
|
updateSlots(inventory, InventorySlot.WEAPONS, 0, 3);
|
||||||
|
inventoryChanges.SuitBin = { count: 1, platinum: 0, Slots: -1 };
|
||||||
|
inventoryChanges.WeaponBin = { count: 3, platinum: 0, Slots: -3 };
|
||||||
|
|
||||||
|
await addItem(inventory, "/Lotus/Types/Keys/VorsPrize/VorsPrizeQuestKeyChain");
|
||||||
|
inventory.ActiveQuest = "/Lotus/Types/Keys/VorsPrize/VorsPrizeQuestKeyChain";
|
||||||
|
|
||||||
|
inventory.PremiumCredits = 50;
|
||||||
|
inventory.PremiumCreditsFree = 50;
|
||||||
|
inventoryChanges.PremiumCredits = 50;
|
||||||
|
inventoryChanges.PremiumCreditsFree = 50;
|
||||||
|
inventory.RegularCredits = 3000;
|
||||||
|
inventoryChanges.RegularCredits = 3000;
|
||||||
|
|
||||||
|
for (const item of awakeningRewards) {
|
||||||
|
const inventoryDelta = await addItem(inventory, item);
|
||||||
|
combineInventoryChanges(inventoryChanges, inventoryDelta.InventoryChanges);
|
||||||
|
}
|
||||||
|
// currentloadoutids
|
||||||
|
|
||||||
|
// "LoadOutPresets": {
|
||||||
|
// "NORMAL": [
|
||||||
|
// {
|
||||||
|
// "s": {
|
||||||
|
// "ItemId": { "$oid": "67b73fbfb56b4b84d70433c2" },
|
||||||
|
// "mod": 0,
|
||||||
|
// "cus": 0
|
||||||
|
// },
|
||||||
|
// "p": {
|
||||||
|
// "ItemId": { "$oid": "67b73fbfb56b4b84d70433c5" },
|
||||||
|
// "mod": 0,
|
||||||
|
// "cus": 0
|
||||||
|
// },
|
||||||
|
// "l": {
|
||||||
|
// "ItemId": { "$oid": "67b73fbfb56b4b84d70433c4" },
|
||||||
|
// "mod": 0,
|
||||||
|
// "cus": 0
|
||||||
|
// },
|
||||||
|
// "m": {
|
||||||
|
// "ItemId": { "$oid": "67b73fbfb56b4b84d70433c6" },
|
||||||
|
// "mod": 0,
|
||||||
|
// "cus": 0
|
||||||
|
// },
|
||||||
|
// "ItemId": { "$oid": "67b73fbfb56b4b84d70433c7" }
|
||||||
|
// }
|
||||||
|
// ]
|
||||||
|
// },
|
||||||
|
|
||||||
|
inventory.PlayedParkourTutorial = true;
|
||||||
|
inventory.ReceivedStartingGear = true;
|
||||||
|
|
||||||
|
//originally ship is returned
|
||||||
|
//also weaponskins
|
||||||
|
return inventoryChanges;
|
||||||
|
};
|
||||||
|
@ -13,7 +13,8 @@ export const manageQuestsController: RequestHandler = async (req, res) => {
|
|||||||
| "completeAll"
|
| "completeAll"
|
||||||
| "ResetAll"
|
| "ResetAll"
|
||||||
| "completeAllUnlocked"
|
| "completeAllUnlocked"
|
||||||
| "updateKey";
|
| "updateKey"
|
||||||
|
| "giveAll";
|
||||||
const questKeyUpdate = req.body as IUpdateQuestRequest["QuestKeys"];
|
const questKeyUpdate = req.body as IUpdateQuestRequest["QuestKeys"];
|
||||||
|
|
||||||
const allQuestKeys: string[] = [];
|
const allQuestKeys: string[] = [];
|
||||||
@ -71,6 +72,7 @@ export const manageQuestsController: RequestHandler = async (req, res) => {
|
|||||||
for (const questKey of inventory.QuestKeys) {
|
for (const questKey of inventory.QuestKeys) {
|
||||||
questKey.Completed = false;
|
questKey.Completed = false;
|
||||||
questKey.Progress = [];
|
questKey.Progress = [];
|
||||||
|
questKey.CompletionDate = undefined;
|
||||||
}
|
}
|
||||||
inventory.ActiveQuest = "";
|
inventory.ActiveQuest = "";
|
||||||
break;
|
break;
|
||||||
@ -78,7 +80,6 @@ export const manageQuestsController: RequestHandler = async (req, res) => {
|
|||||||
case "completeAllUnlocked": {
|
case "completeAllUnlocked": {
|
||||||
logger.info("completing all unlocked quests..");
|
logger.info("completing all unlocked quests..");
|
||||||
for (const questKey of inventory.QuestKeys) {
|
for (const questKey of inventory.QuestKeys) {
|
||||||
console.log("size of questkeys", inventory.QuestKeys.length);
|
|
||||||
try {
|
try {
|
||||||
await completeQuest(inventory, questKey.ItemType);
|
await completeQuest(inventory, questKey.ItemType);
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
@ -105,6 +106,12 @@ export const manageQuestsController: RequestHandler = async (req, res) => {
|
|||||||
inventory.ActiveQuest = "";
|
inventory.ActiveQuest = "";
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
case "giveAll": {
|
||||||
|
for (const questKey of allQuestKeys) {
|
||||||
|
addQuestKey(inventory, { ItemType: questKey });
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
await inventory.save();
|
await inventory.save();
|
||||||
|
@ -33,9 +33,9 @@ interface IConfig {
|
|||||||
httpPort?: number;
|
httpPort?: number;
|
||||||
httpsPort?: number;
|
httpsPort?: number;
|
||||||
myIrcAddresses?: string[];
|
myIrcAddresses?: string[];
|
||||||
platformCDNs: string[];
|
platformCDNs?: string[];
|
||||||
hubAddress: string;
|
hubAddress?: string;
|
||||||
NRS: string[];
|
NRS?: string[];
|
||||||
administratorNames?: string[] | string;
|
administratorNames?: string[] | string;
|
||||||
autoCreateAccount?: boolean;
|
autoCreateAccount?: boolean;
|
||||||
skipTutorial?: boolean;
|
skipTutorial?: boolean;
|
||||||
|
@ -23,7 +23,8 @@ import {
|
|||||||
IInventoryDatabase,
|
IInventoryDatabase,
|
||||||
IKubrowPetEggDatabase,
|
IKubrowPetEggDatabase,
|
||||||
IKubrowPetEggClient,
|
IKubrowPetEggClient,
|
||||||
ILibraryAvailableDailyTaskInfo
|
ILibraryAvailableDailyTaskInfo,
|
||||||
|
ICalendarProgress
|
||||||
} from "@/src/types/inventoryTypes/inventoryTypes";
|
} from "@/src/types/inventoryTypes/inventoryTypes";
|
||||||
import { IGenericUpdate } from "../types/genericUpdate";
|
import { IGenericUpdate } from "../types/genericUpdate";
|
||||||
import {
|
import {
|
||||||
@ -33,7 +34,7 @@ import {
|
|||||||
} from "../types/requestTypes";
|
} from "../types/requestTypes";
|
||||||
import { logger } from "@/src/utils/logger";
|
import { logger } from "@/src/utils/logger";
|
||||||
import { getExalted, getKeyChainItems } from "@/src/services/itemDataService";
|
import { getExalted, getKeyChainItems } from "@/src/services/itemDataService";
|
||||||
import { IEquipmentClient, IItemConfig } from "../types/inventoryTypes/commonInventoryTypes";
|
import { IEquipmentClient, IEquipmentDatabase, IItemConfig } from "../types/inventoryTypes/commonInventoryTypes";
|
||||||
import {
|
import {
|
||||||
ExportArcanes,
|
ExportArcanes,
|
||||||
ExportCustoms,
|
ExportCustoms,
|
||||||
@ -53,6 +54,8 @@ import { creditBundles, fusionBundles } from "@/src/services/missionInventoryUpd
|
|||||||
import { IKeyChainRequest } from "@/src/controllers/api/giveKeyChainTriggeredItemsController";
|
import { IKeyChainRequest } from "@/src/controllers/api/giveKeyChainTriggeredItemsController";
|
||||||
import { toOid } from "../helpers/inventoryHelpers";
|
import { toOid } from "../helpers/inventoryHelpers";
|
||||||
import { generateRewardSeed } from "@/src/controllers/api/getNewRewardSeedController";
|
import { generateRewardSeed } from "@/src/controllers/api/getNewRewardSeedController";
|
||||||
|
import { addStartingGear } from "@/src/controllers/api/giveStartingGearController";
|
||||||
|
import { completeQuest } from "@/src/services/questService";
|
||||||
|
|
||||||
export const createInventory = async (
|
export const createInventory = async (
|
||||||
accountOwnerId: Types.ObjectId,
|
accountOwnerId: Types.ObjectId,
|
||||||
@ -68,68 +71,17 @@ export const createInventory = async (
|
|||||||
});
|
});
|
||||||
|
|
||||||
inventory.LibraryAvailableDailyTaskInfo = createLibraryAvailableDailyTaskInfo();
|
inventory.LibraryAvailableDailyTaskInfo = createLibraryAvailableDailyTaskInfo();
|
||||||
|
inventory.CalendarProgress = createCalendar();
|
||||||
inventory.RewardSeed = generateRewardSeed();
|
inventory.RewardSeed = generateRewardSeed();
|
||||||
//await addItem(inventory, "/Lotus/Types/Friendly/PlayerControllable/Weapons/DuviriDualSwords"); TODO: can enable this once driter melees have been added to export
|
inventory.DuviriInfo = {
|
||||||
|
Seed: generateRewardSeed(),
|
||||||
|
NumCompletions: 0
|
||||||
|
};
|
||||||
|
await addItem(inventory, "/Lotus/Types/Friendly/PlayerControllable/Weapons/DuviriDualSwords");
|
||||||
|
|
||||||
if (config.skipTutorial) {
|
if (config.skipTutorial) {
|
||||||
const defaultEquipment = [
|
await addStartingGear(inventory);
|
||||||
// Awakening rewards
|
await completeQuest(inventory, "/Lotus/Types/Keys/VorsPrize/VorsPrizeQuestKeyChain");
|
||||||
{ ItemCount: 1, ItemType: "/Lotus/Powersuits/Excalibur/Excalibur" },
|
|
||||||
{ ItemCount: 1, ItemType: "/Lotus/Weapons/Tenno/Melee/LongSword/LongSword" },
|
|
||||||
{ ItemCount: 1, ItemType: "/Lotus/Weapons/Tenno/Pistol/Pistol" },
|
|
||||||
{ ItemCount: 1, ItemType: "/Lotus/Weapons/Tenno/Rifle/Rifle" },
|
|
||||||
{ ItemCount: 1, ItemType: "/Lotus/Types/StoreItems/AvatarImages/AvatarImageItem1" },
|
|
||||||
{ ItemCount: 1, ItemType: "/Lotus/Types/StoreItems/AvatarImages/AvatarImageItem2" },
|
|
||||||
{ ItemCount: 1, ItemType: "/Lotus/Types/StoreItems/AvatarImages/AvatarImageItem3" },
|
|
||||||
{ ItemCount: 1, ItemType: "/Lotus/Types/StoreItems/AvatarImages/AvatarImageItem4" },
|
|
||||||
{ ItemCount: 1, ItemType: "/Lotus/Types/Restoratives/LisetAutoHack" }
|
|
||||||
];
|
|
||||||
|
|
||||||
// const vorsPrizeRewards = [
|
|
||||||
// // Vor's Prize rewards
|
|
||||||
// { ItemCount: 1, ItemType: "/Lotus/Upgrades/Mods/Warframe/AvatarHealthMaxMod" },
|
|
||||||
// { ItemCount: 1, ItemType: "/Lotus/Upgrades/Mods/Warframe/AvatarShieldMaxMod" },
|
|
||||||
// { ItemCount: 1, ItemType: "/Lotus/Upgrades/Mods/Warframe/AvatarAbilityRangeMod" },
|
|
||||||
// { ItemCount: 1, ItemType: "/Lotus/Upgrades/Mods/Warframe/AvatarAbilityStrengthMod" },
|
|
||||||
// { ItemCount: 1, ItemType: "/Lotus/Upgrades/Mods/Warframe/AvatarAbilityDurationMod" },
|
|
||||||
// { ItemCount: 1, ItemType: "/Lotus/Upgrades/Mods/Warframe/AvatarPickupBonusMod" },
|
|
||||||
// { ItemCount: 1, ItemType: "/Lotus/Upgrades/Mods/Warframe/AvatarPowerMaxMod" },
|
|
||||||
// { ItemCount: 1, ItemType: "/Lotus/Upgrades/Mods/Warframe/AvatarEnemyRadarMod" },
|
|
||||||
// { ItemCount: 1, ItemType: "/Lotus/Upgrades/Mods/Melee/WeaponFireRateMod" },
|
|
||||||
// { ItemCount: 1, ItemType: "/Lotus/Upgrades/Mods/Melee/WeaponMeleeDamageMod" },
|
|
||||||
// { ItemCount: 1, ItemType: "/Lotus/Upgrades/Mods/Rifle/WeaponFactionDamageCorpus" },
|
|
||||||
// { ItemCount: 1, ItemType: "/Lotus/Upgrades/Mods/Rifle/WeaponFactionDamageGrineer" },
|
|
||||||
// { ItemCount: 1, ItemType: "/Lotus/Upgrades/Mods/Rifle/WeaponDamageAmountMod" },
|
|
||||||
// { ItemCount: 1, ItemType: "/Lotus/Upgrades/Mods/Pistol/WeaponFireDamageMod" },
|
|
||||||
// { ItemCount: 1, ItemType: "/Lotus/Upgrades/Mods/Pistol/WeaponElectricityDamageMod" },
|
|
||||||
// { ItemCount: 1, ItemType: "/Lotus/Upgrades/Mods/Pistol/WeaponDamageAmountMod" },
|
|
||||||
// { ItemCount: 1, ItemType: "/Lotus/Types/Recipes/Weapons/BurstonRifleBlueprint" },
|
|
||||||
// { ItemCount: 1, ItemType: "/Lotus/Types/Items/MiscItems/Morphic" },
|
|
||||||
// { ItemCount: 400, ItemType: "/Lotus/Types/Items/MiscItems/PolymerBundle" },
|
|
||||||
// { ItemCount: 150, ItemType: "/Lotus/Types/Items/MiscItems/AlloyPlate" }
|
|
||||||
// ];
|
|
||||||
for (const equipment of defaultEquipment) {
|
|
||||||
await addItem(inventory, equipment.ItemType, equipment.ItemCount);
|
|
||||||
}
|
|
||||||
|
|
||||||
// Missing in Public Export
|
|
||||||
inventory.Horses.push({
|
|
||||||
ItemType: "/Lotus/Types/NeutralCreatures/ErsatzHorse/ErsatzHorsePowerSuit"
|
|
||||||
});
|
|
||||||
inventory.DataKnives.push({
|
|
||||||
ItemType: "/Lotus/Weapons/Tenno/HackingDevices/TnHackingDevice/TnHackingDeviceWeapon",
|
|
||||||
XP: 450000
|
|
||||||
});
|
|
||||||
inventory.Scoops.push({
|
|
||||||
ItemType: "/Lotus/Weapons/Tenno/Speedball/SpeedballWeaponTest"
|
|
||||||
});
|
|
||||||
inventory.DrifterMelee.push({
|
|
||||||
ItemType: "/Lotus/Types/Friendly/PlayerControllable/Weapons/DuviriDualSwords"
|
|
||||||
});
|
|
||||||
|
|
||||||
inventory.QuestKeys.push({
|
|
||||||
ItemType: "/Lotus/Types/Keys/VorsPrize/VorsPrizeQuestKeyChain"
|
|
||||||
});
|
|
||||||
|
|
||||||
const completedMissions = ["SolNode27", "SolNode89", "SolNode63", "SolNode85", "SolNode15", "SolNode79"];
|
const completedMissions = ["SolNode27", "SolNode89", "SolNode63", "SolNode85", "SolNode15", "SolNode79"];
|
||||||
|
|
||||||
@ -139,9 +91,6 @@ export const createInventory = async (
|
|||||||
Tag: tag
|
Tag: tag
|
||||||
}))
|
}))
|
||||||
);
|
);
|
||||||
|
|
||||||
inventory.RegularCredits = 25000;
|
|
||||||
inventory.FusionPoints = 180;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
await inventory.save();
|
await inventory.save();
|
||||||
@ -156,6 +105,7 @@ export const createInventory = async (
|
|||||||
* @param InventoryChanges - will hold the combined changes
|
* @param InventoryChanges - will hold the combined changes
|
||||||
* @param delta - inventory changes to be added
|
* @param delta - inventory changes to be added
|
||||||
*/
|
*/
|
||||||
|
//TODO: this fails silently when providing an incorrect object to delta
|
||||||
export const combineInventoryChanges = (InventoryChanges: IInventoryChanges, delta: IInventoryChanges): void => {
|
export const combineInventoryChanges = (InventoryChanges: IInventoryChanges, delta: IInventoryChanges): void => {
|
||||||
for (const key in delta) {
|
for (const key in delta) {
|
||||||
if (!(key in InventoryChanges)) {
|
if (!(key in InventoryChanges)) {
|
||||||
@ -596,7 +546,8 @@ export const addSentinelWeapon = (
|
|||||||
export const addPowerSuit = (
|
export const addPowerSuit = (
|
||||||
inventory: TInventoryDatabaseDocument,
|
inventory: TInventoryDatabaseDocument,
|
||||||
powersuitName: string,
|
powersuitName: string,
|
||||||
inventoryChanges: IInventoryChanges = {}
|
inventoryChanges: IInventoryChanges = {},
|
||||||
|
configs: IItemConfig[] = []
|
||||||
): IInventoryChanges => {
|
): IInventoryChanges => {
|
||||||
const specialItems = getExalted(powersuitName);
|
const specialItems = getExalted(powersuitName);
|
||||||
if (specialItems) {
|
if (specialItems) {
|
||||||
@ -604,7 +555,7 @@ export const addPowerSuit = (
|
|||||||
addSpecialItem(inventory, specialItem, inventoryChanges);
|
addSpecialItem(inventory, specialItem, inventoryChanges);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
const suitIndex = inventory.Suits.push({ ItemType: powersuitName, Configs: [], UpgradeVer: 101, XP: 0 }) - 1;
|
const suitIndex = inventory.Suits.push({ ItemType: powersuitName, Configs: configs, UpgradeVer: 101, XP: 0 }) - 1;
|
||||||
inventoryChanges.Suits ??= [];
|
inventoryChanges.Suits ??= [];
|
||||||
inventoryChanges.Suits.push(inventory.Suits[suitIndex].toJSON<IEquipmentClient>());
|
inventoryChanges.Suits.push(inventory.Suits[suitIndex].toJSON<IEquipmentClient>());
|
||||||
return inventoryChanges;
|
return inventoryChanges;
|
||||||
@ -785,15 +736,19 @@ export const addEquipment = (
|
|||||||
category: TEquipmentKey,
|
category: TEquipmentKey,
|
||||||
type: string,
|
type: string,
|
||||||
modularParts: string[] | undefined = undefined,
|
modularParts: string[] | undefined = undefined,
|
||||||
inventoryChanges: IInventoryChanges = {}
|
inventoryChanges: IInventoryChanges = {},
|
||||||
|
defaultOverwrites: Partial<IEquipmentDatabase> | undefined = undefined
|
||||||
): IInventoryChanges => {
|
): IInventoryChanges => {
|
||||||
const index =
|
const equipment = Object.assign(
|
||||||
inventory[category].push({
|
{
|
||||||
ItemType: type,
|
ItemType: type,
|
||||||
Configs: [],
|
Configs: [],
|
||||||
XP: 0,
|
XP: 0,
|
||||||
ModularParts: modularParts
|
ModularParts: modularParts
|
||||||
}) - 1;
|
},
|
||||||
|
defaultOverwrites
|
||||||
|
);
|
||||||
|
const index = inventory[category].push(equipment) - 1;
|
||||||
|
|
||||||
inventoryChanges[category] ??= [];
|
inventoryChanges[category] ??= [];
|
||||||
inventoryChanges[category].push(inventory[category][index].toJSON<IEquipmentClient>());
|
inventoryChanges[category].push(inventory[category][index].toJSON<IEquipmentClient>());
|
||||||
@ -1190,3 +1145,17 @@ const createLibraryAvailableDailyTaskInfo = (): ILibraryAvailableDailyTaskInfo =
|
|||||||
RewardStanding: 7500
|
RewardStanding: 7500
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
const createCalendar = (): ICalendarProgress => {
|
||||||
|
return {
|
||||||
|
Version: 19,
|
||||||
|
Iteration: 2,
|
||||||
|
YearProgress: { Upgrades: [] },
|
||||||
|
SeasonProgress: {
|
||||||
|
SeasonType: "CST_SPRING",
|
||||||
|
LastCompletedDayIdx: -1,
|
||||||
|
LastCompletedChallengeDayIdx: -1,
|
||||||
|
ActivatedChallenges: []
|
||||||
|
}
|
||||||
|
};
|
||||||
|
};
|
||||||
|
@ -26,6 +26,8 @@ import { getLevelKeyRewards, getNode } from "@/src/services/itemDataService";
|
|||||||
import { InventoryDocumentProps, TInventoryDatabaseDocument } from "@/src/models/inventoryModels/inventoryModel";
|
import { InventoryDocumentProps, TInventoryDatabaseDocument } from "@/src/models/inventoryModels/inventoryModel";
|
||||||
import { getEntriesUnsafe } from "@/src/utils/ts-utils";
|
import { getEntriesUnsafe } from "@/src/utils/ts-utils";
|
||||||
import { IEquipmentClient } from "@/src/types/inventoryTypes/commonInventoryTypes";
|
import { IEquipmentClient } from "@/src/types/inventoryTypes/commonInventoryTypes";
|
||||||
|
import junctionRewards from "@/static/fixed_responses/junctionRewards.json";
|
||||||
|
import { IJunctionRewards } from "@/src/types/commonTypes";
|
||||||
|
|
||||||
const getRotations = (rotationCount: number): number[] => {
|
const getRotations = (rotationCount: number): number[] => {
|
||||||
if (rotationCount === 0) return [0];
|
if (rotationCount === 0) return [0];
|
||||||
@ -273,6 +275,20 @@ export const addMissionRewards = async (
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (rewardInfo.node in junctionRewards) {
|
||||||
|
const junctionReward = (junctionRewards as IJunctionRewards)[rewardInfo.node];
|
||||||
|
for (const item of junctionReward.items) {
|
||||||
|
MissionRewards.push({
|
||||||
|
StoreItem: item.ItemType,
|
||||||
|
ItemCount: item.ItemCount
|
||||||
|
});
|
||||||
|
}
|
||||||
|
if (junctionReward.credits) {
|
||||||
|
inventory.RegularCredits += junctionReward.credits;
|
||||||
|
missionCompletionCredits += junctionReward.credits;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
for (const reward of MissionRewards) {
|
for (const reward of MissionRewards) {
|
||||||
//TODO: additem should take in storeItems
|
//TODO: additem should take in storeItems
|
||||||
const inventoryChange = await addItem(inventory, reward.StoreItem.replace("StoreItems/", ""), reward.ItemCount);
|
const inventoryChange = await addItem(inventory, reward.StoreItem.replace("StoreItems/", ""), reward.ItemCount);
|
||||||
|
@ -138,6 +138,8 @@ export const giveKeyChainItem = async (inventory: TInventoryDatabaseDocument, ke
|
|||||||
// items were added: update quest stage's i (item was given)
|
// items were added: update quest stage's i (item was given)
|
||||||
updateQuestStage(inventory, keyChainInfo, { i: true });
|
updateQuestStage(inventory, keyChainInfo, { i: true });
|
||||||
|
|
||||||
|
return inventoryChanges;
|
||||||
|
|
||||||
//TODO: Check whether Wishlist is used to track items which should exist uniquely in the inventory
|
//TODO: Check whether Wishlist is used to track items which should exist uniquely in the inventory
|
||||||
/*
|
/*
|
||||||
some items are added or removed (not sure) to the wishlist, in that case a
|
some items are added or removed (not sure) to the wishlist, in that case a
|
||||||
|
@ -1,3 +1,5 @@
|
|||||||
|
import { ITypeCount } from "@/src/types/inventoryTypes/inventoryTypes";
|
||||||
|
|
||||||
export interface IOid {
|
export interface IOid {
|
||||||
$oid: string;
|
$oid: string;
|
||||||
}
|
}
|
||||||
@ -7,3 +9,10 @@ export interface IMongoDate {
|
|||||||
$numberLong: string;
|
$numberLong: string;
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export interface IReward {
|
||||||
|
items: ITypeCount[];
|
||||||
|
credits: number;
|
||||||
|
}
|
||||||
|
|
||||||
|
export type IJunctionRewards = Record<string, IReward>;
|
||||||
|
@ -39,11 +39,11 @@ export interface ILoginResponse extends IAccountAndLoginResponseCommons {
|
|||||||
Groups: IGroup[];
|
Groups: IGroup[];
|
||||||
BuildLabel: string;
|
BuildLabel: string;
|
||||||
MatchmakingBuildId: string;
|
MatchmakingBuildId: string;
|
||||||
platformCDNs: string[];
|
platformCDNs?: string[];
|
||||||
NRS: string[];
|
NRS?: string[];
|
||||||
DTLS: number;
|
DTLS: number;
|
||||||
IRC: string[];
|
IRC: string[];
|
||||||
HUB: string;
|
HUB?: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface IGroup {
|
export interface IGroup {
|
||||||
|
120
static/fixed_responses/junctionRewards.json
Normal file
120
static/fixed_responses/junctionRewards.json
Normal file
@ -0,0 +1,120 @@
|
|||||||
|
{
|
||||||
|
"VenusToMercuryJunction": {
|
||||||
|
"items": [
|
||||||
|
{ "ItemType": "/Lotus/StoreItems/Types/Keys/InfestedIntroQuest/InfestedIntroQuestKeyChain", "ItemCount": 1 },
|
||||||
|
{ "ItemType": "/Lotus/StoreItems/Types/Keys/KubrowQuest/KubrowQuestKeyChain", "ItemCount": 1 },
|
||||||
|
{ "ItemType": "/Lotus/StoreItems/Weapons/Tenno/Rifle/BoltoRifle", "ItemCount": 1 },
|
||||||
|
{ "ItemType": "/Lotus/StoreItems/Upgrades/Mods/Warframe/AvatarShieldRechargeRateMod", "ItemCount": 1 },
|
||||||
|
{ "ItemType": "/Lotus/StoreItems/Upgrades/Mods/Warframe/AvatarAbilityEfficiencyMod", "ItemCount": 1 },
|
||||||
|
{ "ItemType": "/Lotus/StoreItems/Types/Game/KubrowPet/EggHatcher", "ItemCount": 1 }
|
||||||
|
],
|
||||||
|
"credits": 10000
|
||||||
|
},
|
||||||
|
"EarthToVenusJunction": {
|
||||||
|
"items": [
|
||||||
|
{ "ItemType": "/Lotus/StoreItems/Types/Recipes/Weapons/FurisBlueprint", "ItemCount": 1 },
|
||||||
|
{ "ItemType": "/Lotus/StoreItems/Upgrades/Mods/Melee/WeaponFreezeDamageMod", "ItemCount": 1 },
|
||||||
|
{ "ItemType": "/Lotus/StoreItems/Upgrades/Mods/Rifle/WeaponElectricityDamageMod", "ItemCount": 1 },
|
||||||
|
{ "ItemType": "/Lotus/StoreItems/Types/Recipes/SentinelRecipes/TnSentinelCrossBlueprint", "ItemCount": 1 },
|
||||||
|
{ "ItemType": "/Lotus/StoreItems/Weapons/Tenno/Melee/MeleeTrees/StaffCmbOneMeleeTree", "ItemCount": 1 },
|
||||||
|
{ "ItemType": "/Lotus/StoreItems/Types/Items/MiscItems/OrokinReactor", "ItemCount": 1 },
|
||||||
|
{ "ItemType": "/Lotus/StoreItems/Upgrades/Mods/Aura/PlayerEnergyHealthRegenAuraMod", "ItemCount": 1 }
|
||||||
|
],
|
||||||
|
"credits": 5000
|
||||||
|
},
|
||||||
|
"EarthToMarsJunction": {
|
||||||
|
"items": [
|
||||||
|
{ "ItemType": "/Lotus/StoreItems/Types/Keys/ArchwingQuest/ArchwingQuestKeyChain", "ItemCount": 1 },
|
||||||
|
{ "ItemType": "/Lotus/StoreItems/Types/Game/KubrowPet/EggHatcher", "ItemCount": 1 },
|
||||||
|
{ "ItemType": "/Lotus/StoreItems/Types/Items/ShipFeatureItems/VoidProjectionFeatureItem", "ItemCount": 1 },
|
||||||
|
{ "ItemType": "/Lotus/StoreItems/Types/Game/Projections/T1VoidProjectionRevenantPrimeABronze", "ItemCount": 1 },
|
||||||
|
{ "ItemType": "/Lotus/StoreItems/Weapons/Tenno/Melee/Hammer/HammerWeapon", "ItemCount": 1 },
|
||||||
|
{ "ItemType": "/Lotus/StoreItems/Weapons/Tenno/Melee/MeleeTrees/IronPhoenixMeleeTree", "ItemCount": 1 },
|
||||||
|
{ "ItemType": "/Lotus/StoreItems/Types/Keys/InfestedMicroplanetQuest/InfestedMicroplanetQuestKeyChain", "ItemCount": 1 }
|
||||||
|
],
|
||||||
|
"credits": 15000
|
||||||
|
},
|
||||||
|
"MarsToCeresJunction": {
|
||||||
|
"items": [
|
||||||
|
{ "ItemType": "/Lotus/StoreItems/Types/Recipes/Weapons/GrnSniperRifleBlueprint", "ItemCount": 1 },
|
||||||
|
{ "ItemType": "/Lotus/StoreItems/Upgrades/Mods/Melee/WeaponToxinDamageMod", "ItemCount": 1 },
|
||||||
|
{ "ItemType": "/Lotus/StoreItems/Weapons/Tenno/Melee/MeleeTrees/DualSwordCmbOneMeleeTree", "ItemCount": 1 }
|
||||||
|
],
|
||||||
|
"credits": 20000
|
||||||
|
},
|
||||||
|
"MarsToPhobosJunction": {
|
||||||
|
"items": [
|
||||||
|
{ "ItemType": "/Lotus/StoreItems/Types/Keys/SpyQuestKeyChain/SpyQuestKeyChain", "ItemCount": 1 },
|
||||||
|
{ "ItemType": "/Lotus/StoreItems/Types/Recipes/Weapons/GrnHeavyPistolBlueprint", "ItemCount": 1 },
|
||||||
|
{ "ItemType": "/Lotus/StoreItems/Types/StoreItems/Consumables/CipherBlueprint", "ItemCount": 1 },
|
||||||
|
{ "ItemType": "/Lotus/StoreItems/Upgrades/Mods/Rifle/WeaponReloadSpeedMod", "ItemCount": 1 },
|
||||||
|
{ "ItemType": "/Lotus/StoreItems/Upgrades/Mods/Warframe/AvatarLootRadarMod", "ItemCount": 1 },
|
||||||
|
{ "ItemType": "/Lotus/StoreItems/Types/Items/MiscItems/OrokinCatalyst", "ItemCount": 1 }
|
||||||
|
],
|
||||||
|
"credits": 20000
|
||||||
|
},
|
||||||
|
"JupiterToEuropaJunction": {
|
||||||
|
"items": [
|
||||||
|
{ "ItemType": "/Lotus/StoreItems/Types/Keys/LimboQuest/LimboQuestKeyChain", "ItemCount": 1 },
|
||||||
|
{ "ItemType": "/Lotus/StoreItems/Types/Keys/DragonQuest/DragonQuestKeyChain", "ItemCount": 1 },
|
||||||
|
{ "ItemType": "/Lotus/StoreItems/Types/Recipes/Weapons/CorpusMinigunBlueprint", "ItemCount": 1 },
|
||||||
|
{ "ItemType": "/Lotus/StoreItems/Upgrades/Mods/Aura/PlayerHealthAuraMod", "ItemCount": 1 }
|
||||||
|
],
|
||||||
|
"credits": 40000
|
||||||
|
},
|
||||||
|
"JupiterToSaturnJunction": {
|
||||||
|
"items": [
|
||||||
|
{ "ItemType": "/Lotus/StoreItems/Types/Recipes/Weapons/GrenadeLauncherBlueprint", "ItemCount": 1 },
|
||||||
|
{ "ItemType": "/Lotus/StoreItems/Types/Keys/ProteaQuest/ProteaQuestKeyChain", "ItemCount": 1 }
|
||||||
|
],
|
||||||
|
"credits": 40000
|
||||||
|
},
|
||||||
|
"SaturnToUranusJunction": {
|
||||||
|
"items": [
|
||||||
|
{ "ItemType": "/Lotus/StoreItems/Types/Recipes/Weapons/CorpusWhipBlueprint", "ItemCount": 1 },
|
||||||
|
{ "ItemType": "/Lotus/StoreItems/Types/Recipes/WarframeRecipes/ChromaHelmetBlueprint", "ItemCount": 1 },
|
||||||
|
{ "ItemType": "/Lotus/StoreItems/Types/Keys/DuviriQuest/DuviriQuestKeyChain", "ItemCount": 1 },
|
||||||
|
{ "ItemType": "/Lotus/StoreItems/Types/NeutralCreatures/ErsatzHorse/ErsatzHorsePowerSuit", "ItemCount": 1 }
|
||||||
|
],
|
||||||
|
"credits": 60000
|
||||||
|
},
|
||||||
|
"UranusToNeptuneJunction": {
|
||||||
|
"items": [
|
||||||
|
{ "ItemType": "/Lotus/StoreItems/Types/Keys/OrokinMoonQuest/OrokinMoonQuestKeyChain", "ItemCount": 1 },
|
||||||
|
{ "ItemType": "/Lotus/StoreItems/Types/Recipes/Weapons/ReconnasorBlueprint", "ItemCount": 1 },
|
||||||
|
{ "ItemType": "/Lotus/StoreItems/Types/Recipes/WarframeRecipes/ChromaChassisBlueprint", "ItemCount": 1 }
|
||||||
|
],
|
||||||
|
"credits": 80000
|
||||||
|
},
|
||||||
|
"NeptuneToPlutoJunction": {
|
||||||
|
"items": [
|
||||||
|
{ "ItemType": "/Lotus/StoreItems/Types/Recipes/Weapons/GrineerFlakCannonBlueprint", "ItemCount": 1 },
|
||||||
|
{ "ItemType": "/Lotus/StoreItems/Types/Recipes/WarframeRecipes/ChromaSystemsBlueprint", "ItemCount": 1 }
|
||||||
|
],
|
||||||
|
"credits": 80000
|
||||||
|
},
|
||||||
|
"PlutoToSednaJunction": {
|
||||||
|
"items": [
|
||||||
|
{ "ItemType": "/Lotus/StoreItems/Types/Keys/WarWithinQuest/WarWithinQuestKeyChain", "ItemCount": 1 },
|
||||||
|
{ "ItemType": "/Lotus/StoreItems/Types/Keys/MirageQuest/MirageQuestKeyChain", "ItemCount": 1 },
|
||||||
|
{ "ItemType": "/Lotus/StoreItems/Types/Recipes/Weapons/DualDaggerBlueprint", "ItemCount": 1 }
|
||||||
|
],
|
||||||
|
"credits": 100000
|
||||||
|
},
|
||||||
|
"PlutoToErisJunction": {
|
||||||
|
"items": [
|
||||||
|
{ "ItemType": "/Lotus/StoreItems/Types/Keys/InfestedAladVQuest/InfestedAladVQuestKeyChain", "ItemCount": 1 },
|
||||||
|
{ "ItemType": "/Lotus/StoreItems/Types/Recipes/Weapons/MireSwordBlueprint", "ItemCount": 1 }
|
||||||
|
],
|
||||||
|
"credits": 100000
|
||||||
|
},
|
||||||
|
"CeresToJupiterJunction": {
|
||||||
|
"items": [
|
||||||
|
{ "ItemType": "/Lotus/StoreItems/Types/Recipes/Weapons/GrnStaffBlueprint", "ItemCount": 1 },
|
||||||
|
{ "ItemType": "/Lotus/StoreItems/Upgrades/Mods/Archwing/Suit/ArchwingSuitHealthMaxMod", "ItemCount": 1 },
|
||||||
|
{ "ItemType": "/Lotus/StoreItems/Upgrades/Mods/Archwing/Rifle/ArchwingRifleDamageAmountMod", "ItemCount": 1 },
|
||||||
|
{ "ItemType": "/Lotus/StoreItems/Upgrades/Mods/Archwing/Melee/ArchwingMeleeDamageMod", "ItemCount": 1 }
|
||||||
|
],
|
||||||
|
"credits": 30000
|
||||||
|
}
|
||||||
|
}
|
@ -539,10 +539,12 @@
|
|||||||
</form>
|
</form>
|
||||||
<h5 class="mt-3" data-loc="cheats_quests"></h6>
|
<h5 class="mt-3" data-loc="cheats_quests"></h6>
|
||||||
<div class="mb-2 d-flex flex-wrap gap-2">
|
<div class="mb-2 d-flex flex-wrap gap-2">
|
||||||
<button class="btn btn-primary" onclick="doQuestUpdate('unlockAll');" data-loc="cheats_quests_UnlockAll"></button>
|
<button class="btn btn-primary" onclick="doQuestUpdate('unlockAll');" data-loc="cheats_quests_unlockAll"></button>
|
||||||
<button class="btn btn-primary" onclick="doQuestUpdate('completeAll');" data-loc="cheats_quests_CompleteAll"></button>
|
<button class="btn btn-primary" onclick="doQuestUpdate('completeAll');" data-loc="cheats_quests_completeAll"></button>
|
||||||
<button class="btn btn-primary" onclick="doQuestUpdate('completeAllUnlocked');" data-loc="cheats_quests_CompleteAllUnlocked"></button>
|
<button class="btn btn-primary" onclick="doQuestUpdate('completeAllUnlocked');" data-loc="cheats_quests_completeAllUnlocked"></button>
|
||||||
<button class="btn btn-primary" onclick="doQuestUpdate('ResetAll');" data-loc="cheats_quests_ResetAll"></button>
|
<button class="btn btn-primary" onclick="doQuestUpdate('ResetAll');" data-loc="cheats_quests_resetAll"></button>
|
||||||
|
<button class="btn btn-primary" onclick="doQuestUpdate('giveAll');" data-loc="cheats_quests_giveAll"></button>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -118,10 +118,11 @@ dict = {
|
|||||||
cheats_changeButton: `Change`,
|
cheats_changeButton: `Change`,
|
||||||
cheats_none: `None`,
|
cheats_none: `None`,
|
||||||
cheats_quests: `Quests`,
|
cheats_quests: `Quests`,
|
||||||
cheats_quests_UnlockAll: `Unlock All Quests`,
|
cheats_quests_unlockAll: `Unlock All Quests`,
|
||||||
cheats_quests_CompleteAll: `Complete All Quests`,
|
cheats_quests_completeAll: `Complete All Quests`,
|
||||||
cheats_quests_CompleteAllUnlocked: `Complete All Unlocked Quests`,
|
cheats_quests_completeAllUnlocked: `Complete All Unlocked Quests`,
|
||||||
cheats_quests_ResetAll: `Reset All Quests`,
|
cheats_quests_resetAll: `Reset All Quests`,
|
||||||
|
cheats_quests_giveAll: `Give All Quests`,
|
||||||
import_importNote: `You can provide a full or partial inventory response (client respresentation) here. All fields that are supported by the importer <b>will be overwritten</b> in your account.`,
|
import_importNote: `You can provide a full or partial inventory response (client respresentation) here. All fields that are supported by the importer <b>will be overwritten</b> in your account.`,
|
||||||
import_submit: `Submit`
|
import_submit: `Submit`
|
||||||
};
|
};
|
||||||
|
Loading…
x
Reference in New Issue
Block a user