diff --git a/project/src/controllers/GameController.ts b/project/src/controllers/GameController.ts index cb8439e1..f32fed06 100644 --- a/project/src/controllers/GameController.ts +++ b/project/src/controllers/GameController.ts @@ -203,6 +203,7 @@ export class GameController this.hideoutHelper.setHideoutImprovementsToCompleted(pmcProfile); this.hideoutHelper.unlockHideoutWallInProfile(pmcProfile); this.profileFixerService.addMissingIdsToBonuses(pmcProfile); + this.profileFixerService.fixBitcoinProductionTime(pmcProfile); } this.logProfileDetails(fullProfile); diff --git a/project/src/helpers/HideoutHelper.ts b/project/src/helpers/HideoutHelper.ts index 7793db80..bbd98544 100644 --- a/project/src/helpers/HideoutHelper.ts +++ b/project/src/helpers/HideoutHelper.ts @@ -595,7 +595,7 @@ export class HideoutHelper * @param applyHideoutManagementBonus should the hideout mgmt bonus be appled to the calculation * @returns Items craft time with bonuses subtracted */ - protected getAdjustedCraftTimeWithSkills( + public getAdjustedCraftTimeWithSkills( pmcData: IPmcData, recipeId: string, applyHideoutManagementBonus = false, @@ -613,13 +613,19 @@ export class HideoutHelper return undefined; } - // Seconds to deduct from crafts total time - let timeReductionSeconds = this.getSkillProductionTimeReduction( - pmcData, - recipe.productionTime, - SkillTypes.CRAFTING, - globalSkillsDb.Crafting.ProductionTimeReductionPerLevel, - ); + let timeReductionSeconds = 0; + + // Bitcoin farm is excluded from crafting skill cooldown reduction + if (recipeId !== HideoutHelper.bitcoinFarm) + { + // Seconds to deduct from crafts total time + timeReductionSeconds += this.getSkillProductionTimeReduction( + pmcData, + recipe.productionTime, + SkillTypes.CRAFTING, + globalSkillsDb.Crafting.ProductionTimeReductionPerLevel, + ); + } // Some crafts take into account hideout management, e.g. fuel, water/air filters if (applyHideoutManagementBonus) diff --git a/project/src/services/ProfileFixerService.ts b/project/src/services/ProfileFixerService.ts index 6824fd41..852626d3 100644 --- a/project/src/services/ProfileFixerService.ts +++ b/project/src/services/ProfileFixerService.ts @@ -1311,6 +1311,21 @@ export class ProfileFixerService } } + /** + * 3.8.0 utilized the wrong ProductionTime for bitcoin, fix it if it's found + */ + public fixBitcoinProductionTime(pmcProfile: IPmcData): void + { + const btcProd = pmcProfile.Hideout?.Production[HideoutHelper.bitcoinFarm]; + if (btcProd) + { + btcProd.ProductionTime = this.hideoutHelper.getAdjustedCraftTimeWithSkills( + pmcProfile, + HideoutHelper.bitcoinProductionId, + ); + } + } + /** * At some point the property name was changed,migrate data across to new name * @param pmcProfile Profile to migrate improvements in