forked from OpenWF/SpaceNinjaServer
		
	feat: unlockAllFlavourItems (#149)
This commit is contained in:
		
							parent
							
								
									eb1f472d4c
								
							
						
					
					
						commit
						f019d36209
					
				@ -10,5 +10,6 @@
 | 
				
			|||||||
  "unlockAllQuests": true,
 | 
					  "unlockAllQuests": true,
 | 
				
			||||||
  "infiniteResources": true,
 | 
					  "infiniteResources": true,
 | 
				
			||||||
  "unlockallShipFeatures": true,
 | 
					  "unlockallShipFeatures": true,
 | 
				
			||||||
  "unlockAllShipDecorations": true
 | 
					  "unlockAllShipDecorations": true,
 | 
				
			||||||
 | 
					  "unlockAllFlavourItems": true
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
				
			|||||||
@ -5,9 +5,10 @@ import { Request, RequestHandler, Response } from "express";
 | 
				
			|||||||
import config from "@/config.json";
 | 
					import config from "@/config.json";
 | 
				
			||||||
import allMissions from "@/static/fixed_responses/allMissions.json";
 | 
					import allMissions from "@/static/fixed_responses/allMissions.json";
 | 
				
			||||||
import allQuestKeys from "@/static/fixed_responses/allQuestKeys.json";
 | 
					import allQuestKeys from "@/static/fixed_responses/allQuestKeys.json";
 | 
				
			||||||
import allShipDecorations from "@/static/fixed_responses/shipDecorations.json";
 | 
					import allShipDecorations from "@/static/fixed_responses/allShipDecorations.json";
 | 
				
			||||||
 | 
					import allFlavourItems from "@/static/fixed_responses/allFlavourItems.json";
 | 
				
			||||||
import { ILoadoutDatabase } from "@/src/types/saveLoadoutTypes";
 | 
					import { ILoadoutDatabase } from "@/src/types/saveLoadoutTypes";
 | 
				
			||||||
import { IShipInventory } from "@/src/types/inventoryTypes/inventoryTypes";
 | 
					import { IShipInventory, IFlavourItem } from "@/src/types/inventoryTypes/inventoryTypes";
 | 
				
			||||||
 | 
					
 | 
				
			||||||
const inventoryController: RequestHandler = async (request: Request, response: Response) => {
 | 
					const inventoryController: RequestHandler = async (request: Request, response: Response) => {
 | 
				
			||||||
    const accountId = request.query.accountId;
 | 
					    const accountId = request.query.accountId;
 | 
				
			||||||
@ -43,10 +44,8 @@ const inventoryController: RequestHandler = async (request: Request, response: R
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
    if (config.unlockAllMissions) inventoryResponse.Missions = allMissions;
 | 
					    if (config.unlockAllMissions) inventoryResponse.Missions = allMissions;
 | 
				
			||||||
    if (config.unlockAllQuests) inventoryResponse.QuestKeys = allQuestKeys;
 | 
					    if (config.unlockAllQuests) inventoryResponse.QuestKeys = allQuestKeys;
 | 
				
			||||||
 | 
					    if (config.unlockAllShipDecorations) inventoryResponse.ShipDecorations = allShipDecorations;
 | 
				
			||||||
    if (config.unlockAllShipDecorations) {
 | 
					    if (config.unlockAllFlavourItems) inventoryResponse.FlavourItems = allFlavourItems satisfies IFlavourItem[];
 | 
				
			||||||
        inventoryResponse.ShipDecorations = allShipDecorations;
 | 
					 | 
				
			||||||
    }
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
    response.json(inventoryResponse);
 | 
					    response.json(inventoryResponse);
 | 
				
			||||||
};
 | 
					};
 | 
				
			||||||
 | 
				
			|||||||
							
								
								
									
										1951
									
								
								static/fixed_responses/allFlavourItems.json
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										1951
									
								
								static/fixed_responses/allFlavourItems.json
									
									
									
									
									
										Normal file
									
								
							
										
											
												File diff suppressed because it is too large
												Load Diff
											
										
									
								
							
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user