Add missing quest assort unlocks to questassort.json
Add function to write to console what quest assort unlocks are missing
This commit is contained in:
parent
0c0f48b93a
commit
cad5dcd679
@ -1,6 +1,7 @@
|
|||||||
{
|
{
|
||||||
"assort-missing_loyalty_level_object": "stripQuestAssort(): Assort for Trader {{traderId}} doesn't contain loyal_level_items data, skipping removal of quest assorts",
|
"assort-missing_loyalty_level_object": "stripQuestAssort(): Assort for Trader {{traderId}} doesn't contain loyal_level_items data, skipping removal of quest assorts",
|
||||||
"assort-missing_questassort": "stripQuestAssort(): Assort for Trader: %s doesn't contain a questassort json, skipping removal of quest assorts",
|
"assort-missing_questassort": "stripQuestAssort(): Assort for Trader: %s doesn't contain a questassort json, skipping removal of quest assorts",
|
||||||
|
"assort-missing_quest_assort_unlock": "Unable to find corresponding {{traderName}} quest assort unlock for quest: {{questName}}. Completing this quest will not reward a trader item for purchase",
|
||||||
"baseclass-item_not_found": "Item %s not found in item base cache",
|
"baseclass-item_not_found": "Item %s not found in item base cache",
|
||||||
"baseclass-missing_db_no_cache": "Database was empty, unable to generate an item base cache",
|
"baseclass-missing_db_no_cache": "Database was empty, unable to generate an item base cache",
|
||||||
"bleeding_edge_build": "BLEEDINGEDGE",
|
"bleeding_edge_build": "BLEEDINGEDGE",
|
||||||
|
@ -23,6 +23,7 @@
|
|||||||
"6480625c470acaccd803c172": "6179ac7511973d018217d0b9",
|
"6480625c470acaccd803c172": "6179ac7511973d018217d0b9",
|
||||||
"6480625c470acaccd803c1a5": "59674cd986f7744ab26e32f2",
|
"6480625c470acaccd803c1a5": "59674cd986f7744ab26e32f2",
|
||||||
"6480625d470acaccd803c216": "63a9ae24009ffc6a551631a5",
|
"6480625d470acaccd803c216": "63a9ae24009ffc6a551631a5",
|
||||||
"6480625d470acaccd803c218": "63a9ae24009ffc6a551631a5"
|
"6480625d470acaccd803c218": "63a9ae24009ffc6a551631a5",
|
||||||
|
"UnknownAssortId1": "6179b5b06e9dd54ac275e409"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -21,6 +21,7 @@
|
|||||||
"6480624a470acaccd803af4a": "5c0bbaa886f7746941031d82",
|
"6480624a470acaccd803af4a": "5c0bbaa886f7746941031d82",
|
||||||
"6480624a470acaccd803af60": "639873003693c63d86328f25",
|
"6480624a470acaccd803af60": "639873003693c63d86328f25",
|
||||||
"6480624a470acaccd803af88": "596b455186f77457cb50eccb",
|
"6480624a470acaccd803af88": "596b455186f77457cb50eccb",
|
||||||
"6480624a470acaccd803afec": "647710905320c660d91c15a5"
|
"6480624a470acaccd803afec": "647710905320c660d91c15a5",
|
||||||
|
"UnknownAssortId1": "6179b5eabca27a099552e052"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,37 +1,39 @@
|
|||||||
{
|
{
|
||||||
|
"fail": {},
|
||||||
"started": {
|
"started": {
|
||||||
"6480624f470acaccd803b422": "5ac346cf86f7741d63233a02",
|
"6480624f470acaccd803b422": "5ac346cf86f7741d63233a02",
|
||||||
"6480624f470acaccd803b4ca": "5b47926a86f7747ccc057c15"
|
"6480624f470acaccd803b4ca": "5b47926a86f7747ccc057c15"
|
||||||
},
|
},
|
||||||
"success": {
|
"success": {
|
||||||
"6480624f470acaccd803b3f8": "5ae327c886f7745c7b3f2f3f",
|
|
||||||
"64806252470acaccd803b700": "639872fc93ae507d5858c3a6",
|
|
||||||
"64806250470acaccd803b4e0": "5ac244eb86f7741356335af1",
|
|
||||||
"64806250470acaccd803b501": "5ac23c6186f7741247042bad",
|
|
||||||
"6480624f470acaccd803b3e5": "5ac2428686f77412450b42bf",
|
|
||||||
"6480624f470acaccd803b3c1": "639872f9decada40426d3447",
|
|
||||||
"64806250470acaccd803b4f9": "5ae3267986f7742a413592fe",
|
|
||||||
"6480624f470acaccd803b477": "639872fa9b4fb827b200d8e5",
|
|
||||||
"64806251470acaccd803b69d": "639872fa9b4fb827b200d8e5",
|
|
||||||
"64806253470acaccd803b7f6": "5c1128e386f7746565181106",
|
|
||||||
"64806251470acaccd803b60a": "5c0bde0986f77479cf22c2f8",
|
|
||||||
"64806252470acaccd803b799": "5c139eb686f7747878361a6f",
|
|
||||||
"64806252470acaccd803b725": "5c0be13186f7746f016734aa",
|
|
||||||
"64806250470acaccd803b4fb": "5f04886a3937dc337a6b8238",
|
|
||||||
"64806253470acaccd803b809": "6179b3a12153c15e937d52bc",
|
|
||||||
"64806250470acaccd803b55f": "6179b3a12153c15e937d52bc",
|
|
||||||
"64806253470acaccd803b7d1": "6179b3bdc7560e13d23eeb8d",
|
|
||||||
"6480624e470acaccd803b2f9": "5b47749f86f7746c5d6a5fd4",
|
"6480624e470acaccd803b2f9": "5b47749f86f7746c5d6a5fd4",
|
||||||
"6480624e470acaccd803b313": "5b47749f86f7746c5d6a5fd4",
|
"6480624e470acaccd803b313": "5b47749f86f7746c5d6a5fd4",
|
||||||
"64806252470acaccd803b750": "5b47749f86f7746c5d6a5fd4",
|
"6480624f470acaccd803b3c1": "639872f9decada40426d3447",
|
||||||
"64806253470acaccd803b7dd": "5b47749f86f7746c5d6a5fd4",
|
"6480624f470acaccd803b3e5": "5ac2428686f77412450b42bf",
|
||||||
|
"6480624f470acaccd803b3f8": "5ae327c886f7745c7b3f2f3f",
|
||||||
|
"6480624f470acaccd803b477": "639872fa9b4fb827b200d8e5",
|
||||||
"6480624f470acaccd803b4a7": "5b477b6f86f7747290681823",
|
"6480624f470acaccd803b4a7": "5b477b6f86f7747290681823",
|
||||||
|
"64806250470acaccd803b4e0": "5ac244eb86f7741356335af1",
|
||||||
|
"64806250470acaccd803b4f9": "5ae3267986f7742a413592fe",
|
||||||
|
"64806250470acaccd803b4fb": "5f04886a3937dc337a6b8238",
|
||||||
|
"64806250470acaccd803b501": "5ac23c6186f7741247042bad",
|
||||||
|
"64806250470acaccd803b55f": "6179b3a12153c15e937d52bc",
|
||||||
|
"64806251470acaccd803b60a": "5c0bde0986f77479cf22c2f8",
|
||||||
|
"64806251470acaccd803b652": "63987301e11ec11ff5504036",
|
||||||
|
"64806251470acaccd803b674": "63987301e11ec11ff5504036",
|
||||||
|
"64806251470acaccd803b69d": "639872fa9b4fb827b200d8e5",
|
||||||
|
"64806252470acaccd803b700": "639872fc93ae507d5858c3a6",
|
||||||
|
"64806252470acaccd803b725": "5c0be13186f7746f016734aa",
|
||||||
|
"64806252470acaccd803b738": "5b47825886f77468074618d3",
|
||||||
|
"64806252470acaccd803b750": "5b47749f86f7746c5d6a5fd4",
|
||||||
|
"64806252470acaccd803b799": "5c139eb686f7747878361a6f",
|
||||||
|
"64806253470acaccd803b7d1": "6179b3bdc7560e13d23eeb8d",
|
||||||
|
"64806253470acaccd803b7dd": "5b47749f86f7746c5d6a5fd4",
|
||||||
|
"64806253470acaccd803b7f6": "5c1128e386f7746565181106",
|
||||||
|
"64806253470acaccd803b809": "6179b3a12153c15e937d52bc",
|
||||||
"64806253470acaccd803b83d": "5b477b6f86f7747290681823",
|
"64806253470acaccd803b83d": "5b477b6f86f7747290681823",
|
||||||
"64806253470acaccd803b845": "5b477f7686f7744d1b23c4d2",
|
"64806253470acaccd803b845": "5b477f7686f7744d1b23c4d2",
|
||||||
"64806251470acaccd803b674": "63987301e11ec11ff5504036",
|
"64806253470acaccd803b892": "63966fbeea19ac7ed845db2e",
|
||||||
"64806251470acaccd803b652": "63987301e11ec11ff5504036",
|
"UnknownAssortId1": "639670029113f06a7c3b2377",
|
||||||
"64806252470acaccd803b738": "5b47825886f77468074618d3",
|
"UnknownAssortId2": "63967028c4a91c5cb76abd81"
|
||||||
"64806253470acaccd803b892": "63966fbeea19ac7ed845db2e"
|
}
|
||||||
},
|
|
||||||
"fail": {}
|
|
||||||
}
|
}
|
@ -12,6 +12,7 @@
|
|||||||
"64806246470acaccd803ac5f": "5c1141f386f77430ff393792",
|
"64806246470acaccd803ac5f": "5c1141f386f77430ff393792",
|
||||||
"64806247470acaccd803ac81": "60e71dc0a94be721b065bbfc",
|
"64806247470acaccd803ac81": "60e71dc0a94be721b065bbfc",
|
||||||
"64806247470acaccd803aca1": "5ae4498786f7744bde357695",
|
"64806247470acaccd803aca1": "5ae4498786f7744bde357695",
|
||||||
"64806247470acaccd803acab": "5c10f94386f774227172c572"
|
"64806247470acaccd803acab": "5c10f94386f774227172c572",
|
||||||
|
"UnknownAssortId1": "597a0f5686f774273b74f676"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -27,6 +27,7 @@
|
|||||||
"6480624d470acaccd803b279": "5d25e2ee86f77443e35162ea",
|
"6480624d470acaccd803b279": "5d25e2ee86f77443e35162ea",
|
||||||
"6480624d470acaccd803b292": "5d25c81b86f77443e625dd71",
|
"6480624d470acaccd803b292": "5d25c81b86f77443e625dd71",
|
||||||
"6480624d470acaccd803b2c3": "5d25b6be86f77444001e1b89",
|
"6480624d470acaccd803b2c3": "5d25b6be86f77444001e1b89",
|
||||||
"6480624e470acaccd803b2eb": "63a9b36cc31b00242d28a99f"
|
"6480624e470acaccd803b2eb": "63a9b36cc31b00242d28a99f",
|
||||||
|
"UnknownAssortId1": "64764abcd125ab430a14ccb5"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -15,6 +15,7 @@ import { IGameConfigResponse } from "../models/eft/game/IGameConfigResponse";
|
|||||||
import { IServerDetails } from "../models/eft/game/IServerDetails";
|
import { IServerDetails } from "../models/eft/game/IServerDetails";
|
||||||
import { IAkiProfile } from "../models/eft/profile/IAkiProfile";
|
import { IAkiProfile } from "../models/eft/profile/IAkiProfile";
|
||||||
import { ConfigTypes } from "../models/enums/ConfigTypes";
|
import { ConfigTypes } from "../models/enums/ConfigTypes";
|
||||||
|
import { Traders } from "../models/enums/Traders";
|
||||||
import { ICoreConfig } from "../models/spt/config/ICoreConfig";
|
import { ICoreConfig } from "../models/spt/config/ICoreConfig";
|
||||||
import { IHttpConfig } from "../models/spt/config/IHttpConfig";
|
import { IHttpConfig } from "../models/spt/config/IHttpConfig";
|
||||||
import { ILocationConfig } from "../models/spt/config/ILocationConfig";
|
import { ILocationConfig } from "../models/spt/config/ILocationConfig";
|
||||||
@ -133,6 +134,8 @@ export class GameController
|
|||||||
|
|
||||||
this.saveActiveModsToProfile(fullProfile);
|
this.saveActiveModsToProfile(fullProfile);
|
||||||
|
|
||||||
|
this.validateQuestAssortUnlocksExist();
|
||||||
|
|
||||||
if (pmcProfile.Info)
|
if (pmcProfile.Info)
|
||||||
{
|
{
|
||||||
this.addPlayerToPMCNames(pmcProfile);
|
this.addPlayerToPMCNames(pmcProfile);
|
||||||
@ -150,6 +153,35 @@ export class GameController
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
protected validateQuestAssortUnlocksExist(): void
|
||||||
|
{
|
||||||
|
const db = this.databaseServer.getTables();
|
||||||
|
const traders = db.traders;
|
||||||
|
const quests = db.templates.quests;
|
||||||
|
for (const traderId of Object.values(Traders))
|
||||||
|
{
|
||||||
|
const traderData = traders[traderId];
|
||||||
|
const traderAssorts = traderData?.assort;
|
||||||
|
if (!traderAssorts)
|
||||||
|
{
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Merge started/success/fail quest assorts into one dictionary
|
||||||
|
const mergedQuestAssorts = Object.assign({}, traderData.questassort["started"], traderData.questassort["success"], traderData.questassort["fail"]);
|
||||||
|
|
||||||
|
// loop over all assorts for trader
|
||||||
|
for (const [assortKey, questKey] of Object.entries(mergedQuestAssorts))
|
||||||
|
{
|
||||||
|
// Does assort key exist in trader assort file
|
||||||
|
if (!traderAssorts.loyal_level_items[assortKey])
|
||||||
|
{
|
||||||
|
this.logger.warning(this.localisationService.getText("assort-missing_quest_assort_unlocks", {traderName: Object.keys(Traders)[Object.values(Traders).indexOf(traderId)], questName: quests[questKey].QuestName}));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* BSG have two values for shotgun dispersion, we make sure both have the same value
|
* BSG have two values for shotgun dispersion, we make sure both have the same value
|
||||||
*/
|
*/
|
||||||
|
@ -27,7 +27,7 @@ export class AssortHelper
|
|||||||
* @param pmcProfile Player profile
|
* @param pmcProfile Player profile
|
||||||
* @param traderId Traders id the assort belongs to
|
* @param traderId Traders id the assort belongs to
|
||||||
* @param traderAssorts All assort items from same trader
|
* @param traderAssorts All assort items from same trader
|
||||||
* @param mergedQuestAssorts Dict of quest assort to quest id unlocks for all traders
|
* @param mergedQuestAssorts Dict of quest assort to quest id unlocks for all traders (key = started/failed/complete)
|
||||||
* @returns Assort items minus locked quest assorts
|
* @returns Assort items minus locked quest assorts
|
||||||
*/
|
*/
|
||||||
public stripLockedQuestAssort(pmcProfile: IPmcData, traderId: string, traderAssorts: ITraderAssort, mergedQuestAssorts: Record<string, Record<string, string>>, flea = false): ITraderAssort
|
public stripLockedQuestAssort(pmcProfile: IPmcData, traderId: string, traderAssorts: ITraderAssort, mergedQuestAssorts: Record<string, Record<string, string>>, flea = false): ITraderAssort
|
||||||
|
Loading…
Reference in New Issue
Block a user