feat: more supported equipment types
This commit is contained in:
parent
b72a0d12ef
commit
ac41c6321c
@ -51,9 +51,13 @@ import {
|
|||||||
ICompletedDialogue,
|
ICompletedDialogue,
|
||||||
IDialogueClient,
|
IDialogueClient,
|
||||||
IUpgradeDatabase,
|
IUpgradeDatabase,
|
||||||
ICrewShipDatabase,
|
|
||||||
ICrewShipMemberDatabase,
|
ICrewShipMemberDatabase,
|
||||||
ICrewShipMemberClient
|
ICrewShipMemberClient,
|
||||||
|
TEquipmentKey,
|
||||||
|
equipmentKeys,
|
||||||
|
IKubrowPetDetailsDatabase,
|
||||||
|
ITraits,
|
||||||
|
IKubrowPetDetailsClient
|
||||||
} from "../../types/inventoryTypes/inventoryTypes";
|
} from "../../types/inventoryTypes/inventoryTypes";
|
||||||
import { IOid } from "../../types/commonTypes";
|
import { IOid } from "../../types/commonTypes";
|
||||||
import {
|
import {
|
||||||
@ -223,55 +227,6 @@ ArchonCrystalUpgradeSchema.set("toJSON", {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
const EquipmentSchema = new Schema<IEquipmentDatabase>(
|
|
||||||
{
|
|
||||||
ItemType: String,
|
|
||||||
Configs: [ItemConfigSchema],
|
|
||||||
UpgradeVer: Number,
|
|
||||||
XP: Number,
|
|
||||||
Features: Number,
|
|
||||||
Polarized: Number,
|
|
||||||
Polarity: [polaritySchema],
|
|
||||||
FocusLens: String,
|
|
||||||
ModSlotPurchases: Number,
|
|
||||||
CustomizationSlotPurchases: Number,
|
|
||||||
UpgradeType: String,
|
|
||||||
UpgradeFingerprint: String,
|
|
||||||
ItemName: String,
|
|
||||||
InfestationDate: Date,
|
|
||||||
InfestationDays: Number,
|
|
||||||
InfestationType: String,
|
|
||||||
ModularParts: { type: [String], default: undefined },
|
|
||||||
UnlockLevel: Number,
|
|
||||||
Expiry: Date,
|
|
||||||
SkillTree: String,
|
|
||||||
OffensiveUpgrade: String,
|
|
||||||
DefensiveUpgrade: String,
|
|
||||||
UpgradesExpiry: Date,
|
|
||||||
ArchonCrystalUpgrades: { type: [ArchonCrystalUpgradeSchema], default: undefined }
|
|
||||||
},
|
|
||||||
{ id: false }
|
|
||||||
);
|
|
||||||
|
|
||||||
EquipmentSchema.virtual("ItemId").get(function () {
|
|
||||||
return { $oid: this._id.toString() } satisfies IOid;
|
|
||||||
});
|
|
||||||
|
|
||||||
EquipmentSchema.set("toJSON", {
|
|
||||||
virtuals: true,
|
|
||||||
transform(_document, returnedObject) {
|
|
||||||
delete returnedObject._id;
|
|
||||||
delete returnedObject.__v;
|
|
||||||
|
|
||||||
const db = returnedObject as IEquipmentDatabase;
|
|
||||||
const client = returnedObject as IEquipmentClient;
|
|
||||||
|
|
||||||
if (db.InfestationDate) {
|
|
||||||
client.InfestationDate = toMongoDate(db.InfestationDate);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
const boosterSchema = new Schema<IBooster>(
|
const boosterSchema = new Schema<IBooster>(
|
||||||
{
|
{
|
||||||
ExpiryDate: Number,
|
ExpiryDate: Number,
|
||||||
@ -505,31 +460,6 @@ const helminthResourceSchema = new Schema<IHelminthResource>(
|
|||||||
{ _id: false }
|
{ _id: false }
|
||||||
);
|
);
|
||||||
|
|
||||||
const infestedFoundrySchema = new Schema<IInfestedFoundryDatabase>(
|
|
||||||
{
|
|
||||||
Name: String,
|
|
||||||
Resources: { type: [helminthResourceSchema], default: undefined },
|
|
||||||
Slots: Number,
|
|
||||||
XP: Number,
|
|
||||||
ConsumedSuits: { type: [consumedSchuitsSchema], default: undefined },
|
|
||||||
InvigorationIndex: Number,
|
|
||||||
InvigorationSuitOfferings: { type: [String], default: undefined },
|
|
||||||
InvigorationsApplied: Number,
|
|
||||||
LastConsumedSuit: { type: EquipmentSchema, default: undefined },
|
|
||||||
AbilityOverrideUnlockCooldown: Date
|
|
||||||
},
|
|
||||||
{ _id: false }
|
|
||||||
);
|
|
||||||
|
|
||||||
infestedFoundrySchema.set("toJSON", {
|
|
||||||
transform(_doc, ret, _options) {
|
|
||||||
if (ret.AbilityOverrideUnlockCooldown) {
|
|
||||||
// eslint-disable-next-line @typescript-eslint/no-unsafe-argument
|
|
||||||
ret.AbilityOverrideUnlockCooldown = toMongoDate(ret.AbilityOverrideUnlockCooldown);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
const questProgressSchema = new Schema<IQuestStage>({
|
const questProgressSchema = new Schema<IQuestStage>({
|
||||||
c: Number,
|
c: Number,
|
||||||
i: Boolean,
|
i: Boolean,
|
||||||
@ -715,26 +645,6 @@ const crewShipMembersSchema = new Schema<ICrewShipMembersDatabase>(
|
|||||||
{ _id: false }
|
{ _id: false }
|
||||||
);
|
);
|
||||||
|
|
||||||
const crewShipSchema = new Schema<ICrewShipDatabase>({
|
|
||||||
ItemType: { type: String, required: true },
|
|
||||||
Configs: { type: [ItemConfigSchema], default: [] },
|
|
||||||
Weapon: { type: crewShipWeaponSchema, default: undefined },
|
|
||||||
Customization: { type: crewShipCustomizationSchema, default: undefined },
|
|
||||||
ItemName: { type: String, default: "" },
|
|
||||||
RailjackImage: { type: FlavourItemSchema, default: undefined },
|
|
||||||
CrewMembers: { type: crewShipMembersSchema, default: undefined }
|
|
||||||
});
|
|
||||||
crewShipSchema.virtual("ItemId").get(function () {
|
|
||||||
return { $oid: this._id.toString() };
|
|
||||||
});
|
|
||||||
crewShipSchema.set("toJSON", {
|
|
||||||
virtuals: true,
|
|
||||||
transform(_doc, ret, _options) {
|
|
||||||
delete ret._id;
|
|
||||||
delete ret.__v;
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
const dialogueGiftSchema = new Schema<IDialogueGift>(
|
const dialogueGiftSchema = new Schema<IDialogueGift>(
|
||||||
{
|
{
|
||||||
Item: String,
|
Item: String,
|
||||||
@ -789,6 +699,134 @@ const dialogueHistorySchema = new Schema<IDialogueHistoryDatabase>(
|
|||||||
{ _id: false }
|
{ _id: false }
|
||||||
);
|
);
|
||||||
|
|
||||||
|
const traitsSchema = new Schema<ITraits>(
|
||||||
|
{
|
||||||
|
BaseColor: String,
|
||||||
|
SecondaryColor: String,
|
||||||
|
TertiaryColor: String,
|
||||||
|
AccentColor: String,
|
||||||
|
EyeColor: String,
|
||||||
|
FurPattern: String,
|
||||||
|
Personality: String,
|
||||||
|
BodyType: String,
|
||||||
|
Head: { type: String, required: false },
|
||||||
|
Tail: { type: String, required: false }
|
||||||
|
},
|
||||||
|
{ _id: false }
|
||||||
|
);
|
||||||
|
|
||||||
|
const detalisSchema = new Schema<IKubrowPetDetailsDatabase>(
|
||||||
|
{
|
||||||
|
Name: String,
|
||||||
|
IsPuppy: Boolean,
|
||||||
|
HasCollar: Boolean,
|
||||||
|
PrintsRemaining: Number,
|
||||||
|
Status: String,
|
||||||
|
HatchDate: Date,
|
||||||
|
DominantTraits: traitsSchema,
|
||||||
|
RecessiveTraits: traitsSchema,
|
||||||
|
IsMale: Boolean,
|
||||||
|
Size: Number
|
||||||
|
},
|
||||||
|
{ _id: false }
|
||||||
|
);
|
||||||
|
|
||||||
|
detalisSchema.set("toJSON", {
|
||||||
|
transform(_doc, returnedObject) {
|
||||||
|
delete returnedObject.__v;
|
||||||
|
|
||||||
|
const db = returnedObject as IKubrowPetDetailsDatabase;
|
||||||
|
const client = returnedObject as IKubrowPetDetailsClient;
|
||||||
|
|
||||||
|
client.HatchDate = toMongoDate(db.HatchDate);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
const EquipmentSchema = new Schema<IEquipmentDatabase>(
|
||||||
|
{
|
||||||
|
ItemType: String,
|
||||||
|
Configs: [ItemConfigSchema],
|
||||||
|
UpgradeVer: { type: Number, default: 101 },
|
||||||
|
XP: { type: Number, default: 0 },
|
||||||
|
Features: Number,
|
||||||
|
Polarized: Number,
|
||||||
|
Polarity: [polaritySchema],
|
||||||
|
FocusLens: String,
|
||||||
|
ModSlotPurchases: Number,
|
||||||
|
CustomizationSlotPurchases: Number,
|
||||||
|
UpgradeType: String,
|
||||||
|
UpgradeFingerprint: String,
|
||||||
|
ItemName: String,
|
||||||
|
InfestationDate: Date,
|
||||||
|
InfestationDays: Number,
|
||||||
|
InfestationType: String,
|
||||||
|
ModularParts: { type: [String], default: undefined },
|
||||||
|
UnlockLevel: Number,
|
||||||
|
Expiry: Date,
|
||||||
|
SkillTree: String,
|
||||||
|
OffensiveUpgrade: String,
|
||||||
|
DefensiveUpgrade: String,
|
||||||
|
UpgradesExpiry: Date,
|
||||||
|
ArchonCrystalUpgrades: { type: [ArchonCrystalUpgradeSchema], default: undefined },
|
||||||
|
Weapon: crewShipWeaponSchema,
|
||||||
|
Customization: crewShipCustomizationSchema,
|
||||||
|
RailjackImage: FlavourItemSchema,
|
||||||
|
CrewMembers: crewShipMembersSchema,
|
||||||
|
Details: detalisSchema
|
||||||
|
},
|
||||||
|
{ id: false }
|
||||||
|
);
|
||||||
|
|
||||||
|
EquipmentSchema.virtual("ItemId").get(function () {
|
||||||
|
return { $oid: this._id.toString() } satisfies IOid;
|
||||||
|
});
|
||||||
|
|
||||||
|
EquipmentSchema.set("toJSON", {
|
||||||
|
virtuals: true,
|
||||||
|
transform(_document, returnedObject) {
|
||||||
|
delete returnedObject._id;
|
||||||
|
delete returnedObject.__v;
|
||||||
|
|
||||||
|
const db = returnedObject as IEquipmentDatabase;
|
||||||
|
const client = returnedObject as IEquipmentClient;
|
||||||
|
|
||||||
|
if (db.InfestationDate) {
|
||||||
|
client.InfestationDate = toMongoDate(db.InfestationDate);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
const equipmentFields: Record<string, any> = {};
|
||||||
|
|
||||||
|
equipmentKeys.forEach(key => {
|
||||||
|
equipmentFields[key] = { type: [EquipmentSchema] };
|
||||||
|
});
|
||||||
|
|
||||||
|
const infestedFoundrySchema = new Schema<IInfestedFoundryDatabase>(
|
||||||
|
{
|
||||||
|
Name: String,
|
||||||
|
Resources: { type: [helminthResourceSchema], default: undefined },
|
||||||
|
Slots: Number,
|
||||||
|
XP: Number,
|
||||||
|
ConsumedSuits: { type: [consumedSchuitsSchema], default: undefined },
|
||||||
|
InvigorationIndex: Number,
|
||||||
|
InvigorationSuitOfferings: { type: [String], default: undefined },
|
||||||
|
InvigorationsApplied: Number,
|
||||||
|
LastConsumedSuit: { type: EquipmentSchema, default: undefined },
|
||||||
|
AbilityOverrideUnlockCooldown: Date
|
||||||
|
},
|
||||||
|
{ _id: false }
|
||||||
|
);
|
||||||
|
|
||||||
|
infestedFoundrySchema.set("toJSON", {
|
||||||
|
transform(_doc, ret, _options) {
|
||||||
|
if (ret.AbilityOverrideUnlockCooldown) {
|
||||||
|
// eslint-disable-next-line @typescript-eslint/no-unsafe-argument
|
||||||
|
ret.AbilityOverrideUnlockCooldown = toMongoDate(ret.AbilityOverrideUnlockCooldown);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
const inventorySchema = new Schema<IInventoryDatabase, InventoryDocumentProps>(
|
const inventorySchema = new Schema<IInventoryDatabase, InventoryDocumentProps>(
|
||||||
{
|
{
|
||||||
accountOwnerId: Schema.Types.ObjectId,
|
accountOwnerId: Schema.Types.ObjectId,
|
||||||
@ -821,6 +859,8 @@ const inventorySchema = new Schema<IInventoryDatabase, InventoryDocumentProps>(
|
|||||||
MechBin: { type: slotsBinSchema, default: { Slots: 4 } },
|
MechBin: { type: slotsBinSchema, default: { Slots: 4 } },
|
||||||
CrewMemberBin: { type: slotsBinSchema, default: { Slots: 3 } },
|
CrewMemberBin: { type: slotsBinSchema, default: { Slots: 3 } },
|
||||||
|
|
||||||
|
...equipmentFields,
|
||||||
|
|
||||||
//How many trades do you have left
|
//How many trades do you have left
|
||||||
TradesRemaining: { type: Number, default: 0 },
|
TradesRemaining: { type: Number, default: 0 },
|
||||||
//How many Gift do you have left*(gift spends the trade)
|
//How many Gift do you have left*(gift spends the trade)
|
||||||
@ -870,29 +910,10 @@ const inventorySchema = new Schema<IInventoryDatabase, InventoryDocumentProps>(
|
|||||||
//Upgrade Mods\Riven\Arcane Example:"UpgradeFingerprint"+"ItemType"+""
|
//Upgrade Mods\Riven\Arcane Example:"UpgradeFingerprint"+"ItemType"+""
|
||||||
Upgrades: [upgradeSchema],
|
Upgrades: [upgradeSchema],
|
||||||
|
|
||||||
//Warframe
|
|
||||||
Suits: [EquipmentSchema],
|
|
||||||
//Primary Weapon
|
|
||||||
LongGuns: [EquipmentSchema],
|
|
||||||
//Secondary Weapon
|
|
||||||
Pistols: [EquipmentSchema],
|
|
||||||
//Melee Weapon
|
|
||||||
Melee: [EquipmentSchema],
|
|
||||||
//Ability Weapon like Ultimate Mech\Excalibur\Ivara etc
|
|
||||||
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)
|
|
||||||
Sentinels: [EquipmentSchema],
|
|
||||||
//Any /Sentinels/SentinelWeapons/ (like warframe weapon)
|
|
||||||
SentinelWeapons: [EquipmentSchema],
|
|
||||||
//Modular Pets
|
|
||||||
MoaPets: [EquipmentSchema],
|
|
||||||
|
|
||||||
KubrowPetEggs: [Schema.Types.Mixed],
|
KubrowPetEggs: [Schema.Types.Mixed],
|
||||||
//Like PowerSuit Cat\Kubrow or etc Pets
|
|
||||||
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],
|
||||||
|
|
||||||
@ -905,42 +926,24 @@ const inventorySchema = new Schema<IInventoryDatabase, InventoryDocumentProps>(
|
|||||||
EquippedInstrument: String,
|
EquippedInstrument: String,
|
||||||
ReceivedStartingGear: Boolean,
|
ReceivedStartingGear: Boolean,
|
||||||
|
|
||||||
//to use add SummonItem to Consumables+EquippedGear
|
|
||||||
//Archwing need Suits+Melee+Guns
|
|
||||||
SpaceSuits: [EquipmentSchema],
|
|
||||||
SpaceMelee: [EquipmentSchema],
|
|
||||||
SpaceGuns: [EquipmentSchema],
|
|
||||||
ArchwingEnabled: Boolean,
|
ArchwingEnabled: Boolean,
|
||||||
//Mech need Suits+SpaceGuns+SpecialItem
|
|
||||||
MechSuits: [EquipmentSchema],
|
|
||||||
///Restoratives/HoverboardSummon (like Suit)
|
|
||||||
Hoverboards: [EquipmentSchema],
|
|
||||||
|
|
||||||
//Use Operator\Drifter
|
//Use Operator\Drifter
|
||||||
UseAdultOperatorLoadout: Boolean,
|
UseAdultOperatorLoadout: Boolean,
|
||||||
//Operator\Drifter Weapon
|
|
||||||
OperatorAmps: [EquipmentSchema],
|
|
||||||
//Operator
|
//Operator
|
||||||
OperatorLoadOuts: [operatorConfigSchema],
|
OperatorLoadOuts: [operatorConfigSchema],
|
||||||
//Drifter
|
//Drifter
|
||||||
AdultOperatorLoadOuts: [operatorConfigSchema],
|
AdultOperatorLoadOuts: [operatorConfigSchema],
|
||||||
DrifterMelee: [EquipmentSchema],
|
|
||||||
DrifterGuns: [EquipmentSchema],
|
|
||||||
//ErsatzHorsePowerSuit
|
|
||||||
Horses: [EquipmentSchema],
|
|
||||||
|
|
||||||
//LandingCraft like Liset
|
//LandingCraft like Liset
|
||||||
Ships: { type: [Schema.Types.ObjectId], ref: "Ships" },
|
Ships: { type: [Schema.Types.ObjectId], ref: "Ships" },
|
||||||
// /Lotus/Types/Items/ShipDecos/
|
// /Lotus/Types/Items/ShipDecos/
|
||||||
ShipDecorations: [typeCountSchema],
|
ShipDecorations: [typeCountSchema],
|
||||||
|
|
||||||
//RailJack Setting(Mods,Skin,Weapon,etc)
|
|
||||||
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],
|
||||||
|
|
||||||
//Default RailJack
|
//Default RailJack
|
||||||
CrewShips: [crewShipSchema],
|
|
||||||
CrewShipAmmo: [typeCountSchema],
|
CrewShipAmmo: [typeCountSchema],
|
||||||
CrewShipWeapons: [Schema.Types.Mixed],
|
CrewShipWeapons: [Schema.Types.Mixed],
|
||||||
CrewShipWeaponSkins: [Schema.Types.Mixed],
|
CrewShipWeaponSkins: [Schema.Types.Mixed],
|
||||||
@ -962,9 +965,6 @@ const inventorySchema = new Schema<IInventoryDatabase, InventoryDocumentProps>(
|
|||||||
//Cosmetics like profile glyphs\Kavasa Prime Kubrow Collar\Game Theme etc
|
//Cosmetics like profile glyphs\Kavasa Prime Kubrow Collar\Game Theme etc
|
||||||
FlavourItems: [FlavourItemSchema],
|
FlavourItems: [FlavourItemSchema],
|
||||||
|
|
||||||
//Lunaro Weapon
|
|
||||||
Scoops: [EquipmentSchema],
|
|
||||||
|
|
||||||
//Mastery Rank*(Need item XPInfo to rank up)
|
//Mastery Rank*(Need item XPInfo to rank up)
|
||||||
PlayerLevel: { type: Number, default: 0 },
|
PlayerLevel: { type: Number, default: 0 },
|
||||||
//Item Mastery Rank exp
|
//Item Mastery Rank exp
|
||||||
@ -1075,11 +1075,6 @@ const inventorySchema = new Schema<IInventoryDatabase, InventoryDocumentProps>(
|
|||||||
//https://warframe.fandom.com/wiki/Invasion
|
//https://warframe.fandom.com/wiki/Invasion
|
||||||
InvasionChainProgress: [Schema.Types.Mixed],
|
InvasionChainProgress: [Schema.Types.Mixed],
|
||||||
|
|
||||||
//https://warframe.fandom.com/wiki/Parazon
|
|
||||||
DataKnives: [EquipmentSchema],
|
|
||||||
|
|
||||||
Motorcycles: [EquipmentSchema],
|
|
||||||
|
|
||||||
//CorpusLich or GrineerLich
|
//CorpusLich or GrineerLich
|
||||||
NemesisAbandonedRewards: [String],
|
NemesisAbandonedRewards: [String],
|
||||||
//CorpusLich\KuvaLich
|
//CorpusLich\KuvaLich
|
||||||
@ -1116,7 +1111,6 @@ const inventorySchema = new Schema<IInventoryDatabase, InventoryDocumentProps>(
|
|||||||
//Unknown and system
|
//Unknown and system
|
||||||
DuviriInfo: DuviriInfoSchema,
|
DuviriInfo: DuviriInfoSchema,
|
||||||
Mailbox: MailboxSchema,
|
Mailbox: MailboxSchema,
|
||||||
KahlLoadOuts: [Schema.Types.Mixed],
|
|
||||||
HandlerPoints: Number,
|
HandlerPoints: Number,
|
||||||
ChallengesFixVersion: Number,
|
ChallengesFixVersion: Number,
|
||||||
PlayedParkourTutorial: Boolean,
|
PlayedParkourTutorial: Boolean,
|
||||||
@ -1175,37 +1169,16 @@ inventorySchema.set("toJSON", {
|
|||||||
|
|
||||||
// type overwrites for subdocuments/subdocument arrays
|
// type overwrites for subdocuments/subdocument arrays
|
||||||
export type InventoryDocumentProps = {
|
export type InventoryDocumentProps = {
|
||||||
Suits: Types.DocumentArray<IEquipmentDatabase>;
|
|
||||||
LongGuns: Types.DocumentArray<IEquipmentDatabase>;
|
|
||||||
Pistols: Types.DocumentArray<IEquipmentDatabase>;
|
|
||||||
Melee: Types.DocumentArray<IEquipmentDatabase>;
|
|
||||||
OperatorAmps: Types.DocumentArray<IEquipmentDatabase>;
|
|
||||||
FlavourItems: Types.DocumentArray<IFlavourItem>;
|
FlavourItems: Types.DocumentArray<IFlavourItem>;
|
||||||
RawUpgrades: Types.DocumentArray<IRawUpgrade>;
|
RawUpgrades: Types.DocumentArray<IRawUpgrade>;
|
||||||
Upgrades: Types.DocumentArray<IUpgradeDatabase>;
|
Upgrades: Types.DocumentArray<IUpgradeDatabase>;
|
||||||
MiscItems: Types.DocumentArray<IMiscItem>;
|
MiscItems: Types.DocumentArray<IMiscItem>;
|
||||||
Boosters: Types.DocumentArray<IBooster>;
|
Boosters: Types.DocumentArray<IBooster>;
|
||||||
OperatorLoadOuts: Types.DocumentArray<IOperatorConfigDatabase>;
|
OperatorLoadOuts: Types.DocumentArray<IOperatorConfigDatabase>;
|
||||||
SpecialItems: Types.DocumentArray<IEquipmentDatabase>;
|
|
||||||
AdultOperatorLoadOuts: Types.DocumentArray<IOperatorConfigDatabase>;
|
AdultOperatorLoadOuts: Types.DocumentArray<IOperatorConfigDatabase>;
|
||||||
MechSuits: Types.DocumentArray<IEquipmentDatabase>;
|
|
||||||
Scoops: Types.DocumentArray<IEquipmentDatabase>;
|
|
||||||
DataKnives: Types.DocumentArray<IEquipmentDatabase>;
|
|
||||||
Motorcycles: Types.DocumentArray<IEquipmentDatabase>;
|
|
||||||
DrifterMelee: Types.DocumentArray<IEquipmentDatabase>;
|
|
||||||
Sentinels: Types.DocumentArray<IEquipmentDatabase>;
|
|
||||||
Horses: Types.DocumentArray<IEquipmentDatabase>;
|
|
||||||
PendingRecipes: Types.DocumentArray<IPendingRecipeDatabase>;
|
PendingRecipes: Types.DocumentArray<IPendingRecipeDatabase>;
|
||||||
SpaceSuits: Types.DocumentArray<IEquipmentDatabase>;
|
|
||||||
SpaceGuns: Types.DocumentArray<IEquipmentDatabase>;
|
|
||||||
SpaceMelee: Types.DocumentArray<IEquipmentDatabase>;
|
|
||||||
SentinelWeapons: Types.DocumentArray<IEquipmentDatabase>;
|
|
||||||
Hoverboards: Types.DocumentArray<IEquipmentDatabase>;
|
|
||||||
MoaPets: Types.DocumentArray<IEquipmentDatabase>;
|
|
||||||
WeaponSkins: Types.DocumentArray<IWeaponSkinDatabase>;
|
WeaponSkins: Types.DocumentArray<IWeaponSkinDatabase>;
|
||||||
CrewShips: Types.DocumentArray<ICrewShipDatabase>;
|
} & { [K in TEquipmentKey]: Types.DocumentArray<IEquipmentDatabase> };
|
||||||
CrewShipHarnesses: Types.DocumentArray<IEquipmentDatabase>;
|
|
||||||
};
|
|
||||||
|
|
||||||
// eslint-disable-next-line @typescript-eslint/ban-types
|
// eslint-disable-next-line @typescript-eslint/ban-types
|
||||||
type InventoryModelType = Model<IInventoryDatabase, {}, InventoryDocumentProps>;
|
type InventoryModelType = Model<IInventoryDatabase, {}, InventoryDocumentProps>;
|
||||||
|
@ -8,8 +8,6 @@ import {
|
|||||||
import { IMongoDate } from "../types/commonTypes";
|
import { IMongoDate } from "../types/commonTypes";
|
||||||
import {
|
import {
|
||||||
equipmentKeys,
|
equipmentKeys,
|
||||||
ICrewShipClient,
|
|
||||||
ICrewShipDatabase,
|
|
||||||
ICrewShipMemberClient,
|
ICrewShipMemberClient,
|
||||||
ICrewShipMemberDatabase,
|
ICrewShipMemberDatabase,
|
||||||
ICrewShipMembersClient,
|
ICrewShipMembersClient,
|
||||||
@ -21,6 +19,8 @@ import {
|
|||||||
IInfestedFoundryClient,
|
IInfestedFoundryClient,
|
||||||
IInfestedFoundryDatabase,
|
IInfestedFoundryDatabase,
|
||||||
IInventoryClient,
|
IInventoryClient,
|
||||||
|
IKubrowPetDetailsClient,
|
||||||
|
IKubrowPetDetailsDatabase,
|
||||||
ILoadoutConfigClient,
|
ILoadoutConfigClient,
|
||||||
ILoadOutPresets,
|
ILoadOutPresets,
|
||||||
ISlots,
|
ISlots,
|
||||||
@ -47,7 +47,22 @@ const convertEquipment = (client: IEquipmentClient): IEquipmentDatabase => {
|
|||||||
_id: new Types.ObjectId(ItemId.$oid),
|
_id: new Types.ObjectId(ItemId.$oid),
|
||||||
InfestationDate: convertOptionalDate(client.InfestationDate),
|
InfestationDate: convertOptionalDate(client.InfestationDate),
|
||||||
Expiry: convertOptionalDate(client.Expiry),
|
Expiry: convertOptionalDate(client.Expiry),
|
||||||
UpgradesExpiry: convertOptionalDate(client.UpgradesExpiry)
|
UpgradesExpiry: convertOptionalDate(client.UpgradesExpiry),
|
||||||
|
CrewMembers: client.CrewMembers ? convertCrewShipMembers(client.CrewMembers) : undefined,
|
||||||
|
Details: client.Details ? convertKubrowDetalis(client.Details) : undefined,
|
||||||
|
/* fix for
|
||||||
|
"attcol": [],
|
||||||
|
"sigcol": [],
|
||||||
|
"eyecol": [],
|
||||||
|
"facial": [],
|
||||||
|
in data from aleca */
|
||||||
|
Configs: client.Configs
|
||||||
|
? client.Configs.map(obj =>
|
||||||
|
Object.fromEntries(
|
||||||
|
Object.entries(obj).filter(([_, value]) => !Array.isArray(value) || value.length > 0)
|
||||||
|
)
|
||||||
|
)
|
||||||
|
: []
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -102,15 +117,6 @@ const convertCrewShipMembers = (client: ICrewShipMembersClient): ICrewShipMember
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
const convertCrewShip = (client: ICrewShipClient): ICrewShipDatabase => {
|
|
||||||
const { ItemId, ...rest } = client;
|
|
||||||
return {
|
|
||||||
...rest,
|
|
||||||
_id: new Types.ObjectId(ItemId.$oid),
|
|
||||||
CrewMembers: client.CrewMembers ? convertCrewShipMembers(client.CrewMembers) : undefined
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
const convertInfestedFoundry = (client: IInfestedFoundryClient): IInfestedFoundryDatabase => {
|
const convertInfestedFoundry = (client: IInfestedFoundryClient): IInfestedFoundryDatabase => {
|
||||||
return {
|
return {
|
||||||
...client,
|
...client,
|
||||||
@ -136,6 +142,13 @@ const convertDialogueHistory = (client: IDialogueHistoryClient): IDialogueHistor
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
const convertKubrowDetalis = (client: IKubrowPetDetailsClient): IKubrowPetDetailsDatabase => {
|
||||||
|
return {
|
||||||
|
...client,
|
||||||
|
HatchDate: convertDate(client.HatchDate)
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
export const importInventory = (db: TInventoryDatabaseDocument, client: Partial<IInventoryClient>): void => {
|
export const importInventory = (db: TInventoryDatabaseDocument, client: Partial<IInventoryClient>): void => {
|
||||||
for (const key of equipmentKeys) {
|
for (const key of equipmentKeys) {
|
||||||
if (client[key] !== undefined) {
|
if (client[key] !== undefined) {
|
||||||
@ -222,9 +235,6 @@ export const importInventory = (db: TInventoryDatabaseDocument, client: Partial<
|
|||||||
if (client.FocusUpgrades !== undefined) {
|
if (client.FocusUpgrades !== undefined) {
|
||||||
db.FocusUpgrades = client.FocusUpgrades;
|
db.FocusUpgrades = client.FocusUpgrades;
|
||||||
}
|
}
|
||||||
if (client.CrewShips !== undefined) {
|
|
||||||
replaceArray<ICrewShipDatabase>(db.CrewShips, client.CrewShips.map(convertCrewShip));
|
|
||||||
}
|
|
||||||
if (client.InfestedFoundry !== undefined) {
|
if (client.InfestedFoundry !== undefined) {
|
||||||
db.InfestedFoundry = convertInfestedFoundry(client.InfestedFoundry);
|
db.InfestedFoundry = convertInfestedFoundry(client.InfestedFoundry);
|
||||||
}
|
}
|
||||||
|
@ -2,7 +2,7 @@ import { ExportRegions, ExportRewards, IReward } from "warframe-public-export-pl
|
|||||||
import { IMissionInventoryUpdateRequest, IRewardInfo } from "../types/requestTypes";
|
import { IMissionInventoryUpdateRequest, IRewardInfo } from "../types/requestTypes";
|
||||||
import { logger } from "@/src/utils/logger";
|
import { logger } from "@/src/utils/logger";
|
||||||
import { IRngResult, getRandomReward } from "@/src/services/rngService";
|
import { IRngResult, getRandomReward } from "@/src/services/rngService";
|
||||||
import { IInventoryDatabase } from "@/src/types/inventoryTypes/inventoryTypes";
|
import { equipmentKeys, IInventoryDatabase, TEquipmentKey } from "@/src/types/inventoryTypes/inventoryTypes";
|
||||||
import {
|
import {
|
||||||
addChallenges,
|
addChallenges,
|
||||||
addConsumables,
|
addConsumables,
|
||||||
@ -22,6 +22,7 @@ import { IInventoryChanges } from "@/src/types/purchaseTypes";
|
|||||||
import { getLevelKeyRewards, getNode } from "@/src/services/itemDataService";
|
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";
|
||||||
|
|
||||||
const getRotations = (rotationCount: number): number[] => {
|
const getRotations = (rotationCount: number): number[] => {
|
||||||
if (rotationCount === 0) return [0];
|
if (rotationCount === 0) return [0];
|
||||||
@ -144,23 +145,12 @@ export const addMissionInventoryUpdates = (
|
|||||||
inventoryChanges.FusionPoints = fusionPoints;
|
inventoryChanges.FusionPoints = fusionPoints;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
// Equipment XP updates
|
|
||||||
case "Suits":
|
|
||||||
case "LongGuns":
|
|
||||||
case "Pistols":
|
|
||||||
case "Melee":
|
|
||||||
case "SpecialItems":
|
|
||||||
case "Sentinels":
|
|
||||||
case "SentinelWeapons":
|
|
||||||
case "SpaceSuits":
|
|
||||||
case "SpaceGuns":
|
|
||||||
case "SpaceMelee":
|
|
||||||
case "Hoverboards":
|
|
||||||
case "OperatorAmps":
|
|
||||||
case "MoaPets":
|
|
||||||
addGearExpByCategory(inventory, value, key);
|
|
||||||
break;
|
|
||||||
default:
|
default:
|
||||||
|
// Equipment XP updates
|
||||||
|
if (equipmentKeys.includes(key as TEquipmentKey)) {
|
||||||
|
addGearExpByCategory(inventory, value as IEquipmentClient[], key as TEquipmentKey);
|
||||||
|
}
|
||||||
|
break;
|
||||||
// if (
|
// if (
|
||||||
// (ignoredInventoryUpdateKeys as readonly string[]).includes(key) ||
|
// (ignoredInventoryUpdateKeys as readonly string[]).includes(key) ||
|
||||||
// knownUnhandledKeys.includes(key)
|
// knownUnhandledKeys.includes(key)
|
||||||
|
@ -12,6 +12,7 @@ import { IOid } from "@/src/types/commonTypes";
|
|||||||
import { Types } from "mongoose";
|
import { Types } from "mongoose";
|
||||||
import { isEmptyObject } from "@/src/helpers/general";
|
import { isEmptyObject } from "@/src/helpers/general";
|
||||||
import { logger } from "@/src/utils/logger";
|
import { logger } from "@/src/utils/logger";
|
||||||
|
import { equipmentKeys, TEquipmentKey } from "@/src/types/inventoryTypes/inventoryTypes";
|
||||||
|
|
||||||
//TODO: setup default items on account creation or like originally in giveStartingItems.php
|
//TODO: setup default items on account creation or like originally in giveStartingItems.php
|
||||||
|
|
||||||
@ -124,45 +125,6 @@ export const handleInventoryItemConfigChange = async (
|
|||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case "LongGuns":
|
|
||||||
case "Pistols":
|
|
||||||
case "Suits":
|
|
||||||
case "Melee":
|
|
||||||
case "Scoops":
|
|
||||||
case "DataKnives":
|
|
||||||
case "DrifterMelee":
|
|
||||||
case "Sentinels":
|
|
||||||
case "Horses":
|
|
||||||
case "OperatorAmps":
|
|
||||||
case "SentinelWeapons":
|
|
||||||
case "KubrowPets":
|
|
||||||
case "SpaceSuits":
|
|
||||||
case "SpaceGuns":
|
|
||||||
case "SpaceMelee":
|
|
||||||
case "SpecialItems":
|
|
||||||
case "MoaPets":
|
|
||||||
case "Hoverboards":
|
|
||||||
case "MechSuits":
|
|
||||||
case "CrewShipHarnesses":
|
|
||||||
case "CrewShips":
|
|
||||||
case "Motorcycles": {
|
|
||||||
logger.debug(`general Item config saved of type ${equipmentName}`, { config: equipment });
|
|
||||||
|
|
||||||
const itemEntries = equipment as IItemEntry;
|
|
||||||
for (const [itemId, itemConfigEntries] of Object.entries(itemEntries)) {
|
|
||||||
const inventoryItem = inventory[equipmentName].find(item => item._id?.toString() === itemId);
|
|
||||||
|
|
||||||
if (!inventoryItem) {
|
|
||||||
throw new Error(`inventory item ${equipmentName} not found with id ${itemId}`);
|
|
||||||
}
|
|
||||||
|
|
||||||
//config ids are 0,1,2 can there be a 3?
|
|
||||||
for (const [configId, config] of Object.entries(itemConfigEntries)) {
|
|
||||||
inventoryItem.Configs[parseInt(configId)] = config;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
case "CurrentLoadOutIds": {
|
case "CurrentLoadOutIds": {
|
||||||
const loadoutIds = equipment as IOid[]; // TODO: Check for more than just an array of oids, I think i remember one instance
|
const loadoutIds = equipment as IOid[]; // TODO: Check for more than just an array of oids, I think i remember one instance
|
||||||
inventory.CurrentLoadOutIds = loadoutIds;
|
inventory.CurrentLoadOutIds = loadoutIds;
|
||||||
@ -178,10 +140,30 @@ export const handleInventoryItemConfigChange = async (
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
default: {
|
default: {
|
||||||
|
if (equipmentKeys.includes(equipmentName as TEquipmentKey) && equipmentName != "ValidNewLoadoutId") {
|
||||||
|
logger.debug(`general Item config saved of type ${equipmentName}`, {
|
||||||
|
config: equipment
|
||||||
|
});
|
||||||
|
|
||||||
|
const itemEntries = equipment as IItemEntry;
|
||||||
|
for (const [itemId, itemConfigEntries] of Object.entries(itemEntries)) {
|
||||||
|
const inventoryItem = inventory[equipmentName].find(item => item._id?.toString() === itemId);
|
||||||
|
|
||||||
|
if (!inventoryItem) {
|
||||||
|
throw new Error(`inventory item ${equipmentName} not found with id ${itemId}`);
|
||||||
|
}
|
||||||
|
|
||||||
|
for (const [configId, config] of Object.entries(itemConfigEntries)) {
|
||||||
|
inventoryItem.Configs[parseInt(configId)] = config;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
} else {
|
||||||
logger.warn(`loadout category not implemented, changes may be lost: ${equipmentName}`, {
|
logger.warn(`loadout category not implemented, changes may be lost: ${equipmentName}`, {
|
||||||
config: equipment
|
config: equipment
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
}
|
||||||
//case "KahlLoadOuts": not sure yet how to handle kahl: it is not sent in inventory
|
//case "KahlLoadOuts": not sure yet how to handle kahl: it is not sent in inventory
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,5 +1,14 @@
|
|||||||
import { IMongoDate, IOid } from "@/src/types/commonTypes";
|
import { IMongoDate, IOid } from "@/src/types/commonTypes";
|
||||||
import { Types } from "mongoose";
|
import { Types } from "mongoose";
|
||||||
|
import {
|
||||||
|
ICrewShipCustomization,
|
||||||
|
ICrewShipMembersClient,
|
||||||
|
ICrewShipMembersDatabase,
|
||||||
|
ICrewShipWeapon,
|
||||||
|
IFlavourItem,
|
||||||
|
IKubrowPetDetailsClient,
|
||||||
|
IKubrowPetDetailsDatabase
|
||||||
|
} from "@/src/types/inventoryTypes/inventoryTypes";
|
||||||
|
|
||||||
export interface IPolarity {
|
export interface IPolarity {
|
||||||
Slot: number;
|
Slot: number;
|
||||||
@ -79,11 +88,16 @@ export interface IEquipmentSelection {
|
|||||||
}
|
}
|
||||||
|
|
||||||
export interface IEquipmentClient
|
export interface IEquipmentClient
|
||||||
extends Omit<IEquipmentDatabase, "_id" | "InfestationDate" | "Expiry" | "UpgradesExpiry"> {
|
extends Omit<
|
||||||
|
IEquipmentDatabase,
|
||||||
|
"_id" | "InfestationDate" | "Expiry" | "UpgradesExpiry" | "CrewMembers" | "Details"
|
||||||
|
> {
|
||||||
ItemId: IOid;
|
ItemId: IOid;
|
||||||
InfestationDate?: IMongoDate;
|
InfestationDate?: IMongoDate;
|
||||||
Expiry?: IMongoDate;
|
Expiry?: IMongoDate;
|
||||||
UpgradesExpiry?: IMongoDate;
|
UpgradesExpiry?: IMongoDate;
|
||||||
|
CrewMembers?: ICrewShipMembersClient;
|
||||||
|
Details?: IKubrowPetDetailsClient;
|
||||||
}
|
}
|
||||||
|
|
||||||
export enum EquipmentFeatures {
|
export enum EquipmentFeatures {
|
||||||
@ -120,6 +134,11 @@ export interface IEquipmentDatabase {
|
|||||||
DefensiveUpgrade?: string;
|
DefensiveUpgrade?: string;
|
||||||
UpgradesExpiry?: Date;
|
UpgradesExpiry?: Date;
|
||||||
ArchonCrystalUpgrades?: IArchonCrystalUpgrade[];
|
ArchonCrystalUpgrades?: IArchonCrystalUpgrade[];
|
||||||
|
Weapon?: ICrewShipWeapon;
|
||||||
|
Customization?: ICrewShipCustomization;
|
||||||
|
RailjackImage?: IFlavourItem;
|
||||||
|
CrewMembers?: ICrewShipMembersDatabase;
|
||||||
|
Details?: IKubrowPetDetailsDatabase;
|
||||||
_id: Types.ObjectId;
|
_id: Types.ObjectId;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -51,7 +51,6 @@ export interface IInventoryDatabase
|
|||||||
CrewShipWeaponSkins: IUpgradeDatabase[];
|
CrewShipWeaponSkins: IUpgradeDatabase[];
|
||||||
OperatorLoadOuts: IOperatorConfigDatabase[];
|
OperatorLoadOuts: IOperatorConfigDatabase[];
|
||||||
AdultOperatorLoadOuts: IOperatorConfigDatabase[];
|
AdultOperatorLoadOuts: IOperatorConfigDatabase[];
|
||||||
CrewShips: ICrewShipDatabase[];
|
|
||||||
InfestedFoundry?: IInfestedFoundryDatabase;
|
InfestedFoundry?: IInfestedFoundryDatabase;
|
||||||
DialogueHistory?: IDialogueHistoryDatabase;
|
DialogueHistory?: IDialogueHistoryDatabase;
|
||||||
|
|
||||||
@ -68,6 +67,16 @@ export interface IInventoryDatabase
|
|||||||
Hoverboards: IEquipmentDatabase[];
|
Hoverboards: IEquipmentDatabase[];
|
||||||
OperatorAmps: IEquipmentDatabase[];
|
OperatorAmps: IEquipmentDatabase[];
|
||||||
MoaPets: IEquipmentDatabase[];
|
MoaPets: IEquipmentDatabase[];
|
||||||
|
Scoops: IEquipmentDatabase[];
|
||||||
|
Horses: IEquipmentDatabase[];
|
||||||
|
DrifterGuns: IEquipmentDatabase[];
|
||||||
|
DrifterMelee: IEquipmentDatabase[];
|
||||||
|
Motorcycles: IEquipmentDatabase[];
|
||||||
|
CrewShips: IEquipmentDatabase[];
|
||||||
|
DataKnives: IEquipmentDatabase[];
|
||||||
|
MechSuits: IEquipmentDatabase[];
|
||||||
|
CrewShipHarnesses: IEquipmentDatabase[];
|
||||||
|
KubrowPets: IEquipmentDatabase[];
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface IQuestKeyDatabase {
|
export interface IQuestKeyDatabase {
|
||||||
@ -97,7 +106,17 @@ export const equipmentKeys = [
|
|||||||
"SpaceMelee",
|
"SpaceMelee",
|
||||||
"Hoverboards",
|
"Hoverboards",
|
||||||
"OperatorAmps",
|
"OperatorAmps",
|
||||||
"MoaPets"
|
"MoaPets",
|
||||||
|
"Scoops",
|
||||||
|
"Horses",
|
||||||
|
"DrifterGuns",
|
||||||
|
"DrifterMelee",
|
||||||
|
"Motorcycles",
|
||||||
|
"CrewShips",
|
||||||
|
"DataKnives",
|
||||||
|
"MechSuits",
|
||||||
|
"CrewShipHarnesses",
|
||||||
|
"KubrowPets"
|
||||||
] as const;
|
] as const;
|
||||||
|
|
||||||
export type TEquipmentKey = (typeof equipmentKeys)[number];
|
export type TEquipmentKey = (typeof equipmentKeys)[number];
|
||||||
@ -167,10 +186,17 @@ export interface IInventoryClient extends IDailyAffiliations {
|
|||||||
Hoverboards: IEquipmentClient[];
|
Hoverboards: IEquipmentClient[];
|
||||||
OperatorAmps: IEquipmentClient[];
|
OperatorAmps: IEquipmentClient[];
|
||||||
MoaPets: IEquipmentClient[];
|
MoaPets: IEquipmentClient[];
|
||||||
|
Scoops: IEquipmentClient[];
|
||||||
|
Horses: IEquipmentClient[];
|
||||||
|
DrifterGuns: IEquipmentClient[];
|
||||||
|
DrifterMelee: IEquipmentClient[];
|
||||||
|
Motorcycles: IEquipmentClient[];
|
||||||
|
CrewShips: IEquipmentClient[];
|
||||||
|
DataKnives: IEquipmentClient[];
|
||||||
|
MechSuits: IEquipmentClient[];
|
||||||
|
CrewShipHarnesses: IEquipmentClient[];
|
||||||
|
KubrowPets: IEquipmentClient[];
|
||||||
|
|
||||||
Horses: IEquipmentDatabase[];
|
|
||||||
DrifterMelee: IEquipmentDatabase[];
|
|
||||||
DrifterGuns: IEquipmentDatabase[];
|
|
||||||
DuviriInfo: IDuviriInfo;
|
DuviriInfo: IDuviriInfo;
|
||||||
Mailbox: IMailbox;
|
Mailbox: IMailbox;
|
||||||
KahlLoadOuts: IEquipmentDatabase[];
|
KahlLoadOuts: IEquipmentDatabase[];
|
||||||
@ -208,7 +234,6 @@ export interface IInventoryClient extends IDailyAffiliations {
|
|||||||
QuestKeys: IQuestKeyClient[];
|
QuestKeys: IQuestKeyClient[];
|
||||||
ActiveQuest: string;
|
ActiveQuest: string;
|
||||||
FlavourItems: IFlavourItem[];
|
FlavourItems: IFlavourItem[];
|
||||||
Scoops: IEquipmentDatabase[];
|
|
||||||
LoadOutPresets: ILoadOutPresets;
|
LoadOutPresets: ILoadOutPresets;
|
||||||
CurrentLoadOutIds: IOid[]; // we store it in the database using this representation as well :/
|
CurrentLoadOutIds: IOid[]; // we store it in the database using this representation as well :/
|
||||||
Missions: IMission[];
|
Missions: IMission[];
|
||||||
@ -263,7 +288,6 @@ export interface IInventoryClient extends IDailyAffiliations {
|
|||||||
Drones: IDrone[];
|
Drones: IDrone[];
|
||||||
StepSequencers: IStepSequencer[];
|
StepSequencers: IStepSequencer[];
|
||||||
ActiveAvatarImageType: string;
|
ActiveAvatarImageType: string;
|
||||||
KubrowPets: IEquipmentDatabase[];
|
|
||||||
ShipDecorations: IConsumable[];
|
ShipDecorations: IConsumable[];
|
||||||
DiscoveredMarkers: IDiscoveredMarker[];
|
DiscoveredMarkers: IDiscoveredMarker[];
|
||||||
CompletedJobs: ICompletedJob[];
|
CompletedJobs: ICompletedJob[];
|
||||||
@ -288,13 +312,10 @@ export interface IInventoryClient extends IDailyAffiliations {
|
|||||||
SeasonChallengeHistory: ISeasonChallenge[];
|
SeasonChallengeHistory: ISeasonChallenge[];
|
||||||
EquippedInstrument?: string;
|
EquippedInstrument?: string;
|
||||||
InvasionChainProgress: IInvasionChainProgress[];
|
InvasionChainProgress: IInvasionChainProgress[];
|
||||||
DataKnives: IEquipmentDatabase[];
|
|
||||||
Motorcycles: IEquipmentDatabase[];
|
|
||||||
NemesisHistory: INemesisHistory[];
|
NemesisHistory: INemesisHistory[];
|
||||||
LastNemesisAllySpawnTime?: IMongoDate;
|
LastNemesisAllySpawnTime?: IMongoDate;
|
||||||
Settings: ISettings;
|
Settings: ISettings;
|
||||||
PersonalTechProjects: IPersonalTechProject[];
|
PersonalTechProjects: IPersonalTechProject[];
|
||||||
CrewShips: ICrewShipClient[];
|
|
||||||
PlayerSkills: IPlayerSkills;
|
PlayerSkills: IPlayerSkills;
|
||||||
CrewShipAmmo: IConsumable[];
|
CrewShipAmmo: IConsumable[];
|
||||||
CrewShipSalvagedWeaponSkins: IUpgradeClient[];
|
CrewShipSalvagedWeaponSkins: IUpgradeClient[];
|
||||||
@ -304,10 +325,8 @@ export interface IInventoryClient extends IDailyAffiliations {
|
|||||||
TradeBannedUntil?: IMongoDate;
|
TradeBannedUntil?: IMongoDate;
|
||||||
PlayedParkourTutorial: boolean;
|
PlayedParkourTutorial: boolean;
|
||||||
SubscribedToEmailsPersonalized: number;
|
SubscribedToEmailsPersonalized: number;
|
||||||
MechSuits: IEquipmentDatabase[];
|
|
||||||
InfestedFoundry?: IInfestedFoundryClient;
|
InfestedFoundry?: IInfestedFoundryClient;
|
||||||
BlessingCooldown: IMongoDate;
|
BlessingCooldown: IMongoDate;
|
||||||
CrewShipHarnesses: IEquipmentDatabase[];
|
|
||||||
CrewShipRawSalvage: IConsumable[];
|
CrewShipRawSalvage: IConsumable[];
|
||||||
CrewMembers: ICrewMember[];
|
CrewMembers: ICrewMember[];
|
||||||
AdultOperatorLoadOuts: IOperatorConfigClient[];
|
AdultOperatorLoadOuts: IOperatorConfigClient[];
|
||||||
@ -454,22 +473,6 @@ export interface IUpgradeDatabase extends Omit<IUpgradeClient, "ItemId"> {
|
|||||||
_id: Types.ObjectId;
|
_id: Types.ObjectId;
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface ICrewShipClient {
|
|
||||||
ItemType: string;
|
|
||||||
Configs: IItemConfig[];
|
|
||||||
Weapon?: ICrewShipWeapon;
|
|
||||||
Customization?: ICrewShipCustomization;
|
|
||||||
ItemName: string;
|
|
||||||
RailjackImage?: IFlavourItem;
|
|
||||||
CrewMembers?: ICrewShipMembersClient;
|
|
||||||
ItemId: IOid;
|
|
||||||
}
|
|
||||||
|
|
||||||
export interface ICrewShipDatabase extends Omit<ICrewShipClient, "CrewMembers" | "ItemId"> {
|
|
||||||
CrewMembers?: ICrewShipMembersDatabase;
|
|
||||||
_id: Types.ObjectId;
|
|
||||||
}
|
|
||||||
|
|
||||||
export interface ICrewShipMembersClient {
|
export interface ICrewShipMembersClient {
|
||||||
SLOT_A?: ICrewShipMemberClient;
|
SLOT_A?: ICrewShipMemberClient;
|
||||||
SLOT_B?: ICrewShipMemberClient;
|
SLOT_B?: ICrewShipMemberClient;
|
||||||
@ -643,19 +646,23 @@ export enum KubrowPetPrintItemType {
|
|||||||
LotusTypesGameKubrowPetImprintedTraitPrint = "/Lotus/Types/Game/KubrowPet/ImprintedTraitPrint"
|
LotusTypesGameKubrowPetImprintedTraitPrint = "/Lotus/Types/Game/KubrowPet/ImprintedTraitPrint"
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface IDetails {
|
export interface IKubrowPetDetailsDatabase {
|
||||||
Name: string;
|
Name: string;
|
||||||
IsPuppy: boolean;
|
IsPuppy: boolean;
|
||||||
HasCollar: boolean;
|
HasCollar: boolean;
|
||||||
PrintsRemaining: number;
|
PrintsRemaining: number;
|
||||||
Status: Status;
|
Status: Status;
|
||||||
HatchDate: IMongoDate;
|
HatchDate: Date;
|
||||||
DominantTraits: ITraits;
|
DominantTraits: ITraits;
|
||||||
RecessiveTraits: ITraits;
|
RecessiveTraits: ITraits;
|
||||||
IsMale: boolean;
|
IsMale: boolean;
|
||||||
Size: number;
|
Size: number;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export interface IKubrowPetDetailsClient extends Omit<IKubrowPetDetailsDatabase, "HatchDate"> {
|
||||||
|
HatchDate: IMongoDate;
|
||||||
|
}
|
||||||
|
|
||||||
export enum Status {
|
export enum Status {
|
||||||
StatusAvailable = "STATUS_AVAILABLE",
|
StatusAvailable = "STATUS_AVAILABLE",
|
||||||
StatusStasis = "STATUS_STASIS"
|
StatusStasis = "STATUS_STASIS"
|
||||||
|
@ -39,19 +39,6 @@ export type IMissionInventoryUpdateRequest = {
|
|||||||
GoalTag: string;
|
GoalTag: string;
|
||||||
LevelKeyName: string;
|
LevelKeyName: string;
|
||||||
ActiveBoosters?: IBooster[];
|
ActiveBoosters?: IBooster[];
|
||||||
Suits?: IEquipmentClient[];
|
|
||||||
LongGuns?: IEquipmentClient[];
|
|
||||||
Pistols?: IEquipmentClient[];
|
|
||||||
Melee?: IEquipmentClient[];
|
|
||||||
SpecialItems?: IEquipmentClient[];
|
|
||||||
Sentinels?: IEquipmentClient[];
|
|
||||||
SentinelWeapons?: IEquipmentClient[];
|
|
||||||
SpaceSuits?: IEquipmentClient[];
|
|
||||||
SpaceGuns?: IEquipmentClient[];
|
|
||||||
SpaceMelee?: IEquipmentClient[];
|
|
||||||
Hoverboards?: IEquipmentClient[];
|
|
||||||
OperatorAmps?: IEquipmentClient[];
|
|
||||||
MoaPets?: IEquipmentClient[];
|
|
||||||
FusionBundles?: ITypeCount[];
|
FusionBundles?: ITypeCount[];
|
||||||
RawUpgrades?: IRawUpgrade[];
|
RawUpgrades?: IRawUpgrade[];
|
||||||
MiscItems?: ITypeCount[];
|
MiscItems?: ITypeCount[];
|
||||||
@ -85,6 +72,8 @@ export type IMissionInventoryUpdateRequest = {
|
|||||||
FpsMax: number;
|
FpsMax: number;
|
||||||
FpsSamples: number;
|
FpsSamples: number;
|
||||||
EvolutionProgress?: IEvolutionProgress[];
|
EvolutionProgress?: IEvolutionProgress[];
|
||||||
|
} & {
|
||||||
|
[K in TEquipmentKey]?: IEquipmentClient[];
|
||||||
};
|
};
|
||||||
|
|
||||||
export interface IRewardInfo {
|
export interface IRewardInfo {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user