From 15a83a0da373cb2450bcdf247f2441eeeaa8972c Mon Sep 17 00:00:00 2001 From: Dev Date: Thu, 8 Aug 2024 22:59:07 +0100 Subject: [PATCH] Removed fuel debuffs when completing wall construction --- project/src/controllers/HideoutController.ts | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/project/src/controllers/HideoutController.ts b/project/src/controllers/HideoutController.ts index 117d73e8..484b6fd7 100644 --- a/project/src/controllers/HideoutController.ts +++ b/project/src/controllers/HideoutController.ts @@ -28,6 +28,7 @@ import { IAddItemDirectRequest } from "@spt/models/eft/inventory/IAddItemDirectR import { IAddItemsDirectRequest } from "@spt/models/eft/inventory/IAddItemsDirectRequest"; import { IItemEventRouterResponse } from "@spt/models/eft/itemEvent/IItemEventRouterResponse"; import { BackendErrorCodes } from "@spt/models/enums/BackendErrorCodes"; +import { BonusType } from "@spt/models/enums/BonusType"; import { ConfigTypes } from "@spt/models/enums/ConfigTypes"; import { HideoutAreas } from "@spt/models/enums/HideoutAreas"; import { SkillTypes } from "@spt/models/enums/SkillTypes"; @@ -224,6 +225,13 @@ export class HideoutController { this.checkAndUpgradeWall(pmcData); } + // Cleanup temporary fuel usage debuffs if wall is complete + if (profileHideoutArea.type === HideoutAreas.EMERGENCY_WALL && profileHideoutArea.level === 6) + { + // Get everything except specific fuel consumption debuffs + pmcData.Bonuses = pmcData.Bonuses.filter(bonus => bonus.type !== BonusType.FUEL_CONSUMPTION && bonus.value === 5); + } + // Add Skill Points Per Area Upgrade this.profileHelper.addSkillPointsToPlayer( pmcData,