Skip to main content
The Deno 2 Release Candidate is here
Learn more
class CustomizationController
import { CustomizationController } from "https://deno.land/x/sptaki@1.2.0/controllers/CustomizationController.d.ts";

Constructors

new
CustomizationController(
logger: ILogger,
eventOutputHolder: EventOutputHolder,
databaseServer: DatabaseServer,
saveServer: SaveServer,
localisationService: LocalisationService,
profileHelper: ProfileHelper,
)

Properties

protected
readonly
clothingIds: { lowerParentId: string; upperParentId: string; }
protected
databaseServer: DatabaseServer
protected
eventOutputHolder: EventOutputHolder
protected
localisationService: LocalisationService
protected
logger: ILogger
protected
profileHelper: ProfileHelper
protected
saveServer: SaveServer

Methods

protected
getAllTraderSuits(sessionID: string): ISuit[]
protected
getTraderClothingOffer(sessionId: string, offerId: string): ISuit
protected
outfitAlreadyPurchased(suitId: string, sessionID: string): boolean

Has an outfit been purchased by a player

protected
payForClothingItem(
sessionId: string,
pmcData: IPmcData,
clothingItem: ClothingItem,
): void

Update output object and player profile with purchase details for single piece of clothing

protected
payForClothingItems(
sessionId: string,
pmcData: IPmcData,
clothingItems: ClothingItem[],
): void

Update output object and player profile with purchase details

buyClothing(
pmcData: IPmcData,
buyClothingRequest: IBuyClothingRequestData,
sessionId: string,
): IItemEventRouterResponse

Handle CustomizationBuy event Purchase/unlock a clothing item from a trader

getTraderSuits(traderID: string, sessionID: string): ISuit[]

Get purchasable clothing items from trader that match players side (usec/bear)

wearClothing(
pmcData: IPmcData,
wearClothingRequest: IWearClothingRequestData,
sessionID: string,
): IItemEventRouterResponse

Handle CustomizationWear event Equip one to many clothing items to player