Skip to main content
Deno 2 is finally here 🎉️
Learn more
class HideoutController
import { HideoutController } from "https://deno.land/x/sptaki@1.2.0/controllers/mod.ts";

Constructors

new
HideoutController(
logger: ILogger,
hashUtil: HashUtil,
timeUtil: TimeUtil,
databaseServer: DatabaseServer,
randomUtil: RandomUtil,
inventoryHelper: InventoryHelper,
itemHelper: ItemHelper,
saveServer: SaveServer,
playerService: PlayerService,
presetHelper: PresetHelper,
paymentHelper: PaymentHelper,
eventOutputHolder: EventOutputHolder,
httpResponse: HttpResponseUtil,
profileHelper: ProfileHelper,
hideoutHelper: HideoutHelper,
scavCaseRewardGenerator: ScavCaseRewardGenerator,
localisationService: LocalisationService,
profileActivityService: ProfileActivityService,
configServer: ConfigServer,
jsonUtil: JsonUtil,
fenceService: FenceService,
)

Properties

protected
configServer: ConfigServer
protected
databaseServer: DatabaseServer
protected
eventOutputHolder: EventOutputHolder
protected
fenceService: FenceService
protected
hashUtil: HashUtil
protected
hideoutConfig: IHideoutConfig
protected
hideoutHelper: HideoutHelper
protected
httpResponse: HttpResponseUtil
protected
inventoryHelper: InventoryHelper
protected
itemHelper: ItemHelper
protected
jsonUtil: JsonUtil
protected
localisationService: LocalisationService
protected
logger: ILogger
protected
paymentHelper: PaymentHelper
protected
playerService: PlayerService
protected
presetHelper: PresetHelper
protected
profileActivityService: ProfileActivityService
protected
profileHelper: ProfileHelper
protected
randomUtil: RandomUtil
protected
saveServer: SaveServer
protected
scavCaseRewardGenerator: ScavCaseRewardGenerator
protected
timeUtil: TimeUtil

Methods

protected
addContainerImprovementToProfile(
sessionID: string,
pmcData: IPmcData,
profileParentHideoutArea: HideoutArea,
dbHideoutArea: IHideoutArea,
hideoutStage: Stage,
): void
protected
addContainerUpgradeToClientOutput(
sessionID: string,
areaType: HideoutAreas,
hideoutDbData: IHideoutArea,
hideoutStage: Stage,
): void
protected
addScavCaseRewardsToProfile(
pmcData: IPmcData,
rewards: Product[],
recipeId: string,
): void

Add generated scav case rewards to player profile

protected
addUpdateInventoryItemToProfile(
pmcData: IPmcData,
dbHideoutData: IHideoutArea,
hideoutStage: Stage,
): void

Add an inventory item to profile from a hideout area stage data

protected
checkAndUpgradeWall(pmcData: IPmcData): void

Upgrade wall status to visible in profile if medstation/water collector are both level 1

Get the "CounterHoursCrafting" TaskConditionCounter from a profile

protected
getScavCaseTime(pmcData: IPmcData, productionTime: number): number

Adjust scav case time based on fence standing

protected
handleRecipe(
sessionID: string,
pmcData: IPmcData,
): void

Take recipe-type production out of hideout area and place into player inventory

protected
handleScavCase(
sessionID: string,
pmcData: IPmcData,
): void

Handles generating case rewards and sending to player inventory

protected
removeResourceFromArea(
sessionID: string,
pmcData: IPmcData,
removeResourceRequest: IHideoutTakeItemOutRequestData,
hideoutArea: HideoutArea,
): IItemEventRouterResponse

Find resource item in hideout area, add copy to player inventory, remove Item from hideout slot

Handle client/game/profile/items/moving HideoutCancelProductionCommand

Start production of continuously created item

getQteList(sessionId: string): IQteData[]

Get quick time event list for hideout // TODO - implement this

handleQTEEventOutcome(
sessionId: string,
pmcData: IPmcData,
): void

Handle HideoutQuickTimeEvent on client/game/profile/items/moving Called after completing workout at gym

Handle client/game/profile/items/moving - HideoutImproveArea

putItemsInAreaSlots(
pmcData: IPmcData,
addItemToHideoutRequest: IHideoutPutItemInRequestData,
sessionID: string,
): IItemEventRouterResponse

Handle HideoutPutItemsInAreaSlots Create item in hideout slot item array, remove item from player inventory

recordShootingRangePoints(
sessionId: string,
pmcData: IPmcData,
): void

Record a high score from the shooting range into a player profiles overallcounters

Handle HideoutScavCaseProductionStart event Handles event after clicking 'start' on the scav case hideout page

Handle HideoutSingleProductionStart event Start production for an item from hideout area

startUpgrade(
pmcData: IPmcData,
sessionID: string,
): void

Handle HideoutUpgrade event Start a hideout area upgrade

Handle HideoutTakeItemsFromAreaSlots event Remove item from hideout area and place into player inventory

Handle HideoutTakeProduction event Take completed item out of hideout area and place into player inventory

Handle HideoutToggleArea event Toggle area on/off

update(): void

Function called every x seconds as part of onUpdate event

upgradeComplete(
pmcData: IPmcData,
sessionID: string,
): void

Handle HideoutUpgradeComplete event Complete a hideout area upgrade

Static Properties

protected
nameTaskConditionCountersCrafting: string

Key used in TaskConditionCounters array