forked from OpenWF/SpaceNinjaServer
		
	fix: unable to spawn all enemies in simulacrum despite unlockAllScans (#642)
This commit is contained in:
		
							parent
							
								
									494f219db3
								
							
						
					
					
						commit
						3ae2338c13
					
				@ -4,6 +4,7 @@ import { Inventory } from "@/src/models/inventoryModels/inventoryModel";
 | 
				
			|||||||
import { IStatsView } from "@/src/types/statTypes";
 | 
					import { IStatsView } from "@/src/types/statTypes";
 | 
				
			||||||
import { config } from "@/src/services/configService";
 | 
					import { config } from "@/src/services/configService";
 | 
				
			||||||
import allScans from "@/static/fixed_responses/allScans.json";
 | 
					import allScans from "@/static/fixed_responses/allScans.json";
 | 
				
			||||||
 | 
					import { ExportEnemies } from "warframe-public-export-plus";
 | 
				
			||||||
 | 
					
 | 
				
			||||||
const viewController: RequestHandler = async (req, res) => {
 | 
					const viewController: RequestHandler = async (req, res) => {
 | 
				
			||||||
    const accountId = await getAccountIdForRequest(req);
 | 
					    const accountId = await getAccountIdForRequest(req);
 | 
				
			||||||
@ -23,6 +24,11 @@ const viewController: RequestHandler = async (req, res) => {
 | 
				
			|||||||
    }
 | 
					    }
 | 
				
			||||||
    if (config.unlockAllScans) {
 | 
					    if (config.unlockAllScans) {
 | 
				
			||||||
        responseJson.Scans = allScans;
 | 
					        responseJson.Scans = allScans;
 | 
				
			||||||
 | 
					        for (const type of Object.keys(ExportEnemies.avatars)) {
 | 
				
			||||||
 | 
					            if (!responseJson.Scans.find(x => x.type == type)) {
 | 
				
			||||||
 | 
					                responseJson.Scans.push({ type, scans: 9999 });
 | 
				
			||||||
 | 
					            }
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
    res.json(responseJson);
 | 
					    res.json(responseJson);
 | 
				
			||||||
};
 | 
					};
 | 
				
			||||||
 | 
				
			|||||||
										
											
												File diff suppressed because it is too large
												Load Diff
											
										
									
								
							
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user