fix: more accurate inventory after skipTutorial #755

Merged
AMelonInsideLemon merged 2 commits from new-inventory into main 2025-01-20 09:25:50 -08:00
11 changed files with 183 additions and 502 deletions

View File

@ -718,7 +718,7 @@ const inventorySchema = new Schema<IInventoryDatabase, InventoryDocumentProps>(
RewardSeed: Number, RewardSeed: Number,
//Credit //Credit
RegularCredits: { type: Number, default: 3000 }, RegularCredits: { type: Number, default: 0 },
//Platinum //Platinum
PremiumCredits: { type: Number, default: 50 }, PremiumCredits: { type: Number, default: 50 },
//Gift Platinum(Non trade) //Gift Platinum(Non trade)
@ -729,18 +729,18 @@ const inventorySchema = new Schema<IInventoryDatabase, InventoryDocumentProps>(
PrimeTokens: { type: Number, default: 0 }, PrimeTokens: { type: Number, default: 0 },
//Slots //Slots
SuitBin: slotsBinSchema, SuitBin: { type: slotsBinSchema, default: { Slots: 3 } },
WeaponBin: slotsBinSchema, WeaponBin: { type: slotsBinSchema, default: { Slots: 10 } },
SentinelBin: slotsBinSchema, SentinelBin: { type: slotsBinSchema, default: { Slots: 10 } },
SpaceSuitBin: slotsBinSchema, SpaceSuitBin: { type: slotsBinSchema, default: { Slots: 4 } },
SpaceWeaponBin: slotsBinSchema, SpaceWeaponBin: { type: slotsBinSchema, default: { Slots: 4 } },
PvpBonusLoadoutBin: slotsBinSchema, PvpBonusLoadoutBin: { type: slotsBinSchema, default: { Slots: 0 } },
PveBonusLoadoutBin: slotsBinSchema, PveBonusLoadoutBin: { type: slotsBinSchema, default: { Slots: 0 } },
RandomModBin: slotsBinSchema, RandomModBin: { type: slotsBinSchema, default: { Slots: 15 } },
OperatorAmpBin: slotsBinSchema, OperatorAmpBin: { type: slotsBinSchema, default: { Slots: 8 } },
CrewShipSalvageBin: slotsBinSchema, CrewShipSalvageBin: { type: slotsBinSchema, default: { Slots: 8 } },
MechBin: slotsBinSchema, MechBin: { type: slotsBinSchema, default: { Slots: 4 } },
CrewMemberBin: slotsBinSchema, CrewMemberBin: { type: slotsBinSchema, default: { Slots: 3 } },
//How many trades do you have left //How many trades do you have left
TradesRemaining: { type: Number, default: 0 }, TradesRemaining: { type: Number, default: 0 },
@ -756,20 +756,20 @@ const inventorySchema = new Schema<IInventoryDatabase, InventoryDocumentProps>(
//Syndicates Missions complate(Navigation->Syndicate) //Syndicates Missions complate(Navigation->Syndicate)
CompletedSyndicates: [String], CompletedSyndicates: [String],
//Daily Syndicates Exp //Daily Syndicates Exp
DailyAffiliation: { type: Number, default: 0 }, DailyAffiliation: { type: Number, default: 16000 },
DailyAffiliationPvp: { type: Number, default: 0 }, DailyAffiliationPvp: { type: Number, default: 16000 },
DailyAffiliationLibrary: { type: Number, default: 0 }, DailyAffiliationLibrary: { type: Number, default: 16000 },
DailyAffiliationCetus: { type: Number, default: 0 }, DailyAffiliationCetus: { type: Number, default: 16000 },
DailyAffiliationQuills: { type: Number, default: 0 }, DailyAffiliationQuills: { type: Number, default: 16000 },
DailyAffiliationSolaris: { type: Number, default: 0 }, DailyAffiliationSolaris: { type: Number, default: 16000 },
DailyAffiliationVentkids: { type: Number, default: 0 }, DailyAffiliationVentkids: { type: Number, default: 16000 },
DailyAffiliationVox: { type: Number, default: 0 }, DailyAffiliationVox: { type: Number, default: 16000 },
DailyAffiliationEntrati: { type: Number, default: 0 }, DailyAffiliationEntrati: { type: Number, default: 16000 },
DailyAffiliationNecraloid: { type: Number, default: 0 }, DailyAffiliationNecraloid: { type: Number, default: 16000 },
DailyAffiliationZariman: { type: Number, default: 0 }, DailyAffiliationZariman: { type: Number, default: 16000 },
DailyAffiliationKahl: { type: Number, default: 0 }, DailyAffiliationKahl: { type: Number, default: 16000 },
DailyAffiliationCavia: { type: Number, default: 0 }, DailyAffiliationCavia: { type: Number, default: 16000 },
DailyAffiliationHex: { type: Number, default: 0 }, DailyAffiliationHex: { type: Number, default: 16000 },
//Daily Focus limit //Daily Focus limit
DailyFocus: { type: Number, default: 250000 }, DailyFocus: { type: Number, default: 250000 },
@ -890,7 +890,7 @@ const inventorySchema = new Schema<IInventoryDatabase, InventoryDocumentProps>(
//Item Mastery Rank exp //Item Mastery Rank exp
XPInfo: [TypeXPItemSchema], XPInfo: [TypeXPItemSchema],
//Mastery Rank next availability //Mastery Rank next availability
TrainingDate: Date, TrainingDate: { type: Date, default: new Date(0) },
//Retries rank up(3 time) //Retries rank up(3 time)
TrainingRetriesLeft: Number, TrainingRetriesLeft: Number,
@ -916,7 +916,7 @@ const inventorySchema = new Schema<IInventoryDatabase, InventoryDocumentProps>(
CompletedAlerts: [String], CompletedAlerts: [String],
//Warframe\Duviri //Warframe\Duviri
StoryModeChoice: String, StoryModeChoice: { type: String, default: "WARFRAME" },
//Alert->Kuva Siphon //Alert->Kuva Siphon
PeriodicMissionCompletions: [periodicMissionCompletionsSchema], PeriodicMissionCompletions: [periodicMissionCompletionsSchema],

View File

@ -74,16 +74,38 @@ const apartmentSchema = new Schema<IApartment>(
}, },
{ _id: false } { _id: false }
); );
const apartmentDefault: IApartment = {
Rooms: [
{ Name: "ElevatorLanding", MaxCapacity: 1600 },
{ Name: "ApartmentRoomA", MaxCapacity: 1000 },
{ Name: "ApartmentRoomB", MaxCapacity: 1600 },
{ Name: "ApartmentRoomC", MaxCapacity: 1600 },
{ Name: "DuviriHallway", MaxCapacity: 1600 }
],
FavouriteLoadouts: [],
Gardening: {}
};
const orbiterSchema = new Schema<IOrbiter>( const orbiterSchema = new Schema<IOrbiter>(
{ {
Features: [String], Features: [String],
Rooms: [roomSchema], Rooms: [roomSchema],
ContentUrlSignature: String, ContentUrlSignature: { type: String, required: false },
BootLocation: String BootLocation: String
}, },
{ _id: false } { _id: false }
); );
const orbiterDefault: IOrbiter = {
Features: [],
Rooms: [
{ Name: "AlchemyRoom", MaxCapacity: 1600 },
{ Name: "BridgeRoom", MaxCapacity: 1600 },
{ Name: "LisetRoom", MaxCapacity: 1000 },
{ Name: "OperatorChamberRoom", MaxCapacity: 1600 },
{ Name: "OutsideRoom", MaxCapacity: 1600 },
{ Name: "PersonalQuartersRoom", MaxCapacity: 1600 }
]
};
coderabbitai[bot] commented 2025-01-08 20:24:54 -08:00 (Migrated from github.com)
Review

🛠️ Refactor suggestion

Add default value for BootLocation.

The orbiterDefault object is missing a default value for the BootLocation field that exists in the schema. Consider adding a sensible default to ensure consistent initialization.

 const orbiterDefault: IOrbiter = {
     Features: [],
     Rooms: [
         { Name: "AlchemyRoom", MaxCapacity: 1600 },
         { Name: "BridgeRoom", MaxCapacity: 1600 },
         { Name: "LisetRoom", MaxCapacity: 1000 },
         { Name: "OperatorChamberRoom", MaxCapacity: 1600 },
         { Name: "OutsideRoom", MaxCapacity: 1600 },
         { Name: "PersonalQuartersRoom", MaxCapacity: 1600 }
-    ]
+    ],
+    BootLocation: "LisetRoom" // Default to the starter room
 };
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

const orbiterDefault: IOrbiter = {
    Features: [],
    Rooms: [
        { Name: "AlchemyRoom", MaxCapacity: 1600 },
        { Name: "BridgeRoom", MaxCapacity: 1600 },
        { Name: "LisetRoom", MaxCapacity: 1000 },
        { Name: "OperatorChamberRoom", MaxCapacity: 1600 },
        { Name: "OutsideRoom", MaxCapacity: 1600 },
        { Name: "PersonalQuartersRoom", MaxCapacity: 1600 }
    ],
    BootLocation: "LisetRoom" // Default to the starter room
};
_:hammer_and_wrench: Refactor suggestion_ **Add default value for BootLocation.** The `orbiterDefault` object is missing a default value for the `BootLocation` field that exists in the schema. Consider adding a sensible default to ensure consistent initialization. ```diff const orbiterDefault: IOrbiter = { Features: [], Rooms: [ { Name: "AlchemyRoom", MaxCapacity: 1600 }, { Name: "BridgeRoom", MaxCapacity: 1600 }, { Name: "LisetRoom", MaxCapacity: 1000 }, { Name: "OperatorChamberRoom", MaxCapacity: 1600 }, { Name: "OutsideRoom", MaxCapacity: 1600 }, { Name: "PersonalQuartersRoom", MaxCapacity: 1600 } - ] + ], + BootLocation: "LisetRoom" // Default to the starter room }; ``` <!-- suggestion_start --> <details> <summary>📝 Committable suggestion</summary> > ‼️ **IMPORTANT** > Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements. `````suggestion const orbiterDefault: IOrbiter = { Features: [], Rooms: [ { Name: "AlchemyRoom", MaxCapacity: 1600 }, { Name: "BridgeRoom", MaxCapacity: 1600 }, { Name: "LisetRoom", MaxCapacity: 1000 }, { Name: "OperatorChamberRoom", MaxCapacity: 1600 }, { Name: "OutsideRoom", MaxCapacity: 1600 }, { Name: "PersonalQuartersRoom", MaxCapacity: 1600 } ], BootLocation: "LisetRoom" // Default to the starter room }; ````` </details> <!-- suggestion_end --> <!-- This is an auto-generated comment by CodeRabbit -->
const favouriteLoadoutSchema = new Schema<IFavouriteLoadoutDatabase>( const favouriteLoadoutSchema = new Schema<IFavouriteLoadoutDatabase>(
{ {
@ -114,18 +136,9 @@ const tailorShopDefault: ITailorShopDatabase = {
CustomJson: "{}", CustomJson: "{}",
LevelDecosVisible: true, LevelDecosVisible: true,
Rooms: [ Rooms: [
{ { Name: "LabRoom", MaxCapacity: 4000 },
Name: "LabRoom", { Name: "LivingQuartersRoom", MaxCapacity: 3000 },
MaxCapacity: 4000 { Name: "HelminthRoom", MaxCapacity: 2000 }
},
{
Name: "LivingQuartersRoom",
MaxCapacity: 3000
},
{
Name: "HelminthRoom",
MaxCapacity: 2000
}
] ]
}; };
@ -133,8 +146,8 @@ export const personalRoomsSchema = new Schema<IPersonalRoomsDatabase>({
personalRoomsOwnerId: Schema.Types.ObjectId, personalRoomsOwnerId: Schema.Types.ObjectId,
activeShipId: Schema.Types.ObjectId, activeShipId: Schema.Types.ObjectId,
ShipInteriorColors: colorSchema, ShipInteriorColors: colorSchema,
Ship: orbiterSchema, Ship: { type: orbiterSchema, default: orbiterDefault },
Apartment: apartmentSchema, Apartment: { type: apartmentSchema, default: apartmentDefault },
TailorShop: { type: tailorShopSchema, default: tailorShopDefault } TailorShop: { type: tailorShopSchema, default: tailorShopDefault }
}); });

View File

@ -1,5 +1,4 @@
import { Inventory, TInventoryDatabaseDocument } from "@/src/models/inventoryModels/inventoryModel"; import { Inventory, TInventoryDatabaseDocument } from "@/src/models/inventoryModels/inventoryModel";
import postTutorialInventory 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 { SlotNames, IInventoryChanges, IBinChanges, ICurrencyChanges } from "@/src/types/purchaseTypes"; import { SlotNames, IInventoryChanges, IBinChanges, ICurrencyChanges } from "@/src/types/purchaseTypes";
@ -45,25 +44,90 @@ export const createInventory = async (
defaultItemReferences: { loadOutPresetId: Types.ObjectId; ship: Types.ObjectId } defaultItemReferences: { loadOutPresetId: Types.ObjectId; ship: Types.ObjectId }
): Promise<void> => { ): Promise<void> => {
try { try {
const inventory = config.skipTutorial const inventory = new Inventory({
? new Inventory({
accountOwnerId: accountOwnerId, accountOwnerId: accountOwnerId,
LoadOutPresets: defaultItemReferences.loadOutPresetId, LoadOutPresets: defaultItemReferences.loadOutPresetId,
Ships: [defaultItemReferences.ship], Ships: [defaultItemReferences.ship],
...postTutorialInventory PlayedParkourTutorial: config.skipTutorial,
}) ReceivedStartingGear: config.skipTutorial
: new Inventory({
accountOwnerId: accountOwnerId,
LoadOutPresets: defaultItemReferences.loadOutPresetId,
Ships: [defaultItemReferences.ship],
TrainingDate: 0
}); });
if (config.skipTutorial) {
const defaultEquipment = [
// Awakening rewards
{ ItemCount: 1, ItemType: "/Lotus/Powersuits/Excalibur/Excalibur" },
{ ItemCount: 1, ItemType: "/Lotus/Weapons/Tenno/Melee/LongSword/LongSword" },
{ ItemCount: 1, ItemType: "/Lotus/Weapons/Tenno/Pistol/Pistol" },
{ ItemCount: 1, ItemType: "/Lotus/Weapons/Tenno/Rifle/Rifle" },
{ ItemCount: 1, ItemType: "/Lotus/Types/StoreItems/AvatarImages/AvatarImageItem1" },
{ ItemCount: 1, ItemType: "/Lotus/Types/StoreItems/AvatarImages/AvatarImageItem2" },
{ ItemCount: 1, ItemType: "/Lotus/Types/StoreItems/AvatarImages/AvatarImageItem3" },
{ ItemCount: 1, ItemType: "/Lotus/Types/StoreItems/AvatarImages/AvatarImageItem4" },
{ ItemCount: 1, ItemType: "/Lotus/Types/Restoratives/LisetAutoHack" },
// Vor's Prize rewards
{ ItemCount: 1, ItemType: "/Lotus/Upgrades/Mods/Warframe/AvatarHealthMaxMod" },
{ ItemCount: 1, ItemType: "/Lotus/Upgrades/Mods/Warframe/AvatarShieldMaxMod" },
{ ItemCount: 1, ItemType: "/Lotus/Upgrades/Mods/Warframe/AvatarAbilityRangeMod" },
{ ItemCount: 1, ItemType: "/Lotus/Upgrades/Mods/Warframe/AvatarAbilityStrengthMod" },
{ ItemCount: 1, ItemType: "/Lotus/Upgrades/Mods/Warframe/AvatarAbilityDurationMod" },
{ ItemCount: 1, ItemType: "/Lotus/Upgrades/Mods/Warframe/AvatarPickupBonusMod" },
{ ItemCount: 1, ItemType: "/Lotus/Upgrades/Mods/Warframe/AvatarPowerMaxMod" },
{ ItemCount: 1, ItemType: "/Lotus/Upgrades/Mods/Warframe/AvatarEnemyRadarMod" },
{ ItemCount: 1, ItemType: "/Lotus/Upgrades/Mods/Melee/WeaponFireRateMod" },
{ ItemCount: 1, ItemType: "/Lotus/Upgrades/Mods/Melee/WeaponMeleeDamageMod" },
{ ItemCount: 1, ItemType: "/Lotus/Upgrades/Mods/Rifle/WeaponFactionDamageCorpus" },
{ ItemCount: 1, ItemType: "/Lotus/Upgrades/Mods/Rifle/WeaponFactionDamageGrineer" },
{ ItemCount: 1, ItemType: "/Lotus/Upgrades/Mods/Rifle/WeaponDamageAmountMod" },
{ ItemCount: 1, ItemType: "/Lotus/Upgrades/Mods/Pistol/WeaponFireDamageMod" },
{ ItemCount: 1, ItemType: "/Lotus/Upgrades/Mods/Pistol/WeaponElectricityDamageMod" },
{ ItemCount: 1, ItemType: "/Lotus/Upgrades/Mods/Pistol/WeaponDamageAmountMod" },
{ ItemCount: 1, ItemType: "/Lotus/Types/Recipes/Weapons/BurstonRifleBlueprint" },
{ ItemCount: 1, ItemType: "/Lotus/Types/Items/MiscItems/Morphic" },
{ ItemCount: 400, ItemType: "/Lotus/Types/Items/MiscItems/PolymerBundle" },
{ ItemCount: 150, ItemType: "/Lotus/Types/Items/MiscItems/AlloyPlate" }
];
for (const equipment of defaultEquipment) {
await addItem(inventory, equipment.ItemType, equipment.ItemCount);
}
// Missing in Public Export
inventory.Horses.push({
ItemType: "/Lotus/Types/NeutralCreatures/ErsatzHorse/ErsatzHorsePowerSuit"
});
inventory.DataKnives.push({
ItemType: "/Lotus/Weapons/Tenno/HackingDevices/TnHackingDevice/TnHackingDeviceWeapon",
XP: 450000
});
inventory.Scoops.push({
ItemType: "/Lotus/Weapons/Tenno/Speedball/SpeedballWeaponTest"
});
inventory.DrifterMelee.push({
ItemType: "/Lotus/Types/Friendly/PlayerControllable/Weapons/DuviriDualSwords"
});
inventory.QuestKeys.push({
Completed: true,
ItemType: "/Lotus/Types/Keys/VorsPrize/VorsPrizeQuestKeyChain"
});
const completedMissions = ["SolNode27", "SolNode89", "SolNode63", "SolNode85", "SolNode15", "SolNode79"];
inventory.Missions.push(
...completedMissions.map(tag => ({
Completes: 1,
Tag: tag
}))
);
inventory.RegularCredits = 25000;
inventory.FusionPoints = 180;
}
await inventory.save(); await inventory.save();
} catch (error) { } catch (error) {
if (error instanceof Error) { throw new Error(`Error creating inventory: ${error instanceof Error ? error.message : "Unknown error"}`);
throw new Error(`error creating inventory" ${error.message}`);
}
throw new Error("error creating inventory that is not of instance Error");
} }
}; };

View File

@ -5,7 +5,6 @@ import { createShip } from "./shipService";
import { Document, Types } from "mongoose"; import { Document, Types } from "mongoose";
import { Loadout } from "@/src/models/inventoryModels/loadoutModel"; import { Loadout } from "@/src/models/inventoryModels/loadoutModel";
import { PersonalRooms } from "@/src/models/personalRoomsModel"; import { PersonalRooms } from "@/src/models/personalRoomsModel";
import new_personal_rooms from "@/static/fixed_responses/personalRooms.json";
import { Request } from "express"; import { Request } from "express";
import { config } from "@/src/services/configService"; import { config } from "@/src/services/configService";
@ -42,10 +41,21 @@ export const createLoadout = async (accountId: Types.ObjectId): Promise<Types.Ob
export const createPersonalRooms = async (accountId: Types.ObjectId, shipId: Types.ObjectId): Promise<void> => { export const createPersonalRooms = async (accountId: Types.ObjectId, shipId: Types.ObjectId): Promise<void> => {
const personalRooms = new PersonalRooms({ const personalRooms = new PersonalRooms({
...new_personal_rooms,
personalRoomsOwnerId: accountId, personalRoomsOwnerId: accountId,
activeShipId: shipId activeShipId: shipId
}); });
if (config.skipTutorial) {
// Vor's Prize rewards
const defaultFeatures = [
"/Lotus/Types/Items/ShipFeatureItems/EarthNavigationFeatureItem",
"/Lotus/Types/Items/ShipFeatureItems/MercuryNavigationFeatureItem",
"/Lotus/Types/Items/ShipFeatureItems/ArsenalFeatureItem",
"/Lotus/Types/Items/ShipFeatureItems/SocialMenuFeatureItem",
"/Lotus/Types/Items/ShipFeatureItems/FoundryFeatureItem",
"/Lotus/Types/Items/ShipFeatureItems/ModsFeatureItem"
];
personalRooms.Ship.Features.push(...defaultFeatures);
}
await personalRooms.save(); await personalRooms.save();
}; };

View File

@ -12,7 +12,7 @@ import { Model, Types } from "mongoose";
export interface IOrbiter { export interface IOrbiter {
Features: string[]; Features: string[];
Rooms: IRoom[]; Rooms: IRoom[];
ContentUrlSignature: string; ContentUrlSignature?: string;
BootLocation?: TBootLocation; BootLocation?: TBootLocation;
} }

View File

@ -28,7 +28,7 @@ export interface IShip {
ShipId: IOid; ShipId: IOid;
ShipInterior: IShipInterior; ShipInterior: IShipInterior;
Rooms: IRoom[]; Rooms: IRoom[];
ContentUrlSignature: string; ContentUrlSignature?: string;
BootLocation?: TBootLocation; BootLocation?: TBootLocation;
coderabbitai[bot] commented 2025-01-08 20:21:11 -08:00 (Migrated from github.com)
Review

💡 Codebase verification

Update mongoose schema to match optional ContentUrlSignature

The ContentUrlSignature field is marked as optional in both IShip and IOrbiter interfaces, but it's defined as required in the mongoose schema in src/models/personalRoomsModel.ts. This mismatch could lead to runtime issues.

  • Update the mongoose schema in src/models/personalRoomsModel.ts to make ContentUrlSignature optional by changing:
ContentUrlSignature: String,

to:

ContentUrlSignature: { type: String, required: false },
🔗 Analysis chain

Ensure optional ContentUrlSignature in IShip is handled correctly

With ContentUrlSignature now optional in the IShip interface, verify that all references to IShip.ContentUrlSignature account for the possibility of it being undefined, to avoid undefined access errors.

Run the following script to find potential issues:

🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Find all usages of `IShip.ContentUrlSignature` that may assume it is defined.

rg --type ts 'IShip.*ContentUrlSignature' --files-with-matches | xargs grep -n 'ContentUrlSignature[^?]'

Length of output: 106


Script:

#!/bin/bash
# Find all occurrences of ContentUrlSignature with context
echo "=== ContentUrlSignature usages with context ==="
rg -C 3 "ContentUrlSignature" --type ts

echo -e "\n=== Files containing both ship and ContentUrlSignature ==="
rg -l "ship|Ship" --type ts | xargs rg -l "ContentUrlSignature"

echo -e "\n=== Destructuring patterns ==="
ast-grep --pattern 'const { $$$, ContentUrlSignature, $$$ } = $_'

Length of output: 1636


Script:

#!/bin/bash
# Find actual usage in business logic files
echo "=== ContentUrlSignature usage in business logic ==="
rg -g '!src/types/*' -g '!src/models/*' -C 3 "ContentUrlSignature" --type ts

echo -e "\n=== Check for potential direct access patterns ==="
rg -g '!src/types/*' -g '!src/models/*' "ship\.ContentUrlSignature|orbiter\.ContentUrlSignature" --type ts

Length of output: 415

_:bulb: Codebase verification_ **Update mongoose schema to match optional `ContentUrlSignature`** The `ContentUrlSignature` field is marked as optional in both `IShip` and `IOrbiter` interfaces, but it's defined as required in the mongoose schema in `src/models/personalRoomsModel.ts`. This mismatch could lead to runtime issues. * Update the mongoose schema in `src/models/personalRoomsModel.ts` to make `ContentUrlSignature` optional by changing: ```typescript ContentUrlSignature: String, ``` to: ```typescript ContentUrlSignature: { type: String, required: false }, ``` <details> <summary>🔗 Analysis chain</summary> **Ensure optional `ContentUrlSignature` in `IShip` is handled correctly** With `ContentUrlSignature` now optional in the `IShip` interface, verify that all references to `IShip.ContentUrlSignature` account for the possibility of it being `undefined`, to avoid undefined access errors. Run the following script to find potential issues: </details> <details> <summary>🏁 Scripts executed</summary> The following scripts were executed for the analysis: Script: ```shell #!/bin/bash # Description: Find all usages of `IShip.ContentUrlSignature` that may assume it is defined. rg --type ts 'IShip.*ContentUrlSignature' --files-with-matches | xargs grep -n 'ContentUrlSignature[^?]' ``` Length of output: 106 --- Script: ```shell #!/bin/bash # Find all occurrences of ContentUrlSignature with context echo "=== ContentUrlSignature usages with context ===" rg -C 3 "ContentUrlSignature" --type ts echo -e "\n=== Files containing both ship and ContentUrlSignature ===" rg -l "ship|Ship" --type ts | xargs rg -l "ContentUrlSignature" echo -e "\n=== Destructuring patterns ===" ast-grep --pattern 'const { $$$, ContentUrlSignature, $$$ } = $_' ``` Length of output: 1636 --- Script: ```shell #!/bin/bash # Find actual usage in business logic files echo "=== ContentUrlSignature usage in business logic ===" rg -g '!src/types/*' -g '!src/models/*' -C 3 "ContentUrlSignature" --type ts echo -e "\n=== Check for potential direct access patterns ===" rg -g '!src/types/*' -g '!src/models/*' "ship\.ContentUrlSignature|orbiter\.ContentUrlSignature" --type ts ``` Length of output: 415 </details> <!-- This is an auto-generated comment by CodeRabbit -->
} }
@ -58,7 +58,7 @@ export interface IPlanters {
} }
export interface IGardening { export interface IGardening {
Planters: IPlanters[]; Planters?: IPlanters[];
} }
export interface IApartment { export interface IApartment {
Gardening: IGardening; Gardening: IGardening;

View File

@ -1,23 +1,42 @@
{ {
"Inbox": [ "Inbox": [
{ {
"sndr": "/Lotus/Language/Bosses/Ordis", "sub": "/Lotus/Language/Inbox/DarvoWeaponCraftingMessageBTitle",
"msg": "/Lotus/Language/Inbox/ThankYouFreeMultipleContent", "sndr": "/Lotus/Language/Bosses/Darvo",
"msg": "/Lotus/Language/Inbox/DarvoWeaponCraftingMessageBDesc",
"icon": "/Lotus/Interface/Icons/Npcs/Darvo.png",
"countedAtt": [ "countedAtt": [
{ {
"ItemType": "/Lotus/Upgrades/Skins/Promo/Twitch/OgrisTwitchSkin", "ItemCount": 1,
"ItemCount": 1 "ItemType": "/Lotus/Types/Recipes/Weapons/BurstonRifleBlueprint"
}, },
{ {
"ItemType": "/Lotus/Weapons/ClanTech/Chemical/RocketLauncher", "ItemCount": 1,
"ItemCount": 1 "ItemType": "/Lotus/Types/Items/MiscItems/Morphic"
},
{
"ItemCount": 400,
"ItemType": "/Lotus/Types/Items/MiscItems/PolymerBundle"
},
{
"ItemCount": 150,
"ItemType": "/Lotus/Types/Items/MiscItems/AlloyPlate"
} }
], ],
"sub": "/Lotus/Language/Inbox/ThankYouFreeMultipleSubject",
"icon": "/Lotus/Interface/Icons/Npcs/Ordis.png",
"highPriority": true, "highPriority": true,
"messageId": "removed", "messageId": "66d651800000000000000000",
"date": { "$date": { "$numberLong": "removed" } }, "date": { "$date": { "$numberLong": "1725321600000" } },
"r": true
},
{
"sub": "/Lotus/Language/G1Quests/Beginner_Growth_Inbox_Title",
"sndr": "/Lotus/Language/Menu/Mailbox_WarframeSender",
"msg": "/Lotus/Language/G1Quests/Beginner_Growth_Inbox_Desc",
"icon": "/Lotus/Interface/Icons/Npcs/Lotus_d.png",
"transmission": "/Lotus/Sounds/Dialog/VorsPrize/DLisetPostAssassinate110Lotus",
"highPriority": true,
"messageId": "66d651810000000000000000",
"date": { "$date": { "$numberLong": "1725321601000" } },
"r": true "r": true
} }
] ]

View File

@ -1,131 +0,0 @@
{
"SubscribedToEmails": 0,
"Created": { "$date": { "$numberLong": "removed" } },
"SubscribedToEmailsPersonalized": 0,
"RewardSeed": -123123123123123,
"CrewMemberBin": { "Slots": 3 },
"CrewShipSalvageBin": { "Slots": 8 },
"DrifterMelee": [
{
"ItemType": "/Lotus/Types/Friendly/PlayerControllable/Weapons/DuviriDualSwords",
"ItemId": { "$oid": "removed" }
}
],
"FusionPoints": 0,
"MechBin": { "Slots": 4 },
"OperatorAmpBin": { "Slots": 8 },
"PveBonusLoadoutBin": { "Slots": 0 },
"PvpBonusLoadoutBin": { "Slots": 0 },
"RandomModBin": { "Slots": 15 },
"RegularCredits": 0,
"SentinelBin": { "Slots": 10 },
"SpaceSuitBin": { "Slots": 4 },
"SpaceWeaponBin": { "Slots": 4 },
"SuitBin": { "Slots": 2 },
"WeaponBin": { "Slots": 8 },
"LastInventorySync": { "$oid": "removed" },
"NextRefill": { "$date": { "$numberLong": "removed" } },
"ActiveLandscapeTraps": [],
"ChallengeProgress": [],
"CrewMembers": [],
"CrewShips": [],
"CrewShipHarnesses": [],
"CrewShipSalvagedWeapons": [],
"CrewShipSalvagedWeaponSkins": [],
"CrewShipWeapons": [],
"CrewShipWeaponSkins": [],
"DataKnives": [],
"DrifterGuns": [],
"Drones": [],
"Horses": [],
"Hoverboards": [],
"KubrowPets": [],
"KubrowPetEggs": [],
"KubrowPetPrints": [],
"LongGuns": [],
"MechSuits": [],
"Melee": [],
"MoaPets": [],
"OperatorAmps": [],
"OperatorLoadOuts": [],
"AdultOperatorLoadOuts": [],
"KahlLoadOuts": [],
"PendingRecipes": [],
"PersonalGoalProgress": [],
"PersonalTechProjects": [],
"Pistols": [],
"QualifyingInvasions": [],
"RepVotes": [],
"Scoops": [],
"Sentinels": [],
"SentinelWeapons": [],
"Ships": [{ "ItemType": "/Lotus/Types/Items/Ships/DefaultShip", "ItemId": { "$oid": "123123" } }],
"SpaceGuns": [],
"SpaceMelee": [],
"SpaceSuits": [],
"SpecialItems": [],
"StepSequencers": [],
"Suits": [],
"Upgrades": [],
"WeaponSkins": [],
"Boosters": [],
"Consumables": [],
"EmailItems": [],
"FlavourItems": [],
"FocusUpgrades": [],
"FusionTreasures": [],
"LeagueTickets": [],
"LevelKeys": [],
"LoreFragmentScans": [],
"MiscItems": [],
"PendingSpectreLoadouts": [],
"Quests": [],
"QuestKeys": [],
"RawUpgrades": [],
"Recipes": [],
"Robotics": [],
"ShipDecorations": [],
"SpectreLoadouts": [],
"XPInfo": [],
"CrewShipAmmo": [],
"CrewShipRawSalvage": [],
"EvolutionProgress": [],
"Missions": [],
"TauntHistory": [],
"CompletedSyndicates": [],
"UsedDailyDeals": [],
"DailyAffiliation": 16000,
"DailyAffiliationPvp": 16000,
"DailyAffiliationLibrary": 16000,
"DailyAffiliationCetus": 16000,
"DailyAffiliationQuills": 16000,
"DailyAffiliationSolaris": 16000,
"DailyAffiliationVentkids": 16000,
"DailyAffiliationVox": 16000,
"DailyAffiliationEntrati": 16000,
"DailyAffiliationNecraloid": 16000,
"DailyAffiliationZariman": 16000,
"DailyAffiliationKahl": 16000,
"DailyFocus": 250000,
"GiftsRemaining": 8,
"LibraryAvailableDailyTaskInfo": {
"EnemyTypes": ["/Lotus/Types/Enemies/Orokin/OrokinBladeSawmanAvatar"],
"EnemyLocTag": "/Lotus/Language/Game/OrokinBladeSawman",
"EnemyIcon": "/Lotus/Interface/Icons/Npcs/Orokin/OrokinBladeSawman.png",
"ScansRequired": 4,
"RewardStoreItem": "/Lotus/StoreItems/Upgrades/Mods/FusionBundles/UncommonFusionBundle",
"RewardQuantity": 10,
"RewardStanding": 10000
},
"DuviriInfo": { "Seed": 123123123123123123, "NumCompletions": 0 },
"TradesRemaining": 0,
"HasContributedToDojo": false,
"HasResetAccount": false,
"PendingCoupon": {
"Expiry": { "$date": { "$numberLong": "0" } },
"Discount": 0
},
"PremiumCreditsFree": 0,
"ReceivedStartingGear": true,
"StoryModeChoice": "WARFRAME"
}

View File

@ -1,122 +0,0 @@
{
"SubscribedToEmails": 0,
"Created": { "$date": { "$numberLong": "1685829131" } },
"SubscribedToEmailsPersonalized": 0,
"RewardSeed": -5604904486637265640,
"CrewMemberBin": { "Slots": 3 },
"CrewShipSalvageBin": { "Slots": 8 },
"DrifterMelee": [{ "ItemType": "/Lotus/Types/Friendly/PlayerControllable/Weapons/DuviriDualSwords", "ItemId": { "$oid": "647bb619e15fa43f0ee4b1b1" } }],
"FusionPoints": 0,
"MechBin": { "Slots": 4 },
"OperatorAmpBin": { "Slots": 8 },
"PveBonusLoadoutBin": { "Slots": 0 },
"PvpBonusLoadoutBin": { "Slots": 0 },
"RandomModBin": { "Slots": 15 },
"RegularCredits": 0,
"SentinelBin": { "Slots": 10 },
"SpaceSuitBin": { "Slots": 4 },
"SpaceWeaponBin": { "Slots": 4 },
"SuitBin": { "Slots": 2 },
"WeaponBin": { "Slots": 8 },
"LastInventorySync": { "$oid": "647bb5d79f963c9d24668257" },
"NextRefill": { "$date": { "$numberLong": "1685829131" } },
"ActiveLandscapeTraps": [],
"ChallengeProgress": [],
"CrewMembers": [],
"CrewShips": [],
"CrewShipHarnesses": [],
"CrewShipSalvagedWeapons": [],
"CrewShipSalvagedWeaponSkins": [],
"CrewShipWeapons": [],
"CrewShipWeaponSkins": [],
"DataKnives": [],
"DrifterGuns": [],
"Drones": [],
"Horses": [],
"Hoverboards": [],
"KubrowPets": [],
"KubrowPetEggs": [],
"KubrowPetPrints": [],
"LongGuns": [],
"MechSuits": [],
"Melee": [],
"MoaPets": [],
"OperatorAmps": [],
"OperatorLoadOuts": [],
"AdultOperatorLoadOuts": [],
"KahlLoadOuts": [],
"PendingRecipes": [],
"PersonalGoalProgress": [],
"PersonalTechProjects": [],
"Pistols": [],
"QualifyingInvasions": [],
"RepVotes": [],
"Scoops": [],
"Sentinels": [],
"SentinelWeapons": [],
"Ships": [],
"SpaceGuns": [],
"SpaceMelee": [],
"SpaceSuits": [],
"SpecialItems": [],
"StepSequencers": [],
"Suits": [],
"Upgrades": [],
"WeaponSkins": [],
"Boosters": [],
"Consumables": [],
"EmailItems": [],
"FlavourItems": [],
"FocusUpgrades": [],
"FusionTreasures": [],
"LeagueTickets": [],
"LevelKeys": [],
"LoreFragmentScans": [],
"MiscItems": [],
"PendingSpectreLoadouts": [],
"Quests": [],
"QuestKeys": [],
"RawUpgrades": [],
"Recipes": [],
"Robotics": [],
"ShipDecorations": [],
"SpectreLoadouts": [],
"XPInfo": [],
"CrewShipAmmo": [],
"CrewShipRawSalvage": [],
"EvolutionProgress": [],
"Missions": [],
"TauntHistory": [],
"CompletedSyndicates": [],
"UsedDailyDeals": [],
"DailyAffiliation": 16000,
"DailyAffiliationPvp": 16000,
"DailyAffiliationLibrary": 16000,
"DailyAffiliationCetus": 16000,
"DailyAffiliationQuills": 16000,
"DailyAffiliationSolaris": 16000,
"DailyAffiliationVentkids": 16000,
"DailyAffiliationVox": 16000,
"DailyAffiliationEntrati": 16000,
"DailyAffiliationNecraloid": 16000,
"DailyAffiliationZariman": 16000,
"DailyAffiliationKahl": 16000,
"DailyAffiliationCavia": 16000,
"DailyFocus": 250000,
"GiftsRemaining": 8,
"LibraryAvailableDailyTaskInfo": {
"EnemyTypes": ["/Lotus/Types/Enemies/Orokin/OrokinBladeSawmanAvatar"],
"EnemyLocTag": "/Lotus/Language/Game/OrokinBladeSawman",
"EnemyIcon": "/Lotus/Interface/Icons/Npcs/Orokin/OrokinBladeSawman.png",
"ScansRequired": 4,
"RewardStoreItem": "/Lotus/StoreItems/Upgrades/Mods/FusionBundles/UncommonFusionBundle",
"RewardQuantity": 10,
"RewardStanding": 10000
},
"DuviriInfo": { "Seed": 5898912197983600352, "NumCompletions": 0 },
"TradesRemaining": 0,
"HasContributedToDojo": false,
"HasResetAccount": false,
"PendingCoupon": { "Expiry": { "$date": { "$numberLong": "0" } }, "Discount": 0 },
"PremiumCreditsFree": 0
}

View File

@ -1,32 +0,0 @@
{
"Ship": {
"Features": [
"/Lotus/Types/Items/ShipFeatureItems/EarthNavigationFeatureItem",
"/Lotus/Types/Items/ShipFeatureItems/ArsenalFeatureItem",
"/Lotus/Types/Items/ShipFeatureItems/SocialMenuFeatureItem",
"/Lotus/Types/Items/ShipFeatureItems/ModsFeatureItem",
"/Lotus/Types/Items/ShipFeatureItems/FoundryFeatureItem",
"/Lotus/Types/Items/ShipFeatureItems/MercuryNavigationFeatureItem"
],
"Rooms": [
{ "Name": "AlchemyRoom", "MaxCapacity": 1600 },
{ "Name": "BridgeRoom", "MaxCapacity": 1600 },
{ "Name": "LisetRoom", "MaxCapacity": 1000 },
{ "Name": "OperatorChamberRoom", "MaxCapacity": 1600 },
{ "Name": "OutsideRoom", "MaxCapacity": 1600 },
{ "Name": "PersonalQuartersRoom", "MaxCapacity": 1600 }
],
"ContentUrlSignature": "removed"
},
"Apartment": {
"Rooms": [
{ "Name": "ElevatorLanding", "MaxCapacity": 1600 },
{ "Name": "ApartmentRoomA", "MaxCapacity": 1000 },
{ "Name": "ApartmentRoomB", "MaxCapacity": 1600 },
{ "Name": "ApartmentRoomC", "MaxCapacity": 1600 },
{ "Name": "DuviriHallway", "MaxCapacity": 1600 }
],
"FavouriteLoadouts": [],
"Gardening": {}
}
}

View File

@ -1,140 +0,0 @@
{
"SubscribedToEmails": 0,
"SubscribedToEmailsPersonalized": 0,
"RewardSeed": -5604904486637265640,
"CrewMemberBin": { "Slots": 3 },
"CrewShipSalvageBin": { "Slots": 8 },
"DrifterMelee": [{ "ItemType": "/Lotus/Types/Friendly/PlayerControllable/Weapons/DuviriDualSwords", "ItemId": { "$oid": "647bd27cf856530b4f3bf343" } }],
"MechBin": { "Slots": 4 },
"OperatorAmpBin": { "Slots": 8 },
"PveBonusLoadoutBin": { "Slots": 0 },
"PvpBonusLoadoutBin": { "Slots": 0 },
"RandomModBin": { "Slots": 15 },
"SentinelBin": { "Slots": 10 },
"SpaceSuitBin": { "Slots": 4 },
"SpaceWeaponBin": { "Slots": 4 },
"SuitBin": { "Slots": 1 },
"WeaponBin": { "Slots": 5 },
"DuviriInfo": { "Seed": 5898912197983600352, "NumCompletions": 0 },
"Recipes": [{ "ItemCount": 1, "ItemType": "/Lotus/Types/Recipes/Weapons/BoltonfaBlueprint" }],
"SeasonChallengeHistory": [
{ "challenge": "SeasonDailySolveCiphers", "id": "001000220000000000000308" },
{ "challenge": "SeasonDailyVisitFeaturedDojo", "id": "001000230000000000000316" },
{ "challenge": "SeasonDailyKillEnemiesWithRadiation", "id": "001000230000000000000317" },
{ "challenge": "SeasonWeeklyCompleteSortie", "id": "001000230000000000000309" },
{ "challenge": "SeasonWeeklyVenusBounties", "id": "001000230000000000000310" },
{ "challenge": "SeasonWeeklyZarimanBountyHunter", "id": "001000230000000000000311" },
{ "challenge": "SeasonWeeklyCatchRarePlainsFish", "id": "001000230000000000000312" },
{ "challenge": "SeasonWeeklyKillArchgunEnemies", "id": "001000230000000000000313" },
{ "challenge": "SeasonWeeklyHardKillSilverGroveSpecters", "id": "001000230000000000000314" },
{ "challenge": "SeasonWeeklyHardKillRopalolyst", "id": "001000230000000000000315" }
],
"StoryModeChoice": "WARFRAME",
"ChallengeProgress": [{ "Progress": 2, "Name": "EMGetKills" }],
"ChallengesFixVersion": 6,
"ActiveQuest": "/Lotus/Types/Keys/VorsPrize/VorsPrizeQuestKeyChain",
"Consumables": [{ "ItemCount": 1, "ItemType": "/Lotus/Types/Restoratives/LisetAutoHack" }],
"DataKnives": [{ "ItemType": "/Lotus/Weapons/Tenno/HackingDevices/TnHackingDevice/TnHackingDeviceWeapon", "XP": 450000, "ItemId": { "$oid": "647bd274f22fc794a2cd3d33" } }],
"FlavourItems": [
{ "ItemType": "/Lotus/Types/StoreItems/AvatarImages/AvatarImageItem1" },
{ "ItemType": "/Lotus/Types/StoreItems/AvatarImages/AvatarImageItem2" },
{ "ItemType": "/Lotus/Types/StoreItems/AvatarImages/AvatarImageItem3" },
{ "ItemType": "/Lotus/Types/StoreItems/AvatarImages/AvatarImageItem4" }
],
"LongGuns": [{ "ItemType": "/Lotus/Weapons/MK1Series/MK1Paris", "XP": 0, "Configs": [{}, {}, {}], "ItemId": { "$oid": "647bd27cf856530b4f3bf343" } }],
"Melee": [{ "ItemType": "/Lotus/Weapons/Tenno/Melee/LongSword/LongSword", "XP": 0, "Configs": [{}, {}, {}], "ItemId": { "$oid": "647bd27cf856530b4f3bf343" } }],
"Pistols": [{ "ItemType": "/Lotus/Weapons/MK1Series/MK1Kunai", "XP": 0, "Configs": [{}, {}, {}], "ItemId": { "$oid": "647bd27cf856530b4f3bf343" } }],
"PlayedParkourTutorial": true,
"QuestKeys": [{ "ItemType": "/Lotus/Types/Keys/VorsPrize/VorsPrizeQuestKeyChain" }],
"RawUpgrades": [{ "ItemCount": 1, "LastAdded": { "$oid": "6450f9bfe0714a4d6703f05f" }, "ItemType": "/Lotus/Upgrades/Mods/Warframe/AvatarShieldMaxMod" }],
"ReceivedStartingGear": true,
"Scoops": [{ "ItemType": "/Lotus/Weapons/Tenno/Speedball/SpeedballWeaponTest", "ItemId": { "$oid": "647bd27cf856530b4f3bf343" } }],
"Suits": [{ "ItemType": "/Lotus/Powersuits/Volt/Volt", "XP": 0, "Configs": [{}, {}, {}], "UpgradeVer": 101, "ItemId": { "$oid": "647bd27cf856530b4f3bf343" } }],
"TrainingRetriesLeft": 0,
"WeaponSkins": [{ "ItemType": "/Lotus/Upgrades/Skins/Volt/VoltHelmet", "ItemId": { "$oid": "647bd27cf856530b4f3bf343" } }],
"LastInventorySync": { "$oid": "647bd27cf856530b4f3bf343" },
"NextRefill": { "$date": { "$numberLong": "1685829131" } },
"ActiveLandscapeTraps": [],
"CrewMembers": [],
"CrewShips": [],
"CrewShipHarnesses": [],
"CrewShipSalvagedWeapons": [],
"CrewShipSalvagedWeaponSkins": [],
"CrewShipWeapons": [],
"CrewShipWeaponSkins": [],
"DrifterGuns": [],
"Drones": [],
"Horses": [
{
"ItemType": "/Lotus/Types/NeutralCreatures/ErsatzHorse/ErsatzHorsePowerSuit",
"Configs": [
{
"Skins": ["", "", "/Lotus/Upgrades/Skins/Horse/ErsatzHorseTailDefault"]
},
{
"Skins": ["", "", "/Lotus/Upgrades/Skins/Horse/ErsatzHorseTailDefault"]
},
{
"Skins": ["", "", "/Lotus/Upgrades/Skins/Horse/ErsatzHorseTailDefault"]
}
],
"UpgradeVer": 101,
"ItemId": { "$oid": "647bd27cf856530b4f3bf343" }
}
],
"Hoverboards": [],
"KubrowPets": [],
"KubrowPetEggs": [],
"KubrowPetPrints": [],
"MechSuits": [],
"MoaPets": [],
"OperatorAmps": [],
"OperatorLoadOuts": [],
"AdultOperatorLoadOuts": [],
"KahlLoadOuts": [],
"PendingRecipes": [],
"TrainingDate": 0,
"PersonalGoalProgress": [],
"PersonalTechProjects": [],
"QualifyingInvasions": [],
"RepVotes": [],
"Sentinels": [],
"SentinelWeapons": [],
"SpaceGuns": [],
"SpaceMelee": [],
"SpaceSuits": [],
"SpecialItems": [],
"StepSequencers": [],
"Upgrades": [],
"Boosters": [],
"EmailItems": [],
"FocusUpgrades": [],
"FusionTreasures": [],
"LeagueTickets": [],
"LevelKeys": [],
"LoreFragmentScans": [],
"MiscItems": [],
"PendingSpectreLoadouts": [],
"Quests": [],
"Robotics": [],
"ShipDecorations": [],
"SpectreLoadouts": [],
"XPInfo": [],
"CrewShipAmmo": [],
"CrewShipRawSalvage": [],
"EvolutionProgress": [],
"Missions": [],
"TauntHistory": [],
"CompletedSyndicates": [],
"UsedDailyDeals": [],
"LibraryAvailableDailyTaskInfo": {
"EnemyTypes": ["/Lotus/Types/Enemies/Orokin/OrokinBladeSawmanAvatar"],
"EnemyLocTag": "/Lotus/Language/Game/OrokinBladeSawman",
"EnemyIcon": "/Lotus/Interface/Icons/Npcs/Orokin/OrokinBladeSawman.png",
"ScansRequired": 4,
"RewardStoreItem": "/Lotus/StoreItems/Upgrades/Mods/FusionBundles/UncommonFusionBundle",
"RewardQuantity": 10,
"RewardStanding": 10000
},
"PendingCoupon": { "Expiry": { "$date": { "$numberLong": "0" } }, "Discount": 0 }
}