chore: remove empty ModularParts arrays from equipment
	
		
			
	
		
	
	
		
	
		
			All checks were successful
		
		
	
	
		
			
				
	
				Build / build (pull_request) Successful in 1m17s
				
			
		
		
	
	
				
					
				
			
		
			All checks were successful
		
		
	
	Build / build (pull_request) Successful in 1m17s
				
			This commit is contained in:
		
							parent
							
								
									b21bca7a6d
								
							
						
					
					
						commit
						af458a512a
					
				@ -25,7 +25,8 @@ import {
 | 
			
		||||
    INemesisWeaponTargetFingerprint,
 | 
			
		||||
    INemesisPetTargetFingerprint,
 | 
			
		||||
    IDialogueDatabase,
 | 
			
		||||
    IKubrowPetPrintClient
 | 
			
		||||
    IKubrowPetPrintClient,
 | 
			
		||||
    equipmentKeys
 | 
			
		||||
} from "@/src/types/inventoryTypes/inventoryTypes";
 | 
			
		||||
import { IGenericUpdate, IUpdateNodeIntrosResponse } from "@/src/types/genericUpdate";
 | 
			
		||||
import { IKeyChainRequest, IMissionInventoryUpdateRequest } from "@/src/types/requestTypes";
 | 
			
		||||
@ -2117,6 +2118,21 @@ export const cleanupInventory = (inventory: TInventoryDatabaseDocument): void =>
 | 
			
		||||
            inventory.LotusCustomization.syancol = {};
 | 
			
		||||
        }
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    {
 | 
			
		||||
        let numFixed = 0;
 | 
			
		||||
        for (const equipmentKey of equipmentKeys) {
 | 
			
		||||
            for (const item of inventory[equipmentKey]) {
 | 
			
		||||
                if (item.ModularParts?.length === 0) {
 | 
			
		||||
                    item.ModularParts = undefined;
 | 
			
		||||
                    ++numFixed;
 | 
			
		||||
                }
 | 
			
		||||
            }
 | 
			
		||||
        }
 | 
			
		||||
        if (numFixed != 0) {
 | 
			
		||||
            logger.debug(`removed ModularParts from ${numFixed} non-modular items`);
 | 
			
		||||
        }
 | 
			
		||||
    }
 | 
			
		||||
};
 | 
			
		||||
 | 
			
		||||
export const getDialogue = (inventory: TInventoryDatabaseDocument, dialogueName: string): IDialogueDatabase => {
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user