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