chore: fix ISlots
This commit is contained in:
		
							parent
							
								
									28a36052d9
								
							
						
					
					
						commit
						5ce2e26683
					
				@ -668,9 +668,8 @@ export const updateSlots = (
 | 
				
			|||||||
    extraAmount: number
 | 
					    extraAmount: number
 | 
				
			||||||
): void => {
 | 
					): void => {
 | 
				
			||||||
    inventory[slotName].Slots += slotAmount;
 | 
					    inventory[slotName].Slots += slotAmount;
 | 
				
			||||||
    if (inventory[slotName].Extra === undefined) {
 | 
					    if (extraAmount != 0) {
 | 
				
			||||||
        inventory[slotName].Extra = extraAmount;
 | 
					        inventory[slotName].Extra ??= 0;
 | 
				
			||||||
    } else {
 | 
					 | 
				
			||||||
        inventory[slotName].Extra += extraAmount;
 | 
					        inventory[slotName].Extra += extraAmount;
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
};
 | 
					};
 | 
				
			||||||
 | 
				
			|||||||
@ -435,7 +435,7 @@ export enum InventorySlot {
 | 
				
			|||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
export interface ISlots {
 | 
					export interface ISlots {
 | 
				
			||||||
    Extra: number; // can be undefined, but not if used via mongoose
 | 
					    Extra?: number;
 | 
				
			||||||
    Slots: number;
 | 
					    Slots: number;
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user