feat(inventory&loadouts): motorcyles #580

Merged
orzMaster merged 1 commits from main into main 2024-12-15 20:25:28 -08:00
4 changed files with 7 additions and 1 deletions

View File

@ -867,6 +867,8 @@ const inventorySchema = new Schema<IInventoryDatabase, InventoryDocumentProps>(
//https://warframe.fandom.com/wiki/Parazon
DataKnives: [EquipmentSchema],
Motorcycles: [EquipmentSchema],
coderabbitai[bot] commented 2024-12-15 20:06:15 -08:00 (Migrated from github.com)
Review

💡 Codebase verification

The Motorcycles property needs to be added to interfaces and equipment keys

The verification reveals that the Motorcycles property is missing from:

  1. The IInventoryResponse interface
  2. The equipmentKeys constant array

Required changes:

  • Add Motorcycles: IEquipmentDatabase[] to the IInventoryResponse interface
  • Add "Motorcycles" to the equipmentKeys array to maintain type safety
🔗 Analysis chain

LGTM! Schema addition follows established patterns.

The Motorcycles array using EquipmentSchema is consistent with other equipment types in the inventory system.

Let's verify the interfaces are properly updated:

🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Check if IInventoryDatabase and IInventoryResponse interfaces include the Motorcycles property
rg -A 2 "interface (IInventoryDatabase|IInventoryResponse)" 

Length of output: 897


Script:

#!/bin/bash
# Let's check the complete interface definitions to verify if Motorcycles is included
rg -A 20 "interface IInventoryResponse" src/types/inventoryTypes/inventoryTypes.ts

Length of output: 1215


Script:

#!/bin/bash
# Let's see more of the IInventoryResponse interface to find Motorcycles property
rg -A 40 "interface IInventoryResponse" src/types/inventoryTypes/inventoryTypes.ts

Length of output: 2209


Script:

#!/bin/bash
# Let's check both the equipmentKeys constant and more of the IInventoryResponse interface
rg -A 80 "interface IInventoryResponse" src/types/inventoryTypes/inventoryTypes.ts

Length of output: 4171

_:bulb: Codebase verification_ **The Motorcycles property needs to be added to interfaces and equipment keys** The verification reveals that the Motorcycles property is missing from: 1. The `IInventoryResponse` interface 2. The `equipmentKeys` constant array Required changes: - Add `Motorcycles: IEquipmentDatabase[]` to the `IInventoryResponse` interface - Add `"Motorcycles"` to the `equipmentKeys` array to maintain type safety <details> <summary>🔗 Analysis chain</summary> **LGTM! Schema addition follows established patterns.** The Motorcycles array using EquipmentSchema is consistent with other equipment types in the inventory system. Let's verify the interfaces are properly updated: </details> <details> <summary>🏁 Scripts executed</summary> The following scripts were executed for the analysis: Script: ```shell #!/bin/bash # Check if IInventoryDatabase and IInventoryResponse interfaces include the Motorcycles property rg -A 2 "interface (IInventoryDatabase|IInventoryResponse)" ``` Length of output: 897 --- Script: ```shell #!/bin/bash # Let's check the complete interface definitions to verify if Motorcycles is included rg -A 20 "interface IInventoryResponse" src/types/inventoryTypes/inventoryTypes.ts ``` Length of output: 1215 --- Script: ```shell #!/bin/bash # Let's see more of the IInventoryResponse interface to find Motorcycles property rg -A 40 "interface IInventoryResponse" src/types/inventoryTypes/inventoryTypes.ts ``` Length of output: 2209 --- Script: ```shell #!/bin/bash # Let's check both the equipmentKeys constant and more of the IInventoryResponse interface rg -A 80 "interface IInventoryResponse" src/types/inventoryTypes/inventoryTypes.ts ``` Length of output: 4171 </details> <!-- This is an auto-generated comment by CodeRabbit -->
//CorpusLich or GrineerLich
NemesisAbandonedRewards: [String],
//CorpusLich\KuvaLich
@ -974,6 +976,7 @@ type InventoryDocumentProps = {
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>;

View File

@ -144,7 +144,8 @@ export const handleInventoryItemConfigChange = async (
case "Hoverboards":
case "MechSuits":
case "CrewShipHarnesses":
case "CrewShips": {
case "CrewShips":
case "Motorcycles": {
logger.debug(`general Item config saved of type ${equipmentName}`, { config: equipment });
const itemEntries = equipment as IItemEntry;

View File

@ -245,6 +245,7 @@ export interface IInventoryResponse {
EquippedInstrument: string;
InvasionChainProgress: IInvasionChainProgress[];
DataKnives: IEquipmentDatabase[];
Motorcycles: IEquipmentDatabase[];
NemesisHistory: INemesisHistory[];
LastNemesisAllySpawnTime?: IMongoDate;
Settings: ISettings;

View File

@ -21,6 +21,7 @@ export interface ISaveLoadoutRequest {
MoaPets: IItemEntry;
Hoverboards: IItemEntry;
DataKnives: IItemEntry;
Motorcycles: IItemEntry;
MechSuits: IItemEntry;
CrewShipHarnesses: IItemEntry;
Horses: IItemEntry;