loadouts workinhg
This commit is contained in:
		
							parent
							
								
									f271898ced
								
							
						
					
					
						commit
						36e76a9a84
					
				@ -26,17 +26,23 @@ const EquipmentSelectionSchema = new Schema<IEquipmentSelection>(
 | 
				
			|||||||
    }
 | 
					    }
 | 
				
			||||||
);
 | 
					);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
const loadoutConfigSchema = new Schema<ILoadoutConfigDatabase>({
 | 
					const loadoutConfigSchema = new Schema<ILoadoutConfigDatabase>(
 | 
				
			||||||
 | 
					    {
 | 
				
			||||||
        PresetIcon: String,
 | 
					        PresetIcon: String,
 | 
				
			||||||
        Favorite: Boolean,
 | 
					        Favorite: Boolean,
 | 
				
			||||||
 | 
					        n: String,
 | 
				
			||||||
        s: EquipmentSelectionSchema,
 | 
					        s: EquipmentSelectionSchema,
 | 
				
			||||||
        p: EquipmentSelectionSchema,
 | 
					        p: EquipmentSelectionSchema,
 | 
				
			||||||
        l: EquipmentSelectionSchema,
 | 
					        l: EquipmentSelectionSchema,
 | 
				
			||||||
        m: EquipmentSelectionSchema
 | 
					        m: EquipmentSelectionSchema
 | 
				
			||||||
});
 | 
					    },
 | 
				
			||||||
 | 
					    {
 | 
				
			||||||
 | 
					        id: false
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
loadoutConfigSchema.virtual("ItemId").get(function (): string {
 | 
					loadoutConfigSchema.virtual("ItemId").get(function () {
 | 
				
			||||||
    return this._id.toString();
 | 
					    return { $oid: this._id.toString() } satisfies IOid;
 | 
				
			||||||
});
 | 
					});
 | 
				
			||||||
 | 
					
 | 
				
			||||||
loadoutConfigSchema.set("toJSON", {
 | 
					loadoutConfigSchema.set("toJSON", {
 | 
				
			||||||
 | 
				
			|||||||
@ -63,6 +63,7 @@ export interface ILoadoutKey {
 | 
				
			|||||||
// for request and response from and to client
 | 
					// for request and response from and to client
 | 
				
			||||||
export interface ILoadoutConfigClient {
 | 
					export interface ILoadoutConfigClient {
 | 
				
			||||||
    ItemId: IOid;
 | 
					    ItemId: IOid;
 | 
				
			||||||
 | 
					    n: string;
 | 
				
			||||||
    PresetIcon: string;
 | 
					    PresetIcon: string;
 | 
				
			||||||
    Favorite: boolean;
 | 
					    Favorite: boolean;
 | 
				
			||||||
    s: IEquipmentSelection;
 | 
					    s: IEquipmentSelection;
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user