forked from OpenWF/SpaceNinjaServer
refactor: Combine Equipment and Config Types (#289)
Co-authored-by: AMelonInsideLemon <AMelonInsideLemon@users.noreply.github.com> Co-authored-by: Ordis <134585663+OrdisPrime@users.noreply.github.com>
This commit is contained in:
parent
c9b570059e
commit
e2221f257b
@ -1,7 +1,7 @@
|
|||||||
import { RequestHandler } from "express";
|
import { RequestHandler } from "express";
|
||||||
import { IUpgradesRequest } from "@/src/types/requestTypes";
|
import { IUpgradesRequest } from "@/src/types/requestTypes";
|
||||||
import { FocusSchool } from "@/src/types/inventoryTypes/commonInventoryTypes";
|
import { FocusSchool, IEquipmentDatabase } from "@/src/types/inventoryTypes/commonInventoryTypes";
|
||||||
import { IGenericItemDatabase, IMiscItem, TGenericItemKey } from "@/src/types/inventoryTypes/inventoryTypes";
|
import { IMiscItem, IEquipmentKey } from "@/src/types/inventoryTypes/inventoryTypes";
|
||||||
import { getAccountIdForRequest } from "@/src/services/loginService";
|
import { getAccountIdForRequest } from "@/src/services/loginService";
|
||||||
import { addMiscItems, getInventory, updateCurrency } from "@/src/services/inventoryService";
|
import { addMiscItems, getInventory, updateCurrency } from "@/src/services/inventoryService";
|
||||||
|
|
||||||
@ -28,7 +28,7 @@ export const upgradesController: RequestHandler = async (req, res) => {
|
|||||||
switch (operation.UpgradeRequirement) {
|
switch (operation.UpgradeRequirement) {
|
||||||
case "/Lotus/Types/Items/MiscItems/OrokinReactor":
|
case "/Lotus/Types/Items/MiscItems/OrokinReactor":
|
||||||
case "/Lotus/Types/Items/MiscItems/OrokinCatalyst":
|
case "/Lotus/Types/Items/MiscItems/OrokinCatalyst":
|
||||||
for (const item of inventory[payload.ItemCategory as TGenericItemKey] as IGenericItemDatabase[]) {
|
for (const item of inventory[payload.ItemCategory as IEquipmentKey] as IEquipmentDatabase[]) {
|
||||||
if (item._id.toString() == payload.ItemId.$oid) {
|
if (item._id.toString() == payload.ItemId.$oid) {
|
||||||
item.Features ??= 0;
|
item.Features ??= 0;
|
||||||
item.Features |= 1;
|
item.Features |= 1;
|
||||||
@ -38,7 +38,7 @@ export const upgradesController: RequestHandler = async (req, res) => {
|
|||||||
break;
|
break;
|
||||||
case "/Lotus/Types/Items/MiscItems/UtilityUnlocker":
|
case "/Lotus/Types/Items/MiscItems/UtilityUnlocker":
|
||||||
case "/Lotus/Types/Items/MiscItems/WeaponUtilityUnlocker":
|
case "/Lotus/Types/Items/MiscItems/WeaponUtilityUnlocker":
|
||||||
for (const item of inventory[payload.ItemCategory as TGenericItemKey] as IGenericItemDatabase[]) {
|
for (const item of inventory[payload.ItemCategory as IEquipmentKey] as IEquipmentDatabase[]) {
|
||||||
if (item._id.toString() == payload.ItemId.$oid) {
|
if (item._id.toString() == payload.ItemId.$oid) {
|
||||||
item.Features ??= 0;
|
item.Features ??= 0;
|
||||||
item.Features |= 2;
|
item.Features |= 2;
|
||||||
@ -49,7 +49,7 @@ export const upgradesController: RequestHandler = async (req, res) => {
|
|||||||
case "/Lotus/Types/Items/MiscItems/WeaponPrimaryArcaneUnlocker":
|
case "/Lotus/Types/Items/MiscItems/WeaponPrimaryArcaneUnlocker":
|
||||||
case "/Lotus/Types/Items/MiscItems/WeaponSecondaryArcaneUnlocker":
|
case "/Lotus/Types/Items/MiscItems/WeaponSecondaryArcaneUnlocker":
|
||||||
case "/Lotus/Types/Items/MiscItems/WeaponMeleeArcaneUnlocker":
|
case "/Lotus/Types/Items/MiscItems/WeaponMeleeArcaneUnlocker":
|
||||||
for (const item of inventory[payload.ItemCategory as TGenericItemKey] as IGenericItemDatabase[]) {
|
for (const item of inventory[payload.ItemCategory as IEquipmentKey] as IEquipmentDatabase[]) {
|
||||||
if (item._id.toString() == payload.ItemId.$oid) {
|
if (item._id.toString() == payload.ItemId.$oid) {
|
||||||
item.Features ??= 0;
|
item.Features ??= 0;
|
||||||
item.Features |= 32;
|
item.Features |= 32;
|
||||||
@ -61,7 +61,7 @@ export const upgradesController: RequestHandler = async (req, res) => {
|
|||||||
case "/Lotus/Types/Items/MiscItems/FormaUmbra":
|
case "/Lotus/Types/Items/MiscItems/FormaUmbra":
|
||||||
case "/Lotus/Types/Items/MiscItems/FormaAura":
|
case "/Lotus/Types/Items/MiscItems/FormaAura":
|
||||||
case "/Lotus/Types/Items/MiscItems/FormaStance":
|
case "/Lotus/Types/Items/MiscItems/FormaStance":
|
||||||
for (const item of inventory[payload.ItemCategory as TGenericItemKey] as IGenericItemDatabase[]) {
|
for (const item of inventory[payload.ItemCategory as IEquipmentKey] as IEquipmentDatabase[]) {
|
||||||
if (item._id.toString() == payload.ItemId.$oid) {
|
if (item._id.toString() == payload.ItemId.$oid) {
|
||||||
item.XP = 0;
|
item.XP = 0;
|
||||||
setSlotPolarity(item, operation.PolarizeSlot, operation.PolarizeValue);
|
setSlotPolarity(item, operation.PolarizeSlot, operation.PolarizeValue);
|
||||||
@ -72,7 +72,7 @@ export const upgradesController: RequestHandler = async (req, res) => {
|
|||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case "/Lotus/Types/Items/MiscItems/ModSlotUnlocker":
|
case "/Lotus/Types/Items/MiscItems/ModSlotUnlocker":
|
||||||
for (const item of inventory[payload.ItemCategory as TGenericItemKey] as IGenericItemDatabase[]) {
|
for (const item of inventory[payload.ItemCategory as IEquipmentKey] as IEquipmentDatabase[]) {
|
||||||
if (item._id.toString() == payload.ItemId.$oid) {
|
if (item._id.toString() == payload.ItemId.$oid) {
|
||||||
item.ModSlotPurchases ??= 0;
|
item.ModSlotPurchases ??= 0;
|
||||||
item.ModSlotPurchases += 1;
|
item.ModSlotPurchases += 1;
|
||||||
@ -87,7 +87,7 @@ export const upgradesController: RequestHandler = async (req, res) => {
|
|||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case "/Lotus/Types/Items/MiscItems/CustomizationSlotUnlocker":
|
case "/Lotus/Types/Items/MiscItems/CustomizationSlotUnlocker":
|
||||||
for (const item of inventory[payload.ItemCategory as TGenericItemKey] as IGenericItemDatabase[]) {
|
for (const item of inventory[payload.ItemCategory as IEquipmentKey] as IEquipmentDatabase[]) {
|
||||||
if (item._id.toString() == payload.ItemId.$oid) {
|
if (item._id.toString() == payload.ItemId.$oid) {
|
||||||
item.CustomizationSlotPurchases ??= 0;
|
item.CustomizationSlotPurchases ??= 0;
|
||||||
item.CustomizationSlotPurchases += 1;
|
item.CustomizationSlotPurchases += 1;
|
||||||
@ -103,7 +103,7 @@ export const upgradesController: RequestHandler = async (req, res) => {
|
|||||||
break;
|
break;
|
||||||
case "":
|
case "":
|
||||||
console.assert(operation.OperationType == "UOT_SWAP_POLARITY");
|
console.assert(operation.OperationType == "UOT_SWAP_POLARITY");
|
||||||
for (const item of inventory[payload.ItemCategory as TGenericItemKey] as IGenericItemDatabase[]) {
|
for (const item of inventory[payload.ItemCategory as IEquipmentKey] as IEquipmentDatabase[]) {
|
||||||
if (item._id.toString() == payload.ItemId.$oid) {
|
if (item._id.toString() == payload.ItemId.$oid) {
|
||||||
for (let i = 0; i != operation.PolarityRemap.length; ++i) {
|
for (let i = 0; i != operation.PolarityRemap.length; ++i) {
|
||||||
if (operation.PolarityRemap[i].Slot != i) {
|
if (operation.PolarityRemap[i].Slot != i) {
|
||||||
@ -122,7 +122,7 @@ export const upgradesController: RequestHandler = async (req, res) => {
|
|||||||
res.json({ InventoryChanges });
|
res.json({ InventoryChanges });
|
||||||
};
|
};
|
||||||
|
|
||||||
const setSlotPolarity = (item: IGenericItemDatabase, slot: number, polarity: FocusSchool): void => {
|
const setSlotPolarity = (item: IEquipmentDatabase, slot: number, polarity: FocusSchool): void => {
|
||||||
item.Polarity ??= [];
|
item.Polarity ??= [];
|
||||||
const entry = item.Polarity.find(entry => entry.Slot == slot);
|
const entry = item.Polarity.find(entry => entry.Slot == slot);
|
||||||
if (entry) {
|
if (entry) {
|
||||||
|
@ -8,7 +8,6 @@ import {
|
|||||||
IBooster,
|
IBooster,
|
||||||
IInventoryResponse,
|
IInventoryResponse,
|
||||||
ISlots,
|
ISlots,
|
||||||
IGenericItem,
|
|
||||||
IMailbox,
|
IMailbox,
|
||||||
IDuviriInfo,
|
IDuviriInfo,
|
||||||
IPendingRecipe as IPendingRecipeDatabase,
|
IPendingRecipe as IPendingRecipeDatabase,
|
||||||
@ -16,14 +15,13 @@ import {
|
|||||||
ITypeCount,
|
ITypeCount,
|
||||||
IFocusXP,
|
IFocusXP,
|
||||||
IFocusUpgrades,
|
IFocusUpgrades,
|
||||||
IGenericItem2,
|
|
||||||
ITypeXPItem,
|
ITypeXPItem,
|
||||||
IChallengeProgress,
|
IChallengeProgress,
|
||||||
IStepSequencer,
|
IStepSequencer,
|
||||||
IAffiliation,
|
IAffiliation,
|
||||||
INotePacks,
|
INotePacks,
|
||||||
ICompletedJobChain,
|
ICompletedJobChain,
|
||||||
ISeasonChallengeHistory,
|
ISeasonChallenge,
|
||||||
IPlayerSkills,
|
IPlayerSkills,
|
||||||
ISettings,
|
ISettings,
|
||||||
IInfestedFoundry,
|
IInfestedFoundry,
|
||||||
@ -40,15 +38,14 @@ import {
|
|||||||
ILoreFragmentScan
|
ILoreFragmentScan
|
||||||
} from "../../types/inventoryTypes/inventoryTypes";
|
} from "../../types/inventoryTypes/inventoryTypes";
|
||||||
import { IOid } from "../../types/commonTypes";
|
import { IOid } from "../../types/commonTypes";
|
||||||
import { ISuitDatabase } from "@/src/types/inventoryTypes/SuitTypes";
|
|
||||||
import { IWeaponDatabase } from "@/src/types/inventoryTypes/weaponTypes";
|
|
||||||
import {
|
import {
|
||||||
IAbilityOverride,
|
IAbilityOverride,
|
||||||
IColor,
|
IColor,
|
||||||
IItemConfig,
|
IItemConfig,
|
||||||
IOperatorConfigClient,
|
|
||||||
IOperatorConfigDatabase,
|
IOperatorConfigDatabase,
|
||||||
IPolarity
|
IPolarity,
|
||||||
|
IEquipmentDatabase,
|
||||||
|
IOperatorConfigClient
|
||||||
} from "@/src/types/inventoryTypes/commonInventoryTypes";
|
} from "@/src/types/inventoryTypes/commonInventoryTypes";
|
||||||
import { toMongoDate, toOid } from "@/src/helpers/inventoryHelpers";
|
import { toMongoDate, toOid } from "@/src/helpers/inventoryHelpers";
|
||||||
|
|
||||||
@ -185,9 +182,7 @@ ItemConfigSchema.set("toJSON", {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
//TODO: migrate to one schema for weapons and suits.. and possibly others
|
const EquipmentSchema = new Schema<IEquipmentDatabase>({
|
||||||
const WeaponSchema = new Schema<IWeaponDatabase>(
|
|
||||||
{
|
|
||||||
ItemType: String,
|
ItemType: String,
|
||||||
Configs: [ItemConfigSchema],
|
Configs: [ItemConfigSchema],
|
||||||
UpgradeVer: Number,
|
UpgradeVer: Number,
|
||||||
@ -201,17 +196,21 @@ const WeaponSchema = new Schema<IWeaponDatabase>(
|
|||||||
UpgradeType: Schema.Types.Mixed, //todo
|
UpgradeType: Schema.Types.Mixed, //todo
|
||||||
UpgradeFingerprint: String,
|
UpgradeFingerprint: String,
|
||||||
ItemName: String,
|
ItemName: String,
|
||||||
|
InfestationDate: Date,
|
||||||
|
InfestationDays: Number,
|
||||||
|
InfestationType: String,
|
||||||
ModularParts: [String],
|
ModularParts: [String],
|
||||||
UnlockLevel: Number
|
UnlockLevel: Number,
|
||||||
},
|
Expiry: Date,
|
||||||
{ id: false }
|
SkillTree: String,
|
||||||
);
|
ArchonCrystalUpgrades: [Schema.Types.Mixed] //TODO
|
||||||
|
});
|
||||||
|
|
||||||
WeaponSchema.virtual("ItemId").get(function () {
|
EquipmentSchema.virtual("ItemId").get(function () {
|
||||||
return { $oid: this._id.toString() } satisfies IOid;
|
return { $oid: this._id.toString() } satisfies IOid;
|
||||||
});
|
});
|
||||||
|
|
||||||
WeaponSchema.set("toJSON", {
|
EquipmentSchema.set("toJSON", {
|
||||||
virtuals: true,
|
virtuals: true,
|
||||||
transform(_document, returnedObject) {
|
transform(_document, returnedObject) {
|
||||||
delete returnedObject._id;
|
delete returnedObject._id;
|
||||||
@ -248,7 +247,7 @@ RawUpgrades.set("toJSON", {
|
|||||||
});
|
});
|
||||||
|
|
||||||
//TODO: find out what this is
|
//TODO: find out what this is
|
||||||
const upgrqadesSchema = new Schema(
|
const upgradesSchema = new Schema(
|
||||||
{
|
{
|
||||||
UpgradeFingerprint: String,
|
UpgradeFingerprint: String,
|
||||||
ItemType: String
|
ItemType: String
|
||||||
@ -256,42 +255,11 @@ const upgrqadesSchema = new Schema(
|
|||||||
{ id: false }
|
{ id: false }
|
||||||
);
|
);
|
||||||
|
|
||||||
upgrqadesSchema.virtual("ItemId").get(function () {
|
upgradesSchema.virtual("ItemId").get(function () {
|
||||||
return toOid(this._id);
|
return toOid(this._id);
|
||||||
});
|
});
|
||||||
|
|
||||||
upgrqadesSchema.set("toJSON", {
|
upgradesSchema.set("toJSON", {
|
||||||
virtuals: true,
|
|
||||||
transform(_document, returnedObject) {
|
|
||||||
delete returnedObject._id;
|
|
||||||
delete returnedObject.__v;
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
//TODO: reduce weapon and suit schemas to one schema if reasonable
|
|
||||||
const suitSchema = new Schema<ISuitDatabase>(
|
|
||||||
{
|
|
||||||
ItemType: String,
|
|
||||||
Configs: [ItemConfigSchema],
|
|
||||||
UpgradeVer: Number,
|
|
||||||
XP: Number,
|
|
||||||
InfestationDate: Date,
|
|
||||||
Features: Number,
|
|
||||||
Polarity: [polaritySchema],
|
|
||||||
Polarized: Number,
|
|
||||||
ModSlotPurchases: Number,
|
|
||||||
CustomizationSlotPurchases: Number,
|
|
||||||
FocusLens: String,
|
|
||||||
UnlockLevel: Number
|
|
||||||
},
|
|
||||||
{ id: false }
|
|
||||||
);
|
|
||||||
|
|
||||||
suitSchema.virtual("ItemId").get(function () {
|
|
||||||
return { $oid: this._id.toString() } satisfies IOid;
|
|
||||||
});
|
|
||||||
|
|
||||||
suitSchema.set("toJSON", {
|
|
||||||
virtuals: true,
|
virtuals: true,
|
||||||
transform(_document, returnedObject) {
|
transform(_document, returnedObject) {
|
||||||
delete returnedObject._id;
|
delete returnedObject._id;
|
||||||
@ -321,33 +289,6 @@ FlavourItemSchema.set("toJSON", {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
const GenericItemSchema = new Schema<IGenericItem>(
|
|
||||||
{
|
|
||||||
ItemType: String,
|
|
||||||
Configs: [ItemConfigSchema],
|
|
||||||
UpgradeVer: Number,
|
|
||||||
XP: Number,
|
|
||||||
Features: Number,
|
|
||||||
Polarity: [polaritySchema],
|
|
||||||
Polarized: Number,
|
|
||||||
ModSlotPurchases: Number,
|
|
||||||
CustomizationSlotPurchases: Number
|
|
||||||
},
|
|
||||||
{ id: false }
|
|
||||||
);
|
|
||||||
|
|
||||||
GenericItemSchema.virtual("ItemId").get(function () {
|
|
||||||
return { $oid: this._id.toString() } satisfies IOid;
|
|
||||||
});
|
|
||||||
|
|
||||||
GenericItemSchema.set("toJSON", {
|
|
||||||
virtuals: true,
|
|
||||||
transform(_document, returnedObject) {
|
|
||||||
delete returnedObject._id;
|
|
||||||
delete returnedObject.__v;
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
// "Mailbox": { "LastInboxId": { "$oid": "123456780000000000000000" } }
|
// "Mailbox": { "LastInboxId": { "$oid": "123456780000000000000000" } }
|
||||||
const MailboxSchema = new Schema<IMailbox>(
|
const MailboxSchema = new Schema<IMailbox>(
|
||||||
{
|
{
|
||||||
@ -384,30 +325,6 @@ DuviriInfoSchema.set("toJSON", {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
||||||
const GenericItemSchema2 = new Schema<IGenericItem2>({
|
|
||||||
ItemType: String,
|
|
||||||
ItemName: String,
|
|
||||||
XP: Number,
|
|
||||||
UpgradeVer: Number, //this is probably __v
|
|
||||||
Features: Number,
|
|
||||||
Polarized: Number,
|
|
||||||
CustomizationSlotPurchases: Number,
|
|
||||||
ModSlotPurchases: Number,
|
|
||||||
FocusLens: String,
|
|
||||||
Expiry: Date, //TODO: needs conversion
|
|
||||||
Polarity: [polaritySchema],
|
|
||||||
Configs: [ItemConfigSchema],
|
|
||||||
ModularParts: [String],
|
|
||||||
SkillTree: String,
|
|
||||||
UpgradeType: String,
|
|
||||||
UpgradeFingerprint: String,
|
|
||||||
OffensiveUpgrade: String,
|
|
||||||
DefensiveUpgrade: String,
|
|
||||||
UpgradesExpiry: Date, //TODO: needs conversion
|
|
||||||
ArchonCrystalUpgrades: []
|
|
||||||
});
|
|
||||||
|
|
||||||
const TypeXPItemSchema = new Schema<ITypeXPItem>(
|
const TypeXPItemSchema = new Schema<ITypeXPItem>(
|
||||||
{
|
{
|
||||||
ItemType: String,
|
ItemType: String,
|
||||||
@ -475,7 +392,7 @@ const completedJobChainsSchema = new Schema<ICompletedJobChain>(
|
|||||||
{ _id: false }
|
{ _id: false }
|
||||||
);
|
);
|
||||||
|
|
||||||
const seasonChallengeHistorySchema = new Schema<ISeasonChallengeHistory>(
|
const seasonChallengeHistorySchema = new Schema<ISeasonChallenge>(
|
||||||
{
|
{
|
||||||
challenge: String,
|
challenge: String,
|
||||||
id: String
|
id: String
|
||||||
@ -696,31 +613,31 @@ const inventorySchema = new Schema<IInventoryDatabase, InventoryDocumentProps>(
|
|||||||
//Non Upgrade Mods Example:I have 999 item WeaponElectricityDamageMod (only "ItemCount"+"ItemType")
|
//Non Upgrade Mods Example:I have 999 item WeaponElectricityDamageMod (only "ItemCount"+"ItemType")
|
||||||
RawUpgrades: [RawUpgrades],
|
RawUpgrades: [RawUpgrades],
|
||||||
//Upgrade Mods\Riven\Arcane Example:"UpgradeFingerprint"+"ItemType"+""
|
//Upgrade Mods\Riven\Arcane Example:"UpgradeFingerprint"+"ItemType"+""
|
||||||
Upgrades: [upgrqadesSchema],
|
Upgrades: [upgradesSchema],
|
||||||
|
|
||||||
//Warframe
|
//Warframe
|
||||||
Suits: [suitSchema],
|
Suits: [EquipmentSchema],
|
||||||
//Primary Weapon
|
//Primary Weapon
|
||||||
LongGuns: [WeaponSchema],
|
LongGuns: [EquipmentSchema],
|
||||||
//Secondary Weapon
|
//Secondary Weapon
|
||||||
Pistols: [WeaponSchema],
|
Pistols: [EquipmentSchema],
|
||||||
//Melee Weapon
|
//Melee Weapon
|
||||||
Melee: [WeaponSchema],
|
Melee: [EquipmentSchema],
|
||||||
//Ability Weapon like Ultimate Mech\Excalibur\Ivara etc
|
//Ability Weapon like Ultimate Mech\Excalibur\Ivara etc
|
||||||
SpecialItems: [GenericItemSchema],
|
SpecialItems: [EquipmentSchema],
|
||||||
//The Mandachord(Octavia) is a step sequencer
|
//The Mandachord(Octavia) is a step sequencer
|
||||||
StepSequencers: [StepSequencersSchema],
|
StepSequencers: [StepSequencersSchema],
|
||||||
|
|
||||||
//Sentinel(like Helios or modular)
|
//Sentinel(like Helios or modular)
|
||||||
Sentinels: [Schema.Types.Mixed],
|
Sentinels: [EquipmentSchema],
|
||||||
//Any /Sentinels/SentinelWeapons/ (like warframe weapon)
|
//Any /Sentinels/SentinelWeapons/ (like warframe weapon)
|
||||||
SentinelWeapons: [Schema.Types.Mixed],
|
SentinelWeapons: [EquipmentSchema],
|
||||||
//Modular Pets
|
//Modular Pets
|
||||||
MoaPets: [Schema.Types.Mixed],
|
MoaPets: [EquipmentSchema],
|
||||||
|
|
||||||
KubrowPetEggs: [Schema.Types.Mixed],
|
KubrowPetEggs: [Schema.Types.Mixed],
|
||||||
//Like PowerSuit Cat\Kubrow or etc Pets
|
//Like PowerSuit Cat\Kubrow or etc Pets
|
||||||
KubrowPets: [Schema.Types.Mixed],
|
KubrowPets: [EquipmentSchema],
|
||||||
//Prints Cat(3 Prints)\Kubrow(2 Prints) Pets
|
//Prints Cat(3 Prints)\Kubrow(2 Prints) Pets
|
||||||
KubrowPetPrints: [Schema.Types.Mixed],
|
KubrowPetPrints: [Schema.Types.Mixed],
|
||||||
|
|
||||||
@ -735,27 +652,27 @@ const inventorySchema = new Schema<IInventoryDatabase, InventoryDocumentProps>(
|
|||||||
|
|
||||||
//to use add SummonItem to Consumables+EquippedGear
|
//to use add SummonItem to Consumables+EquippedGear
|
||||||
//Archwing need Suits+Melee+Guns
|
//Archwing need Suits+Melee+Guns
|
||||||
SpaceSuits: [GenericItemSchema],
|
SpaceSuits: [EquipmentSchema],
|
||||||
SpaceMelee: [GenericItemSchema],
|
SpaceMelee: [EquipmentSchema],
|
||||||
SpaceGuns: [Schema.Types.Mixed],
|
SpaceGuns: [EquipmentSchema],
|
||||||
ArchwingEnabled: Boolean,
|
ArchwingEnabled: Boolean,
|
||||||
//Mech need Suits+SpaceGuns+SpecialItem
|
//Mech need Suits+SpaceGuns+SpecialItem
|
||||||
MechSuits: [suitSchema],
|
MechSuits: [EquipmentSchema],
|
||||||
///Restoratives/HoverboardSummon (like Suit)
|
///Restoratives/HoverboardSummon (like Suit)
|
||||||
Hoverboards: [Schema.Types.Mixed],
|
Hoverboards: [EquipmentSchema],
|
||||||
|
|
||||||
//Use Operator\Drifter
|
//Use Operator\Drifter
|
||||||
UseAdultOperatorLoadout: Boolean,
|
UseAdultOperatorLoadout: Boolean,
|
||||||
//Operator\Drifter Weapon
|
//Operator\Drifter Weapon
|
||||||
OperatorAmps: [Schema.Types.Mixed],
|
OperatorAmps: [EquipmentSchema],
|
||||||
//Operator
|
//Operator
|
||||||
OperatorLoadOuts: [operatorConfigSchema],
|
OperatorLoadOuts: [operatorConfigSchema],
|
||||||
//Drifter
|
//Drifter
|
||||||
AdultOperatorLoadOuts: [operatorConfigSchema],
|
AdultOperatorLoadOuts: [operatorConfigSchema],
|
||||||
DrifterMelee: [GenericItemSchema],
|
DrifterMelee: [EquipmentSchema],
|
||||||
DrifterGuns: [GenericItemSchema],
|
DrifterGuns: [EquipmentSchema],
|
||||||
//ErsatzHorsePowerSuit
|
//ErsatzHorsePowerSuit
|
||||||
Horses: [GenericItemSchema],
|
Horses: [EquipmentSchema],
|
||||||
|
|
||||||
//LandingCraft like Liset
|
//LandingCraft like Liset
|
||||||
Ships: { type: [Schema.Types.ObjectId], ref: "Ships" },
|
Ships: { type: [Schema.Types.ObjectId], ref: "Ships" },
|
||||||
@ -763,7 +680,7 @@ const inventorySchema = new Schema<IInventoryDatabase, InventoryDocumentProps>(
|
|||||||
ShipDecorations: [typeCountSchema],
|
ShipDecorations: [typeCountSchema],
|
||||||
|
|
||||||
//RailJack Setting(Mods,Skin,Weapon,etc)
|
//RailJack Setting(Mods,Skin,Weapon,etc)
|
||||||
CrewShipHarnesses: [Schema.Types.Mixed],
|
CrewShipHarnesses: [EquipmentSchema],
|
||||||
//Railjack/Components(https://warframe.fandom.com/wiki/Railjack/Components)
|
//Railjack/Components(https://warframe.fandom.com/wiki/Railjack/Components)
|
||||||
CrewShipRawSalvage: [Schema.Types.Mixed],
|
CrewShipRawSalvage: [Schema.Types.Mixed],
|
||||||
|
|
||||||
@ -790,7 +707,7 @@ const inventorySchema = new Schema<IInventoryDatabase, InventoryDocumentProps>(
|
|||||||
FlavourItems: [FlavourItemSchema],
|
FlavourItems: [FlavourItemSchema],
|
||||||
|
|
||||||
//Lunaro Weapon
|
//Lunaro Weapon
|
||||||
Scoops: [GenericItemSchema],
|
Scoops: [EquipmentSchema],
|
||||||
|
|
||||||
//Mastery Rank*(Need item XPInfo to rank up)
|
//Mastery Rank*(Need item XPInfo to rank up)
|
||||||
PlayerLevel: Number,
|
PlayerLevel: Number,
|
||||||
@ -907,7 +824,7 @@ const inventorySchema = new Schema<IInventoryDatabase, InventoryDocumentProps>(
|
|||||||
InvasionChainProgress: [Schema.Types.Mixed],
|
InvasionChainProgress: [Schema.Types.Mixed],
|
||||||
|
|
||||||
//https://warframe.fandom.com/wiki/Parazon
|
//https://warframe.fandom.com/wiki/Parazon
|
||||||
DataKnives: [GenericItemSchema],
|
DataKnives: [EquipmentSchema],
|
||||||
|
|
||||||
//CorpusLich or GrineerLich
|
//CorpusLich or GrineerLich
|
||||||
NemesisAbandonedRewards: [String],
|
NemesisAbandonedRewards: [String],
|
||||||
@ -1000,24 +917,24 @@ inventorySchema.set("toJSON", {
|
|||||||
|
|
||||||
// type overwrites for subdocuments/subdocument arrays
|
// type overwrites for subdocuments/subdocument arrays
|
||||||
type InventoryDocumentProps = {
|
type InventoryDocumentProps = {
|
||||||
Suits: Types.DocumentArray<ISuitDatabase>;
|
Suits: Types.DocumentArray<IEquipmentDatabase>;
|
||||||
LongGuns: Types.DocumentArray<IWeaponDatabase>;
|
LongGuns: Types.DocumentArray<IEquipmentDatabase>;
|
||||||
Pistols: Types.DocumentArray<IWeaponDatabase>;
|
Pistols: Types.DocumentArray<IEquipmentDatabase>;
|
||||||
Melee: Types.DocumentArray<IWeaponDatabase>;
|
Melee: Types.DocumentArray<IEquipmentDatabase>;
|
||||||
FlavourItems: Types.DocumentArray<IFlavourItem>;
|
FlavourItems: Types.DocumentArray<IFlavourItem>;
|
||||||
RawUpgrades: Types.DocumentArray<IRawUpgrade>;
|
RawUpgrades: Types.DocumentArray<IRawUpgrade>;
|
||||||
Upgrades: Types.DocumentArray<ICrewShipSalvagedWeaponSkin>;
|
Upgrades: Types.DocumentArray<ICrewShipSalvagedWeaponSkin>;
|
||||||
MiscItems: Types.DocumentArray<IMiscItem>;
|
MiscItems: Types.DocumentArray<IMiscItem>;
|
||||||
Boosters: Types.DocumentArray<IBooster>;
|
Boosters: Types.DocumentArray<IBooster>;
|
||||||
OperatorLoadOuts: Types.DocumentArray<IOperatorConfigClient>;
|
OperatorLoadOuts: Types.DocumentArray<IOperatorConfigClient>;
|
||||||
SpecialItems: Types.DocumentArray<IGenericItem>;
|
SpecialItems: Types.DocumentArray<IEquipmentDatabase>;
|
||||||
AdultOperatorLoadOuts: Types.DocumentArray<IOperatorConfigClient>; //TODO: this should still contain _id
|
AdultOperatorLoadOuts: Types.DocumentArray<IOperatorConfigClient>; //TODO: this should still contain _id
|
||||||
MechSuits: Types.DocumentArray<ISuitDatabase>;
|
MechSuits: Types.DocumentArray<IEquipmentDatabase>;
|
||||||
Scoops: Types.DocumentArray<IGenericItem>;
|
Scoops: Types.DocumentArray<IEquipmentDatabase>;
|
||||||
DataKnives: Types.DocumentArray<IGenericItem>;
|
DataKnives: Types.DocumentArray<IEquipmentDatabase>;
|
||||||
DrifterMelee: Types.DocumentArray<IGenericItem>;
|
DrifterMelee: Types.DocumentArray<IEquipmentDatabase>;
|
||||||
Sentinels: Types.DocumentArray<IWeaponDatabase>;
|
Sentinels: Types.DocumentArray<IEquipmentDatabase>;
|
||||||
Horses: Types.DocumentArray<IGenericItem>;
|
Horses: Types.DocumentArray<IEquipmentDatabase>;
|
||||||
PendingRecipes: Types.DocumentArray<IPendingRecipeDatabase>;
|
PendingRecipes: Types.DocumentArray<IPendingRecipeDatabase>;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
import { IOid } from "@/src/types/commonTypes";
|
import { IOid } from "@/src/types/commonTypes";
|
||||||
import { ILoadoutConfigDatabase, ILoadoutDatabase, IEquipmentSelection } from "@/src/types/saveLoadoutTypes";
|
import { IEquipmentSelection } from "@/src/types/inventoryTypes/commonInventoryTypes";
|
||||||
|
import { ILoadoutConfigDatabase, ILoadoutDatabase } from "@/src/types/saveLoadoutTypes";
|
||||||
import { Model, Schema, Types, model } from "mongoose";
|
import { Model, Schema, Types, model } from "mongoose";
|
||||||
|
|
||||||
const oidSchema = new Schema<IOid>(
|
const oidSchema = new Schema<IOid>(
|
||||||
|
@ -2,9 +2,7 @@ import { Inventory } from "@/src/models/inventoryModels/inventoryModel";
|
|||||||
import new_inventory from "@/static/fixed_responses/postTutorialInventory.json";
|
import new_inventory from "@/static/fixed_responses/postTutorialInventory.json";
|
||||||
import { config } from "@/src/services/configService";
|
import { config } from "@/src/services/configService";
|
||||||
import { Types } from "mongoose";
|
import { Types } from "mongoose";
|
||||||
import { ISuitClient } from "@/src/types/inventoryTypes/SuitTypes";
|
|
||||||
import { SlotNames } from "@/src/types/purchaseTypes";
|
import { SlotNames } from "@/src/types/purchaseTypes";
|
||||||
import { IWeaponClient } from "@/src/types/inventoryTypes/weaponTypes";
|
|
||||||
import {
|
import {
|
||||||
IChallengeProgress,
|
IChallengeProgress,
|
||||||
IConsumable,
|
IConsumable,
|
||||||
@ -13,7 +11,7 @@ import {
|
|||||||
IMiscItem,
|
IMiscItem,
|
||||||
IMission,
|
IMission,
|
||||||
IRawUpgrade,
|
IRawUpgrade,
|
||||||
ISeasonChallengeHistory,
|
ISeasonChallenge,
|
||||||
ITypeCount,
|
ITypeCount,
|
||||||
InventorySlot
|
InventorySlot
|
||||||
} from "@/src/types/inventoryTypes/inventoryTypes";
|
} from "@/src/types/inventoryTypes/inventoryTypes";
|
||||||
@ -27,6 +25,7 @@ import {
|
|||||||
import { logger } from "@/src/utils/logger";
|
import { logger } from "@/src/utils/logger";
|
||||||
import { WeaponTypeInternal, getWeaponType, getExalted } from "@/src/services/itemDataService";
|
import { WeaponTypeInternal, getWeaponType, getExalted } from "@/src/services/itemDataService";
|
||||||
import { ISyndicateSacrifice, ISyndicateSacrificeResponse } from "../types/syndicateTypes";
|
import { ISyndicateSacrifice, ISyndicateSacrificeResponse } from "../types/syndicateTypes";
|
||||||
|
import { IEquipmentClient } from "../types/inventoryTypes/commonInventoryTypes";
|
||||||
|
|
||||||
export const createInventory = async (
|
export const createInventory = async (
|
||||||
accountOwnerId: Types.ObjectId,
|
accountOwnerId: Types.ObjectId,
|
||||||
@ -237,7 +236,7 @@ export const addSentinel = async (sentinelName: string, accountId: string) => {
|
|||||||
return changedInventory.Sentinels[sentinelIndex - 1].toJSON();
|
return changedInventory.Sentinels[sentinelIndex - 1].toJSON();
|
||||||
};
|
};
|
||||||
|
|
||||||
export const addPowerSuit = async (powersuitName: string, accountId: string): Promise<ISuitClient> => {
|
export const addPowerSuit = async (powersuitName: string, accountId: string): Promise<IEquipmentClient> => {
|
||||||
const specialItems = getExalted(powersuitName);
|
const specialItems = getExalted(powersuitName);
|
||||||
if (specialItems != false) {
|
if (specialItems != false) {
|
||||||
for await (const specialItem of specialItems) {
|
for await (const specialItem of specialItems) {
|
||||||
@ -386,7 +385,7 @@ export const addWeapon = async (
|
|||||||
weaponType: WeaponTypeInternal,
|
weaponType: WeaponTypeInternal,
|
||||||
weaponName: string,
|
weaponName: string,
|
||||||
accountId: string
|
accountId: string
|
||||||
): Promise<IWeaponClient> => {
|
): Promise<IEquipmentClient> => {
|
||||||
const inventory = await getInventory(accountId);
|
const inventory = await getInventory(accountId);
|
||||||
|
|
||||||
let weaponIndex;
|
let weaponIndex;
|
||||||
@ -418,7 +417,7 @@ export const addCustomization = async (customizatonName: string, accountId: stri
|
|||||||
|
|
||||||
const addGearExpByCategory = (
|
const addGearExpByCategory = (
|
||||||
inventory: IInventoryDatabaseDocument,
|
inventory: IInventoryDatabaseDocument,
|
||||||
gearArray: ISuitClient[] | IWeaponClient[] | undefined,
|
gearArray: IEquipmentClient[] | undefined,
|
||||||
categoryName: "Pistols" | "LongGuns" | "Melee" | "Suits"
|
categoryName: "Pistols" | "LongGuns" | "Melee" | "Suits"
|
||||||
) => {
|
) => {
|
||||||
const category = inventory[categoryName];
|
const category = inventory[categoryName];
|
||||||
@ -534,7 +533,7 @@ export const updateChallengeProgress = async (challenges: IUpdateChallengeProgre
|
|||||||
|
|
||||||
export const addSeasonalChallengeHistory = (
|
export const addSeasonalChallengeHistory = (
|
||||||
inventory: IInventoryDatabaseDocument,
|
inventory: IInventoryDatabaseDocument,
|
||||||
itemsArray: ISeasonChallengeHistory[] | undefined
|
itemsArray: ISeasonChallenge[] | undefined
|
||||||
) => {
|
) => {
|
||||||
const category = inventory.SeasonChallengeHistory;
|
const category = inventory.SeasonChallengeHistory;
|
||||||
|
|
||||||
|
@ -1,25 +0,0 @@
|
|||||||
import { IOid } from "@/src/types/commonTypes";
|
|
||||||
import { IPolarity } from "@/src/types/inventoryTypes/commonInventoryTypes";
|
|
||||||
import { Types } from "mongoose";
|
|
||||||
import { IItemConfig } from "./commonInventoryTypes";
|
|
||||||
|
|
||||||
export interface ISuitClient extends Omit<ISuitDatabase, "_id"> {
|
|
||||||
ItemId: IOid;
|
|
||||||
}
|
|
||||||
|
|
||||||
export interface ISuitDatabase {
|
|
||||||
ItemType: string;
|
|
||||||
Configs: IItemConfig[];
|
|
||||||
UpgradeVer?: number;
|
|
||||||
XP?: number;
|
|
||||||
InfestationDate?: Date;
|
|
||||||
Features?: number;
|
|
||||||
Polarity?: IPolarity[];
|
|
||||||
Polarized?: number;
|
|
||||||
ModSlotPurchases?: number;
|
|
||||||
CustomizationSlotPurchases?: number;
|
|
||||||
FocusLens?: string;
|
|
||||||
UnlockLevel?: number;
|
|
||||||
_id: Types.ObjectId;
|
|
||||||
ItemId?: IOid; // only in response
|
|
||||||
}
|
|
@ -1,4 +1,4 @@
|
|||||||
import { IOid } from "@/src/types/commonTypes";
|
import { IMongoDate, IOid } from "@/src/types/commonTypes";
|
||||||
import { Types } from "mongoose";
|
import { Types } from "mongoose";
|
||||||
|
|
||||||
export interface IPolarity {
|
export interface IPolarity {
|
||||||
@ -38,15 +38,8 @@ export interface ISlotsBin {
|
|||||||
Slots: number;
|
Slots: number;
|
||||||
}
|
}
|
||||||
|
|
||||||
// ISigCol? IsIgCoL? ISIGCOL!
|
export interface IItemConfig {
|
||||||
export interface Isigcol {
|
Skins?: string[];
|
||||||
t0: number;
|
|
||||||
t1: number;
|
|
||||||
en: number;
|
|
||||||
}
|
|
||||||
|
|
||||||
interface IItemConfigBase {
|
|
||||||
Skins: string[];
|
|
||||||
pricol?: IColor;
|
pricol?: IColor;
|
||||||
attcol?: IColor;
|
attcol?: IColor;
|
||||||
sigcol?: IColor;
|
sigcol?: IColor;
|
||||||
@ -56,12 +49,7 @@ interface IItemConfigBase {
|
|||||||
cloth?: IColor;
|
cloth?: IColor;
|
||||||
Upgrades?: string[];
|
Upgrades?: string[];
|
||||||
Name?: string;
|
Name?: string;
|
||||||
ugly?: boolean;
|
OperatorAmp?: IOid;
|
||||||
}
|
|
||||||
|
|
||||||
//TODO: Proper names for the different config types, this should be something like
|
|
||||||
//IItemConfigPlayable
|
|
||||||
export interface IItemConfig extends IItemConfigBase {
|
|
||||||
Songs?: ISong[];
|
Songs?: ISong[];
|
||||||
AbilityOverride?: IAbilityOverride;
|
AbilityOverride?: IAbilityOverride;
|
||||||
PvpUpgrades?: string[];
|
PvpUpgrades?: string[];
|
||||||
@ -74,14 +62,47 @@ export interface ISong {
|
|||||||
p?: string;
|
p?: string;
|
||||||
s: string;
|
s: string;
|
||||||
}
|
}
|
||||||
|
export interface IOperatorConfigDatabase extends IItemConfig {
|
||||||
//TODO: Consider renaming it to loadout instead of config
|
|
||||||
export interface IOperatorConfigDatabase extends IItemConfigBase {
|
|
||||||
_id: Types.ObjectId;
|
_id: Types.ObjectId;
|
||||||
AbilityOverride?: IAbilityOverride; // not present in adultOperator
|
|
||||||
OperatorAmp?: IOid; // not present in adultOperator
|
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface IOperatorConfigClient extends Omit<IOperatorConfigDatabase, "_id"> {
|
export interface IOperatorConfigClient extends Omit<IOperatorConfigDatabase, "_id"> {
|
||||||
ItemId: IOid;
|
ItemId: IOid;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export interface IEquipmentSelection {
|
||||||
|
ItemId: IOid;
|
||||||
|
mod?: number;
|
||||||
|
cus?: number;
|
||||||
|
ItemType?: string;
|
||||||
|
hide?: boolean;
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface IEquipmentClient extends Omit<IEquipmentDatabase, "_id"> {
|
||||||
|
ItemId: IOid;
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface IEquipmentDatabase {
|
||||||
|
ItemType: string;
|
||||||
|
ItemName?: string;
|
||||||
|
Configs: IItemConfig[];
|
||||||
|
UpgradeVer?: number;
|
||||||
|
XP?: number;
|
||||||
|
Features?: number;
|
||||||
|
Polarized?: number;
|
||||||
|
Polarity?: IPolarity[];
|
||||||
|
FocusLens?: string;
|
||||||
|
ModSlotPurchases?: number;
|
||||||
|
CustomizationSlotPurchases?: number;
|
||||||
|
UpgradeType?: string;
|
||||||
|
UpgradeFingerprint?: string;
|
||||||
|
InfestationDate?: IMongoDate;
|
||||||
|
InfestationDays?: number;
|
||||||
|
InfestationType?: string;
|
||||||
|
ModularParts?: string[];
|
||||||
|
UnlockLevel?: number;
|
||||||
|
Expiry?: IMongoDate;
|
||||||
|
SkillTree?: string;
|
||||||
|
ArchonCrystalUpgrades?: []; //TODO
|
||||||
|
_id: Types.ObjectId;
|
||||||
|
}
|
||||||
|
@ -2,15 +2,13 @@
|
|||||||
import { Document, Types } from "mongoose";
|
import { Document, Types } from "mongoose";
|
||||||
import { IOid, IMongoDate } from "../commonTypes";
|
import { IOid, IMongoDate } from "../commonTypes";
|
||||||
import {
|
import {
|
||||||
IAbilityOverride,
|
|
||||||
IColor,
|
IColor,
|
||||||
FocusSchool,
|
FocusSchool,
|
||||||
IPolarity,
|
|
||||||
IItemConfig,
|
IItemConfig,
|
||||||
IOperatorConfigClient
|
IOperatorConfigClient,
|
||||||
|
IEquipmentSelection,
|
||||||
|
IEquipmentDatabase
|
||||||
} from "@/src/types/inventoryTypes/commonInventoryTypes";
|
} from "@/src/types/inventoryTypes/commonInventoryTypes";
|
||||||
import { ISuitDatabase } from "@/src/types/inventoryTypes/SuitTypes";
|
|
||||||
import { IOperatorLoadOutSigcol, IWeaponDatabase } from "@/src/types/inventoryTypes/weaponTypes";
|
|
||||||
|
|
||||||
//Document extends will be deleted soon. TODO: delete and migrate uses to ...
|
//Document extends will be deleted soon. TODO: delete and migrate uses to ...
|
||||||
export interface IInventoryDatabaseDocument extends IInventoryDatabase, Document {}
|
export interface IInventoryDatabaseDocument extends IInventoryDatabase, Document {}
|
||||||
@ -61,48 +59,14 @@ export interface ITypeCount {
|
|||||||
ItemCount: number;
|
ItemCount: number;
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface IGenericItem2 {
|
export type IEquipmentKey =
|
||||||
ItemType: string;
|
| "Suits"
|
||||||
ItemName: string;
|
| "LongGuns"
|
||||||
ItemId: IOid;
|
| "Pistols"
|
||||||
XP: number;
|
| "Melee"
|
||||||
UpgradeVer: number;
|
| "SpecialItems"
|
||||||
Features: number;
|
| "Sentinels"
|
||||||
Polarized: number;
|
| "SentinelWeapons";
|
||||||
CustomizationSlotPurchases: number;
|
|
||||||
ModSlotPurchases: number;
|
|
||||||
FocusLens: string;
|
|
||||||
Expiry: IMongoDate;
|
|
||||||
Polarity: IPolarity[];
|
|
||||||
Configs: IItemConfig[];
|
|
||||||
ModularParts: string[];
|
|
||||||
SkillTree: string;
|
|
||||||
UpgradeType: string;
|
|
||||||
UpgradeFingerprint: string;
|
|
||||||
OffensiveUpgrade: string;
|
|
||||||
DefensiveUpgrade: string;
|
|
||||||
UpgradesExpiry: IMongoDate;
|
|
||||||
ArchonCrystalUpgrades: [];
|
|
||||||
}
|
|
||||||
|
|
||||||
export interface IGenericItem {
|
|
||||||
ItemType: string;
|
|
||||||
XP?: number;
|
|
||||||
Configs: IItemConfig[];
|
|
||||||
UpgradeVer: number;
|
|
||||||
ItemId: IOid;
|
|
||||||
Features?: number;
|
|
||||||
Polarity?: IPolarity[];
|
|
||||||
Polarized?: number;
|
|
||||||
ModSlotPurchases?: number;
|
|
||||||
CustomizationSlotPurchases?: number;
|
|
||||||
}
|
|
||||||
|
|
||||||
export interface IGenericItemDatabase extends Omit<IGenericItem, "ItemId"> {
|
|
||||||
_id: Types.ObjectId;
|
|
||||||
}
|
|
||||||
|
|
||||||
export type TGenericItemKey = "Suits" | "LongGuns" | "Pistols" | "Melee";
|
|
||||||
|
|
||||||
export interface IDuviriInfo {
|
export interface IDuviriInfo {
|
||||||
Seed: number;
|
Seed: number;
|
||||||
@ -119,12 +83,12 @@ export interface IPendingRecipeResponse extends Omit<IPendingRecipe, "Completion
|
|||||||
CompletionDate: IMongoDate;
|
CompletionDate: IMongoDate;
|
||||||
}
|
}
|
||||||
export interface IInventoryResponse {
|
export interface IInventoryResponse {
|
||||||
Horses: IGenericItem[];
|
Horses: IEquipmentDatabase[];
|
||||||
DrifterMelee: IGenericItem[];
|
DrifterMelee: IEquipmentDatabase[];
|
||||||
DrifterGuns: IGenericItem[];
|
DrifterGuns: IEquipmentDatabase[];
|
||||||
DuviriInfo: IDuviriInfo;
|
DuviriInfo: IDuviriInfo;
|
||||||
Mailbox: IMailbox;
|
Mailbox: IMailbox;
|
||||||
KahlLoadOuts: IGenericItem[];
|
KahlLoadOuts: IEquipmentDatabase[];
|
||||||
SubscribedToEmails: number;
|
SubscribedToEmails: number;
|
||||||
Created: IMongoDate;
|
Created: IMongoDate;
|
||||||
RewardSeed: number;
|
RewardSeed: number;
|
||||||
@ -156,19 +120,19 @@ export interface IInventoryResponse {
|
|||||||
ChallengeProgress: IChallengeProgress[];
|
ChallengeProgress: IChallengeProgress[];
|
||||||
RawUpgrades: IRawUpgrade[];
|
RawUpgrades: IRawUpgrade[];
|
||||||
ReceivedStartingGear: boolean;
|
ReceivedStartingGear: boolean;
|
||||||
Suits: ISuitDatabase[];
|
Suits: IEquipmentDatabase[];
|
||||||
LongGuns: IWeaponDatabase[];
|
LongGuns: IEquipmentDatabase[];
|
||||||
Pistols: IWeaponDatabase[];
|
Pistols: IEquipmentDatabase[];
|
||||||
Melee: IWeaponDatabase[];
|
Melee: IEquipmentDatabase[];
|
||||||
Ships: IShipInventory[];
|
Ships: IShipInventory[];
|
||||||
QuestKeys: IQuestKeyResponse[];
|
QuestKeys: IQuestKeyResponse[];
|
||||||
FlavourItems: IFlavourItem[];
|
FlavourItems: IFlavourItem[];
|
||||||
Scoops: IGenericItem[];
|
Scoops: IEquipmentDatabase[];
|
||||||
TrainingRetriesLeft: number;
|
TrainingRetriesLeft: number;
|
||||||
LoadOutPresets: ILoadOutPresets;
|
LoadOutPresets: ILoadOutPresets;
|
||||||
CurrentLoadOutIds: Array<any[] | IOid>;
|
CurrentLoadOutIds: Array<any[] | IOid>;
|
||||||
Missions: IMission[];
|
Missions: IMission[];
|
||||||
RandomUpgradesIdentified: number;
|
RandomUpgradesIdentified?: number;
|
||||||
LastRegionPlayed: string;
|
LastRegionPlayed: string;
|
||||||
XPInfo: ITypeXPItem[];
|
XPInfo: ITypeXPItem[];
|
||||||
Recipes: ITypeCount[];
|
Recipes: ITypeCount[];
|
||||||
@ -198,14 +162,14 @@ export interface IInventoryResponse {
|
|||||||
Affiliations: IAffiliation[];
|
Affiliations: IAffiliation[];
|
||||||
QualifyingInvasions: any[];
|
QualifyingInvasions: any[];
|
||||||
FactionScores: number[];
|
FactionScores: number[];
|
||||||
SpaceSuits: IGenericItem[];
|
SpaceSuits: IEquipmentDatabase[];
|
||||||
SpaceMelee: IGenericItem[];
|
SpaceMelee: IEquipmentDatabase[];
|
||||||
SpaceGuns: ISpaceGun[];
|
SpaceGuns: IEquipmentDatabase[];
|
||||||
ArchwingEnabled: boolean;
|
ArchwingEnabled: boolean;
|
||||||
PendingSpectreLoadouts: any[];
|
PendingSpectreLoadouts: any[];
|
||||||
SpectreLoadouts: ISpectreLoadout[];
|
SpectreLoadouts: ISpectreLoadout[];
|
||||||
SentinelWeapons: IWeaponDatabase[];
|
SentinelWeapons: IEquipmentDatabase[];
|
||||||
Sentinels: IWeaponDatabase[];
|
Sentinels: IEquipmentDatabase[];
|
||||||
EmailItems: ITypeXPItem[];
|
EmailItems: ITypeXPItem[];
|
||||||
CompletedSyndicates: string[];
|
CompletedSyndicates: string[];
|
||||||
FocusXP: IFocusXP;
|
FocusXP: IFocusXP;
|
||||||
@ -216,7 +180,7 @@ export interface IInventoryResponse {
|
|||||||
Drones: IDrone[];
|
Drones: IDrone[];
|
||||||
StepSequencers: IStepSequencer[];
|
StepSequencers: IStepSequencer[];
|
||||||
ActiveAvatarImageType: string;
|
ActiveAvatarImageType: string;
|
||||||
KubrowPets: IKubrowPet[];
|
KubrowPets: IEquipmentDatabase[];
|
||||||
ShipDecorations: IConsumable[];
|
ShipDecorations: IConsumable[];
|
||||||
DailyAffiliationCetus: number;
|
DailyAffiliationCetus: number;
|
||||||
DailyAffiliationQuills: number;
|
DailyAffiliationQuills: number;
|
||||||
@ -224,14 +188,14 @@ export interface IInventoryResponse {
|
|||||||
CompletedJobs: ICompletedJob[];
|
CompletedJobs: ICompletedJob[];
|
||||||
FocusAbility: string;
|
FocusAbility: string;
|
||||||
FocusUpgrades: IFocusUpgrade[];
|
FocusUpgrades: IFocusUpgrade[];
|
||||||
OperatorAmps: IOperatorAmp[];
|
OperatorAmps: IEquipmentDatabase[];
|
||||||
HasContributedToDojo: boolean;
|
HasContributedToDojo?: boolean;
|
||||||
HWIDProtectEnabled: boolean;
|
HWIDProtectEnabled: boolean;
|
||||||
KubrowPetPrints: IKubrowPetPrint[];
|
KubrowPetPrints: IKubrowPetPrint[];
|
||||||
AlignmentReplay: IAlignment;
|
AlignmentReplay: IAlignment;
|
||||||
PersonalGoalProgress: IPersonalGoalProgress[];
|
PersonalGoalProgress: IPersonalGoalProgress[];
|
||||||
DailyAffiliationSolaris: number;
|
DailyAffiliationSolaris: number;
|
||||||
SpecialItems: IGenericItem[];
|
SpecialItems: IEquipmentDatabase[];
|
||||||
ThemeStyle: string;
|
ThemeStyle: string;
|
||||||
ThemeBackground: string;
|
ThemeBackground: string;
|
||||||
ThemeSounds: string;
|
ThemeSounds: string;
|
||||||
@ -242,17 +206,17 @@ export interface IInventoryResponse {
|
|||||||
DailyAffiliationVentkids: number;
|
DailyAffiliationVentkids: number;
|
||||||
DailyAffiliationVox: number;
|
DailyAffiliationVox: number;
|
||||||
RecentVendorPurchases: Array<number | string>;
|
RecentVendorPurchases: Array<number | string>;
|
||||||
Hoverboards: IHoverboard[];
|
Hoverboards: IEquipmentDatabase[];
|
||||||
NodeIntrosCompleted: string[];
|
NodeIntrosCompleted: string[];
|
||||||
GuildId?: IOid;
|
GuildId?: IOid;
|
||||||
CompletedJobChains: ICompletedJobChain[];
|
CompletedJobChains: ICompletedJobChain[];
|
||||||
SeasonChallengeHistory: ISeasonChallengeHistory[];
|
SeasonChallengeHistory: ISeasonChallenge[];
|
||||||
MoaPets: IMoaPet[];
|
MoaPets: IEquipmentDatabase[];
|
||||||
EquippedInstrument: string;
|
EquippedInstrument: string;
|
||||||
InvasionChainProgress: IInvasionChainProgress[];
|
InvasionChainProgress: IInvasionChainProgress[];
|
||||||
DataKnives: IGenericItem[];
|
DataKnives: IEquipmentDatabase[];
|
||||||
NemesisHistory: INemesisHistory[];
|
NemesisHistory: INemesisHistory[];
|
||||||
LastNemesisAllySpawnTime: IMongoDate;
|
LastNemesisAllySpawnTime?: IMongoDate;
|
||||||
Settings: ISettings;
|
Settings: ISettings;
|
||||||
PersonalTechProjects: IPersonalTechProject[];
|
PersonalTechProjects: IPersonalTechProject[];
|
||||||
CrewShips: ICrewShip[];
|
CrewShips: ICrewShip[];
|
||||||
@ -262,15 +226,15 @@ export interface IInventoryResponse {
|
|||||||
CrewShipWeapons: ICrewShipWeapon[];
|
CrewShipWeapons: ICrewShipWeapon[];
|
||||||
CrewShipSalvagedWeapons: ICrewShipWeapon[];
|
CrewShipSalvagedWeapons: ICrewShipWeapon[];
|
||||||
CrewShipWeaponSkins: ICrewShipSalvagedWeaponSkin[];
|
CrewShipWeaponSkins: ICrewShipSalvagedWeaponSkin[];
|
||||||
TradeBannedUntil: IMongoDate;
|
TradeBannedUntil?: IMongoDate;
|
||||||
PlayedParkourTutorial: boolean;
|
PlayedParkourTutorial: boolean;
|
||||||
SubscribedToEmailsPersonalized: number;
|
SubscribedToEmailsPersonalized: number;
|
||||||
DailyAffiliationEntrati: number;
|
DailyAffiliationEntrati: number;
|
||||||
DailyAffiliationNecraloid: number;
|
DailyAffiliationNecraloid: number;
|
||||||
MechSuits: ISuitDatabase[];
|
MechSuits: IEquipmentDatabase[];
|
||||||
InfestedFoundry: IInfestedFoundry;
|
InfestedFoundry: IInfestedFoundry;
|
||||||
BlessingCooldown: IMongoDate;
|
BlessingCooldown: IMongoDate;
|
||||||
CrewShipHarnesses: ICrewShipHarness[];
|
CrewShipHarnesses: IEquipmentDatabase[];
|
||||||
CrewShipRawSalvage: IConsumable[];
|
CrewShipRawSalvage: IConsumable[];
|
||||||
CrewMembers: ICrewMember[];
|
CrewMembers: ICrewMember[];
|
||||||
AdultOperatorLoadOuts: IOperatorConfigClient[];
|
AdultOperatorLoadOuts: IOperatorConfigClient[];
|
||||||
@ -297,16 +261,6 @@ export interface IInventoryResponse {
|
|||||||
DeathSquadable: boolean;
|
DeathSquadable: boolean;
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface IAdultOperatorLoadOut {
|
|
||||||
Skins: string[];
|
|
||||||
attcol: IColor;
|
|
||||||
eyecol: IColor;
|
|
||||||
facial: IColor;
|
|
||||||
pricol: IColor;
|
|
||||||
Upgrades?: string[];
|
|
||||||
ItemId: IOid;
|
|
||||||
}
|
|
||||||
|
|
||||||
export interface IAffiliation {
|
export interface IAffiliation {
|
||||||
Initiated?: boolean;
|
Initiated?: boolean;
|
||||||
Standing: number;
|
Standing: number;
|
||||||
@ -384,14 +338,11 @@ export interface ICrewMember {
|
|||||||
WeaponId: IOid;
|
WeaponId: IOid;
|
||||||
XP: number;
|
XP: number;
|
||||||
PowersuitType: string;
|
PowersuitType: string;
|
||||||
Configs: ICrewMemberConfig[];
|
Configs: IItemConfig[];
|
||||||
SecondInCommand: boolean;
|
SecondInCommand: boolean;
|
||||||
ItemId: IOid;
|
ItemId: IOid;
|
||||||
}
|
}
|
||||||
|
|
||||||
// eslint-disable-next-line @typescript-eslint/no-empty-interface
|
|
||||||
export interface ICrewMemberConfig {}
|
|
||||||
|
|
||||||
export interface ISkillEfficiency {
|
export interface ISkillEfficiency {
|
||||||
PILOTING: ICombat;
|
PILOTING: ICombat;
|
||||||
GUNNERY: ICombat;
|
GUNNERY: ICombat;
|
||||||
@ -404,21 +355,6 @@ export interface ICombat {
|
|||||||
Assigned: number;
|
Assigned: number;
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface ICrewShipHarness {
|
|
||||||
ItemType: string;
|
|
||||||
Configs: ICrewShipHarnessConfig[];
|
|
||||||
Features: number;
|
|
||||||
UpgradeVer: number;
|
|
||||||
XP: number;
|
|
||||||
Polarity: IPolarity[];
|
|
||||||
Polarized: number;
|
|
||||||
ItemId: IOid;
|
|
||||||
}
|
|
||||||
|
|
||||||
export interface ICrewShipHarnessConfig {
|
|
||||||
Upgrades?: string[];
|
|
||||||
}
|
|
||||||
|
|
||||||
export enum InventorySlot {
|
export enum InventorySlot {
|
||||||
SUITS = "SuitBin",
|
SUITS = "SuitBin",
|
||||||
WEAPONS = "WeaponBin",
|
WEAPONS = "WeaponBin",
|
||||||
@ -443,25 +379,21 @@ export interface ICrewShipWeapon {
|
|||||||
ItemType: string;
|
ItemType: string;
|
||||||
UpgradeType?: string;
|
UpgradeType?: string;
|
||||||
UpgradeFingerprint?: string;
|
UpgradeFingerprint?: string;
|
||||||
Configs?: ICrewShipHarnessConfig[];
|
Configs?: IItemConfig[];
|
||||||
UpgradeVer?: number;
|
UpgradeVer?: number;
|
||||||
ItemId: IOid;
|
ItemId: IOid;
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface ICrewShip {
|
export interface ICrewShip {
|
||||||
ItemType: string;
|
ItemType: string;
|
||||||
Configs: ICrewShipConfig[];
|
Configs: IItemConfig[];
|
||||||
Weapon: ICrewshipWeapon;
|
Weapon: ICrewshipWeapon;
|
||||||
Customization: ICustomization;
|
Customization: ICustomization;
|
||||||
ItemName: string;
|
ItemName: string;
|
||||||
RailjackImage: IFlavourItem;
|
RailjackImage: IFlavourItem;
|
||||||
CrewMembers: ICrewMembers;
|
CrewMembers: ICrewMembers;
|
||||||
ItemId: IOid;
|
ItemId: IOid;
|
||||||
}
|
_id: Types.ObjectId;
|
||||||
|
|
||||||
export interface ICrewShipConfig {
|
|
||||||
Skins?: string[];
|
|
||||||
pricol?: IColor;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface ICrewMembers {
|
export interface ICrewMembers {
|
||||||
@ -484,16 +416,6 @@ export interface IShipExterior {
|
|||||||
ShipAttachments?: IShipAttachments;
|
ShipAttachments?: IShipAttachments;
|
||||||
}
|
}
|
||||||
|
|
||||||
//TODO: check whether it makes sense to use this specifity of color.
|
|
||||||
export interface IShipExteriorColors {
|
|
||||||
t0: number;
|
|
||||||
t1: number;
|
|
||||||
t2: number;
|
|
||||||
t3: number;
|
|
||||||
m0: number;
|
|
||||||
en: number;
|
|
||||||
}
|
|
||||||
|
|
||||||
export interface IShipAttachments {
|
export interface IShipAttachments {
|
||||||
HOOD_ORNAMENT: string; //TODO: Others are probably possible
|
HOOD_ORNAMENT: string; //TODO: Others are probably possible
|
||||||
}
|
}
|
||||||
@ -512,22 +434,12 @@ export interface ICrewshipWeapon {
|
|||||||
PORT_GUNS: IPortGuns;
|
PORT_GUNS: IPortGuns;
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface IPilot {
|
|
||||||
PRIMARY_A: IL;
|
|
||||||
SECONDARY_A: IL;
|
|
||||||
}
|
|
||||||
|
|
||||||
// L? Bozo.
|
|
||||||
export interface IL {
|
|
||||||
ItemId?: IOid;
|
|
||||||
mod?: number;
|
|
||||||
cus?: number;
|
|
||||||
ItemType?: string;
|
|
||||||
hide?: boolean;
|
|
||||||
}
|
|
||||||
|
|
||||||
export interface IPortGuns {
|
export interface IPortGuns {
|
||||||
PRIMARY_A: IL;
|
PRIMARY_A: IEquipmentSelection;
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface IPilot extends IPortGuns {
|
||||||
|
SECONDARY_A: IEquipmentSelection;
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface IDiscoveredMarker {
|
export interface IDiscoveredMarker {
|
||||||
@ -569,38 +481,6 @@ export interface IFusionTreasure {
|
|||||||
Sockets: number;
|
Sockets: number;
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface IHoverboard {
|
|
||||||
ItemType: string;
|
|
||||||
Configs: IHoverboardConfig[];
|
|
||||||
ModularParts: string[];
|
|
||||||
ItemName?: string;
|
|
||||||
Polarity?: IPolarity[];
|
|
||||||
UpgradeVer: number;
|
|
||||||
XP: number;
|
|
||||||
Features: number;
|
|
||||||
ItemId: IOid;
|
|
||||||
}
|
|
||||||
|
|
||||||
export interface IHoverboardConfig {
|
|
||||||
Upgrades?: string[];
|
|
||||||
Skins?: IPurpleSkin[];
|
|
||||||
pricol?: IColor;
|
|
||||||
sigcol?: ISigcol;
|
|
||||||
attcol?: IColor;
|
|
||||||
}
|
|
||||||
|
|
||||||
export enum IPurpleSkin {
|
|
||||||
Empty = "",
|
|
||||||
The5Be4Af71A38E4A9306040E15 = "5be4af71a38e4a9306040e15",
|
|
||||||
The5C930Ac3A38E4A24Bc3Ad5De = "5c930ac3a38e4a24bc3ad5de",
|
|
||||||
The5C9C6F9857904A7A3B25656B = "5c9c6f9857904a7a3b25656b",
|
|
||||||
The5Dd8A8E3A38E4A321A45E6A0 = "5dd8a8e3a38e4a321a45e6a0"
|
|
||||||
}
|
|
||||||
|
|
||||||
export interface ISigcol {
|
|
||||||
t3: number;
|
|
||||||
}
|
|
||||||
|
|
||||||
export interface IInfestedFoundry {
|
export interface IInfestedFoundry {
|
||||||
Name: string;
|
Name: string;
|
||||||
Resources: ITypeCount[];
|
Resources: ITypeCount[];
|
||||||
@ -653,44 +533,13 @@ export interface ITraits {
|
|||||||
Personality: string;
|
Personality: string;
|
||||||
BodyType: string;
|
BodyType: string;
|
||||||
Head?: string;
|
Head?: string;
|
||||||
Tail?: Tail;
|
Tail?: string;
|
||||||
}
|
|
||||||
|
|
||||||
export enum Tail {
|
|
||||||
Empty = "",
|
|
||||||
LotusTypesGameCatbrowPetTailsCatbrowTailA = "/Lotus/Types/Game/CatbrowPet/Tails/CatbrowTailA",
|
|
||||||
LotusTypesGameCatbrowPetTailsCatbrowTailB = "/Lotus/Types/Game/CatbrowPet/Tails/CatbrowTailB",
|
|
||||||
LotusTypesGameCatbrowPetTailsCatbrowTailC = "/Lotus/Types/Game/CatbrowPet/Tails/CatbrowTailC",
|
|
||||||
LotusTypesGameCatbrowPetTailsCatbrowTailD = "/Lotus/Types/Game/CatbrowPet/Tails/CatbrowTailD"
|
|
||||||
}
|
}
|
||||||
|
|
||||||
export enum KubrowPetPrintItemType {
|
export enum KubrowPetPrintItemType {
|
||||||
LotusTypesGameKubrowPetImprintedTraitPrint = "/Lotus/Types/Game/KubrowPet/ImprintedTraitPrint"
|
LotusTypesGameKubrowPetImprintedTraitPrint = "/Lotus/Types/Game/KubrowPet/ImprintedTraitPrint"
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface IKubrowPet {
|
|
||||||
ItemType: string;
|
|
||||||
Configs: IKubrowPetConfig[];
|
|
||||||
UpgradeVer: number;
|
|
||||||
Details: IDetails;
|
|
||||||
XP?: number;
|
|
||||||
Polarized?: number;
|
|
||||||
Polarity?: IPolarity[];
|
|
||||||
Features?: number;
|
|
||||||
InfestationDate?: IMongoDate;
|
|
||||||
InfestationDays?: number;
|
|
||||||
InfestationType?: string;
|
|
||||||
ItemId: IOid;
|
|
||||||
ModularParts?: string[];
|
|
||||||
}
|
|
||||||
|
|
||||||
export interface IKubrowPetConfig {
|
|
||||||
Skins?: string[];
|
|
||||||
pricol?: IColor;
|
|
||||||
attcol?: IColor;
|
|
||||||
Upgrades?: string[];
|
|
||||||
}
|
|
||||||
|
|
||||||
export interface IDetails {
|
export interface IDetails {
|
||||||
Name: string;
|
Name: string;
|
||||||
IsPuppy: boolean;
|
IsPuppy: boolean;
|
||||||
@ -733,74 +582,32 @@ export interface ILibraryPersonalProgress {
|
|||||||
|
|
||||||
//this needs to be checked against ILoadoutDatabase
|
//this needs to be checked against ILoadoutDatabase
|
||||||
export interface ILoadOutPresets {
|
export interface ILoadOutPresets {
|
||||||
NORMAL: INormal[];
|
NORMAL: ILoadoutConfigClient[];
|
||||||
NORMAL_PVP: IArchwing[];
|
NORMAL_PVP: ILoadoutConfigClient[];
|
||||||
LUNARO: ILunaro[];
|
LUNARO: ILoadoutConfigClient[];
|
||||||
ARCHWING: IArchwing[];
|
ARCHWING: ILoadoutConfigClient[];
|
||||||
SENTINEL: IArchwing[];
|
SENTINEL: ILoadoutConfigClient[];
|
||||||
OPERATOR: IArchwing[];
|
OPERATOR: ILoadoutConfigClient[];
|
||||||
GEAR: IGear[];
|
GEAR: ILoadoutConfigClient[];
|
||||||
KDRIVE: IKdrive[];
|
KDRIVE: ILoadoutConfigClient[];
|
||||||
DATAKNIFE: IArchwing[];
|
DATAKNIFE: ILoadoutConfigClient[];
|
||||||
MECH: IMech[];
|
MECH: ILoadoutConfigClient[];
|
||||||
OPERATOR_ADULT: IArchwing[];
|
OPERATOR_ADULT: ILoadoutConfigClient[];
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface IArchwing {
|
export interface ILoadoutConfigClient {
|
||||||
PresetIcon: string;
|
FocusSchool?: FocusSchool;
|
||||||
Favorite: boolean;
|
PresetIcon?: string;
|
||||||
n?: string;
|
Favorite?: boolean;
|
||||||
s: IL;
|
n?: string; // Loadout name
|
||||||
l?: IL;
|
s?: IEquipmentSelection; // Suit
|
||||||
m?: IL;
|
p?: IEquipmentSelection;
|
||||||
ItemId: IOid;
|
l?: IEquipmentSelection; // Primary weapon
|
||||||
p?: IL;
|
m?: IEquipmentSelection; // Melee weapon
|
||||||
}
|
h?: IEquipmentSelection; // Gravimag weapon
|
||||||
|
a?: IEquipmentSelection;
|
||||||
export interface IGear {
|
|
||||||
n: string;
|
|
||||||
s: IL;
|
|
||||||
p: IL;
|
|
||||||
l: IL;
|
|
||||||
m: IL;
|
|
||||||
ItemId: IOid;
|
|
||||||
}
|
|
||||||
|
|
||||||
export interface IKdrive {
|
|
||||||
PresetIcon: string;
|
|
||||||
Favorite: boolean;
|
|
||||||
s: IL;
|
|
||||||
ItemId: IOid;
|
|
||||||
}
|
|
||||||
|
|
||||||
export interface ILunaro {
|
|
||||||
n: string;
|
|
||||||
s: IL;
|
|
||||||
m: IL;
|
|
||||||
ItemId: IOid;
|
|
||||||
}
|
|
||||||
|
|
||||||
export interface IMech {
|
|
||||||
PresetIcon: string;
|
|
||||||
Favorite: boolean;
|
|
||||||
s: IL;
|
|
||||||
h: IL;
|
|
||||||
a: IL;
|
|
||||||
ItemId: IOid;
|
|
||||||
}
|
|
||||||
|
|
||||||
export interface INormal {
|
|
||||||
FocusSchool: FocusSchool;
|
|
||||||
PresetIcon: string;
|
|
||||||
Favorite: boolean;
|
|
||||||
n: string;
|
|
||||||
s: IL;
|
|
||||||
p: IL;
|
|
||||||
l: IL;
|
|
||||||
m: IL;
|
|
||||||
h: IL;
|
|
||||||
a?: IL;
|
|
||||||
ItemId: IOid;
|
ItemId: IOid;
|
||||||
|
Remove?: boolean; // when client wants to remove a config, it only includes ItemId & Remove.
|
||||||
}
|
}
|
||||||
|
|
||||||
export enum UpgradeType {
|
export enum UpgradeType {
|
||||||
@ -813,16 +620,7 @@ export interface ILoreFragmentScan {
|
|||||||
ItemType: string;
|
ItemType: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface ILotusCustomization {
|
export interface ILotusCustomization extends IItemConfig {
|
||||||
Upgrades: any[];
|
|
||||||
PvpUpgrades: any[];
|
|
||||||
Skins: string[];
|
|
||||||
pricol: IColor;
|
|
||||||
attcol: any[];
|
|
||||||
sigcol: any[];
|
|
||||||
eyecol: any[];
|
|
||||||
facial: any[];
|
|
||||||
Songs: any[];
|
|
||||||
Persona: string;
|
Persona: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -833,18 +631,6 @@ export interface IMission {
|
|||||||
RewardsCooldownTime?: IMongoDate;
|
RewardsCooldownTime?: IMongoDate;
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface IMoaPet {
|
|
||||||
ItemType: string;
|
|
||||||
Configs: IKubrowPetConfig[];
|
|
||||||
UpgradeVer: number;
|
|
||||||
ModularParts: string[];
|
|
||||||
XP?: number;
|
|
||||||
Features?: number;
|
|
||||||
ItemName: string;
|
|
||||||
Polarity?: IPolarity[];
|
|
||||||
ItemId: IOid;
|
|
||||||
}
|
|
||||||
|
|
||||||
export interface INemesisHistory {
|
export interface INemesisHistory {
|
||||||
fp: number;
|
fp: number;
|
||||||
manifest: Manifest;
|
manifest: Manifest;
|
||||||
@ -879,30 +665,6 @@ export enum Manifest {
|
|||||||
LotusTypesGameNemesisKuvaLichKuvaLichManifestVersionTwo = "/Lotus/Types/Game/Nemesis/KuvaLich/KuvaLichManifestVersionTwo"
|
LotusTypesGameNemesisKuvaLichKuvaLichManifestVersionTwo = "/Lotus/Types/Game/Nemesis/KuvaLich/KuvaLichManifestVersionTwo"
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface IOperatorAmp {
|
|
||||||
ItemType: string;
|
|
||||||
Configs: IKubrowPetConfig[];
|
|
||||||
ModularParts?: string[];
|
|
||||||
XP?: number;
|
|
||||||
UpgradeVer?: number;
|
|
||||||
ItemName?: string;
|
|
||||||
Features?: number;
|
|
||||||
ItemId: IOid;
|
|
||||||
}
|
|
||||||
|
|
||||||
export interface IOperatorLoadOut {
|
|
||||||
Skins: string[];
|
|
||||||
pricol?: IColor;
|
|
||||||
attcol?: IColor;
|
|
||||||
eyecol: IColor;
|
|
||||||
facial?: IColor;
|
|
||||||
sigcol?: IOperatorLoadOutSigcol;
|
|
||||||
OperatorAmp?: IOid;
|
|
||||||
Upgrades?: string[];
|
|
||||||
AbilityOverride: IAbilityOverride;
|
|
||||||
ItemId: IOid;
|
|
||||||
}
|
|
||||||
|
|
||||||
export interface IPendingCoupon {
|
export interface IPendingCoupon {
|
||||||
Expiry: IMongoDate;
|
Expiry: IMongoDate;
|
||||||
Discount: number;
|
Discount: number;
|
||||||
@ -1031,12 +793,7 @@ export interface IRawUpgrade {
|
|||||||
LastAdded?: IOid;
|
LastAdded?: IOid;
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface ISeasonChallengeHistory {
|
export interface ISeasonChallenge {
|
||||||
challenge: string;
|
|
||||||
id: string;
|
|
||||||
}
|
|
||||||
|
|
||||||
export interface ISeasonChallengeCompletions {
|
|
||||||
challenge: string;
|
challenge: string;
|
||||||
id: string;
|
id: string;
|
||||||
}
|
}
|
||||||
@ -1060,30 +817,6 @@ export interface IShipInventory {
|
|||||||
ItemId: IOid;
|
ItemId: IOid;
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface ISpaceGun {
|
|
||||||
ItemType: string;
|
|
||||||
Configs: ISpaceGunConfig[];
|
|
||||||
XP?: number;
|
|
||||||
UpgradeVer?: number;
|
|
||||||
ItemId: IOid;
|
|
||||||
Features?: number;
|
|
||||||
Polarized?: number;
|
|
||||||
Polarity?: IPolarity[];
|
|
||||||
UpgradeType?: UpgradeType;
|
|
||||||
UpgradeFingerprint?: string;
|
|
||||||
ItemName?: string;
|
|
||||||
}
|
|
||||||
|
|
||||||
export interface ISpaceGunConfig {
|
|
||||||
Skins?: string[];
|
|
||||||
pricol?: IColor;
|
|
||||||
Upgrades?: string[];
|
|
||||||
}
|
|
||||||
|
|
||||||
export interface IPurpleCol {
|
|
||||||
en: number;
|
|
||||||
}
|
|
||||||
|
|
||||||
export interface ISpectreLoadout {
|
export interface ISpectreLoadout {
|
||||||
LongGuns: string;
|
LongGuns: string;
|
||||||
Melee: string;
|
Melee: string;
|
||||||
|
@ -1,33 +0,0 @@
|
|||||||
import { IOid } from "@/src/types/commonTypes";
|
|
||||||
import { IItemConfig } from "./commonInventoryTypes";
|
|
||||||
import { IPolarity } from "@/src/types/inventoryTypes/commonInventoryTypes";
|
|
||||||
import { Types } from "mongoose";
|
|
||||||
|
|
||||||
export interface IWeaponClient extends Omit<IWeaponDatabase, "_id"> {
|
|
||||||
ItemId: IOid;
|
|
||||||
}
|
|
||||||
|
|
||||||
export interface IWeaponDatabase {
|
|
||||||
ItemType: string;
|
|
||||||
Configs: IItemConfig[];
|
|
||||||
UpgradeVer?: number;
|
|
||||||
XP?: number;
|
|
||||||
Features?: number;
|
|
||||||
Polarized?: number;
|
|
||||||
Polarity?: IPolarity[];
|
|
||||||
FocusLens?: string;
|
|
||||||
ModSlotPurchases?: number;
|
|
||||||
CustomizationSlotPurchases?: number;
|
|
||||||
UpgradeType?: string;
|
|
||||||
UpgradeFingerprint?: string;
|
|
||||||
ItemName?: string;
|
|
||||||
ModularParts?: string[];
|
|
||||||
UnlockLevel?: number;
|
|
||||||
_id: Types.ObjectId;
|
|
||||||
}
|
|
||||||
|
|
||||||
export interface IOperatorLoadOutSigcol {
|
|
||||||
t0?: number;
|
|
||||||
t1?: number;
|
|
||||||
en?: number;
|
|
||||||
}
|
|
@ -1,6 +1,5 @@
|
|||||||
import { ISuitClient } from "@/src/types/inventoryTypes/SuitTypes";
|
|
||||||
import { IFlavourItem } from "@/src/types/inventoryTypes/inventoryTypes";
|
import { IFlavourItem } from "@/src/types/inventoryTypes/inventoryTypes";
|
||||||
import { IWeaponClient } from "@/src/types/inventoryTypes/weaponTypes";
|
import { IEquipmentClient } from "./inventoryTypes/commonInventoryTypes";
|
||||||
|
|
||||||
export interface IPurchaseRequest {
|
export interface IPurchaseRequest {
|
||||||
PurchaseParams: IPurchaseParams;
|
PurchaseParams: IPurchaseParams;
|
||||||
@ -23,11 +22,11 @@ export interface IPurchaseResponse {
|
|||||||
SuitBin?: IBinChanges;
|
SuitBin?: IBinChanges;
|
||||||
WeaponBin?: IBinChanges;
|
WeaponBin?: IBinChanges;
|
||||||
MechBin?: IBinChanges;
|
MechBin?: IBinChanges;
|
||||||
MechSuits?: ISuitClient[];
|
MechSuits?: IEquipmentClient[];
|
||||||
Suits?: ISuitClient[];
|
Suits?: IEquipmentClient[];
|
||||||
LongGuns?: IWeaponClient[];
|
LongGuns?: IEquipmentClient[];
|
||||||
Pistols?: IWeaponClient[];
|
Pistols?: IEquipmentClient[];
|
||||||
Melee?: IWeaponClient[];
|
Melee?: IEquipmentClient[];
|
||||||
PremiumCredits?: number;
|
PremiumCredits?: number;
|
||||||
PremiumCreditsFree?: number;
|
PremiumCreditsFree?: number;
|
||||||
RegularCredits?: number;
|
RegularCredits?: number;
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
import { IOid } from "./commonTypes";
|
import { IOid } from "./commonTypes";
|
||||||
import { IPolarity, FocusSchool } from "@/src/types/inventoryTypes/commonInventoryTypes";
|
import { IPolarity, FocusSchool, IEquipmentClient } from "@/src/types/inventoryTypes/commonInventoryTypes";
|
||||||
import {
|
import {
|
||||||
IBooster,
|
IBooster,
|
||||||
IChallengeProgress,
|
IChallengeProgress,
|
||||||
@ -8,11 +8,8 @@ import {
|
|||||||
IMiscItem,
|
IMiscItem,
|
||||||
IMission,
|
IMission,
|
||||||
IRawUpgrade,
|
IRawUpgrade,
|
||||||
ISeasonChallengeCompletions,
|
ISeasonChallenge
|
||||||
ISeasonChallengeHistory
|
|
||||||
} from "./inventoryTypes/inventoryTypes";
|
} from "./inventoryTypes/inventoryTypes";
|
||||||
import { IWeaponClient } from "./inventoryTypes/weaponTypes";
|
|
||||||
import { ISuitClient } from "./inventoryTypes/SuitTypes";
|
|
||||||
|
|
||||||
export interface IArtifactsRequest {
|
export interface IArtifactsRequest {
|
||||||
Upgrade: ICrewShipSalvagedWeaponSkin;
|
Upgrade: ICrewShipSalvagedWeaponSkin;
|
||||||
@ -35,18 +32,18 @@ export interface IAffiliationChange {
|
|||||||
|
|
||||||
export interface IUpdateChallengeProgressRequest {
|
export interface IUpdateChallengeProgressRequest {
|
||||||
ChallengeProgress: IChallengeProgress[];
|
ChallengeProgress: IChallengeProgress[];
|
||||||
SeasonChallengeHistory: ISeasonChallengeHistory[];
|
SeasonChallengeHistory: ISeasonChallenge[];
|
||||||
SeasonChallengeCompletions: ISeasonChallengeCompletions[];
|
SeasonChallengeCompletions: ISeasonChallenge[];
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface IMissionInventoryUpdateRequest {
|
export interface IMissionInventoryUpdateRequest {
|
||||||
rewardsMultiplier?: number;
|
rewardsMultiplier?: number;
|
||||||
ActiveBoosters?: IBooster[];
|
ActiveBoosters?: IBooster[];
|
||||||
AffiliationChanges?: IAffiliationChange[];
|
AffiliationChanges?: IAffiliationChange[];
|
||||||
LongGuns?: IWeaponClient[];
|
LongGuns?: IEquipmentClient[];
|
||||||
Pistols?: IWeaponClient[];
|
Pistols?: IEquipmentClient[];
|
||||||
Suits?: ISuitClient[];
|
Suits?: IEquipmentClient[];
|
||||||
Melee?: IWeaponClient[];
|
Melee?: IEquipmentClient[];
|
||||||
RawUpgrades?: IRawUpgrade[];
|
RawUpgrades?: IRawUpgrade[];
|
||||||
MiscItems?: IMiscItem[];
|
MiscItems?: IMiscItem[];
|
||||||
Consumables?: IConsumable[];
|
Consumables?: IConsumable[];
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
import { IOid } from "@/src/types/commonTypes";
|
import { IOid } from "@/src/types/commonTypes";
|
||||||
import { IItemConfig, IOperatorConfigClient } from "@/src/types/inventoryTypes/commonInventoryTypes";
|
import { IItemConfig, IOperatorConfigClient } from "@/src/types/inventoryTypes/commonInventoryTypes";
|
||||||
import { Types } from "mongoose";
|
import { Types } from "mongoose";
|
||||||
|
import { ILoadoutConfigClient } from "./inventoryTypes/inventoryTypes";
|
||||||
|
|
||||||
export interface ISaveLoadoutRequest {
|
export interface ISaveLoadoutRequest {
|
||||||
LoadOuts: ILoadoutClient;
|
LoadOuts: ILoadoutClient;
|
||||||
@ -72,23 +73,3 @@ export interface ILoadoutEntry {
|
|||||||
export interface ILoadoutConfigDatabase extends Omit<ILoadoutConfigClient, "ItemId"> {
|
export interface ILoadoutConfigDatabase extends Omit<ILoadoutConfigClient, "ItemId"> {
|
||||||
_id: Types.ObjectId;
|
_id: Types.ObjectId;
|
||||||
}
|
}
|
||||||
|
|
||||||
// for request and response from and to client
|
|
||||||
export interface ILoadoutConfigClient {
|
|
||||||
ItemId: IOid;
|
|
||||||
Remove?: boolean; // when client wants to remove a config, it only includes ItemId & Remove.
|
|
||||||
n?: string;
|
|
||||||
PresetIcon?: string;
|
|
||||||
Favorite?: boolean;
|
|
||||||
s?: IEquipmentSelection;
|
|
||||||
p?: IEquipmentSelection;
|
|
||||||
l?: IEquipmentSelection;
|
|
||||||
m?: IEquipmentSelection;
|
|
||||||
}
|
|
||||||
|
|
||||||
export interface IEquipmentSelection {
|
|
||||||
ItemId?: IOid;
|
|
||||||
mod?: number;
|
|
||||||
cus?: number;
|
|
||||||
hide?: boolean;
|
|
||||||
}
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user