mirror of
https://github.com/sp-tarkov/server.git
synced 2025-02-12 16:50:43 -05:00
Formatting changes
This commit is contained in:
parent
9b7c31e36f
commit
2527823208
@ -1061,15 +1061,12 @@ export class QuestHelper {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Find hideout craft id for the specified quest reward
|
* Find hideout craft for the specified quest reward
|
||||||
* @param craftUnlockReward
|
* @param craftUnlockReward Reward item from quest with craft unlock details
|
||||||
* @param questDetails
|
* @param questDetails Quest with craft unlock reward
|
||||||
* @returns
|
* @returns Hideout craft
|
||||||
*/
|
*/
|
||||||
public getRewardProductionMatch(
|
public getRewardProductionMatch(craftUnlockReward: IQuestReward, questDetails: IQuest): IHideoutProduction[] {
|
||||||
craftUnlockReward: IQuestReward,
|
|
||||||
questDetails: IQuest,
|
|
||||||
): IHideoutProduction[] {
|
|
||||||
// Get hideout crafts and find those that match by areatype/required level/end product tpl - hope for just one match
|
// Get hideout crafts and find those that match by areatype/required level/end product tpl - hope for just one match
|
||||||
const craftingRecipes = this.databaseService.getHideout().production.recipes;
|
const craftingRecipes = this.databaseService.getHideout().production.recipes;
|
||||||
|
|
||||||
@ -1425,20 +1422,18 @@ export class QuestHelper {
|
|||||||
/**
|
/**
|
||||||
* Create a clone of the given quest array with the rewards updated to reflect the
|
* Create a clone of the given quest array with the rewards updated to reflect the
|
||||||
* given game version
|
* given game version
|
||||||
*
|
* @param quests List of quests to check
|
||||||
* @param quests The list of quests to check
|
* @param gameVersion Game version of the profile
|
||||||
* @param gameVersion The game version of the profile
|
* @returns Array of IQuest objects with the rewards filtered correctly for the game version
|
||||||
* @returns array of IQuest objects with the rewards filtered correctly for the game version
|
|
||||||
*/
|
*/
|
||||||
protected updateQuestsForGameEdition(quests: IQuest[], gameVersion: string)
|
protected updateQuestsForGameEdition(quests: IQuest[], gameVersion: string): IQuest[] {
|
||||||
{
|
|
||||||
const modifiedQuests = this.cloner.clone(quests);
|
const modifiedQuests = this.cloner.clone(quests);
|
||||||
for (const quest of modifiedQuests)
|
for (const quest of modifiedQuests) {
|
||||||
{
|
|
||||||
// Remove any reward that doesn't pass the game edition check
|
// Remove any reward that doesn't pass the game edition check
|
||||||
for (const rewardType of Object.keys(quest.rewards))
|
for (const rewardType of Object.keys(quest.rewards)) {
|
||||||
{
|
quest.rewards[rewardType] = quest.rewards[rewardType].filter((reward) =>
|
||||||
quest.rewards[rewardType] = quest.rewards[rewardType].filter(reward => this.questRewardIsForGameEdition(reward, gameVersion));
|
this.questRewardIsForGameEdition(reward, gameVersion),
|
||||||
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1447,8 +1442,8 @@ export class QuestHelper {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Return a list of quests that would fail when supplied quest is completed
|
* Return a list of quests that would fail when supplied quest is completed
|
||||||
* @param completedQuestId quest completed id
|
* @param completedQuestId Quest completed id
|
||||||
* @returns array of IQuest objects
|
* @returns Array of IQuest objects
|
||||||
*/
|
*/
|
||||||
protected getQuestsFromProfileFailedByCompletingQuest(completedQuestId: string, pmcProfile: IPmcData): IQuest[] {
|
protected getQuestsFromProfileFailedByCompletingQuest(completedQuestId: string, pmcProfile: IPmcData): IQuest[] {
|
||||||
const questsInDb = this.getQuestsFromDb();
|
const questsInDb = this.getQuestsFromDb();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user